Explorar o código

产品关联物料bug修复提交

LAPTOP-16IUEB3P\Lenovo %!s(int64=2) %!d(string=hai) anos
pai
achega
483a562c50

+ 20 - 11
src/views/material/productLinkMaterial/components/link-material-dialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <ele-modal :visible.sync="visible" title="" width="80%" @close="cancel">
+  <ele-modal :visible.sync="visible" title="" width="90%" @close="cancel">
     <el-row :gutter="40">
       <el-col :span="12">
         <headerTitle>
@@ -21,7 +21,7 @@
             >
           </template>
         </headerTitle>
-        <el-form label-width="100px">
+        <el-form label-width="60px">
           <el-row>
             <el-col :span="12">
               <el-form-item :label="`分类`">
@@ -95,7 +95,7 @@
             ></template
           ></headerTitle
         >
-        <el-form label-width="100px">
+        <el-form label-width="60px">
           <el-row>
             <el-col :span="12">
               <el-form-item :label="`分类`">
@@ -251,15 +251,18 @@
           },
           {
             label: `${this.catogaryName}分类`,
-            prop: 'categoryLevelGroupName'
+            prop: 'categoryLevelGroupName',
+            width: 110
           },
           {
             label: `${this.catogaryName}编码`,
-            prop: 'code'
+            prop: 'code',
+            width: 110
           },
           {
             label: `${this.catogaryName}名称`,
-            prop: 'name'
+            prop: 'name',
+            width: 110
           },
           {
             label: '型号',
@@ -269,7 +272,10 @@
             ? [
                 {
                   label: '槽数',
-                  prop: 'modelType'
+                  prop: 'slotNum',
+                  formatter:(_row, _column, cellValue) => {
+                    return _row.extendInfo.slotNum;
+                  }
                 },
                 {
                   label: '角度',
@@ -283,7 +289,8 @@
                 {
                   label: '产能',
                   slot: 'capacity',
-                  action: 'capacity'
+                  action: 'capacity',
+                  width: 200
                 }
               ]
             : [])
@@ -294,6 +301,7 @@
       open (type, row) {
         this.type = type;
         this.row = row;
+        // console.log('this.row',this.row)
         this.getDatasource();
         this.getDatasourceRight();
         this.visible = true;
@@ -306,7 +314,7 @@
         //   return this.$message.error('请添加关联数据');
         // }
         const params = {
-          mainCategoryId: this.row.categoryLevelId,
+          mainCategoryId: this.row.id,
           mainCategoryLevelRootId: this.type,
           materialDetailsPOList: this.datasourceRightShow.map((i) => ({
             ...i,
@@ -384,14 +392,15 @@
       },
       async getDatasource () {
         const data = await unassociated({
-          categoryLevelGroupId: this.idMap[this.type]
+          categoryLevelGroupId: this.idMap[this.type],
+          categoryLevelRootId: this.type
         });
         this.datasource = data.slice(0);
         this.datasourceShow = data.slice(0);
       },
       async getDatasourceRight () {
         const data = await getRelatesInformationList({
-          mainCategoryId: this.row.categoryLevelId,
+          mainCategoryId: this.row.id,
           // categoryLevelGroupId: this.idMap[this.type],
           categoryLevelRootId: this.type
         });