Procházet zdrojové kódy

1、修改edit-tree-table

周兴 před 3 roky
rodič
revize
8a7d32fb45

+ 18 - 20
src/components/base/edit-tree-table/edit-tree-table.vue

@@ -155,7 +155,7 @@
             <div @dblclick.stop="copyValue(row,colItem,rowIndex)"
                  :class="colItem.treeNode?( row['parentId']?'child-class':'parent-class'):'edit-div-class'">
               <icon color="#19BE6B"
-                    v-if="colItem.treeNode && checkExchangeIconVisible(row,colItem,rowIndex)"
+                    v-if="colItem.treeNode && checkExchangeIconVisible(row)"
                     :class="row['parentId']?'change-icon-class':'change-icon-child-class'"
                     @click="handleExchangeClick(row,colItem)"
                     type="iconfont iconfont icon-exchange"></icon>
@@ -3597,11 +3597,9 @@
        * @author : 周兴
        * @date   : 2022/5/28 7:54
        */
-      checkExchangeIconVisible(row,colItem,rowIndex) {
-        console.log("row",row,colItem,rowIndex)
-        console.log("this.exchangeField",this.exchangeField)
-        console.log('ff',!this.readonly,row[this.exchangeField],this.exchangeField)
-        if (!this.readonly && row && row[this.exchangeField] && row[this.exchangeField].length > 0) {
+      checkExchangeIconVisible(row) {
+        console.log('ff',!this.readonly,row,row[this.exchangeField],this.exchangeField)
+        if (!this.readonly && row && row[this.exchangeField]) {
           return true
         }
         return false
@@ -3822,16 +3820,16 @@
             this.service = this.$service.commonService
             //替换的列
             this.columnsUpdate.push(
-              { field: 'moldlineItemNo',title: self.$t('groupNo') }, // 分组序号
-              { field: 'moldlineItemCode',title: self.$t('groupName') },//分组名称
-              { field: 'uniqueCode',title: self.$t('moldlineCode')},//成型线编码
+              { field: 'moldlineItemNo',title: this.$t('groupNo') }, // 分组序号
+              { field: 'moldlineItemCode',title: this.$t('groupName') },//分组名称
+              { field: 'uniqueCode',title: this.$t('moldlineCode')},//成型线编码
               { field: 'moldlineName' },//成型线名称
               { field: 'manageUserName' },//成型班长
               { field: 'moldingUserName' },//成型工号
-              { field: 'modelCode',title: self.$t('productCode') },//产品编码
-              { field: 'modelName',title: self.$t('productName') },//产品名称
-              { field: 'mouldCode',title: self.$t('moldingModelCode') },//模具编号
-              { field: 'moldlineItemKindName',title: self.$t('mouldKindName') },//模具状态
+              { field: 'modelCode',title: this.$t('productCode') },//产品编码
+              { field: 'modelName',title: this.$t('productName') },//产品名称
+              { field: 'mouldCode',title: this.$t('moldingModelCode') },//模具编号
+              { field: 'moldlineItemKindName',title: this.$t('mouldKindName') },//模具状态
               { field: 'moldingBatch' },//成型批次
               { field: 'flgMolding' },//成型标识
               { field: 'unmoldedReasonName' },//未成型原因
@@ -3843,21 +3841,21 @@
             //弹窗的列
             this.columnsDetail.push(
               // 分组序号
-              { field: 'moldlineItemNo', title: self.$t('groupNo'), treeNode: true, type: 'disabled', width: 'auto' },
+              { field: 'moldlineItemNo', title: this.$t('groupNo'), treeNode: true, type: 'disabled', width: 'auto' },
               // 分组名称
-              { field: 'moldlineItemCode', title: self.$t('groupName'), type: 'disabled', width: 'auto' },
+              { field: 'moldlineItemCode', title: this.$t('groupName'), type: 'disabled', width: 'auto' },
               // 成型线编码
-              { field: 'uniqueCode', title: self.$t('moldlineCode'), type: 'disabled', width: 'auto' },
+              { field: 'uniqueCode', title: this.$t('moldlineCode'), type: 'disabled', width: 'auto' },
               // 成型线名称
               { field: 'moldlineName', type: 'disabled', width: 'auto' },
               // 产品编码
-              { field: 'modelCode', title: self.$t('productCode'), type: 'disabled', width: 'auto' },
+              { field: 'modelCode', title: this.$t('productCode'), type: 'disabled', width: 'auto' },
               // 产品名称
-              { field: 'modelName', title: self.$t('productName'), type: 'disabled', width: 'auto' },
+              { field: 'modelName', title: this.$t('productName'), type: 'disabled', width: 'auto' },
               // 模具编号
-              { field: 'mouldCode', title: self.$t('moldingModelCode'), type: 'disabled', width: 'auto' },
+              { field: 'mouldCode', title: this.$t('moldingModelCode'), type: 'disabled', width: 'auto' },
               // 模具状态
-              { field: 'moldlineItemKindName', title: self.$t('mouldKindName'), type: 'disabled', width: 'auto' },
+              { field: 'moldlineItemKindName', title: this.$t('mouldKindName'), type: 'disabled', width: 'auto' },
             )
           }
         })

+ 1 - 1
src/view/pdm/molding-record/bind-barcode-grouping.vue

@@ -38,7 +38,7 @@
                          :add-flag="false"
                          :height="tableHeight"
                          :new-row-flag="false"
-                         exchangeField="modelCode"
+                         exchangeField="pdtModelId"
                          :columns="moldingRecordTreeColumns"
                          @changeValue="changeValue"
           ></EditTreeTable>