ysy 2 tahun lalu
induk
melakukan
ce74c842ed
2 mengubah file dengan 32 tambahan dan 6 penghapusan
  1. TEMPAT SAMPAH
      dist.zip
  2. 32 6
      src/views/material/product/components/mouldDialog.vue

TEMPAT SAMPAH
dist.zip


+ 32 - 6
src/views/material/product/components/mouldDialog.vue

@@ -53,11 +53,11 @@
                 </template>
 
                 <template v-slot:palletBomCode="{ row }">
-                    <el-input :value="row.palletBomCode" placeholder="请输入模具BOM编码"></el-input>
+                    <el-input v-model="row.palletBomCode" placeholder="请输入模具BOM编码"></el-input>
                 </template>
 
                 <template v-slot:palletBomName="{ row }">
-                    <el-input :value="row.palletBomName" placeholder="请输入模具BOM名称"></el-input>
+                    <el-input v-model="row.palletBomName" placeholder="请输入模具BOM名称"></el-input>
                 </template>
 
                 <!-- 操作列 -->
@@ -164,7 +164,7 @@ export default {
                     slot: 'expand'
                 },
 
-          
+
 
                 {
                     prop: 'code',
@@ -340,9 +340,7 @@ export default {
         },
 
         remove2(row) {
-
             const data = this.$refs.table.getData() ?? [];
-
             data.forEach((e) => {
                 if (row.parentId == e.produceTaskId) {
                     e.palletList = e.palletList.filter((d) => d.id !== row.id);
@@ -361,6 +359,34 @@ export default {
 
         save() {
             let _arr = this.$refs.table.getData();
+
+            console.log(_arr)
+
+            let result = true
+            for(let i =0; i < _arr.length; i++) {
+                console.log('5', _arr[i])
+               if(_arr[i].hasOwnProperty('palletList') || e.palletList.length  == 0) {
+                result = false
+                break;
+               }
+            }
+
+            console.log(result)
+
+
+
+   
+
+
+            if (!result) {
+                this.$message.success('请先配磨具信息');
+                return false
+            }
+
+
+
+            return false
+
             let param = {
                 categoryId: this.categoryId,
                 taskList: _arr
@@ -369,7 +395,7 @@ export default {
                 .then((msg) => {
                     this.loading = false;
                     this.$message.success(msg);
-                    this.visible = false;
+                    this.updateVisible(false);
                     this.$emit('done');
                 })
                 .catch((e) => {