作者 小范

仓库场站管理功能完善

... ... @@ -21,6 +21,9 @@ export const delStation = params => { return axios.get(`${baseUrl}/delStation`,
export const addStation = params => { return http.post(`${baseUrl}/addStation`,params)};
export const ediStation = params => { return http.post(`${baseUrl}/ediStation`,params)};
export const selectByStationno = params => { return axios.get(`${baseUrl}/selectByStationno`, { params: params }); };
//仓库管理
export const selectHouses = params => { return axios.get(`${baseUrl1}/selectHouses`, { params: params }); };
... ... @@ -29,6 +32,9 @@ export const delHouse = params => { return axios.get(`${baseUrl1}/delHouse`, { p
export const addHouse = params => { return http.post(`${baseUrl1}/addHouse`,params)};
export const ediHouse = params => { return http.post(`${baseUrl1}/ediHouse`,params)};
export const selectByHouseid = params => { return axios.get(`${baseUrl1}/selectByHouseid`, { params: params }); };
//库存变更记录
export const selectInventroyrecords = params => { return axios.get(`${baseUrl2}/selectInventroyrecords`, { params: params }); };
... ... @@ -61,3 +67,5 @@ export const delArea = params => { return axios.get(`${baseUrl5}/delArea`, { par
export const addArea = params => { return http.post(`${baseUrl5}/addArea`,params)};
export const ediArea = params => { return http.post(`${baseUrl5}/ediArea`,params)};
export const selectByAreaid = params => { return axios.get(`${baseUrl5}/selectByAreaid`, { params: params }); };
... ...
... ... @@ -80,32 +80,32 @@
<el-table-column
prop="xstart"
label="库区X起始位"
width="80">
width="90">
</el-table-column>
<el-table-column
prop="xend"
label="库区X结束位"
width="80">
width="90">
</el-table-column>
<el-table-column
prop="ystart"
label="库区Y起始位"
width="80">
width="90">
</el-table-column>
<el-table-column
prop="yend"
label="库区Y结束位"
width="80">
width="90">
</el-table-column>
<el-table-column
prop="zstart"
label="库区Z起始位"
width="80">
width="90">
</el-table-column>
<el-table-column
prop="zend"
label="库区Z结束位"
width="80">
width="90">
</el-table-column>
<el-table-column
fixed="right"
... ... @@ -135,6 +135,27 @@
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="houseid">
<!-- <el-input v-model="addForm.houseid" autocomplete="off" size="small" style="width: 300px">-->
<!-- <template slot="prepend">所属仓库</template>-->
<!-- </el-input>-->
<el-select v-model="addForm.houseid"
filterable
allow-create
default-first-option
remote size="small"
:remote-method="getHouseid"
:loading="loading" placeholder="请输入所属仓库" style="width: 300px">
<el-option
v-for="item in houseids"
:key="item.houseid"
:label="item.houseid"
:value="item.houseid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="areano">
<el-input v-model="addForm.areano" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">库区编号</template>
... ... @@ -148,13 +169,7 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="houseid">
<el-input v-model="addForm.houseid" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">所属仓库</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
... ... @@ -269,10 +284,16 @@
</template>
<script>
import {selectAreas,delArea,addArea,ediArea} from '../../api/consigner/station';
import {
selectAreas,
delArea,
addArea,
ediArea,
selectByHouseid
} from '../../api/consigner/station';
export default {
name: "area",
// name: "area",
data() {
return {
queryInfo: {
... ... @@ -318,6 +339,9 @@
remark3:'',
remark4:'',
},
houseids:[],
houseid: '',
loading:false,
formLabelWidth: '120px',
rules: {
userName: [
... ... @@ -341,6 +365,22 @@
}
},
methods: {
//获取所属仓库
getHouseid:function(query){
this.houseids=[];
this.loading = true;
selectByHouseid({houseid:query}).then(res =>{
if (res !== '') {
setTimeout(() => {
this.loading = false;
this.houseids=res.data.data;
}, 200);
} else {
this.houseids = [];
}
});
},
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
... ...
... ... @@ -170,9 +170,23 @@
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="stationid">
<el-input v-model="addForm.stationid" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">场站&emsp;id</template>
</el-input>
<!-- <el-input v-model="addForm.stationid" autocomplete="off" size="small" style="width: 260px">-->
<!-- <template slot="prepend">场站&emsp;id</template>-->
<!-- </el-input>-->
<el-select v-model="addForm.stationid"
filterable
allow-create
default-first-option
remote autocomplete="off" size="small"
:remote-method="getStationno"
:loading="loading" placeholder="请输入场站id" style="width: 260px">
<el-option
v-for="item in stationids"
:key="item.stationno"
:label="item.stationno"
:value="item.stationno">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -246,7 +260,7 @@
</template>
<script>
import {selectHouses,delHouse,addHouse,ediHouse} from '../../api/consigner/station';
import {selectHouses,delHouse,addHouse,ediHouse,selectByStationno} from '../../api/consigner/station';
export default {
name: "house",
... ... @@ -290,6 +304,9 @@
remark2:'',
remark3:''
},
stationids:[],
stationno: '',
loading:false,
formLabelWidth: '220px',
rules: {
userName: [
... ... @@ -313,6 +330,23 @@
}
},
methods: {
//获取场站ID
getStationno:function(query){
this.stationids=[];
let params={stationno:query};
this.loading = true;
selectByStationno(params).then(res =>{
if (res !== '') {
setTimeout(() => {
this.loading = false;
this.stationids=res.data.data;
}, 200);
} else {
this.stationids = [];
}
});
},
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
... ...
... ... @@ -122,9 +122,23 @@
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="areaid">
<el-input v-model="addForm.areaid" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">所属库区</template>
</el-input>
<!-- <el-input v-model="addForm.areaid" autocomplete="off" size="small" style="width: 260px">-->
<!-- <template slot="prepend">所属库区</template>-->
<!-- </el-input>-->
<el-select v-model="addForm.areaid"
filterable
allow-create
default-first-option
remote size="small"
:remote-method="getArea"
:loading="loading" placeholder="请输入所属库区" style="width: 260px">
<el-option
v-for="item in areaids"
:key="item.areano"
:label="item.areano"
:value="item.areano">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
... ... @@ -195,7 +209,13 @@
</template>
<script>
import {selectLocations,delLocation,addLocation,ediLocation} from '../../api/consigner/station';
import {
selectLocations,
delLocation,
addLocation,
ediLocation,
selectByAreaid
} from '../../api/consigner/station';
export default {
name: "locations",
... ... @@ -239,6 +259,9 @@
remark3:'',
remark4:'',
},
areaids:[],
areano: '',
loading:false,
formLabelWidth: '220px',
rules: {
userName: [
... ... @@ -262,6 +285,22 @@
}
},
methods: {
//获取所属库区
getArea:function(query){
this.areaids=[];
this.loading = true;
selectByAreaid({areano:query}).then(res =>{
if (res !== '') {
setTimeout(() => {
this.loading = false;
this.areaids=res.data.data;
}, 200);
} else {
this.areaids = [];
}
});
},
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
... ...