koushanshan 3 лет назад
Родитель
Сommit
e74ea7d891

+ 0 - 3
src/api/pages/common/common.js

@@ -149,9 +149,6 @@ export default {
     getLabelPrintItem: 'get_label_print_item',
     //获取员工用于报工记录查询
     getStaffWithWork: 'get_staff_with_work',
-    //查询可替换绑定条码的产品
-    // selectProductByBindBarcode: 'select_product_by_bind_barcode',
-    selectByMoldineId:'select_by_moldline_id',
   },
   appCommonService: {
     prefix: 'mdm-server/app/mst/common/',

+ 2 - 0
src/api/pages/pdm/molding-record.js

@@ -21,6 +21,8 @@ export default {
     selectByMoldingId:'select_by_molding_id',
     //根据成型线id查询
     selectByMoldineId:'select_by_moldline_id',
+    //查询可替换绑定条码的产品
+    selectProductByBindBarcode: 'select_product_by_bind_barcode'
   }
 }
 

+ 170 - 56
src/components/base/edit-tree-table/edit-tree-table.vue

@@ -509,12 +509,25 @@
       <!--切换子品-->
       <DkModal
         width="900"
+        ref="chlid_modal"
         v-model="showModal"
         @modalOk="modalOk"
-        title="请选择需要替换的商品">
-        <DkTable :primaryKey="controlId" ref="table-exchange" :id="'table-'+$options.name" name="table"
+        title="请选择需要替换的产品">
+        <BaseIndexButtonGroup>
+          <template #left>
+            <BaseIndexButton ref="search" name="search" @click="searchData"></BaseIndexButton>
+            <BaseIndexButton :finalFlag="true" ref="clear" name="clear" @click="clear"></BaseIndexButton>
+          </template>
+        </BaseIndexButtonGroup>
+
+        <DkTable :primaryKey="controlId" ref="table-exchange"
+                 :id="'table-'+$options.name" name="table"
                  :data="exchangeData"
-                 size="mini" :link-click-checked="true" :page-flag="false">
+                 :choose-flag="false"
+                 :page-total="pageInfo.total"
+                 :current-page="pageInfo.currentPage"
+                 @pageChange="pageSizeChange"
+                 size="mini" >
           <DkTableColumn v-for="(item,index) in columnsDetail" :key="index" :field="item.field"
                          :title="item.title"></DkTableColumn>
         </DkTable>
@@ -668,7 +681,12 @@
       mouseEnterEditFlag: {
         type: Boolean,
         default: true,
-      }
+      },
+      //绑定条码标识
+      bindBarCodeFlag:{
+        type: Boolean,
+        default: false,
+      },
     },
     data() {
       const vm = window.vm
@@ -715,6 +733,11 @@
         nonGlassForm: {},    // 非标玻璃的form表单
         settingLeft: null,          // 设置图标居左的位置
         settingTop: null,           // 设置图标居上的位置
+        pageInfo: {
+          total: 0,
+          pageSize: this.$config.pageSize,
+          currentPage: 1
+        },
       }
     },
     watch: {
@@ -742,6 +765,7 @@
           })
           // 编辑
           if (data && data.length > 0) {
+            console.log("data",data)
             this.tableData = JSON.parse(JSON.stringify(data))
             this.handleSelectData()
             this.loadChildrenInit(this.tableData) // 处理子级数据
@@ -758,6 +782,32 @@
     },
     methods: {
       /**
+       * @desc   : 清空事件
+       * @author : 周兴
+       * @date   : 2022/3/4 8:19
+       */
+      clear() {
+        this.searchList = {}
+        this.searchCond._value = {}
+        if (this.$refs.searchCond) {
+          this.$refs.searchCond.clearCondition();
+        }
+        this.searchData() // 重新查询
+      },
+      /**
+       * @desc   : 查询,从第一页开始
+       * @author : 周兴
+       * @date   : 2023/2/24 10:45
+       */
+      searchData() {
+        this.pageInfo.currentPage = 1;
+        this.getDataTable();
+      },
+      pageSizeChange(pageInfo) {
+        this.pageInfo = pageInfo
+        this.getDataTable() // 查询数据
+      },
+      /**
        * @desc   : 单元格样式
        * @author : 周兴
        * @date   : 2022/8/23 17:23
@@ -1778,6 +1828,7 @@
             let childs = this.children.filter(it => it.parentId === row.id && it.hasChild == 0)
             resolve(childs)
           }
+          console.log('row',row,this.tableData)
         })
       },
 
@@ -3568,33 +3619,55 @@
           // 查询可替换商品
           this.getDataTable(row)
         }
-      }
-      ,
+      },
       /**
        * @desc   : 查询可切换的数据
        * @author : 周兴
        * @date   : 2022/5/27 16:04
        */
       getDataTable(row) {
-        let param = {}
-        param.ftyId = this.$store.state.user.ftyId
-        // 根据传入的数据进行检索
-        param[this.exchangeField] = row[this.exchangeField]
-        console.log("this.methodsNameExchange",this.methodsNameExchange)
-        console.log("row[this.exchangeField]",row[this.exchangeField])
-        this.service[this.methodsNameExchange](param).then(res => {
-          if (res.code === 200) {
-            this.exchangeData = res.data.list
-            //过滤掉当前数据
-            this.exchangeData = this.exchangeData.filter(it => it[this.controlId] !== row[this.controlId])
-            //显示可替换的界面
-            this.showModal = true
-          } else {
-            this.$Message.error(res.message)
+        //显示可替换的界面
+        this.showModal = true
+        this.$nextTick(() => {
+          let param = { ...this.$refs['table-exchange'].pageInfo }
+          param.currentPage = this.pageInfo.currentPage ? this.pageInfo.currentPage : 1
+          param.pageSize = this.pageInfo.pageSize
+          param.ftyId = this.$store.state.user.ftyId
+          // 根据传入的数据进行检索
+          if(!row){
+            row = this.focusedRow
           }
+          param[this.exchangeField] = row[this.exchangeField]
+          if (this.bindBarCodeFlag && row['moldlineId']) {
+            param.pdtGlueKind = row['pdtGlueKind']
+            //todo 查出所有数据 zdl 2023年4月25日09:01:27
+            // param.moldlineId = row['moldlineId']
+            //todo 暂时注掉 2023年4月25日08:46:09  zdl
+            // param.moldlineItemNoList =  this.children.map(it=>it.moldlineItemNo).unique()
+          }
+          this.excute(this.service, this.service[this.methodsNameExchange], param).then(res => {
+            if (res.code === this.$config.SUCCESS_CODE) {
+              let arr = []
+              if (res.data && res.data.list && res.data.list.length > 0) {
+                arr = [...res.data.list]
+              }
+              if ((!arr || arr.length === 0) && res.data && res.data.length > 0) {
+                arr = [...res.data]
+              }
+              this.exchangeData = arr
+              //过滤掉当前数据  不是绑定条码事需要
+              if(!this.bindBarCodeFlag){
+                this.exchangeData = this.exchangeData.filter(it => it[this.controlId] !== row[this.controlId])
+              }
+              this.$refs['table-exchange'].pageInfo.total = res.data.total
+              //显示可替换的界面
+              // this.showModal = true
+            } else {
+              this.$Message.error(res.message)
+            }
+          })
         })
-      }
-      ,
+      },
       /**
        * @desc   : 判断交换图标是否可见
        * @author : 周兴
@@ -3619,39 +3692,76 @@
           return
         }
         let row = this.$refs['table-exchange'].batchRows[0]
-        // 判断替品是否有标价
-        if (!row.priceStandard && row.priceStandard != 0) {
-          this.$Message.error(this.$t('W_069', { 'param': this.$t('priceStandard') }))
-          return
-        }
-        // 关闭弹窗
-        this.showModal = false
-        // 全局中的children也要改变
-        let child = this.children.filter(it => it['id'] === this.focusedRow['id'])
-        // 把选择的数据进行覆盖当前列表
-        this.columnsUpdate.forEach(col => {
-          if (col.field !== 'id' && col.field !== 'parentId'
-            && this.focusedRow && this.focusedRow[col.field] && row[col.field]) {
-            this.focusedRow[col.field] = row[col.field]
-            child[0][col.field] = row[col.field]
+        //如果是绑定条码
+        if(this.bindBarCodeFlag){
+          //判断页面中是否已有选择数据
+          //没有重复数据
+          if (this.children.filter(it => it.pdtModelId == row.pdtModelId &&
+            it.moldlineId == row.moldlineId && it.moldlineItemNo == row.moldlineItemNo).length == 0) {
+            //替换明细
+            this.checkDetailByBindBarCode(row)
+            this.showModal = false
           }
-        })
-        //hasChild也需要替换
-        this.focusedRow['hasChild'] = row['hasChild'] ? row['hasChild'] : 0
-        this.focusedRow['bomItems'] = row['bomItems'] ? row['bomItems'] : []
-        child['hasChild'] = row['hasChild'] ? row['hasChild'] : 0
-        child['bomItems'] = row['bomItems'] ? row['bomItems'] : []
-        //修改子级的价格等信息
-        let parentRows = this.tableData.filter(it => it['id'] === this.focusedRow['parentId'])
-        if (parentRows && parentRows.length > 0) {
-          // 先计算父级
-          this.shareToParentData(parentRows[0]).then(res => {
-            // 再根据父级计算子级其他数据
-            this.shareFromParentData(parentRows[0], parentRows[0].children)
+          //有重复数据
+          else {
+            this.$Message.error(this.$t('W_141'))
+            return
+          }
+        }else{
+          // 判断替品是否有标价
+          if (!row.priceStandard && row.priceStandard != 0) {
+            this.$Message.error(this.$t('W_069', { 'param': this.$t('priceStandard') }))
+            return
+          }
+          // 关闭弹窗
+          this.showModal = false
+          // 全局中的children也要改变
+          let child = this.children.filter(it => it['id'] === this.focusedRow['id'])
+          // 把选择的数据进行覆盖当前列表
+          this.columnsUpdate.forEach(col => {
+            if (col.field !== 'id' && col.field !== 'parentId'
+              && this.focusedRow && this.focusedRow[col.field] && row[col.field]) {
+              this.focusedRow[col.field] = row[col.field]
+              child[0][col.field] = row[col.field]
+            }
           })
+          //hasChild也需要替换
+          this.focusedRow['hasChild'] = row['hasChild'] ? row['hasChild'] : 0
+          this.focusedRow['bomItems'] = row['bomItems'] ? row['bomItems'] : []
+          child['hasChild'] = row['hasChild'] ? row['hasChild'] : 0
+          child['bomItems'] = row['bomItems'] ? row['bomItems'] : []
+          //修改子级的价格等信息
+          let parentRows = this.tableData.filter(it => it['id'] === this.focusedRow['parentId'])
+          if (parentRows && parentRows.length > 0) {
+            // 先计算父级
+            this.shareToParentData(parentRows[0]).then(res => {
+              // 再根据父级计算子级其他数据
+              this.shareFromParentData(parentRows[0], parentRows[0].children)
+            })
+          }
         }
-      }
-      ,
+      },
+      /**
+       *   @desc   : 替换明细--当前绑定条码用
+       *   @date   : 2023/4/24 14:40
+       *   @author : 寇珊珊
+       */
+      checkDetailByBindBarCode(row){
+        for(let i in this.children){
+          //找到明细中需要替换的数据
+          if(this.children[i].id==this.focusedRow.id){
+            row.parentId = this.children[i].parentId
+            row.hasChild = this.children[i].hasChild
+            row.id = this.children[i].id
+            row.readOnlyUniqueCode = this.children[i].readOnlyUniqueCode
+            this.children[i]=row
+            this.children.moldingItemId = this.children[i].itemId
+            break
+          }
+        }
+        this.$emit('check-detail-by-bind-bar-code',this.focusedRow,row)
+
+      },
       /**
        * @desc   : 计算父级数据
        * @author : 周兴
@@ -3817,9 +3927,9 @@
           //绑定条码- 产品
           else if(col.treeNode && col.dataType === this.$config.tableSelectType.product){
             //设置后台接口服务
-            this.methodsName = 'selectByMoldineId'
-            this.methodsNameExchange = 'selectByMoldineId'
-            this.service = this.$service.commonService
+            this.methodsName = 'selectProductByBindBarcode'
+            this.methodsNameExchange = 'selectProductByBindBarcode'
+            this.service = this.$service.moldingRecordItemService
             //替换的列
             this.columnsUpdate.push(
               { field: 'moldlineItemNo',title: this.$t('groupNo') }, // 分组序号
@@ -3842,6 +3952,10 @@
             )
             //弹窗的列
             this.columnsDetail.push(
+              // 成型批次
+              { field: 'moldingBatch', type: 'disabled', width: 'auto' },
+              // 成型日期
+              { field: 'moldingDate', type: 'disabled', width: 'auto' },
               // 分组序号
               { field: 'moldlineItemNo', title: this.$t('groupNo'), treeNode: true, type: 'disabled', width: 'auto' },
               // 分组名称

+ 1 - 0
src/locale/lang/zh-CN.js

@@ -1074,6 +1074,7 @@ export const messages = {
   W_136: '选择打印模板',
   W_140: '当前数据暂无成型线粘贴方式,无法进行绑定条码',
   W_139: '请选择新型号',
+  W_141: '页面中已存在该条数据,请重新选择',
   E_001: '系统出现异常,请联系管理员。',
   Q_001: '当前页面的数据有过更改,请确认需要保存吗?',
   Q_002: '确定要进行{param}操作吗?',

+ 51 - 23
src/view/pdm/molding-record/bind-barcode-group.vue

@@ -40,8 +40,12 @@
                          :add-flag="false"
                          :height="tableHeight"
                          :new-row-flag="false"
-                         :columns="moldingRecordTreeColumns"
                          @changeValue="changeValue"
+                         :columns="moldingRecordTreeColumns"
+                         exchangeField="pdtModelId"
+                         controlId="pdtModelId"
+                         :bindBarCodeFlag="true"
+                         @check-detail-by-bind-bar-code="checkDetail"
           ></EditTreeTable>
         </div>
       </DkPanel>
@@ -183,8 +187,9 @@
         }
         //条码数字长度
         let indexLength = (parseInt(lastNum) + parseInt(index)).toString().length
-        for (let i = 0; i < this.moldingRecordList.length; i++) {
-          if (this.moldingRecordList[i].productUniqueCodeFlag || this.moldingRecordList[i].canProductUniqueCode) {
+        let moldingRecordList = this.$refs['moldingRecord'].tableData;
+        for (let i = 0; i < moldingRecordList.length; i++) {
+          if (moldingRecordList[i].productUniqueCodeFlag || moldingRecordList[i].canProductUniqueCode) {
             let number = parseInt(lastNum) + parseInt(index)
             //每次多一位数,就去掉前面一个0
             if (indexLength != number.toString().length) {
@@ -197,44 +202,45 @@
             //数字在前
             if (beforeStr.length == 0) {
               if (zeroFlag) {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', number + beforeStr + lastStr)
+                this.$set(moldingRecordList[i], 'productUniqueCode', number + beforeStr + lastStr)
               } else {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', zeroStr + number + beforeStr + lastStr)
+                this.$set(moldingRecordList[i], 'productUniqueCode', zeroStr + number + beforeStr + lastStr)
               }
             }
             //数字在后
             else if (lastStr.length == 0) {
               if (zeroFlag) {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', beforeStr + lastStr + number)
+                this.$set(moldingRecordList[i], 'productUniqueCode', beforeStr + lastStr + number)
               } else {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', beforeStr + lastStr + zeroStr + number)
+                this.$set(moldingRecordList[i], 'productUniqueCode', beforeStr + lastStr + zeroStr + number)
               }
             }
             //数字在中
             else {
               if (zeroFlag) {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', beforeStr + number + lastStr)
+                this.$set(moldingRecordList[i], 'productUniqueCode', beforeStr + number + lastStr)
               } else {
-                this.$set(this.moldingRecordList[i], 'productUniqueCode', beforeStr + zeroStr + number + lastStr)
+                this.$set(moldingRecordList[i], 'productUniqueCode', beforeStr + zeroStr + number + lastStr)
               }
             }
-            this.$set(this.moldingRecordList[i], 'productUniqueCodeFlag', true)
-            this.$set(this.moldingRecordList[i], 'productUniqueFlag', true)
+            this.$set(moldingRecordList[i], 'productUniqueCodeFlag', true)
+            this.$set(moldingRecordList[i], 'productUniqueFlag', true)
             index++
             //给每个总单下的明细【绑定条码赋值】
-            for (let item = 0; item < this.moldingRecordList[i].bomItems.length; item++) {
+            for (let item = 0; item < moldingRecordList[i].bomItems.length; item++) {
               //从后台数据查出来绑定条码已经存在的不需要赋值
-              if (!this.moldingRecordList[i].bomItems[item].readOnlyUniqueCode) {
-                this.$set(this.moldingRecordList[i].bomItems[item], 'productUniqueCode', this.moldingRecordList[i].productUniqueCode)
-                this.$set(this.moldingRecordList[i].bomItems[item], 'productUniqueCodeFlag', true)
-                this.$set(this.moldingRecordList[i].bomItems[item], 'productUniqueFlag', true)
+              if (!moldingRecordList[i].bomItems[item].readOnlyUniqueCode) {
+                this.$set(moldingRecordList[i].bomItems[item], 'productUniqueCode', moldingRecordList[i].productUniqueCode)
+                this.$set(moldingRecordList[i].bomItems[item], 'productUniqueCodeFlag', true)
+                this.$set(moldingRecordList[i].bomItems[item], 'productUniqueFlag', true)
               }
             }
           }
         }
+        console.log('moldingRecordList',moldingRecordList)
         // 处理子级数据
-        this.$refs.moldingRecord.loadChildrenInit(this.moldingRecordList, ['productUniqueCode'])
-        this.$refs.moldingRecord.reloadData(this.moldingRecordList)
+        this.$refs.moldingRecord.loadChildrenInit(moldingRecordList, ['productUniqueCode'])
+        // this.$refs.moldingRecord.reloadData(this.moldingRecordList)
       },
       /**
        *   @desc   : 清空条码
@@ -293,7 +299,26 @@
         }
         // 处理子级数据
         this.$refs.moldingRecord.loadChildrenInit(this.moldingRecordList, ['productUniqueCode'])
-        this.$refs.moldingRecord.$refs.xTable.reloadData(this.moldingRecordList)
+        // this.$refs.moldingRecord.$refs.xTable.reloadData(this.moldingRecordList)
+      },
+      /**
+       *   @desc   : 替换子集
+       *   @date   : 2023/4/24 15:09
+       *   @author : 寇珊珊
+       */
+      checkDetail(oldRow,newRow){
+        for(let it of this.moldingRecordList){
+          let index =0
+          for(let item of it.bomItems){
+            if(item.id ==oldRow.id){
+              newRow.moldingItemId= newRow.itemId
+              item = Object.assign(item, newRow)
+              index++
+              break
+            }
+          }
+        }
+        this.$refs.moldingRecord.reloadData(this.moldingRecordList)
       },
       /**
        *   @desc   : 通过id查询
@@ -303,9 +328,10 @@
       detail(id) {
         let param = {
           'moldlineId': parseInt(id),
-          'pdtGlueKindName': this.$route.query.pdtGlueKindName,
+          'pdtGlueKind': this.$route.query.pdtGlueKind,
           'moldingBatch': this.$route.query.moldingBatch,
           'moldingDate': this.$route.query.moldingDate,
+          'ftyId' : this.$store.state.user.ftyId
         }
         return this.excute(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.selectByMoldineId, param).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {
@@ -316,6 +342,8 @@
             for (let i of  this.moldingRecordList) {
               //明细已有绑定条码个数
               let productUniqueCodeLength = 0
+              //明细已有成型标识个数
+              let flgMoldingLength = 0
               //明细下标
               let itemIndex = 0
               //明细第一条的绑定条码
@@ -336,12 +364,12 @@
                 }
                 //明细不是成型
                 if (!item.flgMolding) {
-                  productUniqueCodeLength++
+                  flgMoldingLength++
                 }
                 itemIndex++
               }
-              //明细中每条绑定条码都有值或者是成型的数量  =  每条总单下的明细数量
-              if (productUniqueCodeLength == i.bomItems.length) {
+              //明细中每条绑定条码都有值  =  每条总单下的明细数量 或者 是成型标识数量大于0
+              if (productUniqueCodeLength == i.bomItems.length || flgMoldingLength>0) {
                 i.readOnlyUniqueCode = true
                 //明细第一条绑定条码赋值给父级
                 this.$set(this.moldingRecordList[index], 'productUniqueCode', zeroCode)

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

@@ -40,9 +40,12 @@
                          :add-flag="false"
                          :height="tableHeight"
                          :new-row-flag="false"
-                         exchangeField="pdtModelId"
-                         :columns="moldingRecordTreeColumns"
                          @changeValue="changeValue"
+                         :columns="moldingRecordTreeColumns"
+                         exchangeField="pdtModelId"
+                         controlId="pdtModelId"
+                         :bindBarCodeFlag="true"
+                         @check-detail-by-bind-bar-code="checkDetail"
           ></EditTreeTable>
         </div>
       </DkPanel>
@@ -78,7 +81,7 @@
         moldingRecordTreeColumns: [
           // 分组序号
           { field: 'moldlineItemNo', title: self.$t('groupNo'),
-            dataType: self.$config.tableSelectType.product,
+            dataType: self.$config.tableSelectType.product, controlId: 'pdtModelId',
             treeNode: true, type: 'disabled', width: 'auto' },
           // 分组名称
           { field: 'moldlineItemCode', title: self.$t('groupName'), type: 'disabled', width: 'auto' },
@@ -240,7 +243,7 @@
         }
         // 处理子级数据
         this.$refs.moldingRecord.loadChildrenInit(this.moldingRecordList, ['productUniqueCode'])
-        this.$refs.moldingRecord.reloadData(this.moldingRecordList)
+        // this.$refs.moldingRecord.reloadData(this.moldingRecordList)
       },
       /**
        *   @desc   : 清空条码
@@ -299,7 +302,26 @@
           }
           // 处理子级数据
           this.$refs.moldingRecord.loadChildrenInit(this.moldingRecordList, ['productUniqueCode'])
-          this.$refs.moldingRecord.reloadData(this.moldingRecordList)
+          // this.$refs.moldingRecord.reloadData(this.moldingRecordList)
+      },
+      /**
+       *   @desc   : 替换子集
+       *   @date   : 2023/4/24 15:09
+       *   @author : 寇珊珊
+       */
+      checkDetail(oldRow,newRow){
+        for(let it of this.moldingRecordList){
+          let index =0
+          for(let item of it.bomItems){
+            if(item.id ==oldRow.id){
+              newRow.moldingItemId= newRow.itemId
+              item = Object.assign(item, newRow)
+              index++
+              break
+            }
+          }
+        }
+        this.$refs.moldingRecord.reloadData(this.moldingRecordList)
       },
       /**
        *   @desc   : 通过id查询
@@ -309,9 +331,10 @@
       detail(id) {
         let param = {
           'moldlineId': parseInt(id),
-          'pdtGlueKindName': this.$route.query.pdtGlueKindName,
+          'pdtGlueKind': this.$route.query.pdtGlueKind,
           'moldingBatch': this.$route.query.moldingBatch,
           'moldingDate': this.$route.query.moldingDate,
+          'ftyId' : this.$store.state.user.ftyId
         }
         return this.excute(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.selectByMoldineId, param).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {
@@ -322,6 +345,8 @@
             for (let i of  this.moldingRecordList) {
               //明细已有绑定条码个数
               let productUniqueCodeLength = 0
+              //明细已有成型标识个数
+              let flgMoldingLength = 0
               //明细下标
               let itemIndex = 0
               //明细第一条的绑定条码
@@ -342,12 +367,12 @@
                 }
                 //明细不是成型
                 if (!item.flgMolding) {
-                  productUniqueCodeLength++
+                  flgMoldingLength++
                 }
                 itemIndex++
               }
-              //明细中每条绑定条码都有值或者是成型的数量  =  每条总单下的明细数量
-              if (productUniqueCodeLength == i.bomItems.length) {
+              //明细中每条绑定条码都有值  =  每条总单下的明细数量 或者 是成型标识数量大于0
+              if (productUniqueCodeLength == i.bomItems.length || flgMoldingLength>0) {
                 i.readOnlyUniqueCode = true
                 //明细第一条绑定条码赋值给父级
                 this.$set(this.moldingRecordList[index], 'productUniqueCode', zeroCode)

+ 3 - 2
src/view/pdm/molding-record/bind-barcode.vue

@@ -248,9 +248,10 @@
       detail(id) {
         let param = {
           'moldlineId':parseInt(id),
-          'pdtGlueKindName':this.$route.query.pdtGlueKindName,
+          'pdtGlueKind': this.$route.query.pdtGlueKind,
           'moldingBatch': this.$route.query.moldingBatch,
           'moldingDate': this.$route.query.moldingDate,
+          'ftyId' : this.$store.state.user.ftyId
         }
         return this.excute(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.selectByMoldineId, param).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {
@@ -259,7 +260,7 @@
             this.moldingRecordList = list
             for (let i of  this.moldingRecordList) {
               i.moldingItemId = i.itemId
-              if (i.productUniqueCode) {
+              if (i.productUselectProductByBindBarcodeniqueCode) {
                 this.$set(i, 'readOnly', ['productUniqueCode'])
                 i.readOnlyUniqueCode = true
                 this.productUniqueCodeCount++

+ 3 - 4
src/view/pdm/molding-record/index.vue

@@ -36,7 +36,6 @@
     <div>
       <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
                primaryKey="moldingId"
-               :pageFlag="true"
                :choose-flag="false"
                :page-total="pageInfo.total"
                :current-page="pageInfo.currentPage"
@@ -206,7 +205,7 @@ export default {
           this.$router.push({
             path:'/pdm/molding-record/bind-barcode/'+rows[0].moldlineId,
             query:{
-              'pdtGlueKindName':rows[0].pdtGlueKindName,
+              'pdtGlueKind':rows[0].pdtGlueKind,
               'moldingBatch':rows[0].moldingBatch,
               'moldingDate':rows[0].moldingDate,
             }
@@ -217,7 +216,7 @@ export default {
           this.$router.push({
             path:'/pdm/molding-record/bind-barcode-grouping/'+rows[0].moldlineId,
             query:{
-              'pdtGlueKindName':rows[0].pdtGlueKindName,
+              'pdtGlueKind':rows[0].pdtGlueKind,
               'moldingBatch':rows[0].moldingBatch,
               'moldingDate':rows[0].moldingDate,
             }
@@ -228,7 +227,7 @@ export default {
           this.$router.push({
             path:'/pdm/molding-record/bind-barcode-group/'+rows[0].moldlineId,
             query:{
-              'pdtGlueKindName':rows[0].pdtGlueKindName,
+              'pdtGlueKind':rows[0].pdtGlueKind,
               'moldingBatch':rows[0].moldingBatch,
               'moldingDate':rows[0].moldingDate,
             }