diff --git a/src/views/firstOrder/components/inDialog.vue b/src/views/firstOrder/components/inDialog.vue
index 99a3f3b..e7a1d53 100644
--- a/src/views/firstOrder/components/inDialog.vue
+++ b/src/views/firstOrder/components/inDialog.vue
@@ -61,7 +61,7 @@
v-if="!allDisabled && sizeForm.option == 2">新增
-
+
@@ -109,10 +109,16 @@
+
+
+
+ {{ scope.row.remark }}
+
+
-
+
@@ -168,7 +174,7 @@
-
+
@@ -238,7 +244,7 @@
-
+
@@ -372,7 +378,7 @@ export default {
batchType: '',//批量选择类型
materialsType: '',
allDisabled: false,
-
+
}
},
computed: {
@@ -517,6 +523,9 @@ export default {
const res = await getPurchasesByIds(this.batchType);
if (res.data.success) {
this.sizeForm.inTableData = res.data.result;
+ this.sizeForm.inTableData.forEach(item => {
+ item.theInboundQuantity = 0
+ })
this.$message.success("数据获取成功");
this.inBatchDialogVisible = false;
} else {
@@ -571,7 +580,7 @@ export default {
this.$message.error("请选择来源");
return;
}
- if (this.sizeForm.option === 1) {
+ if (this.sizeForm.option === 1) {//批量选择
if (!this.sizeForm.quarterName) {
this.$message.error("请选择采购单名称");
return;
@@ -596,7 +605,7 @@ export default {
return;
}
}
- if (!row.theInboundQuantity || row.theInboundQuantity < 0) {
+ if ( row.theInboundQuantity < 0) {
this.$message.error("本次入库数量不能为空");
return;
}
@@ -604,6 +613,11 @@ export default {
this.$message.error("请选择类别");
return;
}
+ if ((row.theInboundQuantity+ row.inboundQuantity > row.requiredQuantity)&& !row.remark ) {
+
+ this.$message.error(row.materialName + "本次入库数量不能大于采购单计划数量,请填写备注原因");
+ return;
+ }
}
}
// 单项选择验证
@@ -718,7 +732,7 @@ export default {
}
::v-deep.dialog-content {
- max-height: calc(100vh - 200px);
+ max-height: calc(100vh - 200px);
overflow-y: auto;
padding-right: 10px;
}