Преглед изворни кода

生产+产品报损+工序撤销+editTable-select类型添加clear返回事件

koushanshan пре 3 година
родитељ
комит
c25dc429ae

+ 6 - 1
src/api/pages/pdm/collect.js

@@ -21,10 +21,15 @@ export default {
     getBlameNode:'/get_blame_node',
     getBlameNode:'/get_blame_node',
     //查询缺陷位置
     //查询缺陷位置
     placeListBy:'/place_list_by',
     placeListBy:'/place_list_by',
-    //撤销验证条码
+    //工序撤销验证条码
     checkBarCodeNodeUndo:'/check_bar_code_node_undo',
     checkBarCodeNodeUndo:'/check_bar_code_node_undo',
     //保存产品报损
     //保存产品报损
     scrap:'/scrap',
     scrap:'/scrap',
+    //产品报损撤销验证条码
+    checkBarCodeScrapUndo:'/check_bar_code_scrap_undo',
+    //工序撤销(产品报损撤销、工序撤销)
+    scrapUndo:'/scrap_undo',
+
 
 
   }
   }
 }
 }

+ 1 - 0
src/components/base/edit-table/edit-table.vue

@@ -2070,6 +2070,7 @@ export default {
         this.tableData[e.rowIndex][e.column.field] = null;
         this.tableData[e.rowIndex][e.column.field] = null;
         this.tableData[e.rowIndex][e.column.field + '_Name'] = null;
         this.tableData[e.rowIndex][e.column.field + '_Name'] = null;
       }
       }
+      this.$emit('clear-select',e)
     },
     },
     /**
     /**
      * @desc   : desc
      * @desc   : desc

+ 16 - 1
src/config/index.js

@@ -279,7 +279,22 @@ export default {
     goodProduct:'产品等级-良',
     goodProduct:'产品等级-良',
     excellent:'产品等级-优',
     excellent:'产品等级-优',
   },
   },
-
+  /**
+   *   @desc   : 工序撤销固定节点码
+   *   @date   : 2023/3/9 15:28
+   *   @author : 寇珊珊
+   */
+  reverseNodeId: {
+    id: '00000000-0000-0000-0000-000000000001',
+  },
+  /**
+   *   @desc   : 工序撤销标识
+   *   @date   : 2023/3/9 15:28
+   *   @author : 寇珊珊
+   */
+  reverseFlgUndo: {
+    flg: true,
+  },
   /**
   /**
    * @desc   : 数据字典类型
    * @desc   : 数据字典类型
    * @author : 常皓宁
    * @author : 常皓宁

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

@@ -744,13 +744,17 @@ export const columns = {
   blameUserCode:'工号编码',
   blameUserCode:'工号编码',
   blameUserName:'工号名称',
   blameUserName:'工号名称',
   blameJobCode:'工种编码',
   blameJobCode:'工种编码',
+  blameJobName:'工种名称',
   //撤销
   //撤销
   reasonPdtFlowNodeName:'完成工序',
   reasonPdtFlowNodeName:'完成工序',
   reasonCarrierCode:'所在载具',
   reasonCarrierCode:'所在载具',
-  reasonCause:'撤销原因',
+  undoReason:'撤销原因',
   //产品报损
   //产品报损
   damageReason:'损柸原因',
   damageReason:'损柸原因',
   gradeClassification:'产品分级',
   gradeClassification:'产品分级',
+  scrapAgoNodeName:'报损工序',
+  pdtDefectName:'损坯原因',
+  pdtDefectData:'损坯日期',
 
 
   //工位打卡
   //工位打卡
   replaceStaffName:'替班员工',
   replaceStaffName:'替班员工',

+ 1 - 1
src/view-app/app/piecework-procedure/climb-kiln/index.vue

@@ -300,7 +300,7 @@ export default {
             this.tableRowData = this.tableRowData.concat(res.data)
             this.tableRowData = this.tableRowData.concat(res.data)
             for (let i of this.tableRowData.filter(it => !it.carCode)) {
             for (let i of this.tableRowData.filter(it => !it.carCode)) {
               i.kilnCode = this.formData.kilnCode
               i.kilnCode = this.formData.kilnCode
-              i.carCode = this.formData.kilnCode + this.formData.KilnCarNumber
+              i.carCode = this.formData.kilnCode + '-' + this.formData.KilnCarNumber
               if (this.formData.carrierRangeId) {
               if (this.formData.carrierRangeId) {
                 i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
                 i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
                 i.carrierRangeId = this.formData.carrierRangeId
                 i.carrierRangeId = this.formData.carrierRangeId

+ 1 - 1
src/view-app/app/piecework-procedure/in-kiln/index.vue

@@ -184,7 +184,7 @@ export default {
           //页面table赋值
           //页面table赋值
           for (let i of res.data.productList) {
           for (let i of res.data.productList) {
             i.kilnCode = this.formData.kilnCode
             i.kilnCode = this.formData.kilnCode
-            i.carCode = this.formData.kilnCode + this.formData.KilnCarNumber
+            i.carCode = this.formData.kilnCode + '-' + this.formData.KilnCarNumber
           }
           }
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           //计件模式为单品直接调用保存
           //计件模式为单品直接调用保存

+ 1 - 1
src/view-app/app/piecework-procedure/out-kiln/index.vue

@@ -181,7 +181,7 @@ export default {
           //页面table赋值
           //页面table赋值
           for (let i of res.data.productList) {
           for (let i of res.data.productList) {
             i.kilnCode = this.formData.kilnCode
             i.kilnCode = this.formData.kilnCode
-            i.carCode = this.formData.kilnCode + this.formData.KilnCarNumber
+            i.carCode = this.formData.kilnCode + '-' + this.formData.KilnCarNumber
           }
           }
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           //计件模式为单品直接调用保存
           //计件模式为单品直接调用保存

+ 1 - 1
src/view-app/app/piecework-procedure/uninstall-kiln/index.vue

@@ -180,7 +180,7 @@ export default {
           //页面table赋值
           //页面table赋值
           for (let i of res.data.productList) {
           for (let i of res.data.productList) {
             i.kilnCode = this.formData.kilnCode
             i.kilnCode = this.formData.kilnCode
-            i.carCode = this.formData.kilnCode + this.formData.KilnCarNumber
+            i.carCode = this.formData.kilnCode + '-' + this.formData.KilnCarNumber
           }
           }
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           this.tableRowData = this.tableRowData.concat(res.data.productList)
 
 

+ 2 - 5
src/view/mst/product-view/config/ProductView.js

@@ -33,7 +33,6 @@ export default class Product {
   static graphJson = null //图形对象
   static graphJson = null //图形对象
   static deleteNodeList = null//被删除节点
   static deleteNodeList = null//被删除节点
   static nodeClickValue = null//点击节点
   static nodeClickValue = null//点击节点
-  static delFlag = false//删除标识
   static graph = null //图形对象
   static graph = null //图形对象
   static embedPadding = 30 // 触发群组动态调整大小的padding
   static embedPadding = 30 // 触发群组动态调整大小的padding
   ctrlPressed = false//ctrl键是是否按下
   ctrlPressed = false//ctrl键是是否按下
@@ -264,15 +263,13 @@ export default class Product {
     // region 删除
     // region 删除
     this.graph.bindKey(['backspace', 'del'], () => {
     this.graph.bindKey(['backspace', 'del'], () => {
       const cells = this.graph.getSelectedCells()
       const cells = this.graph.getSelectedCells()
-
-      if(cells.length==0 && !this.delFlag ){
+      if(cells.length==0){
         iView.Message.info(i18n.messages[i18n.locale].W_119)
         iView.Message.info(i18n.messages[i18n.locale].W_119)
         return
         return
       }
       }
-      if (cells.length &&  !this.delFlag) {
+      if (cells.length>0) {
         this.deleteNodeList(cells)
         this.deleteNodeList(cells)
         this.graph.removeCells(cells)
         this.graph.removeCells(cells)
-        this.delFlag =!this.delFlag
       }
       }
     })
     })
     // endregion
     // endregion

+ 0 - 7
src/view/mst/product-view/form.vue

@@ -135,9 +135,7 @@
         fileList: [],//文件集合
         fileList: [],//文件集合
         imageUrl: null,//当前图片地址
         imageUrl: null,//当前图片地址
         imageColumn: [
         imageColumn: [
-          // {field: 'imageName', type: 'text', width: 150},//图片名称
           { field: 'displayNo', type: 'number', width: 'auto' },//显示顺序
           { field: 'displayNo', type: 'number', width: 'auto' },//显示顺序
-          // {field: 'imageRemarks', type: 'text', width: 200},//图片备注
           {
           {
             field: 'productPlaceId',
             field: 'productPlaceId',
             title: self.$t('placeCode'),
             title: self.$t('placeCode'),
@@ -250,7 +248,6 @@
         // console.log("index",index)
         // console.log("index",index)
         // console.log("nowPicIndex",this.nowPicIndex)
         // console.log("nowPicIndex",this.nowPicIndex)
         //当前画布路径 和 文件集合[index]图片路径不相等
         //当前画布路径 和 文件集合[index]图片路径不相等
-        // if (this.imageUrl != this.fileList[index].imageData || saveFlag) {
         // 记录当前图标
         // 记录当前图标
         if (this.imageList[this.nowPicIndex]) {
         if (this.imageList[this.nowPicIndex]) {
           this.nowImage = { ...this.imageList[this.nowPicIndex] }
           this.nowImage = { ...this.imageList[this.nowPicIndex] }
@@ -290,10 +287,8 @@
             remarks: null,
             remarks: null,
           }
           }
         }
         }
-        // }
         if (!saveFlag) {
         if (!saveFlag) {
           //说明当前画布存在
           //说明当前画布存在
-          // if (this.fileList[index].placeRange && this.fileList[index].placeRange.cells.length > 0) {
           if (this.fileList[index].placeRange) {
           if (this.fileList[index].placeRange) {
             this.imageColumnList = this.fileList[index].productViewPlaceVOList
             this.imageColumnList = this.fileList[index].productViewPlaceVOList
             this.graph = Product.init(this.$refs.container, (val) => {
             this.graph = Product.init(this.$refs.container, (val) => {
@@ -320,8 +315,6 @@
                 image: this.fileList[index].imageData,
                 image: this.fileList[index].imageData,
                 opacity: 0.2,
                 opacity: 0.2,
                 size: 'contain',
                 size: 'contain',
-
-
               }
               }
             )
             )
           }
           }

+ 1 - 1
src/view/pdm/data-collection/climbKiln-add.vue

@@ -216,7 +216,7 @@
                 this.tableData = this.tableData.concat(res.data)
                 this.tableData = this.tableData.concat(res.data)
                 for (let i  of  this.tableData.filter(it => !it.carCode)) {
                 for (let i  of  this.tableData.filter(it => !it.carCode)) {
                   i.kilnCode = this.formData.kilnCode
                   i.kilnCode = this.formData.kilnCode
-                  i.carCode = this.formData.kilnCode + this.formData.KilnCarNumber
+                  i.carCode = this.formData.kilnCode + '-' +this.formData.KilnCarNumber
                   if (this.formData.carrierRangeId) {
                   if (this.formData.carrierRangeId) {
                     i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
                     i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
                     i.carrierRangeId = this.formData.carrierRangeId
                     i.carrierRangeId = this.formData.carrierRangeId

+ 2 - 0
src/view/pdm/data-collection/climbKiln.vue

@@ -89,10 +89,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 2 - 0
src/view/pdm/data-collection/finishCheck.vue

@@ -120,10 +120,12 @@
           {
           {
             //产品编码
             //产品编码
             itemCode: 'modelCode',
             itemCode: 'modelCode',
+            itemName: 'productCode',
           },
           },
           {
           {
             //产品名称
             //产品名称
             itemCode: 'modelName',
             itemCode: 'modelName',
+            itemName: 'productName',
           },
           },
           {
           {
             //产品类别
             //产品类别

+ 59 - 27
src/view/pdm/data-collection/halfCheck-add.vue

@@ -29,7 +29,7 @@
           <!--产品条码-->
           <!--产品条码-->
           <DkFormItem :required="true" prop="barCode">
           <DkFormItem :required="true" prop="barCode">
             <InputPop :readonly="!formData.prodUserId" ref="barCode" v-model="formData.barCode" @on-enter="onBarCode"
             <InputPop :readonly="!formData.prodUserId" ref="barCode" v-model="formData.barCode" @on-enter="onBarCode"
-                      @on-blur="onBarCode"/>
+                      @on-blur="onBarCode" @on-clear="clearBarCode"/>
           </DkFormItem>
           </DkFormItem>
           <!--商标-->
           <!--商标-->
           <DkFormItem :required="true" prop="logoName">
           <DkFormItem :required="true" prop="logoName">
@@ -74,6 +74,7 @@
                        :freeze="false"
                        :freeze="false"
                        :add-flag="false" :delete-flag="false"
                        :add-flag="false" :delete-flag="false"
                        @chooseData="chooseData"
                        @chooseData="chooseData"
+                       @clear-select="clearSelect"
                        controlId="defectCode"
                        controlId="defectCode"
                        @changeValue="changeValue"
                        @changeValue="changeValue"
             ></EditTable>
             ></EditTable>
@@ -83,7 +84,6 @@
                      :pageFlag="false"
                      :pageFlag="false"
                      :pageTotalFlag="false"
                      :pageTotalFlag="false"
                      :linkClickChecked="true"
                      :linkClickChecked="true"
-                     @select-change="staffSelectChange($event)"
                      name="table">
                      name="table">
               <DkTableColumn field="staffName" :title="$t('staffName')" width="auto"></DkTableColumn>
               <DkTableColumn field="staffName" :title="$t('staffName')" width="auto"></DkTableColumn>
             </DkTable>
             </DkTable>
@@ -339,6 +339,22 @@
         }
         }
       },
       },
       /**
       /**
+       *   @desc   : 产品条码清空
+       *   @date   : 2023/3/22 13:27
+       *   @author : 寇珊珊
+       */
+      clearBarCode(){
+        this.formData.barCode = null
+          this.formData.productId = null
+          this.formData.productCode = null
+          this.formData.productName = null
+          this.formData.logoName = null
+          this.formData.colourName = null
+          this.formData.opnGradeId = null
+          this.formData.gradeName = null
+          this.formData.opnGradeKind = null
+      },
+      /**
        *   @desc   : 查询缺陷数据
        *   @desc   : 查询缺陷数据
        *   @date   : 2023/3/9 10:46
        *   @date   : 2023/3/9 10:46
        *   @author : 寇珊珊
        *   @author : 寇珊珊
@@ -370,18 +386,18 @@
         }
         }
         let params = {
         let params = {
           ftyId: this.formData.ftyId,
           ftyId: this.formData.ftyId,
-          userId: this.userId?parseInt(this.userId):null,
+          userId: this.userId ? parseInt(this.userId) : null,
         }
         }
         this.excute(this.$service.commonService, this.$service.commonService.getTeamStaff, params).then(res => {
         this.excute(this.$service.commonService, this.$service.commonService.getTeamStaff, params).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {
           if (res.code === this.$config.SUCCESS_CODE) {
             this.staffList = res.data.list
             this.staffList = res.data.list
-            for(let i  of this.staffList){
-              i.blameStaffId=i.staffId
-              i.blameWsJobId=i.jobId
+            for (let i  of this.staffList) {
+              i.blameStaffId = i.staffId
+              i.blameWsJobId = i.jobId
             }
             }
-            if(!this.jobId ||this.staffList.filter(it=>it.jobId==this.jobId).length==0){
+            if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
               let _this = this
               let _this = this
-              setTimeout(()=>{
+              setTimeout(() => {
                 _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
                 _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
               }, 200)
               }, 200)
             }
             }
@@ -470,30 +486,30 @@
             })
             })
             this.userId = list[0].userId
             this.userId = list[0].userId
             this.jobId = list[0].jobId
             this.jobId = list[0].jobId
-            this.detailColumns[6].disabled=true
-            this.detailColumns[7].disabled=true
+            this.detailColumns[6].disabled = true
+            this.detailColumns[7].disabled = true
             //员工
             //员工
-            this.staffList= list[0].clockList
-            for(let i  of this.staffList){
-              i.blameStaffId=i.staffId
-              i.blameWsJobId=i.jobId
+            this.staffList = list[0].clockList
+            for (let i  of this.staffList) {
+              i.blameStaffId = i.staffId
+              i.blameWsJobId = i.jobId
             }
             }
-            if(!this.jobId ||this.staffList.filter(it=>it.jobId==this.jobId).length==0){
+            if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
               let _this = this
               let _this = this
-              setTimeout(()=>{
+              setTimeout(() => {
                 _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
                 _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
               }, 200)
               }, 200)
             }
             }
           }
           }
         }
         }
         //责任工号
         //责任工号
-      else if (colItem.field == 'userName') {
+        else if (colItem.field == 'userName') {
           this.userId = row.userId
           this.userId = row.userId
           this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
           this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
             blameUserId: row.userId,
             blameUserId: row.userId,
             blameUserName: row.userName,
             blameUserName: row.userName,
           })
           })
-          if(this.userId){
+          if (this.userId) {
             //查询员工
             //查询员工
             this.getStaff()
             this.getStaff()
           }
           }
@@ -555,10 +571,9 @@
             }
             }
           })
           })
         }
         }
-        //todo  现在没有小叉叉的清除事件
         else if (field === 'blameNodeId') {
         else if (field === 'blameNodeId') {
           this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
           this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
-            blameNodeId:null,
+            blameNodeId: null,
             blameNodeName: null,
             blameNodeName: null,
             //责任工号
             //责任工号
             blameUserId: null,
             blameUserId: null,
@@ -574,12 +589,29 @@
         }
         }
       },
       },
       /**
       /**
-       *   @desc   : 责任员工选择
-       *   @date   : 2023/3/20 10:38
+       *   @desc   : 改变select类型值
+       *   @date   : 2023/3/22 13:45
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
-      staffSelectChange(list, row, checked, allFlag) {
-        console.log('staffSelectChange', list, row, checked, allFlag)
+      clearSelect(value){
+        if (value.column.field === 'blameNodeId') {
+          this.detailColumns[6].disabled = false
+          this.detailColumns[7].disabled = false
+          this.detailList[0] = Object.assign(this.detailList[0], {
+            //责任工号
+            blameUserId: null,
+            blameUserName: null,
+            userName: null,
+            //责任工种
+            blameWsJobId: null,
+            blameWsJobName: null,
+            jobName: null,
+          })
+          this.$refs.recordTable.$refs.xTable.reloadData(this.$refs.recordTable.tableData)
+          this.staffList=null
+          this.userId = null
+          this.jobId = null
+        }
       },
       },
       /**
       /**
        *   @desc   : 删除提交行数据
        *   @desc   : 删除提交行数据
@@ -624,7 +656,7 @@
         //endregion
         //endregion
 
 
         //region 缺陷位置
         //region 缺陷位置
-        if (item && this.formData.opnGradeKind != this.$config.gradeKindType.excellent &&  item.pdtPlaceId == null) {
+        if (item && this.formData.opnGradeKind != this.$config.gradeKindType.excellent && item.pdtPlaceId == null) {
           this.$Message.error(this.$t('W_069', { 'param': this.$t('pdtPlaceId') }))
           this.$Message.error(this.$t('W_069', { 'param': this.$t('pdtPlaceId') }))
           this.setErrToRow(item, this.$t('W_093', {
           this.setErrToRow(item, this.$t('W_093', {
             'param': this.$t('pdtPlaceId')
             'param': this.$t('pdtPlaceId')
@@ -699,7 +731,7 @@
         }
         }
         this.detailList[0].info = null
         this.detailList[0].info = null
         this.detailList[0].blameStaffName = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords().map(map => map.staffName).toString()
         this.detailList[0].blameStaffName = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords().map(map => map.staffName).toString()
-        this.detailList[0].prodDefectStaffList =this.$refs['staff-table-select'].$refs.table.getCheckboxRecords()
+        this.detailList[0].prodDefectStaffList = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords()
         //缺陷编码
         //缺陷编码
         this.detailList[0].pdtDefectCode = this.detailList[0].defectCode
         this.detailList[0].pdtDefectCode = this.detailList[0].defectCode
         //缺陷名称
         //缺陷名称
@@ -796,7 +828,7 @@
        */
        */
       validData() {
       validData() {
         let noList = []
         let noList = []
-        noList = noList.concat(this.editDetailList.copy().filter(f => f.pdtDefectId).map(m => m.pdtDefectId))
+        noList = noList.concat(this.editDetailList.copy().filter(f => f.pdtDefectId).map(m => m.pdtDefectId+'-'+m.pdtPlaceId))
         if (noList.length != noList.unique().length) {
         if (noList.length != noList.unique().length) {
           this.$Message.error(this.$t('W_114'))
           this.$Message.error(this.$t('W_114'))
           return false
           return false

+ 2 - 0
src/view/pdm/data-collection/halfCheck.vue

@@ -120,10 +120,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 2 - 0
src/view/pdm/data-collection/inKiln.vue

@@ -86,10 +86,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 2 - 0
src/view/pdm/data-collection/outKiln.vue

@@ -86,10 +86,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 2 - 0
src/view/pdm/data-collection/recover.vue

@@ -79,10 +79,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 1 - 1
src/view/pdm/data-collection/register-add.vue

@@ -325,7 +325,7 @@
               return
               return
             }
             }
             this.userKind = res.data.userKind
             this.userKind = res.data.userKind
-            //生产工号赋默认值
+            //生产工号赋默认值 节点工号-生产
             if (this.userKind == this.$config.operationUserType.produceUser) {
             if (this.userKind == this.$config.operationUserType.produceUser) {
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
               this.formData.prodUserId = this.$store.state.user.id

+ 2 - 0
src/view/pdm/data-collection/register.vue

@@ -82,10 +82,12 @@
           {
           {
             //产品编码
             //产品编码
             itemCode: 'modelCode',
             itemCode: 'modelCode',
+            itemName: 'productCode',
           },
           },
           {
           {
             //产品名称
             //产品名称
             itemCode: 'modelName',
             itemCode: 'modelName',
+            itemName: 'productName',
           },
           },
           {
           {
             //产品类别
             //产品类别

+ 2 - 0
src/view/pdm/data-collection/uninstallKiln.vue

@@ -87,10 +87,12 @@ export default {
         {
         {
           //产品编码
           //产品编码
           itemCode: 'modelCode',
           itemCode: 'modelCode',
+          itemName: 'productCode',
         },
         },
         {
         {
           //产品名称
           //产品名称
           itemCode: 'modelName',
           itemCode: 'modelName',
+          itemName: 'productName',
         },
         },
         {
         {
           //产品类别
           //产品类别

+ 37 - 72
src/view/pdm/process-node-reverse/add.vue

@@ -40,24 +40,24 @@
             <InputPop ref="carrierCode" v-model="formData.carrierCode" :readonly="true"/>
             <InputPop ref="carrierCode" v-model="formData.carrierCode" :readonly="true"/>
           </DkFormItem>
           </DkFormItem>
           <!--商标-->
           <!--商标-->
-          <DkFormItem :required="true" prop="logoName">
+          <DkFormItem prop="logoName">
             <InputPop ref="logoName" v-model="formData.logoName" :readonly="true"/>
             <InputPop ref="logoName" v-model="formData.logoName" :readonly="true"/>
           </DkFormItem>
           </DkFormItem>
           <!--釉色-->
           <!--釉色-->
-          <DkFormItem :required="true" prop="colourName">
+          <DkFormItem prop="colourName">
             <InputPop ref="colourName" v-model="formData.colourName" :readonly="true"/>
             <InputPop ref="colourName" v-model="formData.colourName" :readonly="true"/>
           </DkFormItem>
           </DkFormItem>
           <!--编码-->
           <!--编码-->
-          <DkFormItem :required="true" prop="productCode">
+          <DkFormItem prop="productCode">
             <InputPop ref="productCode" v-model="formData.productCode" :readonly="true"/>
             <InputPop ref="productCode" v-model="formData.productCode" :readonly="true"/>
           </DkFormItem>
           </DkFormItem>
           <!--名称-->
           <!--名称-->
-          <DkFormItem :required="true" prop="productName">
+          <DkFormItem prop="productName">
             <InputPop ref="productName" v-model="formData.productName" :readonly="true"/>
             <InputPop ref="productName" v-model="formData.productName" :readonly="true"/>
           </DkFormItem>
           </DkFormItem>
           <!--撤销原因-->
           <!--撤销原因-->
-          <DkFormItem :required="true" prop="reasonCause">
-            <InputPop ref="reasonCause" v-model="formData.reasonCause" @on-blur="changeReasonCause"/>
+          <DkFormItem :required="true" prop="undoReason">
+            <InputPop ref="undoReason" v-model="formData.undoReason"/>
           </DkFormItem>
           </DkFormItem>
         </DkForm>
         </DkForm>
       </DkPanel>
       </DkPanel>
@@ -94,11 +94,12 @@
         tableData: [],
         tableData: [],
         loading: false,
         loading: false,
         tableHeight: 620,
         tableHeight: 620,
+        barCodeList: [],//产品条码集合
         // 画面表单数据
         // 画面表单数据
         formData: {
         formData: {
           barCode: '',
           barCode: '',
           ftyId: this.$store.state.user.ftyId,
           ftyId: this.$store.state.user.ftyId,
-          reasonCause: null,//撤销原因
+          undoReason: null,//撤销原因
           productId: null,
           productId: null,
           productCode: null,
           productCode: null,
           productName: null,
           productName: null,
@@ -110,8 +111,6 @@
           pdtFlowNodeName: null,//完成工序
           pdtFlowNodeName: null,//完成工序
           carrierCode: null,//所在载具
           carrierCode: null,//所在载具
         },
         },
-        oldReasonCause: null,//撤销原因-判断上次和本次是否一致
-        flowNodeId: self.$route.meta.menuUuid,
         // 明细列表
         // 明细列表
         detailColumns: [
         detailColumns: [
           // 产品条码
           // 产品条码
@@ -134,11 +133,8 @@
           { field: 'productCode', type: 'disabled', width: 'auto' },
           { field: 'productCode', type: 'disabled', width: 'auto' },
           //产品名称
           //产品名称
           { field: 'productName', type: 'disabled', width: 'auto' },
           { field: 'productName', type: 'disabled', width: 'auto' },
-          //撤销原因
-          { field: 'reasonCause', type: 'disabled', width: 'auto' },
         ],
         ],
         detailList: [],
         detailList: [],
-        rowIndex: 0,
       }
       }
     },
     },
     methods: {
     methods: {
@@ -168,34 +164,6 @@
         }
         }
       },
       },
       /**
       /**
-       *   @desc   :  撤销原因修改
-       *   @date   : 2023/3/21 11:28
-       *   @author : 寇珊珊
-       */
-      changeReasonCause() {
-        if (this.formData.reasonCause && this.oldReasonCause) {
-          if (this.formData.reasonCause == this.oldReasonCause) {
-            return
-          } else {
-            this.$IBMessage({
-                content: this.$t('Q_012'),
-                title: this.$t('systemQuestion'),
-              },
-              {
-                ok: () => {
-                  this.detailList = []
-                  this.oldReasonCause = this.formData.reasonCause
-                },
-                cancel: () => {
-                  return
-                }
-              })
-          }
-        } else {
-          this.oldReasonCause = this.formData.reasonCause
-        }
-      },
-      /**
        *   @desc   : 删除提交行数据
        *   @desc   : 删除提交行数据
        *   @date   : 2023/3/10 11:26
        *   @date   : 2023/3/10 11:26
        *   @author : 寇珊珊
        *   @author : 寇珊珊
@@ -209,32 +177,29 @@
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
       addRow() {
       addRow() {
-        this.$refs['formInline'].validate().then(validFlag => {
-          if (validFlag) {
-            //校验名称是否重复
-            if (!this.validData()) {
-              return
-            }
-            let list =[]
-            list.splice(0,0, {})
-            list[0].barCode = this.formData.barCode
-            list[0].productId = this.formData.productId
-            list[0].productCode = this.formData.productCode
-            list[0].productName = this.formData.productName
-            list[0].logoName = this.formData.logoName
-            list[0].colourName = this.formData.colourName
-            list[0].reasonCause = this.formData.reasonCause
-            list[0].moldingDate = this.formData.moldingDate
-            list[0].modelCode = this.formData.modelCode
-            list[0].finishTime = this.formData.finishTime
-            list[0].pdtFlowNodeName = this.formData.pdtFlowNodeName
-            list[0].carrierCode = this.formData.carrierCode
-            this.detailList.push(list[0])
-            //清空表单
-            this.clear(true)
-          } else {
+        if(this.formData.barCode){
+          //校验名称是否重复
+          if (!this.validData()) {
+            return
           }
           }
-        })
+          this.barCodeList.push(this.formData.barCode)
+          let list = []
+          list.splice(0, 0, {})
+          list[0].barCode = this.formData.barCode
+          list[0].productId = this.formData.productId
+          list[0].productCode = this.formData.productCode
+          list[0].productName = this.formData.productName
+          list[0].logoName = this.formData.logoName
+          list[0].colourName = this.formData.colourName
+          list[0].moldingDate = this.formData.moldingDate
+          list[0].modelCode = this.formData.modelCode
+          list[0].finishTime = this.formData.finishTime
+          list[0].pdtFlowNodeName = this.formData.pdtFlowNodeName
+          list[0].carrierCode = this.formData.carrierCode
+          this.detailList.push(list[0])
+          //清空表单
+          this.clear(true)
+        }
       },
       },
       /**
       /**
        *   @desc   : 设置传参
        *   @desc   : 设置传参
@@ -242,11 +207,10 @@
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
       setParams() {
       setParams() {
-        this.params = JSON.parse(JSON.stringify(this.formData))
-        this.params.barCodeList = [this.params.barCode]
-        delete this.params.barCode
-        this.params.detailLiet = this.detailLiet
-        this.params.flowNodeId = this.flowNodeId
+        this.params = {
+          barCodeList: this.barCodeList,
+          undoReason: this.formData.undoReason,
+        }
       },
       },
       /**
       /**
        *   @desc   : 校验重复数据
        *   @desc   : 校验重复数据
@@ -268,7 +232,7 @@
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
       saveData() {
       saveData() {
-        return this.excute(this.$service.collectService, '/', this.params)
+        return this.excute(this.$service.collectService, this.$service.collectService.scrapUndo, this.params)
       },
       },
       /**
       /**
        *   @desc   : 清空
        *   @desc   : 清空
@@ -278,7 +242,8 @@
       clear(value) {
       clear(value) {
         if (!value) {
         if (!value) {
           this.detailList = []
           this.detailList = []
-          this.formData.reasonCause = null
+          this.barCodeList = []
+          this.formData.undoReason = null
         }
         }
         this.formData.barCode = null
         this.formData.barCode = null
         this.formData.productId = null
         this.formData.productId = null

+ 29 - 19
src/view/pdm/process-node-reverse/index.vue

@@ -82,38 +82,47 @@
           {
           {
             //产品编码
             //产品编码
             itemCode: 'modelCode',
             itemCode: 'modelCode',
+            itemName: 'productCode',
           },
           },
           {
           {
             //产品名称
             //产品名称
             itemCode: 'modelName',
             itemCode: 'modelName',
+            itemName: 'productName',
           },
           },
           {
           {
-            //产品类别
-            itemCode: 'modelCategory',
-            valueFormat: { code: 'categoryId' },
-            valueKind: 'S-SEARCH',
-            magnifierType: self.$config.MagnifierType.modelCategoryReport
+            //产品型号
+            itemCode: 'mouldCode',
           },
           },
+          // {
+          //   //完成工序
+          //   itemCode: 'pdtFlowNodeName',
+          //   itemName: 'reasonPdtFlowNodeName',
+          // },
+          // {
+          //   //完成时间
+          //   itemCode: 'finishTime',
+          //   valueFormat: {code: 'finishTime', default: [new Date().toDateStr(), new Date().toDateStr()]},
+          //   valueKind: 'DATE_RANGE',
+          // },
+          // {
+          //   //成型日期
+          //   itemCode: 'moldingDate',
+          //   valueFormat: {code: 'moldingDate', default: [new Date().toDateStr(), new Date().toDateStr()]},
+          //   valueKind: 'DATE_RANGE',
+          // },
           {
           {
-            //生产工号
-            itemCode: 'prodUserCode',
+            //所在载具
+            itemCode: 'carrierCode',
+            itemName: 'reasonCarrierCode',
           },
           },
           {
           {
-            //组织机构
-            itemCode: 'orgName',
-            valueFormat: { code: 'orgName' },
-            valueKind: 'S-SEARCH',
-            magnifierType: self.$config.MagnifierType.organization
-          },
-          {
-            //操作时间
-            itemCode: 'opnTime',
-            valueFormat: {code: 'opnTime', default: [new Date().toDateStr(), new Date().toDateStr()]},
-            valueKind: 'DATE_RANGE'
+            //撤销原因
+            itemCode: 'undoReason',
           },
           },
         ],
         ],
-        flowNodeId: self.$route.meta.exMenuUuid,
+        flowNodeId: self.$config.reverseNodeId.id,
         ftyId: self.$store.state.user.ftyId,
         ftyId: self.$store.state.user.ftyId,
+        flgUndo:self.$config.reverseFlgUndo.flg
       }
       }
     },
     },
     methods: {
     methods: {
@@ -125,6 +134,7 @@
        */
        */
       getData(params) {
       getData(params) {
         params.flowNodeId = this.flowNodeId
         params.flowNodeId = this.flowNodeId
+        params.flgUndo = this.flgUndo
         return this.excute(this.$service.produceService, this.$service.produceService.search.url, params)
         return this.excute(this.$service.produceService, this.$service.produceService.search.url, params)
       },
       },
 
 

+ 32 - 32
src/view/pdm/prod-defect/add.vue

@@ -213,7 +213,6 @@
         if (this.formData.barCode) {
         if (this.formData.barCode) {
           this.excuteNoParam(this.$service.collectService, this.$service.collectService.checkBarCodeNodeUndo, [this.formData.barCode]).then(res => {
           this.excuteNoParam(this.$service.collectService, this.$service.collectService.checkBarCodeNodeUndo, [this.formData.barCode]).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
             if (res.code === this.$config.SUCCESS_CODE) {
-              this.barCodeList.push(this.formData.barCode)
               this.formData.productId = res.data.uniqueId
               this.formData.productId = res.data.uniqueId
               this.formData.productCode = res.data.modelCode
               this.formData.productCode = res.data.modelCode
               this.formData.productName = res.data.modelName
               this.formData.productName = res.data.modelName
@@ -307,34 +306,30 @@
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
       addRow() {
       addRow() {
-        this.$refs['formInline'].validate().then(validFlag => {
-          if (validFlag) {
-            //校验名称是否重复
-            if (!this.validData()) {
-              return
-            }
-            let list = []
-            list.splice(0, 0, {})
-            list[0].barCode = this.formData.barCode//产品条码
-            list[0].productId = this.formData.productId
-            list[0].productCode = this.formData.productCode//产品编码
-            list[0].productName = this.formData.productName//产品名称
-            list[0].logoName = this.formData.logoName//商标
-            list[0].colourName = this.formData.colourName//釉色
-            list[0].moldingDate = this.formData.moldingDate//成型时间
-            list[0].modelCode = this.formData.modelCode//型号编码
-            list[0].finishTime = this.formData.finishTime//完成时间
-            list[0].pdtFlowNodeName = this.formData.pdtFlowNodeName//完成工序
-            list[0].carrierCode = this.formData.carrierCode//所在载具
-            list[0].moldlineName = this.formData.moldlineName//成型线
-            list[0].blameStaffName = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords().map(map => map.staffName).toString()
-            list[0].prodDefectStaffList = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords()
-            this.detailList.push(list[0])
-            //清空表单
-            this.clear(true)
-          } else {
+        if(this.formData.barCode) {
+          //校验名称是否重复
+          if (!this.validData()) {
+            return
           }
           }
-        })
+          this.barCodeList.push(this.formData.barCode)
+          let list = []
+          list.splice(0, 0, {})
+          list[0].barCode = this.formData.barCode//产品条码
+          list[0].productId = this.formData.productId
+          list[0].productCode = this.formData.productCode//产品编码
+          list[0].productName = this.formData.productName//产品名称
+          list[0].logoName = this.formData.logoName//商标
+          list[0].colourName = this.formData.colourName//釉色
+          list[0].moldingDate = this.formData.moldingDate//成型时间
+          list[0].modelCode = this.formData.modelCode//型号编码
+          list[0].finishTime = this.formData.finishTime//完成时间
+          list[0].pdtFlowNodeName = this.formData.pdtFlowNodeName//完成工序
+          list[0].carrierCode = this.formData.carrierCode//所在载具
+          list[0].moldlineName = this.formData.moldlineName//成型线
+          this.detailList.push(list[0])
+          //清空表单
+          this.clear(true)
+        }
       },
       },
       /**
       /**
        *   @desc   : 设置传参
        *   @desc   : 设置传参
@@ -342,11 +337,16 @@
        *   @author : 寇珊珊
        *   @author : 寇珊珊
        */
        */
       setParams() {
       setParams() {
+        let productionDefect = {
+          pdtDefectId: this.LossReportingFormData.pdtDefectId,
+          blameUserId: this.LossReportingFormData.blameUserId,
+          prodDefectStaffList: this.$refs['staff-table-select'].$refs.table.getCheckboxRecords()
+        }
         this.params = {
         this.params = {
           opnGradeId: this.LossReportingFormData.opnGradeId,
           opnGradeId: this.LossReportingFormData.opnGradeId,
-          remarks: this.formData.remarks,
+          remarks: this.LossReportingFormData.remarks,
           barCodeList: this.barCodeList,
           barCodeList: this.barCodeList,
-          productionDefect: this.detailLiet.map(map => map.prodDefectStaffList),
+          productionDefect: productionDefect,
         }
         }
       },
       },
       /**
       /**
@@ -386,8 +386,9 @@
           this.LossReportingFormData.pdtDefectId = null
           this.LossReportingFormData.pdtDefectId = null
           this.LossReportingFormData.defectName = null
           this.LossReportingFormData.defectName = null
           this.LossReportingFormData.remarks = null
           this.LossReportingFormData.remarks = null
+          this.staffList = []
+          this.barCodeList = []
         }
         }
-        this.staffList = null
         this.formData.barCode = null
         this.formData.barCode = null
         this.formData.productId = null
         this.formData.productId = null
         this.formData.productCode = null
         this.formData.productCode = null
@@ -400,7 +401,6 @@
         this.formData.finishTime = null
         this.formData.finishTime = null
         this.formData.pdtFlowNodeName = null
         this.formData.pdtFlowNodeName = null
         this.formData.carrierCode = null
         this.formData.carrierCode = null
-
       },
       },
       /**
       /**
        *   @desc   : 查询产品分级
        *   @desc   : 查询产品分级

+ 54 - 39
src/view/pdm/prod-defect/index.vue

@@ -39,26 +39,30 @@
         <DkTableColumn field="modelCode" width="auto"></DkTableColumn>
         <DkTableColumn field="modelCode" width="auto"></DkTableColumn>
         <!--产品名称-->
         <!--产品名称-->
         <DkTableColumn field="modelName" width="auto"></DkTableColumn>
         <DkTableColumn field="modelName" width="auto"></DkTableColumn>
-        <!--生产工号-->
-        <DkTableColumn field="prodUserCode" width="auto"></DkTableColumn>
-        <!--模具名称-->
-        <DkTableColumn field="modelMouldCode" :title="$t('produceModelCode')" width="auto"></DkTableColumn>
-        <!--注浆日期-->
-        <DkTableColumn field="moldingDate" width="auto"></DkTableColumn>
-        <!--成型工号-->
-        <DkTableColumn field="moldingUserCode" :title="$t('moldingUser')" width="auto"></DkTableColumn>
-        <!--回收标识-->
-        <DkTableColumn field="flgRecycled" type="switch" :switch-disabled="true"></DkTableColumn>
-        <!--商标-->
-        <DkTableColumn field="logoName" width="auto"></DkTableColumn>
-        <!--注浆日期-->
-        <DkTableColumn field="moldingDate" width="auto"></DkTableColumn>
-        <!--注浆次数-->
-        <DkTableColumn field="moldedNum" :title="$t('slipCastingNum')" width="auto"></DkTableColumn>
-        <!--载具条码-->
-        <DkTableColumn field="carrierCode"  :title="$t('vehicleBarcode')" width="auto"></DkTableColumn>
-        <DkTableColumn field="opnTime" width="auto"></DkTableColumn>
-        <DkTableColumn field="createUserName" width="auto"></DkTableColumn>
+        <!--产品型号-->
+        <DkTableColumn field="modelCode" width="auto"></DkTableColumn>
+        <!--成型线-->
+        <DkTableColumn field="moldlineName" width="auto"></DkTableColumn>
+        <!--成型日期-->
+        <DkTableColumn field="moldingDate"  width="auto"></DkTableColumn>
+        <!--完成时间-->
+        <DkTableColumn field="finishTime" width="auto"></DkTableColumn>
+        <!--完成工序-->
+        <DkTableColumn field="pdtFlowNodeName" :title="$t('moldingUser')" width="auto"></DkTableColumn>
+        <!--所在载具-->
+        <DkTableColumn field="carrierCode"  width="auto"></DkTableColumn>
+        <!--产品分级-->
+        <DkTableColumn field="opnGradeKindName"  :title="$t('gradeClassification')" width="auto"></DkTableColumn>
+        <!--报损工序-->
+        <DkTableColumn field="scrapAgoNodeName"  width="auto"></DkTableColumn>
+        <!--损柸原因-->
+        <DkTableColumn field="pdtDefectName"  width="auto"></DkTableColumn>
+        <!--责任工号-->
+        <DkTableColumn field="blameUserCode" :title="$t('blameUserId')" width="auto"></DkTableColumn>
+        <!--责任员工-->
+        <DkTableColumn field="blameStaffName"  :title="$t('blameStaffId')" width="auto"></DkTableColumn>
+        <!--备注-->
+        <DkTableColumn field="remarks" width="auto"></DkTableColumn>
       </DkTable>
       </DkTable>
     </div>
     </div>
   </div>
   </div>
@@ -75,6 +79,15 @@
       let self = this
       let self = this
       return {
       return {
         searchContent: [
         searchContent: [
+          // {
+          //   //成型线编码
+          //   itemCode: 'moldlineCode',
+          //   valueFormat: {code: 'uniqueCode'},
+          // },
+          // {
+          //   //成型线名称
+          //   itemCode: 'moldlineName',
+          // },
           {
           {
             //产品条码
             //产品条码
             itemCode: 'uniqueCode',
             itemCode: 'uniqueCode',
@@ -83,37 +96,39 @@
           {
           {
             //产品编码
             //产品编码
             itemCode: 'modelCode',
             itemCode: 'modelCode',
+            itemName: 'productCode',
           },
           },
           {
           {
             //产品名称
             //产品名称
             itemCode: 'modelName',
             itemCode: 'modelName',
+            itemName: 'productName',
           },
           },
           {
           {
-            //产品类别
-            itemCode: 'modelCategory',
-            valueFormat: { code: 'categoryId' },
-            valueKind: 'S-SEARCH',
-            magnifierType: self.$config.MagnifierType.modelCategoryReport
-          },
-          {
-            //生产工号
-            itemCode: 'prodUserCode',
+            //产品型号
+            itemCode: 'mouldCode',
           },
           },
+          // {
+          //   //损柸日期
+          //   itemCode: 'opnTime',
+          //   itemName: 'pdtDefectData',
+          //   valueFormat: {code: 'opnTime', default: [new Date().toDateStr(), new Date().toDateStr()]},
+          //   valueKind: 'DATE_RANGE'
+          // },
+          // {
+          //   //损柸原因
+          //   itemCode: 'pdtDefectName',
+          // },
           {
           {
-            //组织机构
-            itemCode: 'orgName',
-            valueFormat: { code: 'orgName' },
-            valueKind: 'S-SEARCH',
-            magnifierType: self.$config.MagnifierType.organization
+            //责任工号
+            itemCode: 'blameUserCode',
+            itemName: 'blameUserId',
           },
           },
           {
           {
-            //操作时间
-            itemCode: 'opnTime',
-            valueFormat: {code: 'opnTime', default: [new Date().toDateStr(), new Date().toDateStr()]},
-            valueKind: 'DATE_RANGE'
+            //撤销原因
+            itemCode: 'undoReason',
           },
           },
         ],
         ],
-        flowNodeId: self.$route.meta.exMenuUuid,
+        flowNodeId: self.$config.reverseNodeId.id,
         ftyId: self.$store.state.user.ftyId,
         ftyId: self.$store.state.user.ftyId,
       }
       }
     },
     },

+ 249 - 4
src/view/pdm/prod-defect/reverse.vue

@@ -1,11 +1,256 @@
+<!-- @desc:产品报损撤销  @auth:寇珊珊  @time:2023年3月21日15:21:08 -->
 <template>
 <template>
-
+  <div class="main-div">
+    <DkPaxeButton :total="editKeys?editKeys.length:0"
+                  :current="editIndex"
+                  v-if="editKeys && editKeys.length > 1"
+                  @pageChange="editPageChange"></DkPaxeButton>
+    <DkCollapse>
+      <DkPanel prop="essentialInformation">
+        <!--添加行按钮-->
+        <DkButton slot="content" type="success" @click="addRow" size="small"
+                  style="float: left;position: absolute; top: 9px;left: 120px;">{{ $v('add') }}
+        </DkButton>
+        <div style="clear:both"></div>
+        <!--  下拉区域  -->
+        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
+          <!--产品条码-->
+          <DkFormItem :required="true" prop="barCode">
+            <InputPop ref="barCode" v-model="formData.barCode" @on-enter="onBarCode"
+                      @on-blur="onBarCode"/>
+          </DkFormItem>
+          <!--产品型号-->
+          <DkFormItem prop="modelCode">
+            <InputPop ref="modelCode" v-model="formData.modelCode" :readonly="true"/>
+          </DkFormItem>
+          <!--编码-->
+          <DkFormItem prop="productCode">
+            <InputPop ref="productCode" v-model="formData.productCode" :readonly="true"/>
+          </DkFormItem>
+          <!--名称-->
+          <DkFormItem prop="productName">
+            <InputPop ref="productName" v-model="formData.productName" :readonly="true"/>
+          </DkFormItem>
+          <!--产品分级-->
+          <DkFormItem prop="opnGradeKindName" :label="$t('gradeClassification')">
+            <InputPop ref="opnGradeKindName" v-model="formData.opnGradeKindName" :readonly="true"/>
+          </DkFormItem>
+          <!--报损工序-->
+          <DkFormItem prop="scrapAgoNodeName">
+            <InputPop ref="scrapAgoNodeName" v-model="formData.scrapAgoNodeName" :readonly="true"/>
+          </DkFormItem>
+          <!--损柸原因-->
+          <DkFormItem prop="pdtDefectName">
+            <InputPop ref="pdtDefectName" v-model="formData.pdtDefectName" :readonly="true"/>
+          </DkFormItem>
+          <!--责任工号-->
+          <DkFormItem prop="blameUserCode" :label="$t('blameUserId')">
+            <InputPop ref="blameUserCode" v-model="formData.blameUserCode" :readonly="true"/>
+          </DkFormItem>
+          <!--备注-->
+          <DkFormItem prop="remarks">
+            <InputPop ref="remarks" v-model="formData.remarks" :readonly="true"/>
+          </DkFormItem>
+          <!--撤销原因-->
+          <DkFormItem :required="true" prop="undoReason">
+            <InputPop ref="undoReason" v-model="formData.undoReason"/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <div>
+        <!--明细-->
+        <DkPanel prop="details">
+          <div slot="content" :style="'height: ' + tableHeight + 'px'">
+            <!--撤销信息-->
+            <EditTable slot="left" ref="submitTable" :data="detailList"
+                       :columns="detailColumns"
+                       :height="tableHeight-120"
+                       :freeze="false"
+                       :add-flag="false"
+                       @delRow="delSubmitTable"
+            ></EditTable>
+          </div>
+        </DkPanel>
+      </div>
+    </DkCollapse>
+    <!--      下部分按钮区域-->
+    <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-export default {
-  name: "prod-defect-reverse"
-}
+  import { formMixin } from '@/mixins/form'
+
+  export default {
+    name: 'prod-defect-reverse',
+    mixins: [formMixin],
+    data() {
+      let self = this
+      return {
+        tableData: [],
+        loading: false,
+        tableHeight: 620,
+        barCodeList: [],//产品条码集合
+        // 画面表单数据
+        formData: {
+          barCode: '',
+          ftyId: this.$store.state.user.ftyId,
+          undoReason: null,//撤销原因
+          productId: null,
+          productCode: null,
+          productName: null,
+          modelCode: null,//产品型号
+          opnGradeKindName: null,//产品分级
+          scrapAgoNodeName: null,//报损工序
+          pdtDefectName: null,//损柸原因
+          blameUserCode: null,//责任工号
+          remarks: null,//备注
+        },
+        // 明细列表
+        detailColumns: [
+          // 产品条码
+          { field: 'barCode', type: 'disabled', width: 'auto' },
+          //产品型号
+          { field: 'modelCode', type: 'disabled', width: 'auto' },
+          //产品编码
+          { field: 'productCode', type: 'disabled', width: 'auto' },
+          //产品名称
+          { field: 'productName', type: 'disabled', width: 'auto' },
+          // 产品分级
+          { field: 'opnGradeKindName', title: self.$t('gradeClassification'), type: 'disabled', width: 'auto' },
+          //报损工序
+          { field: 'scrapAgoNodeName', type: 'disabled', width: 'auto' },
+          //损柸原因
+          { field: 'pdtDefectName', type: 'disabled', width: 'auto' },
+          //责任工号
+          { field: 'blameUserCode', title: self.$t('blameUserId'), type: 'disabled', width: 'auto' },
+          //备注
+          { field: 'remarks', type: 'disabled', width: 'auto' },
+        ],
+        detailList: [],
+      }
+    },
+    methods: {
+      /**
+       *   @desc   : 产品条码失焦事件
+       *   @date   : 2023/2/28 9:28
+       *   @author : 寇珊珊
+       */
+      onBarCode() {
+        if (this.formData.barCode) {
+          this.excuteNoParam(this.$service.collectService, this.$service.collectService.checkBarCodeScrapUndo, [this.formData.barCode]).then(res => {
+            if (res.code === this.$config.SUCCESS_CODE) {
+              this.formData.productId = res.data.uniqueId
+              this.formData.productCode = res.data.modelCode
+              this.formData.productName = res.data.modelName
+              this.formData.modelCode = res.data.modelMouldCode
+              this.formData.opnGradeKindName = res.data.opnGradeKindName//产品分级
+              this.formData.scrapAgoNodeName = res.data.scrapAgoNodeName//报损工序
+              this.formData.pdtDefectName = res.data.productionDefectList[0].pdtDefectName//损柸原因
+              this.formData.blameUserCode = res.data.productionDefectList[0].blameUserCode//责任工号
+              this.formData.remarks = res.data.productionDefectList[0].remarks//备注
+            } else {
+              this.$Message.error(res.message)
+            }
+          })
+        }
+      },
+      /**
+       *   @desc   : 删除提交行数据
+       *   @date   : 2023/3/10 11:26
+       *   @author : 寇珊珊
+       */
+      delSubmitTable(row, rowIndex) {
+        this.detailList.splice(rowIndex, 1)
+      },
+      /**
+       *   @desc   : 添加行
+       *   @date   : 2023/3/10 8:54
+       *   @author : 寇珊珊
+       */
+      addRow() {
+        if(this.formData.barCode) {
+          //校验名称是否重复
+          if (!this.validData()) {
+            return
+          }
+          this.barCodeList.push(this.formData.barCode)
+          let list = []
+          list.splice(0, 0, {})
+          list[0].barCode = this.formData.barCode
+          list[0].productId = this.formData.productId
+          list[0].productCode = this.formData.productCode
+          list[0].productName = this.formData.productName
+          list[0].modelCode = this.formData.modelCode
+          list[0].opnGradeKindName = this.formData.opnGradeKindName//产品分级
+          list[0].scrapAgoNodeName = this.formData.scrapAgoNodeName//报损工序
+          list[0].pdtDefectName = this.formData.pdtDefectName//损柸原因
+          list[0].blameUserCode = this.formData.blameUserCode//责任工号
+          list[0].remarks = this.formData.remarks//备注
+          this.detailList.push(list[0])
+          //清空表单
+          this.clear(true)
+        }
+      },
+      /**
+       *   @desc   : 设置传参
+       *   @date   : 2023/2/28 11:29
+       *   @author : 寇珊珊
+       */
+      setParams() {
+        this.params = {
+          barCodeList: this.barCodeList,
+          undoReason: this.formData.undoReason,
+        }
+      },
+      /**
+       *   @desc   : 校验重复数据
+       *   @date   : 2023/3/8 8:45
+       *   @author : 寇珊珊
+       */
+      validData() {
+        if (this.detailList.length > 0) {
+          if (this.detailList.filter(it => it.barCode == this.formData.barCode).length > 0) {
+            this.$Message.error(this.$t('W_120'))
+            return false
+          }
+        }
+        return true
+      },
+      /**
+       *   @desc   : 保存数据
+       *   @date   : 2023/3/16 13:28
+       *   @author : 寇珊珊
+       */
+      saveData() {
+        return this.excute(this.$service.collectService, this.$service.collectService.scrapUndo, this.params)
+      },
+      /**
+       *   @desc   : 清空
+       *   @date   : 2023/3/8 10:48
+       *   @author : 寇珊珊
+       */
+      clear(value) {
+        if (!value) {
+          this.detailList = []
+          this.barCodeList =[]
+          this.formData.undoReason = null
+        }
+        this.formData.barCode = null
+        this.formData.productId = null
+        this.formData.productCode = null
+        this.formData.productName = null
+        this.formData.modelCode = null
+        this.formData.opnGradeKindName = null //产品分级
+        this.formData.scrapAgoNodeName = null //报损工序
+        this.formData.pdtDefectName = null //损柸原因
+        this.formData.blameUserCode = null //责任工号
+        this.formData.remarks = null //备注
+      },
+    },
+    created() {
+    },
+  }
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>