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

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) { export function getInvProductOrderInfo(params) {
return axios({ return axios({
url: "/spms/inv/product/getInvProductOrderInfo", 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="serialNo" width="150"></el-table-column>
<el-table-column label="计量单位" prop="measname" 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="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="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="manufactory" width="150"></el-table-column>
<el-table-column label="供应商" prop="supName" 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 {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace"; import {getInvSpaceList} from "@/api/inventory/invSpace";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {bindInvSpace, getInvProductInfo} from "@/api/inventory/invPlace"; import {bindInvSpace, getInvPlaceOrderDetailList, getCheckInvProductInfo} from "@/api/inventory/invPlace";
export default { export default {
props: { props: {
@ -125,6 +126,7 @@ export default {
code: null, code: null,
}, },
list: [], list: [],
orderId: null,
codeArray: [], codeArray: [],
invList: [], invList: [],
spaceList: [], spaceList: [],
@ -153,14 +155,12 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.list.forEach((item) => {
this.codeArray.push(item.code);
});
let params = { let params = {
invCode: this.formData.invCode, invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode, invSpaceCode: this.formData.invSpaceCode,
type: 1, // changeSpaceCode: this.formData.changeSpaceCode,
codeArray: this.codeArray type: 3, //
orderId: this.orderId,
}; };
bindInvSpace(params).then((res) => { bindInvSpace(params).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
@ -196,7 +196,6 @@ export default {
item.invSpaceName = null; item.invSpaceName = null;
}) })
this.getSpaceList(); this.getSpaceList();
this.getChangeSpaceList();
}, },
// //
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
@ -239,6 +238,7 @@ export default {
invProduct.invSpaceCode = item.code; invProduct.invSpaceCode = item.code;
invProduct.invSpaceName = item.name; invProduct.invSpaceName = item.name;
}); });
this.getChangeSpaceList();
}, },
handleChangeSelect(item) { handleChangeSelect(item) {
@ -276,7 +276,14 @@ export default {
status: 1 status: 1
}; };
getInvSpaceList(params).then((res) => { 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; return;
} }
if (isBlank(this.formData.changeSpaceName)) {
this.$message.error('变更后货位不能为空');
return;
}
this.formData.code = this.formData.code.trim(); this.formData.code = this.formData.code.trim();
if (this.$isBlank(this.formData.code)) return; if (this.$isBlank(this.formData.code)) return;
this.getInvProductInfo(this.formData.code); this.getInvProductInfo(this.formData.code);
@ -302,16 +314,21 @@ export default {
}, },
getInvProductInfo(code) { getInvProductInfo(code) {
let params = { let params = {
orderId: this.orderId,
invCode: this.formData.invCode, invCode: this.formData.invCode,
code: code invSpaceCode: this.formData.invSpaceCode,
changeSpaceCode: this.formData.changeSpaceCode,
code: this.formData.code,
type:3
}; };
getInvProductInfo(params).then((res) => { getCheckInvProductInfo(params).then((res) => {
if (res.data !== null) { if (res.code == 20000) {
res.data.forEach((item) => { this.orderId=res.data;
this.list.push(item); getInvPlaceOrderDetailList({orderId:this.orderId}).then((res) => {
this.list=res.data.list;
}); });
} else { } else {
this.$message.warning("未查询到产品信息"); this.$message.warning(res.message);
} }
}) })
}, },

Loading…
Cancel
Save