物质摆放变更功能代码提交

prod
郑明梁 2 years ago
parent 20f21696e7
commit cd68fd88d9

@ -40,6 +40,14 @@ export function getInvProductInfo(params) {
});
}
export function getCheckInvProductInfo(params) {
return axios({
url: "/spms/inv/product/getCheckInvProductInfo",
method: "get",
params: params
});
}
export function getInvProductOrderInfo(params) {
return axios({
url: "/spms/inv/product/getInvProductOrderInfo",

@ -93,6 +93,7 @@
<el-table-column label="序列号" prop="serialNo" width="150"></el-table-column>
<el-table-column label="计量单位" prop="measname" width="150"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="150"></el-table-column>
<el-table-column label="数量" prop="count" width="150"></el-table-column>
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150" show-tooltip-when-overflow></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" width="150"></el-table-column>
<el-table-column label="供应商" prop="supName" width="150"></el-table-column>
@ -104,7 +105,7 @@
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {isBlank} from "@/utils/strUtil";
import {bindInvSpace, getInvProductInfo} from "@/api/inventory/invPlace";
import {bindInvSpace, getInvPlaceOrderDetailList, getCheckInvProductInfo} from "@/api/inventory/invPlace";
export default {
props: {
@ -125,6 +126,7 @@ export default {
code: null,
},
list: [],
orderId: null,
codeArray: [],
invList: [],
spaceList: [],
@ -153,14 +155,12 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.list.forEach((item) => {
this.codeArray.push(item.code);
});
let params = {
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode,
type: 1, //
codeArray: this.codeArray
changeSpaceCode: this.formData.changeSpaceCode,
type: 3, //
orderId: this.orderId,
};
bindInvSpace(params).then((res) => {
if (res.code === 20000) {
@ -196,7 +196,6 @@ export default {
item.invSpaceName = null;
})
this.getSpaceList();
this.getChangeSpaceList();
},
//
querySearchAsync(queryString, cb) {
@ -239,6 +238,7 @@ export default {
invProduct.invSpaceCode = item.code;
invProduct.invSpaceName = item.name;
});
this.getChangeSpaceList();
},
handleChangeSelect(item) {
@ -276,7 +276,14 @@ export default {
status: 1
};
getInvSpaceList(params).then((res) => {
this.changeSpaceList = res.data.list || [];
var list=[];
console.log(this.formData.invSpaceName)
for (var i=0;i<res.data.list.length;i++){
if(res.data.list[i].name!=this.formData.invSpaceName){
list.push(res.data.list[i]);
}
}
this.changeSpaceList = list || [];
})
},
@ -295,6 +302,11 @@ export default {
return;
}
if (isBlank(this.formData.changeSpaceName)) {
this.$message.error('变更后货位不能为空');
return;
}
this.formData.code = this.formData.code.trim();
if (this.$isBlank(this.formData.code)) return;
this.getInvProductInfo(this.formData.code);
@ -302,16 +314,21 @@ export default {
},
getInvProductInfo(code) {
let params = {
orderId: this.orderId,
invCode: this.formData.invCode,
code: code
invSpaceCode: this.formData.invSpaceCode,
changeSpaceCode: this.formData.changeSpaceCode,
code: this.formData.code,
type:3
};
getInvProductInfo(params).then((res) => {
if (res.data !== null) {
res.data.forEach((item) => {
this.list.push(item);
getCheckInvProductInfo(params).then((res) => {
if (res.code == 20000) {
this.orderId=res.data;
getInvPlaceOrderDetailList({orderId:this.orderId}).then((res) => {
this.list=res.data.list;
});
} else {
this.$message.warning("未查询到产品信息");
this.$message.warning(res.message);
}
})
},

Loading…
Cancel
Save