于继渤 2 лет назад
Родитель
Сommit
79ff5956ec

+ 138 - 126
src/components-app/business/dk-app-single-dropdown/dk-app-single-dropdown.vue

@@ -75,7 +75,7 @@ export default {
       type: String,
       default: 'org'
     },
-    isSingleCloseFlag:{  //选择并关闭 标识  2023/02/22
+    isSingleCloseFlag: {  //选择并关闭 标识  2023/02/22
       type: Boolean,
       default: true
     },
@@ -378,6 +378,13 @@ export default {
                     postName: item2.postName,
                     checked: false
                   }
+                } else if (this.typeName === 'kilnCode') {
+                  item = {
+                    id: item2.kilnId,
+                    name: item2.kilnCode,
+                    code: item2.kilnCode,
+                    checked: false
+                  } 
                 }
 
 
@@ -738,138 +745,138 @@ export default {
       this.clickRodioButton = dataListCopy[index].name
       this.radio = index
       //单选并关闭
-      if(this.isSingleCloseFlag){
+      if (this.isSingleCloseFlag) {
         let dataList = this.finalList
-      if (dataList == null || dataList.length === 0) return
-      let ids = []
-      let id = null
-      let codes = []
-      let deductNum = []
-      let names = ''
-      let clockId = []
-      let userCode = []
-      let qvUserids = []
-      let jobList = []
-      let userList = []
-      let gradeKind = ""
-      let stdNum = ""
-      let outputQty = ""
-      let outputStdSum = ""
-      let modelMouldOutput = ""
-      let modelProduct = ""
-      let defaultFlag = null
+        if (dataList == null || dataList.length === 0) return
+        let ids = []
+        let id = null
+        let codes = []
+        let deductNum = []
+        let names = ''
+        let clockId = []
+        let userCode = []
+        let qvUserids = []
+        let jobList = []
+        let userList = []
+        let gradeKind = ""
+        let stdNum = ""
+        let outputQty = ""
+        let outputStdSum = ""
+        let modelMouldOutput = ""
+        let modelProduct = ""
+        let defaultFlag = null
+
+        let jobId = null
+        let jobName = ''
+        let userId = null
+        let userName = ''
+        let clockList = []
+        dataList.forEach(item => {
+          if (item.checked) {
+            ids = item.id
+            id = item.id
+            codes = item.code
+            names = item.name
+            qvUserids.push(item.qvUserid)
+            deductNum.push(item.deductNum)
+            stdNum = item.stdNum
+            gradeKind = item.gradeKind
+            outputQty = item.outputQty
+            outputStdSum = item.outputStdSum
+            modelMouldOutput = item.modelMouldOutput
+            modelProduct = item.modelProduct
+            clockId.push(item.clockId)
+            userCode.push(item.userCode)
+            jobList = item.jobList
+            userList = item.userList
+            jobId = item.jobId
+            jobName = item.jobName
+            userId = item.userId
+            userName = item.userName
+            clockList = item.clockList
+            defaultFlag = item.defaultFlag
+          }
+        })
+        let returnValue = {}
+        if (this.typeName === 'moldType') { ////档案管理新建里的模具型号
+          returnValue = {
+            ids: ids,
+            names: names,
+            qvUserids: qvUserids.join(';'),
+            idList: ids,
+            stdNum: stdNum,
+            outputQty: outputQty,
+            outputStdSum: outputStdSum,
+            modelMouldOutput: modelMouldOutput,
+            modelProduct: modelProduct,
+          }
+        } else if (this.typeName === 'moldingUsers') {
+          returnValue = {
+            ids: ids,
+            names: names,
+            clockId: clockId.join(','),
+            userCode: userCode.join(',')
+          }
 
-      let jobId = null
-      let jobName = ''
-      let userId = null
-      let userName = ''
-      let clockList = []
-      dataList.forEach(item => {
-        if (item.checked) {
-          ids = item.id
-          id = item.id
-          codes = item.code
-          names = item.name
-          qvUserids.push(item.qvUserid)
-          deductNum.push(item.deductNum)
-          stdNum = item.stdNum
-          gradeKind = item.gradeKind
-          outputQty = item.outputQty
-          outputStdSum = item.outputStdSum
-          modelMouldOutput = item.modelMouldOutput
-          modelProduct = item.modelProduct
-          clockId.push(item.clockId)
-          userCode.push(item.userCode)
-          jobList = item.jobList
-          userList = item.userList
-          jobId = item.jobId
-          jobName = item.jobName
-          userId = item.userId
-          userName = item.userName
-          clockList = item.clockList
-          defaultFlag = item.defaultFlag
-        }
-      })
-      let returnValue = {}
-      if (this.typeName === 'moldType') { ////档案管理新建里的模具型号
-        returnValue = {
-          ids: ids,
-          names: names,
-          qvUserids: qvUserids.join(';'),
-          idList: ids,
-          stdNum: stdNum,
-          outputQty: outputQty,
-          outputStdSum: outputStdSum,
-          modelMouldOutput: modelMouldOutput,
-          modelProduct: modelProduct,
-        }
-      } else if (this.typeName === 'moldingUsers') {
-        returnValue = {
-          ids: ids,
-          names: names,
-          clockId: clockId.join(','),
-          userCode: userCode.join(',')
-        }
+        } else if (this.typeName === 'defectDeduction') {
+          returnValue = {
+            ids: ids,
+            names: names,
+            deductNum: deductNum.join(',')
+          }
+        } else if (this.typeName === 'dutyFlowNode') {
+          returnValue = {
+            ids: id,
+            names: names,
+            jobId: jobId,
+            jobName: jobName,
+            userId: userId,
+            userName: userName,
+            clockList: clockList,
+          }
 
-      } else if (this.typeName === 'defectDeduction') {
-        returnValue = {
-          ids: ids,
-          names: names,
-          deductNum: deductNum.join(',')
-        }
-      } else if (this.typeName === 'dutyFlowNode') {
-        returnValue = {
-          ids: id,
-          names: names,
-          jobId: jobId,
-          jobName: jobName,
-          userId: userId,
-          userName: userName,
-          clockList: clockList,
-        }
+        } else if (this.typeName === 'productClassification') {
+          returnValue = {
+            ids: ids,
+            names: names,
+            gradeKind: gradeKind,
+            idList: ids,
+          }
+        } else if (this.typeName === 'staff') {
+          returnValue = {
+            ids: id,
+            codes: codes,
+            blameStaffId: id,
+            blameWsJobId: jobId,
+            names: names,
+            jobId: jobId,
+            jobName: jobName,
+            defaultFlag: defaultFlag,
+          }
+        } else if (this.typeName === 'getStaff') {
+          returnValue = {
+            ids: id,
+            names: names,
+            codes: codes,
+            jobId: jobId,
+            jobName: jobName,
+          }
 
-      } else if (this.typeName === 'productClassification') {
-        returnValue = {
-          ids: ids,
-          names: names,
-          gradeKind: gradeKind,
-          idList: ids,
-        }
-      } else if (this.typeName === 'staff') {
-        returnValue = {
-          ids: id,
-          codes: codes,
-          blameStaffId: id,
-          blameWsJobId: jobId,
-          names: names,
-          jobId: jobId,
-          jobName: jobName,
-          defaultFlag: defaultFlag,
-        }
-      } else if (this.typeName === 'getStaff') {
-        returnValue = {
-          ids: id,
-          names: names,
-          codes: codes,
-          jobId: jobId,
-          jobName: jobName,
-        }
+        } else {
+          returnValue = {
+            ids: ids,
+            names: names,
+            codes: codes,
+            idList: ids,
+          }
 
-      } else {
-        returnValue = {
-          ids: ids,
-          names: names,
-          codes: codes,
-          idList: ids,
         }
-
-      }
-      this.$emit('mutiCommit', returnValue)
-      this.dataValue = names
-      this.show_p = false
+        this.$emit('mutiCommit', returnValue)
+        this.dataValue = names
+        this.show_p = false
       }
 
-     
+
     },
     /**
      * 查询数据
@@ -983,13 +990,15 @@ export default {
 
         param.flgValid = true
         param.leafFlag = true
-        
+
         if (!this.allFlag) {
           param.staffUserId = this.staffUserId
           param.jobId = this.jobId
         }
 
         return this.excute(this.$service.commonService, this.$service.commonService.getStaff, param)
+      } else if (dataSourceCode === 'kilnCode') {
+        return this.excute(this.$service.commonService, this.$service.commonService.getKiln, param)
       }
 
       else {
@@ -1085,6 +1094,9 @@ export default {
     else if (this.typeName === 'getStaff') {
       this.dataSourceCode = 'getStaff'
     }
+    else if (this.typeName === 'kilnCode') {
+      this.dataSourceCode = 'kilnCode'
+    }
     if (this.getDataInItFlag) {
       this.getDataInIt()
     }

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

@@ -2,7 +2,8 @@
   <!--  登窑      -->
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
-    <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight" :rightIcon="true"></dk-app-nav-bar>
+    <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight"
+      :rightIcon="true"></dk-app-nav-bar>
 
     <!-- 选择工位 -->
     <dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')" :readonly="true"
@@ -12,9 +13,15 @@
       :readonly="userKind == $config.operationUserType.produceUser" :label="$t('appProductionJobNumber')"
       placeholderType="scan" @changeBarCode="queryUser" />
     <!--    窑炉编码-->
-    <dk-app-field :readonly="tableRowData.length > 0" :label="$t('appKilnCode')" ref="appKilnCode"
-      v-model="formData.kilnCode" @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true"
-      @changeBarCode="setFocus('appKilnCarNumber')" placeholderType="scan"></dk-app-field>
+    <!-- <dk-app-field :readonly="tableRowData.length > 0" :label="$t('appKilnCode')" ref="appKilnCode"
+      v-model="formData.kilnCode" @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true" 
+      @changeBarCode="setFocus('appKilnCarNumber')" placeholderType="scan"></dk-app-field> -->
+
+
+
+    <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode" :readonly="true"
+      @click="showKilnCode = true" placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
+
     <!--    窑炉车号-->
     <dk-app-field :label="$t('appKilnCarNumber')" ref="appKilnCarNumber" v-model="formData.KilnCarNumber"
       @changeBarCode="queryCarCode" @clickRightIcon="openQRCodeScan('KilnCarNumber')" :isScanFlg="true"
@@ -35,13 +42,13 @@
 
       <div v-if="productList.length > 0" style="margin: 10px">{{ $t('appOnKilnCarInformation') }}</div>
       <!--    已登窑列表-->
-      <dk-app-table  v-if="productList.length > 0"  :rows="rows" :tableRowData="productList">
+      <dk-app-table v-if="productList.length > 0" :rows="rows" :tableRowData="productList">
       </dk-app-table>
 
     </div>
 
 
-    
+
     <!--  保存按钮-->
     <div class="app_save_bottom-class">
       <dk-app-button @click="save">{{ $t('appSave') }}
@@ -57,6 +64,9 @@
       <!--   窑车位置 -->
       <dk-app-single-dropdown typeName="carrierRange" :show="showCarrierRange" @mutiClose="mutiClose('carrierRange')"
         :carModelId="formData.modelId" @mutiCommit="mutiCommit($event, 'carrierRange')"></dk-app-single-dropdown>
+      <!--   窑车编号 -->
+      <dk-app-single-dropdown typeName="kilnCode" :show="showKilnCode" apiType="web" @mutiClose="mutiClose('kilnCode')"
+        @mutiCommit="mutiCommit($event, 'kilnCode')"></dk-app-single-dropdown>
     </div>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
@@ -74,6 +84,7 @@ export default {
     let self = this
     return {
       showPopup: false,//点击 三个小点 弹出popup
+      showKilnCode: false,
       gridItemList: [  //右上角功能菜单
         // {
         //   gridName: "装车统计", //装车统计
@@ -135,7 +146,7 @@ export default {
       userKind: null,//用户类型
       loading: false,
       IsPieceSingleFlag: true,
-      productList:[],
+      productList: [],
     }
   },
   methods: {
@@ -249,7 +260,7 @@ export default {
         ftyId: this.formData.ftyId,//工厂
         stationId: this.formData.stationId,//工位
         flowNodeId: this.formData.flowNodeId,//工序
-        carCode: this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber) 
+        carCode: this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
       }
       this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params, "queryCarCode", true).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
@@ -302,7 +313,7 @@ export default {
               let tableList = this.tableRowData.filter(it => it.kilnCarPlace)
               for (let it of tableList) {
                 //窑车窑炉存在相同位置
-                if ((this.formData.kilnCode + this.format(this.formData.KilnCarNumber)  + this.formData.carrierRangeId) == (it.carCode + it.carrierRangeId)) {
+                if ((this.formData.kilnCode + this.format(this.formData.KilnCarNumber) + this.formData.carrierRangeId) == (it.carCode + it.carrierRangeId)) {
                   this.appToastFail((this.$t('W_118')));
                   return
                 }
@@ -311,7 +322,7 @@ export default {
             this.tableRowData = this.tableRowData.concat(res.data)
             for (let i of this.tableRowData.filter(it => !it.carCode)) {
               i.kilnCode = this.formData.kilnCode
-              i.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber) 
+              i.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
               if (this.formData.carrierRangeId) {
                 i.kilnCarPlace = this.kilnCarPlaceList.filter(it => it.rangeId == this.formData.carrierRangeId)[0].rangeName
                 i.carrierRangeId = this.formData.carrierRangeId
@@ -338,6 +349,11 @@ export default {
         this.formData.carrierRangeId = Number(e.ids) //选中的 工位id
         this.setFocus("prodUser")
       }
+
+      if (typeName === 'kilnCode') {
+        this.formData.kilnCode = e.codes
+        this.setFocus("appKilnCarNumber")
+      }
     },
     /**
      * @desc   : 单选侧拉关闭
@@ -353,6 +369,9 @@ export default {
       if (e === 'carrierRange') {
         this.showCarrierRange = false
       }
+      if (e === 'kilnCode') {
+        this.showKilnCode = false
+      }
 
     },
     /**
@@ -396,6 +415,13 @@ export default {
      *   @author : 王英杰
      */
     clear() {
+      //窑炉编号存缓存
+      localStorage.setItem('pdaKilnData', JSON.stringify( {
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,
+        kilnCode: this.formData.kilnCode
+      }))
+
       //操作用户类型---生产工号不清空
       if (this.userKind !== this.$config.operationUserType.produceUser) {
         this.formData.prodUserId = null
@@ -424,7 +450,7 @@ export default {
     setParams() {
       this.params = { ...this.formData }
       this.params.barCodeList = this.barCodeList
-      this.params.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber) 
+      this.params.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
     },
     /**
      * @desc   : 检验
@@ -468,7 +494,6 @@ export default {
           this.formData.barCode = ""
           break;
         case 'queryCarCode'://检验窑炉车
-        //  this.formData.kilnCode = ""
           this.formData.KilnCarNumber = ""
           this.setFocus('appKilnCode')
           break;
@@ -493,6 +518,17 @@ export default {
     this.getWorkStation()
     //窑车位置
     this.getKilnCarPlace()
+    //获取缓存窑炉编号
+    if (localStorage.getItem('pdaKilnData')) {
+      let pdaKilnData = JSON.parse(localStorage.getItem('pdaKilnData')) 
+      if((this.$store.state.user.ftyId === pdaKilnData.ftyId) && (this.$store.state.user.id === pdaKilnData.userId)){
+        this.formData.kilnCode = pdaKilnData.kilnCode
+        this.setFocus("appKilnCarNumber")
+      }else{
+        localStorage.removeItem('pdaKilnData')
+      }
+    }
+
   },
 
 }

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

@@ -10,9 +10,12 @@
     <dk-app-field :readonly="userKind == $config.operationUserType.produceUser" v-model="formData.prodUserCode"
       ref="prodUser" :label="$t('appProductionJobNumber')" placeholderType="scan" @changeBarCode="queryUser" />
     <!--    窑炉编码-->
-    <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
+    <!-- <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
       @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true" @changeBarCode="setFocus('appKilnCarNumber')"
-      placeholderType="scan"></dk-app-field>
+      placeholderType="scan"></dk-app-field> -->
+
+      <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode" :readonly="true"
+      @click="showKilnCode = true" placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
     <!--    窑炉车号-->
     <dk-app-field :label="$t('appKilnCarNumber')" ref="appKilnCarNumber" v-model="formData.KilnCarNumber"
       @changeBarCode="queryCarCode" @clickRightIcon="openQRCodeScan('KilnCarNumber')" :isScanFlg="true"
@@ -34,6 +37,9 @@
       <dk-app-single-dropdown typeName="register" :show="showStation" :flowNodeId="formData.flowNodeId"
         @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
         @mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
+          <!--   窑车编号 -->
+      <dk-app-single-dropdown typeName="kilnCode" :show="showKilnCode" apiType="web" @mutiClose="mutiClose('kilnCode')"
+        @mutiCommit="mutiCommit($event, 'kilnCode')"></dk-app-single-dropdown>
     </div>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
@@ -49,6 +55,7 @@ export default {
   data() {
     let self = this
     return {
+      showKilnCode: false,
       rows: [
         { name: 'uniqueCode', title: self.$t('appProductCodeB') },//产品编码
         { name: 'modelCode', title: self.$t('modelCode') },//型号编码
@@ -227,6 +234,11 @@ export default {
         this.formData.stationId = Number(e.ids) //选中的 工位id
         this.setFocus("prodUser")
       }
+      //窑炉编号
+      if (typeName === 'kilnCode') {
+        this.formData.kilnCode = e.codes
+        this.setFocus("appKilnCarNumber")
+      }
     },
     /**
      * @desc   : 单选侧拉关闭
@@ -238,6 +250,10 @@ export default {
       if (e === 'register') {
         this.showStation = false
       }
+       //窑炉编号
+      if (e === 'kilnCode') {
+        this.showKilnCode = false
+      }
     },
 
     /**
@@ -263,6 +279,12 @@ export default {
      *   @author : 王英杰
      */
     clear() {
+       //窑炉编号存缓存
+       localStorage.setItem('pdaKilnData', JSON.stringify( {
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,
+        kilnCode: this.formData.kilnCode
+      }))
       //操作用户类型---生产工号不清空
       if (this.userKind != this.$config.operationUserType.produceUser) {
         this.formData.prodUserId = null
@@ -348,11 +370,20 @@ export default {
    * @param e
    */
   created(e) {
-
-    
     this.getWorkStation()
     //根据节点id查询工序节点
     this.selectProcessNode()
+
+    //获取缓存窑炉编号
+    if (localStorage.getItem('pdaKilnData')) {
+      let pdaKilnData = JSON.parse(localStorage.getItem('pdaKilnData')) 
+      if((this.$store.state.user.ftyId === pdaKilnData.ftyId) && (this.$store.state.user.id === pdaKilnData.userId)){
+        this.formData.kilnCode = pdaKilnData.kilnCode
+        this.setFocus("appKilnCarNumber")
+      }else{
+        localStorage.removeItem('pdaKilnData')
+      }
+    }
   },
 
 }

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

@@ -10,9 +10,12 @@
     <dk-app-field v-model="formData.prodUserCode" :readonly="userKind == $config.operationUserType.produceUser"
       ref="prodUser" :label="$t('appProductionJobNumber')" placeholderType="scan" @changeBarCode="queryUser" />
     <!--    窑炉编码-->
-    <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
+    <!-- <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
       @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true" @changeBarCode="setFocus('appKilnCarNumber')"
-      placeholderType="scan"></dk-app-field>
+      placeholderType="scan"></dk-app-field> -->
+
+    <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode" :readonly="true"
+      @click="showKilnCode = true" placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
     <!--    窑炉车号-->
     <dk-app-field :label="$t('appKilnCarNumber')" ref="appKilnCarNumber" v-model="formData.KilnCarNumber"
       @changeBarCode="queryCarCode" :readonly="!formData.kilnCode" @clickRightIcon="openQRCodeScan('KilnCarNumber')"
@@ -34,6 +37,9 @@
       <dk-app-single-dropdown typeName="register" :show="showStation" :flowNodeId="formData.flowNodeId"
         @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
         @mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
+      <!--   窑车编号 -->
+      <dk-app-single-dropdown typeName="kilnCode" :show="showKilnCode" apiType="web" @mutiClose="mutiClose('kilnCode')"
+        @mutiCommit="mutiCommit($event, 'kilnCode')"></dk-app-single-dropdown>
     </div>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
@@ -50,6 +56,7 @@ export default {
   data() {
     let self = this
     return {
+      showKilnCode: false,
       rows: [
         { name: 'uniqueCode', title: self.$t('appProductCodeB') },//产品编码
         { name: 'modelCode', title: self.$t('modelCode') },//型号编码
@@ -178,20 +185,20 @@ export default {
         ftyId: this.formData.ftyId,//工厂
         stationId: this.formData.stationId,//工位
         flowNodeId: this.formData.flowNodeId,//工序
-        carCode: this.formData.kilnCode + '-' +  this.format(this.formData.KilnCarNumber)
+        carCode: this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
       }
       this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params, "queryCarCode", true).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
           this.formData.kilnId = res.data.carrier.kilnId
           //提取窑炉id集合窑车编码集合
-          let carCode = this.formData.kilnCode + '-' +  this.format(this.formData.KilnCarNumber)
+          let carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
           if (this.carCodeList.length == 0 || this.carCodeList.filter(it => it != carCode)) {
-            this.carCodeList.push(this.formData.kilnCode + '-' +  this.format(this.formData.KilnCarNumber))
+            this.carCodeList.push(this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber))
           }
           //页面table赋值
           for (let i of res.data.productList) {
             i.kilnCode = this.formData.kilnCode
-            i.carCode = this.formData.kilnCode + '-' +  this.format(this.formData.KilnCarNumber)
+            i.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
           }
           this.tableRowData = this.tableRowData.concat(res.data.productList)
           //计件模式为单品直接调用保存
@@ -233,6 +240,11 @@ export default {
         this.formData.stationName = e.names//显示 选中的 工位名称
         this.formData.stationId = Number(e.ids) //选中的 工位id
       }
+      if (typeName === 'kilnCode') {
+        this.formData.kilnCode = e.codes
+        this.setFocus("appKilnCarNumber")
+      }
+
     },
     /**
      * @desc   : 单选侧拉关闭
@@ -244,6 +256,9 @@ export default {
       if (e === 'register') {
         this.showStation = false
       }
+      if (e === 'kilnCode') {
+        this.showKilnCode = false
+      }
     },
 
     /**
@@ -268,6 +283,12 @@ export default {
      *   @author : 王英杰
      */
     clear() {
+      //窑炉编号存缓存
+      localStorage.setItem('pdaKilnData', JSON.stringify({
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,
+        kilnCode: this.formData.kilnCode
+      }))
       //操作用户类型---生产工号不清空
       if (this.userKind != this.$config.operationUserType.produceUser) {
         this.formData.prodUserId = null
@@ -292,7 +313,7 @@ export default {
      */
     setParams() {
       this.params = { ...this.formData }
-      this.params.carCode = this.formData.kilnCode + '-' +  this.format(this.formData.KilnCarNumber)
+      this.params.carCode = this.formData.kilnCode + '-' + this.format(this.formData.KilnCarNumber)
       this.params.carCodeList = this.carCodeList
     },
     /**
@@ -357,6 +378,16 @@ export default {
     this.getWorkStation()
     //根据节点id查询工序节点
     this.selectProcessNode()
+     //获取缓存窑炉编号
+     if (localStorage.getItem('pdaKilnData')) {
+      let pdaKilnData = JSON.parse(localStorage.getItem('pdaKilnData')) 
+      if((this.$store.state.user.ftyId === pdaKilnData.ftyId) && (this.$store.state.user.id === pdaKilnData.userId)){
+        this.formData.kilnCode = pdaKilnData.kilnCode
+        this.setFocus("appKilnCarNumber")
+      }else{
+        localStorage.removeItem('pdaKilnData')
+      }
+    }
   },
 
 }

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

@@ -11,9 +11,12 @@
       :readonly="userKind == $config.operationUserType.produceUser" :label="$t('appProductionJobNumber')"
       placeholderType="scan" @changeBarCode="queryUser" />
     <!--    窑炉编码-->
-    <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
+    <!-- <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode"
       @clickRightIcon="openQRCodeScan('kilnCode')" :isScanFlg="true" @changeBarCode="setFocus('appKilnCarNumber')"
-      placeholderType="scan"></dk-app-field>
+      placeholderType="scan"></dk-app-field> -->
+
+      <dk-app-field :label="$t('appKilnCode')" ref="appKilnCode" v-model="formData.kilnCode" :readonly="true"
+      @click="showKilnCode = true" placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
     <!--    窑炉车号-->
     <dk-app-field :label="$t('appKilnCarNumber')" ref="appKilnCarNumber" v-model="formData.KilnCarNumber"
       @clickRightIcon="openQRCodeScan('KilnCarNumber')" :isScanFlg="true" @changeBarCode="queryCarCode"
@@ -34,6 +37,9 @@
       <dk-app-single-dropdown typeName="register" :show="showStation" :flowNodeId="formData.flowNodeId"
         @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
         @mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
+        <!--   窑车编号 -->
+      <dk-app-single-dropdown typeName="kilnCode" :show="showKilnCode" apiType="web" @mutiClose="mutiClose('kilnCode')"
+        @mutiCommit="mutiCommit($event, 'kilnCode')"></dk-app-single-dropdown>
     </div>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
@@ -50,6 +56,7 @@ export default {
   data() {
     let self = this
     return {
+      showKilnCode: false,
       rows: [
         { name: 'uniqueCode', title: self.$t('appProductCodeB') },//产品编码
         { name: 'modelCode', title: self.$t('modelCode') },//型号编码
@@ -224,6 +231,10 @@ export default {
         this.formData.stationName = e.names//显示 选中的 工位名称
         this.formData.stationId = Number(e.ids) //选中的 工位id
       }
+      if (typeName === 'kilnCode') {
+        this.formData.kilnCode = e.codes
+        this.setFocus("appKilnCarNumber")
+      }
     },
     /**
      * @desc   : 单选侧拉关闭
@@ -235,6 +246,9 @@ export default {
       if (e === 'register') {
         this.showStation = false
       }
+      if (e === 'kilnCode') {
+        this.showKilnCode = false
+      }
     },
     /**
      * @desc   : 点击弹窗图标功能事件
@@ -259,6 +273,12 @@ export default {
      *   @author : 王英杰
      */
     clear() {
+        //窑炉编号存缓存
+        localStorage.setItem('pdaKilnData', JSON.stringify({
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,
+        kilnCode: this.formData.kilnCode
+      }))
       //操作用户类型---生产工号不清空
       if (this.userKind != this.$config.operationUserType.produceUser) {
         this.formData.prodUserId = null
@@ -353,6 +373,16 @@ export default {
     this.getWorkStation()
     //根据节点id查询工序节点
     this.selectProcessNode()
+     //获取缓存窑炉编号
+     if (localStorage.getItem('pdaKilnData')) {
+      let pdaKilnData = JSON.parse(localStorage.getItem('pdaKilnData')) 
+      if((this.$store.state.user.ftyId === pdaKilnData.ftyId) && (this.$store.state.user.id === pdaKilnData.userId)){
+        this.formData.kilnCode = pdaKilnData.kilnCode
+        this.setFocus("appKilnCarNumber")
+      }else{
+        localStorage.removeItem('pdaKilnData')
+      }
+    }
   },
 
 }