瀏覽代碼

Merge branch 'master' of http://git.dongkesoft.com:9001/DK-MES-3.0/mes-web

jiangn 3 年之前
父節點
當前提交
2d9f2a450a

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

@@ -1565,6 +1565,7 @@ export const appOthers = {
   appDefectsOperation:'当前操作有未记录的缺陷',
   appProductionKilnWrong:'当前窑炉车号不存在',
   appNotDetailIsLoss:'当前无修改记录,无法保存',
+  appRepealMenuUuid:'e6a31228-5893-487b-bcc2-2fae990d8e37',
 }
 
 

+ 6 - 3
src/view-app/app/prod-management/bind-carrier/index.vue

@@ -19,7 +19,7 @@
       v-model="formData.productCode"
       :label="$t('appProductUniqueCode')"
       ref="productCode"
-      :readonly="productCodeFlag"
+      :readonly="!formData.carrierCode"
       placeholderType="scan"
       @changeBarCode="goOn"
     />
@@ -50,7 +50,7 @@ export default {
       productCodeFlag:true,
       rows: [
         {name: 'pdtBarcode', title: self.$t('appProductBarcode')},//产品条码
-        {name: 'modelCode', title: self.$t('appProductCodeB')},//产品编码
+        {name: 'modelCode', title: self.$t('appProductUniqueCode')},//产品编码
         {name: 'modelName', title: self.$t('appProductName')},//产品名称
         {name: 'flowNodeName', title: self.$t('appCurrentNode')},//生产工序
         {name: 'prodUserCode', title: self.$t('appProductionJobNumber')},//生产工号
@@ -107,6 +107,7 @@ export default {
             this.$appDialog.alert({message: this.$t('W_002', {'param': this.$t('appVehicleCode')})}).then(() => {
               this.formData.carrierCode = ''
               this.setFocus('carrierCode')
+              this.tableRowData = []
             });
 
           }
@@ -128,7 +129,7 @@ export default {
     // carrieFlowPdtService
     /**
      * @desc   : 检验
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     validData(flag) {
@@ -141,8 +142,10 @@ export default {
         ftyId: this.$store.state.user.ftyId,
         productCode: this.formData.productCode
       }
+      
     },
     goOn() {
+      this.setParams()
       return this.excute(this.$service.carrieFlowPdtService, this.$service.carrieFlowPdtService.getOn.url, this.params, 'productCode', true).then(res=>{
           if (res.code === this.$config.SUCCESS_CODE) {
             this.getData(false)

+ 21 - 29
src/view-app/app/prod-management/unbind-carrier/index.vue

@@ -2,21 +2,16 @@
   <!--  减产品 appSupplementaryProductsTitle-->
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
-    <dk-app-nav-bar :title="$t('appUnBindCarrierTitle')"
-                    @click-left="onClickLeft"></dk-app-nav-bar>
+    <dk-app-nav-bar :title="$t('appUnBindCarrierTitle')" @click-left="onClickLeft"></dk-app-nav-bar>
 
 
     <!--    载具码-->
-    <dk-app-field
-      :label="$t('appVehicleCode')"
-      ref="carrierCode"
-      v-model="formData.carrierCode"
-      placeholderType="scan"
+    <dk-app-field :label="$t('appVehicleCode')" ref="carrierCode" v-model="formData.carrierCode" placeholderType="scan"
       @changeBarCode="onSearch"></dk-app-field>
 
 
     <div ref="scrollTable" class="main-app-table">
-      <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
+      <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
       <!--    列表-->
       <dk-app-table :rows="rows" :tableRowData="tableRowData" :checkboxFlag="true">
       </dk-app-table>
@@ -34,7 +29,7 @@
 
 <script>
 
-import {appFormMixin} from '@/mixins/appform.js'
+import { appFormMixin } from '@/mixins/appform.js'
 
 export default {
   name: "app-unbind-carrier",
@@ -42,13 +37,13 @@ export default {
   data() {
     return {
       rows: [
-        {name: 'pdtBarcode', title: this.$t('appProductBarcode')},//产品条码
-        {name: 'modelCode', title: this.$t('appProductCodeB')},//产品编码
-        {name: 'modelName', title: this.$t('appProductName')},//产品名称
-        {name: 'flowNodeName', title: this.$t('appCurrentNode')},//生产工序
-        {name: 'prodUserCode', title: this.$t('appProductionJobNumber')},//生产工号
+        { name: 'pdtBarcode', title: this.$t('appProductBarcode') },//产品条码
+        { name: 'modelCode', title: this.$t('appProductUniqueCode') },//产品编码
+        { name: 'modelName', title: this.$t('appProductName') },//产品名称
+        { name: 'flowNodeName', title: this.$t('appCurrentNode') },//生产工序
+        { name: 'prodUserCode', title: this.$t('appProductionJobNumber') },//生产工号
       ],//每一条的内容
-      tableRowData:[],
+      tableRowData: [],
       formData: {
         carrierCode: '',
       },
@@ -93,9 +88,10 @@ export default {
               }
             )
           } else {
-            this.$appDialog.alert({message: this.$t('W_002', {'param': this.$t('appVehicleCode')})}).then(() => {
+            this.$appDialog.alert({ message: this.$t('W_002', { 'param': this.$t('appVehicleCode') }) }).then(() => {
               this.formData.carrierCode = ''
               this.setFocus('carrierCode')
+              this.tableRowData = []
             });
 
           }
@@ -106,9 +102,7 @@ export default {
       this.excute(this.$service.carrieFlowPdtService, this.$service.carrieFlowPdtService.search.url, params, 'carrierCode', false).then(res => {
         this.loading = false
         if (res.code === this.$config.SUCCESS_CODE) {
-          if (res.data.list && res.data.list.length > 0) {
-            this.tableRowData = res.data.list
-          }
+          this.tableRowData = res.data.list
         }
       })
     },
@@ -119,7 +113,7 @@ export default {
 
     /**
      * @desc   : 检验
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     validData(flag) {
@@ -134,7 +128,7 @@ export default {
     },
     /**
      * @desc   : 给参数赋值
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     setParams() {
@@ -152,16 +146,15 @@ export default {
     },
     /**
      * @desc   : 保存方法
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     saveData() {
-      return this.excute(this.$service.carrieFlowPdtService, this.$service.carrieFlowPdtService.getOff.url, this.params, '', true).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.getData(false)
-        }
-      })
+      return this.excute(this.$service.carrieFlowPdtService, this.$service.carrieFlowPdtService.getOff.url, this.params);
     },
+    clear(){
+      this.getData(false)
+    }
     // endregion
 
   },
@@ -180,5 +173,4 @@ export default {
 }
 </script>
 
-<style scoped>
-</style>
+<style scoped></style>

+ 50 - 39
src/view-app/app/prod-management/working-procedure-undo/index.vue

@@ -4,15 +4,11 @@
     <!-- 顶部导航栏 -->
     <dk-app-nav-bar :title="moldingMoldManagementActiveTitle" @click-left="onClickLeft"></dk-app-nav-bar>
     <!--    产品条码-->
-    <dk-app-field
-      :label="$t('appProductCode')"
-      ref="barCode"
-      v-model="formData.barCode"
-      @changeBarCode="queryBarCode"
+    <dk-app-field :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="queryBarCode"
       placeholderType="scan"></dk-app-field>
 
     <div ref="scrollTable" class="main-app-table">
-      <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
+      <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
       <!--    产品信息-->
       <dk-app-table :rows="rows" :tableRowData="tableRowData">
       </dk-app-table>
@@ -29,7 +25,7 @@
 
 <script>
 
-import {appFormMixin} from '@/mixins/appform.js'
+import { appFormMixin } from '@/mixins/appform.js'
 
 export default {
   //app-piece-undo(计件)    app-finished-product-undo(成品)
@@ -38,17 +34,18 @@ export default {
   data() {
     let self = this
     return {
+      routeFlag:false,
       rows: [
-        {name: 'uniqueCode', title: self.$t('appProductCodeB')},         //产品编码
-        {name: 'modelCode', title: self.$t('modelCode')},                //型号编码
-        {name: 'moldingDate', title: self.$t('appFormingDate')},         //成型日期
-        {name: 'finishTime', title: self.$t('appFinishTime')},           //完成日期
-        {name: 'pdtFlowNodeName', title: self.$t('appCompleteTheProcess')}, //完成工序
-        {name: 'moldingUserCode', title: self.$t('appMoldingStationNo')},//成型工号
-        {name: 'modelMouldCode', title: self.$t('appMoldNo')},           //模具编号
-        {name: 'modelCode', title: self.$t('appProductUniqueCode')},   //产品编码
-        {name: 'logoName', title: self.$t('appLogoName')},               //商标名称
-        {name: 'colourName', title: self.$t('colourName')},              //釉色名称
+        { name: 'uniqueCode', title: self.$t('appProductCodeB') },         //产品编码
+        { name: 'modelCode', title: self.$t('modelCode') },                //型号编码
+        { name: 'moldingDate', title: self.$t('appFormingDate') },         //成型日期
+        { name: 'finishTime', title: self.$t('appFinishTime') },           //完成日期
+        { name: 'pdtFlowNodeName', title: self.$t('appCompleteTheProcess') }, //完成工序
+        { name: 'moldingUserCode', title: self.$t('appMoldingStationNo') },//成型工号
+        { name: 'modelMouldCode', title: self.$t('appMoldNo') },           //模具编号
+        { name: 'modelCode', title: self.$t('appProductUniqueCode') },   //产品编码
+        { name: 'logoName', title: self.$t('appLogoName') },               //商标名称
+        { name: 'colourName', title: self.$t('colourName') },              //釉色名称
       ],//每一条的内容
       tableRowData: [],
 
@@ -77,29 +74,35 @@ export default {
      * @date   : 2023/2/10 9:16
      */
     queryBarCode() {
-      this.excute(this.$service.collectService, this.$service.collectService.checkBarCodeScrapUndo +'/'+this.formData.barCode,[this.formData.barCode]
+      let api = this.$service.collectService.checkBarCodeScrapUndo
+      if(this.routeFlag){
+        //计件撤销
+        api = this.$service.collectService.checkBarCodeNodeUndo
+      }
+      this.excute(this.$service.collectService, api, { barCode: this.formData.barCode }
         , '', true).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          if (res.data) {
-            if (this.tableRowData.length > 0) {
-              //遍历 数据列表 重复数据提示
-              for (let i = 0; i < this.tableRowData.length; i++) {
-                //产品ID
-                if (this.tableRowData[i].uniqueId === res.data.uniqueId) {
-                  this.formData.barCode = ""
-                  this.setFocus('barCode') //焦点产品条码
-                  //存在重复产品
-                  this.$appDialog.alert({message: this.$t('W_120')})
-                  return
+          if (res.code === this.$config.SUCCESS_CODE) {
+            if (res.data) {
+              if (this.tableRowData.length > 0) {
+                //遍历 数据列表 重复数据提示
+                for (let i = 0; i < this.tableRowData.length; i++) {
+                  //产品ID
+                  if (this.tableRowData[i].uniqueId === res.data.uniqueId) {
+                    this.formData.barCode = ""
+                    this.setFocus('barCode') //焦点产品条码
+                    //存在重复产品
+                    this.$appDialog.alert({ message: this.$t('W_120') })
+                    return
+                  }
+
                 }
               }
             }
+            this.tableRowData = this.tableRowData.concat(res.data)
+            this.barCodeList.push(this.formData.barCode)
+            this.formData.barCode = ""
           }
-          this.tableRowData = this.tableRowData.concat(res.data)
-          this.barCodeList.push(this.formData.barCode)
-          this.formData.barCode = ""
-        }
-      })
+        })
     },
 
     /**
@@ -131,7 +134,7 @@ export default {
      * @date   : 2023/2/10 11:46
      */
     setParams() {
-      this.params = {...this.formData}
+      this.params = { ...this.formData }
       delete this.params.barCode
       this.params.barCodeList = this.barCodeList
     },
@@ -155,7 +158,13 @@ export default {
      * @date   : 2023/2/10 11:46
      */
     saveData() {
-      return this.excute(this.$service.appCollectService, this.$service.appCollectService.scrapUndo, this.params);
+      if(this.routeFlag){
+        //计件撤销
+        return this.excute(this.$service.collectService, this.$service.collectService.nodeUndo, this.params);
+      }else{
+        return this.excute(this.$service.appCollectService, this.$service.appCollectService.scrapUndo, this.params);
+      }
+     
     },
     // endregion
 
@@ -167,10 +176,12 @@ export default {
   created(e) {
     //接收参数
     this.focusItem = "barCode"
+    if (this.$route.meta.menuUuid != this.$t('appRepealMenuUuid')) {
+      this.routeFlag = true
+    }
   },
 
 }
 </script>
 
-<style scoped>
-</style>
+<style scoped></style>

+ 16 - 29
src/view/pdm/data-collection/finishCheck-add.vue

@@ -153,7 +153,7 @@
     data() {
       let self = this
       return {
-        gradeFlag:null,//改判权限标识
+        gradeFlag: null,//改判权限标识
         tableData: [],
         loading: false,
         tableHeight: 620,
@@ -299,7 +299,7 @@
         modelPdtLabelJson: {},//验证标签集合
         labelModal: false,//验证标签modal
         labelFormData: {},
-        getBarCodeMessage:null,//产品条码信息
+        getBarCodeMessage: null,//产品条码信息
         onProdUserCodeFlag: false,//校验打卡标识
       }
     },
@@ -347,7 +347,7 @@
               this.$Message.error(res.message)
             }
           })
-        }else{
+        } else {
           this.onProdUserCodeFlag = false
         }
       },
@@ -366,8 +366,8 @@
           }
           this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
-              if(0 == parseInt(res.data.flowNodeNum)){
-                this.labelFlag =true
+              if (0 == parseInt(res.data.flowNodeNum)) {
+                this.gradeFlag = true
               }
               this.getBarCodeMessage = res
               //验证标签开启并且工序类型为产品码
@@ -514,13 +514,11 @@
           i.blameStaffId = i.staffId
           i.blameWsJobId = i.jobId
         }
-        if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
-          let _this = this
-          setTimeout(() => {
-            _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
-              _this.staffList.filter(it => it.defaultFlag), true)
-          }, 200)
-        }
+        let _this = this
+        setTimeout(() => {
+          _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
+            _this.staffList.filter(it => it.defaultFlag), true)
+        }, 200)
       },
       /**
        *   @desc   : 查询员工
@@ -542,13 +540,11 @@
               i.blameStaffId = i.staffId
               i.blameWsJobId = i.jobId
             }
-            if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
-              let _this = this
-              setTimeout(() => {
-                _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
-                  _this.staffList.filter(it => it.defaultFlag), true)
-              }, 200)
-            }
+            let _this = this
+            setTimeout(() => {
+              _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
+                _this.staffList.filter(it => it.defaultFlag), true)
+            }, 200)
           } else {
             this.$Message.error(res.message)
           }
@@ -784,15 +780,6 @@
         }
         //endregion
 
-        //region 缺陷扣罚
-        if (item.dftFineId == null) {
-          this.$Message.error(this.$t('W_069', { 'param': this.$t('dftFineId') }))
-          this.setErrToRow(item, this.$t('W_093', {
-            'param': this.$t('dftFineId')
-          }))// 给行增加错误提示信息
-          return false
-        }
-        //endregion
 
         //region 缺陷位置
         if (item && this.formData.opnGradeKind != this.$config.gradeKindType.excellent && item.pdtPlaceId == null) {
@@ -978,7 +965,7 @@
        */
       validData() {
         //判断是否有改判权限
-        if(!this.gradeFlag){
+        if (!this.gradeFlag) {
           this.$Message.error(this.$t('W_131'))
           return false
         }

+ 15 - 28
src/view/pdm/data-collection/halfCheck-add.vue

@@ -153,7 +153,7 @@
     data() {
       let self = this
       return {
-        gradeFlag:null,//改判权限标识
+        gradeFlag: null,//改判权限标识
         tableData: [],
         loading: false,
         tableHeight: 620,
@@ -347,7 +347,7 @@
               this.$Message.error(res.message)
             }
           })
-        }else{
+        } else {
           this.onProdUserCodeFlag = false
         }
       },
@@ -366,8 +366,8 @@
           }
           this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
-              if(0 == parseInt(res.data.flowNodeNum)){
-                this.labelFlag =true
+              if (0 == parseInt(res.data.flowNodeNum)) {
+                this.gradeFlag = true
               }
               this.getBarCodeMessage = res
               //验证标签开启并且工序类型为产品码
@@ -514,13 +514,11 @@
           i.blameStaffId = i.staffId
           i.blameWsJobId = i.jobId
         }
-        if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
-          let _this = this
-          setTimeout(() => {
-            _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
-              _this.staffList.filter(it => it.defaultFlag), true)
-          }, 200)
-        }
+        let _this = this
+        setTimeout(() => {
+          _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
+            _this.staffList.filter(it => it.defaultFlag), true)
+        }, 200)
       },
       /**
        *   @desc   : 查询员工
@@ -542,13 +540,11 @@
               i.blameStaffId = i.staffId
               i.blameWsJobId = i.jobId
             }
-            if (!this.jobId || this.staffList.filter(it => it.jobId == this.jobId).length == 0) {
-              let _this = this
-              setTimeout(() => {
-                _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
-                  _this.staffList.filter(it => it.defaultFlag), true)
-              }, 200)
-            }
+            let _this = this
+            setTimeout(() => {
+              _this.$refs['staff-table-select'].$refs.table.setCheckboxRow(
+                _this.staffList.filter(it => it.defaultFlag), true)
+            }, 200)
           } else {
             this.$Message.error(res.message)
           }
@@ -784,15 +780,6 @@
         }
         //endregion
 
-        //region 缺陷扣罚
-        if (item.dftFineId == null) {
-          this.$Message.error(this.$t('W_069', { 'param': this.$t('dftFineId') }))
-          this.setErrToRow(item, this.$t('W_093', {
-            'param': this.$t('dftFineId')
-          }))// 给行增加错误提示信息
-          return false
-        }
-        //endregion
 
         //region 缺陷位置
         if (item && this.formData.opnGradeKind != this.$config.gradeKindType.excellent && item.pdtPlaceId == null) {
@@ -978,7 +965,7 @@
        */
       validData() {
         //判断是否有改判权限
-        if(!this.gradeFlag){
+        if (!this.gradeFlag) {
           this.$Message.error(this.$t('W_131'))
           return false
         }

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

@@ -240,9 +240,6 @@
           }
           this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
-              if(0 == parseInt(res.data.flowNodeNum)){
-                this.labelFlag =true
-              }
               this.getBarCodeMessage = res
               //验证标签开启并且工序类型为产品码
               if (this.$config.processType.productCode == this.opnKind && this.labelFlag) {

+ 2 - 1
src/view/pdm/prod-defect/add.vue

@@ -473,10 +473,11 @@
        *   @date   : 2023/3/3 10:09
        *   @author : 寇珊珊
        */
+      //todo  2023年4月13日14:14:52 zdl 损柸原因-损坯
       getReasonForBlankLoss() {
         let params = {
           ftyId: this.$store.state.user.ftyId,
-          defectKind: this.$config.defectKind.moldDamageReason
+          defectKind: this.$config.defectKind.Damage
         }
         this.excute(this.$service.commonService, this.$service.commonService.getProductDefect, params).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {