修改bug

prod
wangwei 3 years ago
parent fb0bacf0db
commit 33cd2aa77e

@ -7,7 +7,7 @@
v-if="countType != 2" v-if="countType != 2"
type="primary" type="primary"
:disabled="this.codeArray.length > 0" :disabled="this.codeArray.length > 0"
@click.native="startCount()" @click.native="startCount(1)"
>开始盘点 >开始盘点
</el-button> </el-button>
<el-button <el-button
@ -514,7 +514,7 @@ export default {
this.multiProduct.push(item); this.multiProduct.push(item);
}); });
}, },
startCount() { startCount(val) {
localStorage.setItem('key', JSON.stringify(this.formData.invSpaceCode)); localStorage.setItem('key', JSON.stringify(this.formData.invSpaceCode));
this.countProductList = []; this.countProductList = [];
if (this.countType === 0) { if (this.countType === 0) {
@ -536,25 +536,29 @@ export default {
this.saveOrder(1); this.saveOrder(1);
} }
}); });
} else if (this.countType === 1) { } else if (this.countType === 1 ) {
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) { if( val === 1) {
this.$message.warning("请先选择盘点仓库和货位"); if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
return; this.$message.warning("请先选择盘点仓库和货位");
return;
}
let params = {
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode
};
getCountInvProductProduct(params).then((res) => {
if (res.data.total !== 0) {
let invProductList = res.data.list;
for (let product of invProductList) {
this.countProductList.push(product);
}
this.saveOrder(1);
}
});
}else{
this.selectInvProductVisible = true;
} }
this.selectInvProductVisible = true;
// let params = {
// invCode: this.formData.invCode,
// invSpaceCode: this.formData.invSpaceCode
// };
// getCountInvProductProduct(params).then((res) => {
// if (res.data.total !== 0) {
// let invProductList = res.data.list;
// for (let product of invProductList) {
// this.countProductList.push(product);
// }
// this.saveOrder(1);
// }
// });
} else if (this.countType === 2) { } else if (this.countType === 2) {
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) { if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
this.$message.warning("请先选盘点仓库"); this.$message.warning("请先选盘点仓库");

Loading…
Cancel
Save