ysy %!s(int64=2) %!d(string=hai) anos
pai
achega
3f72214272
Modificáronse 1 ficheiros con 17 adicións e 11 borrados
  1. 17 11
      src/views/material/product/components/mouldDialog.vue

+ 17 - 11
src/views/material/product/components/mouldDialog.vue

@@ -44,7 +44,7 @@
 
             <header-title title="工序"> </header-title>
 
-            <ele-pro-table ref="table" :needPage="false" :columns="columns" :datasource="datasource"
+            <ele-pro-table ref="table" :needPage="false" :columns="columns" :datasource="form.taskList"
                 row-key="produceTaskId">
                 <!-- 表头工具栏 -->
                 <template v-slot:toolbar>
@@ -210,10 +210,7 @@ export default {
         }
     },
     methods: {
-        /* 表格数据源 */
-        datasource({ page, limit, where }) {
-            return [];
-        },
+  
 
         /* 更新visible */
         updateVisible(value) {
@@ -221,15 +218,16 @@ export default {
         },
 
         openEdit() {
-            let _arr = this.$refs.table.getData();
-            _arr.map((m) => {
+            console.log( this.form)
+            this.form.taskList.map((m) => {
+                
                 m.id = m.produceTaskId;
                 delete m.produceTaskId;
                 return {
                     ...m
                 };
             });
-            this.$refs.processRefs.open(_arr);
+            this.$refs.processRefs.open(this.form.taskList);
         },
 
         chooseProcess(data) {
@@ -241,6 +239,7 @@ export default {
                 };
             });
             this.$refs.table.setData([...data, ...this.$refs.table.getData()]);
+         
         },
 
         handleDel(row, index) {
@@ -254,19 +253,26 @@ export default {
 
 
         openMould(row,index) {
+            console.log(index)
             this.$refs.mouldRef.open(row, index)
         },
 
         saveMould(row,idx) {
-            this.$set('')
-            console.log(row)
+            let _arr = this.$refs.table.getData()
+            this.$set(_arr[idx], 'modelCategoryLevelId', row.id)
+            this.$set(_arr[idx], 'modelCategoryLevelCode', row.code)
+            this.$set(_arr[idx], 'modelCategoryLevelName', row.name)
+            this.$refs.table.setData([..._arr]);
+         
+            
         },
 
 
 
         async getCategoryTaskDetail() {
             const res = await getCategoryTaskPallet(this.categoryId);
-            this.$refs.table.setData(res);
+            this.form.taskList = res
+            this.$forceUpdate()
         },
 
         save() {