|
|
|
@ -343,8 +343,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.spaceList = res.data.list || [];
|
|
|
|
|
});
|
|
|
|
|
this.formData.invSpaceCode=JSON.parse(localStorage.getItem('key'));
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
invSpaceChange() {
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
@ -358,7 +356,6 @@ export default {
|
|
|
|
|
invSpaceCode: this.formData.invSpaceCode,
|
|
|
|
|
countType: this.countType
|
|
|
|
|
};
|
|
|
|
|
localStorage.setItem('key', JSON.stringify(this.formData.invSpaceCode));
|
|
|
|
|
saveCountOrder(orderData).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.formData.orderId = res.data.orderId;
|
|
|
|
@ -373,7 +370,9 @@ export default {
|
|
|
|
|
nameCode: product.nameCode,
|
|
|
|
|
batchNo: product.batchNo,
|
|
|
|
|
produceDate: product.productionDate,
|
|
|
|
|
expireDate: product.expireDate
|
|
|
|
|
expireDate: product.expireDate,
|
|
|
|
|
invCode: this.formData.invCode,
|
|
|
|
|
invSpaceCode: this.formData.invSpaceCode
|
|
|
|
|
};
|
|
|
|
|
addCountOrderDetail(detailData).then((result) => {
|
|
|
|
|
if (result.code === 20000) {
|
|
|
|
@ -503,7 +502,6 @@ export default {
|
|
|
|
|
//添加第一个产品,先保存单据,再添加单据详情
|
|
|
|
|
this.saveOrder(1);
|
|
|
|
|
}
|
|
|
|
|
this.formData.invSpaceCode = JSON.parse(localStorage.getItem('key'));
|
|
|
|
|
this.selectInvProductVisible = false;
|
|
|
|
|
},
|
|
|
|
|
getRowKeys(row) {
|
|
|
|
@ -516,7 +514,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
startCount(val) {
|
|
|
|
|
localStorage.setItem('key', JSON.stringify(this.formData.invSpaceCode));
|
|
|
|
|
this.countProductList = [];
|
|
|
|
|
if (this.countType === 0) {
|
|
|
|
|
if (isBlank(this.formData.invCode)) {
|
|
|
|
@ -538,11 +535,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (this.countType === 1) {
|
|
|
|
|
if( val === 1) {
|
|
|
|
|
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
|
|
|
|
|
this.$message.warning("请先选择盘点仓库和货位");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (val === 1) {
|
|
|
|
|
let params = {
|
|
|
|
|
invCode: this.formData.invCode,
|
|
|
|
|
invSpaceCode: this.formData.invSpaceCode
|
|
|
|
@ -551,14 +548,14 @@ export default {
|
|
|
|
|
if (res.data.total !== 0) {
|
|
|
|
|
let invProductList = res.data.list;
|
|
|
|
|
for (let product of invProductList) {
|
|
|
|
|
this.codeArray.push(product);
|
|
|
|
|
this.countProductList.push(product);
|
|
|
|
|
}
|
|
|
|
|
this.saveOrder(1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.productList = [];
|
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else if (this.countType === 2) {
|
|
|
|
|
if (isBlank(this.formData.invCode)) {
|
|
|
|
|