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

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

@@ -114,7 +114,9 @@ export default {
     // 获取工位分页
     getWorkStationByPage:'get_work_station_by_page',
     // 根据用户Id获取班组信息
-    getWorkTeamByUserId:'get_work_team_by_user_id'
+    getWorkTeamByUserId:'get_work_team_by_user_id',
+    //获取产品等级
+    getProductGrade:'get_product_grade'
   },
   appCommonService: {
     prefix: 'mdm-server/app/mst/common/',

+ 3 - 0
src/api/pages/mst/product-defect.js

@@ -6,5 +6,8 @@
 export default {
   productDefectService: {
     prefix: '/mdm-server/mst/productDefect/',
+    getByCode:'get_by_code/',
+
   }
 }
+

+ 1 - 1
src/api/pages/pdm/produce.js

@@ -13,7 +13,7 @@ export default {
 export const routeUrl = {
   produce: {
     //计件新建
-    registerAdd:{key:'add',url:'/pdm/data-collection/register-add/'},
+    registerAdd:{key:'add',url:'/pdm/data-collection/register-add'},
     //登窑新建
     climbKilnAdd:{key:'add',url:'/pdm/data-collection/climbKiln-add'},
     //入窑新建

+ 2 - 0
src/config/index.js

@@ -633,6 +633,8 @@ export default {
     stationUser:'stationUser',
     //工位
     station:'station',
+    //产品等级
+    productGrade:'productGrade',
   },
 
   /**

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

@@ -720,7 +720,7 @@ export const columns = {
   produceModelCode:'模具编码',
   bindCarModel:'批量设置载具型号',
   KilnCarNumber:'窑炉车号',
-  produceBarCode:'商品条码',
+  produceBarCode:'起始条码',
   productRemarks:'备注',
   barCode:'产品条码',
   modelMouldCode:'模具编码',

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

@@ -106,6 +106,7 @@
       flowNodeId:self.$route.meta.menuUuid,
       tableData:[],
       workStationList: [],//工位数据
+      barCodeList:[],//产品条码集合
     }
   },
     methods: {
@@ -187,7 +188,11 @@
         }
         this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
           if (res.code === this.$config.SUCCESS_CODE) {
-            this.tableData = [res.data]
+            if(this.tableData.filter(it=>it.productId == [res.data.productId]).length==0){
+              this.tableData.push([res.data])
+              this.barCodeList.push(this.formData.barCode)
+              this.$refs['table-select'].reloadData(this.tableData)
+            }
           }else{
             this.$Message.error(res.message)
           }
@@ -217,6 +222,7 @@
         this.params = this.formData
         this.params.carCode=this.formData.kilnCode+'-'+this.formData.KilnCarNumber
         this.params.flowNodeId = this.flowNodeId
+        this.params.barCodeList = this.barCodeList
       },
       /**
        *   @desc   : 清空

+ 264 - 145
src/view/pdm/data-collection/halfCheck-add.vue

@@ -10,24 +10,26 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem :required="true" prop="stationId" :data-type="$config.dataType.number" :label="$t('stationId')">
+          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+                      :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
           <!--生产工号-->
-          <DkFormItem :required="true" prop="makeUserName">
-            <InputPop ref="makeUserName" v-model="formData.makeUserName" />
+          <DkFormItem :required="true" prop="prodUserCode">
+            <InputPop ref="prodUserCode" v-model="formData.prodUserCode" @on-blur="onProdUserCode"/>
           </DkFormItem>
           <!--产品条码-->
-          <DkFormItem :required="true" prop="pdtBarcode">
-            <InputPop ref="pdtBarcode" v-model="formData.pdtBarcode" @on-blur="onBlurBarCode"/>
-          </DkFormItem>
-          <!--产品查询-->
-          <DkFormItem >
-            <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>
+          <DkFormItem :required="true" prop="barCode">
+            <InputPop :readonly="!formData.prodUserId" ref="barCode" v-model="formData.barCode" @on-blur="onBarCode"/>
           </DkFormItem>
+          <!--          &lt;!&ndash;产品查询&ndash;&gt;-->
+          <!--          <DkFormItem >-->
+          <!--            <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>-->
+          <!--          </DkFormItem>-->
           <!--商标-->
           <DkFormItem :required="true" prop="logoName">
             <InputPop ref="logoName" v-model="formData.logoName" :readonly="true"/>
@@ -42,7 +44,16 @@
           </DkFormItem>
           <!--名称-->
           <DkFormItem :required="true" prop="productName">
-            <InputPop ref="productName" v-model="formData.productName" :readonly="true" />
+            <InputPop ref="productName" v-model="formData.productName" :readonly="true"/>
+          </DkFormItem>
+          <!--产品等级-->
+          <DkFormItem prop="gradeId" :required="true" :label="$t('gradeKind')">
+            <SelectPop v-model="formData.gradeName" ref="gradeName" :multiple="false"
+                       :options="gradeList"
+                       @on-select="chooseGrade"
+                       labelKey="gradeName"
+                       valueKey="gradeId">
+            </SelectPop>
           </DkFormItem>
         </DkForm>
       </DkPanel>
@@ -53,7 +64,7 @@
                      :columns="detailColumns"
                      :height="tableHeight"
                      :operate-flag="false"
-                     :new-row-flag="false"
+                     :new-row-flag="true"
                      :freeze="false"
                      @current-change="currentChange"
                      @changeValue="changeValue"></EditTable>
@@ -67,146 +78,254 @@
 
 <script>
   import { formMixin } from '@/mixins/form'
-export default {
-  name: "halfCheck-add",
-  mixins: [formMixin],
-  data() {
-    let self = this
-    return {
-      tableData: [],
-      loading: false,
-      tableHeight: 620,
-      // 画面表单数据
-      formData: {
-        stationId:null,
-        stationName:'',
-        makeUserName : '',
-        pdtBarcode: '',
-        ftyId: this.$store.state.user.ftyId,
-        productCode:'',
-        productName:'',
-        logoName:'',
-        colourName:'',
-      },
-      editItemColumns:['itemId','moldingId','productUniqueCode'],
-      detailList: [],// 成型记录明细信息
-      defectList:[],//缺陷列表
-      defectNodeList:[],//责任工序
-      dutyUserCodeList:[],//责任工号
-      dutyJobList:[],//责任工种
-      dutyUserList:[],//责任人
-      defectFinetList:[],//缺陷扣罚
-      defectFinetNumList:[],//扣除数
-      // 明细列表
-      detailColumns: [
-        // 缺陷名称
-        {
-          field: 'defectName',
-          type: 'select',
-          options: () => self.defectList,
-          labelKey: 'defectName',
-          valueKey: 'defectId',
-          width: 'auto'
-        },
-        // 缺陷位置
-        { field: 'moldlineName', type: 'disabled', width: 'auto' },
-        // 特殊缺陷
-        { field: 'manageUserName', type: 'disabled', width: 'auto' },
-        // 责任工序
-        { field: 'appResponsibleProcess', type: 'disabled', width: 'auto' },
-        // 责任工号
-        {
-          field: 'moldingUser',
-          title:self.$t('appResponsibleJobNumber'),
-          type: 'select',
-          options: () => self.userAddList,
-          labelKey: 'userName',
-          valueKey: 'userId',
-          width: 'auto'
-        },
-        { field: 'modelCode', title: self.$t('appProductCodeB'), type: 'disabled', width: 'auto' },
-        // 责任工种
-        { field: 'modelName', title: self.$t('appProductName'), type: 'disabled', width: 'auto' },
-        // 责任人
-        { field: 'moldlineItemCode', title: self.$t('moldingModelCode'), type: 'disabled', width: 'auto' },
-        // 缺陷扣罚
-        { field: 'moldlineItemKindName', title: self.$t('mouldKindName'), type: 'disabled', width: 'auto' },
-        // 扣除数
-        { field: 'productUniqueCode', title: self.$t('pdtUniqueCode'), type: 'text', width: 'auto' },
-        // 特殊
-        { field: 'moldingBatch', type: 'disabled', width: 'auto' },
-      ],
-    }
-  },
-  methods: {
-    /**
-     *   @desc   : 产品查询
-     *   @date   : 2023/2/28 14:49
-     *   @author : 寇珊珊
-     */
-    productSelect() {
-      this.$refs['formInline'].validate().then(valid => {
-        if (valid) {
 
-        }
-      })
-    },
-    /**
-     *   @desc   : 行改变时间
-     *   @date   : 2023/2/28 11:22
-     *   @author : 寇珊珊
-     */
-    currentChange(e) {
-      console.log('e', e)
-    },
-    /**
-     *   @desc   : 值改变
-     *   @date   : 2023/2/28 11:23
-     *   @author : 寇珊珊
-     */
-    changeValue(field, row, rowIndex, val) {
-      console.log('field, row, rowIndex, val', field, row, rowIndex, val)
-    },
-    /**
-     *   @desc   : 通过id查询
-     *   @date   : 2023/2/28 11:25
-     *   @author : 寇珊珊
-     */
-    detail(id) {
-      return this.excuteNoParam(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.selectByMoldingId, [parseInt(id)])
-    },
-    /**
-     *   @desc   : 页面赋值
-     *   @date   : 2023/2/28 11:26
-     *   @author : 寇珊珊
-     */
-    setValuesByEdit(data) {
-      if (data && data.length > 0) {
-        this.detailList = data
+  export default {
+    name: 'halfCheck-add',
+    mixins: [formMixin],
+    data() {
+      let self = this
+      return {
+        tableData: [],
+        loading: false,
+        tableHeight: 620,
+        // 画面表单数据
+        formData: {
+          stationId: null,
+          stationName: '',
+          prodUserId: null,
+          prodUserCode: '',
+          barCode: '',
+          ftyId: this.$store.state.user.ftyId,
+          productCode: '',
+          productName: '',
+          logoName: '',
+          colourName: '',
+          gradeId: null,
+          gradeName: null,
+          gradeKind: null,
+        },
+        flowNodeId: self.$route.meta.menuUuid,
+        workStationList: [],//工位数据
+        editItemColumns: ['itemId', 'moldingId', 'productUniqueCode'],
+        gradeList: [],//产品等级
+        detailList: [],// 成型记录明细信息
+        defectNodeList: [],//责任工序
+        dutyUserCodeList: [],//责任工号
+        dutyJobList: [],//责任工种
+        dutyUserList: [],//责任人
+        defectFinetList: [],//缺陷扣罚
+        defectFinetNumList: [],//扣除数
+        // 明细列表
+        detailColumns: [
+          // 缺陷编码
+          { field: 'defectCode', type: 'text', width: 'auto' , },
+          //缺陷名称
+          { field: 'defectName', type: 'disabled', width: 'auto' , },
+          // 缺陷位置
+          { field: 'moldlineName', type: 'disabled', width: 'auto' },
+          // 特殊缺陷
+          { field: 'manageUserName', type: 'disabled', width: 'auto' },
+          // 责任工序
+          { field: 'appResponsibleProcess', type: 'disabled', width: 'auto' },
+          // 责任工号
+          {
+            field: 'moldingUser',
+            title: self.$t('appResponsibleJobNumber'),
+            type: 'select',
+            options: () => self.userAddList,
+            labelKey: 'userName',
+            valueKey: 'userId',
+            width: 'auto'
+          },
+          { field: 'modelCode', title: self.$t('appProductCodeB'), type: 'disabled', width: 'auto' },
+          // 责任工种
+          { field: 'modelName', title: self.$t('appProductName'), type: 'disabled', width: 'auto' },
+          // 责任人
+          { field: 'moldlineItemCode', title: self.$t('moldingModelCode'), type: 'disabled', width: 'auto' },
+          // 缺陷扣罚
+          { field: 'moldlineItemKindName', title: self.$t('mouldKindName'), type: 'disabled', width: 'auto' },
+          // 扣除数
+          { field: 'productUniqueCode', title: self.$t('pdtUniqueCode'), type: 'text', width: 'auto' },
+          // 特殊
+          { field: 'moldingBatch', type: 'disabled', width: 'auto' },
+        ],
       }
     },
+    methods: {
+      /**
+       *   @desc   : 产品查询
+       *   @date   : 2023/2/28 14:49
+       *   @author : 寇珊珊
+       */
+      productSelect() {
+        this.$refs['formInline'].validate().then(valid => {
+          if (valid) {
+            //产品条码查询
+            this.onBarCode()
+          }
+        })
+      },
+      /**
+       *   @desc   : 选择工位
+       *   @date   : 2023/2/28 9:24
+       *   @author : 寇珊珊
+       */
+      chooseStation(row) {
+        if (row && row[0]) {
+          this.formData.stationId = row[0].stationId
+          this.formData.stationName = row[0].stationName
+        }
+      },
+      /**
+       *   @desc   : 生产工号失焦事件
+       *   @date   : 2023/2/28 9:28
+       *   @author : 寇珊珊
+       */
+      onProdUserCode() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          prodUserCode: this.formData.prodUserCode,
+          stationId: this.formData.stationId,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkProdUserCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.prodUserId = parseInt(res.data)
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      },
+      /**
+       *   @desc   : 产品条码失焦事件
+       *   @date   : 2023/2/28 9:28
+       *   @author : 寇珊珊
+       */
+      onBarCode() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          barCode: this.formData.barCode,
+          prodUserCode: this.formData.prodUserCode,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.productCode = [res.data.modelCode]
+            this.formData.productName = [res.data.modelName]
+            this.formData.logoName = [res.data.logoName]
+            this.formData.colourName = [res.data.colourName]
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      },
+      /**
+       *   @desc   : 查询产品等级
+       *   @date   : 2023/3/3 10:09
+       *   @author : 寇珊珊
+       */
+      getGrade() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          nodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.commonService, this.$service.commonService.getProductGrade, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.gradeList = res.data
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      },
+      /**
+       *   @desc   : 选择产品等级
+       *   @date   : 2023/3/3 9:17
+       *   @author : 寇珊珊
+       */
+      chooseGrade(row) {
+        if (row ) {
+          this.formData.gradeId = row
+          let list =this.gradeList.filter(it=>it.gradeId== row)
+          if(list.length>0){
+            this.formData.gradeKind=list[0].gradeKind
+          }
+        }
+      },
+      /**
+       *   @desc   : 行改变时间
+       *   @date   : 2023/2/28 11:22
+       *   @author : 寇珊珊
+       */
+      currentChange(e) {
+        console.log('e', e)
+      },
+      /**
+       *   @desc   : 值改变
+       *   @date   : 2023/2/28 11:23
+       *   @author : 寇珊珊
+       */
+      changeValue(field, row, rowIndex) {
+        if(!this.detailList[rowIndex]){
+          this.detailList.splice(rowIndex,0,{})
+        }
+        let params = {
+          ftyId: this.formData.ftyId,
+          defectCode: row[field],
+        }
+        this.excute(this.$service.productDefectService, this.$service.productDefectService.getByCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.$set(this.detailList[rowIndex],'defectCode',row[field])
+            this.$set(this.detailList[rowIndex],'defectName',res.data.defectName)
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
 
-    /**
-     *   @desc   : 设置传参
-     *   @date   : 2023/2/28 11:29
-     *   @author : 寇珊珊
-     */
-    setParams() {
-      let table = this.$refs.moldingRecord.getTableChangeData()
-      table = table.minus(this.tableDataSocial,this.editItemColumns);        // 过滤掉已经编辑的数据
-      this.params = table;
-    },
+      },
+      /**
+       *   @desc   : 通过id查询
+       *   @date   : 2023/2/28 11:25
+       *   @author : 寇珊珊
+       */
+      detail(id) {
+        return this.excuteNoParam(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.selectByMoldingId, [parseInt(id)])
+      },
+      /**
+       *   @desc   : 页面赋值
+       *   @date   : 2023/2/28 11:26
+       *   @author : 寇珊珊
+       */
+      setValuesByEdit(data) {
+        if (data && data.length > 0) {
+          this.detailList = data
+        }
+      },
 
-    /**
-     *   @desc   : 保存数据
-     *   @date   : 2023/2/28 11:28
-     *   @author : 寇珊珊
-     */
-    saveData() {
-      this.excute(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.update, this.params)
+      /**
+       *   @desc   : 设置传参
+       *   @date   : 2023/2/28 11:29
+       *   @author : 寇珊珊
+       */
+      setParams() {
+        let table = this.$refs.moldingRecord.getTableChangeData()
+        table = table.minus(this.tableDataSocial, this.editItemColumns)        // 过滤掉已经编辑的数据
+        this.params = table
+      },
+
+      /**
+       *   @desc   : 保存数据
+       *   @date   : 2023/2/28 11:28
+       *   @author : 寇珊珊
+       */
+      save() {
+        this.excute(this.$service.moldingRecordItemService, this.$service.moldingRecordItemService.update, this.params)
+      },
     },
-  },
-}
+    created() {
+      //查询产品等级
+      this.getGrade();
+    }
+  }
 </script>
 
 <style scoped>

+ 10 - 9
src/view/pdm/data-collection/inKiln-add.vue

@@ -17,6 +17,11 @@
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
+          <!--生产工号-->
+          <!--          <DkFormItem :required="true" prop="prodUserCode" :span="5">-->
+          <DkFormItem :required="true" prop="prodUserCode" >
+            <InputPop ref="prodUserCode" v-model="formData.prodUserCode" @on-blur="onProdUserCode" />
+          </DkFormItem>
           <!--窑炉编码-->
 <!--          <DkFormItem :required="true" prop="kilnCode" :span="5">-->
           <DkFormItem :required="true" prop="kilnCode" >
@@ -25,13 +30,9 @@
           <!--窑炉车号-->
 <!--          <DkFormItem :required="true" prop="KilnCarNumber" :span="5">-->
           <DkFormItem :required="true" prop="KilnCarNumber" >
-            <InputPop :readonly="!formData.kilnCode"  ref="KilnCarNumber" v-model="formData.KilnCarNumber" />
-          </DkFormItem>
-          <!--生产工号-->
-<!--          <DkFormItem :required="true" prop="prodUserCode" :span="5">-->
-          <DkFormItem :required="true" prop="prodUserCode" >
-            <InputPop ref="prodUserCode" v-model="formData.prodUserCode" @on-blur="onProdUserCode" />
+            <InputPop :readonly="!formData.kilnCode"  ref="KilnCarNumber" v-model="formData.KilnCarNumber" @on-blur="onCarCode"  />
           </DkFormItem>
+
 <!--          <DkFormItem :span="2">-->
 <!--          &lt;!&ndash;产品查询&ndash;&gt;-->
 <!--          <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>-->
@@ -146,7 +147,8 @@ export default {
       }
       this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          this.formData.kilnId = res.data.kilnId
+          this.formData.kilnId = res.data.carrier.kilnId
+          this.tableData = res.data.productList
         }else{
           this.$Message.error(res.message)
         }
@@ -166,8 +168,7 @@ export default {
       }
       this.excute(this.$service.collectService, this.$service.collectService.checkProdUserCode, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          // this.formData.prodUserId =parseInt(res.data)
-          // this.tableData = [res.data]
+          this.formData.prodUserId =parseInt(res.data)
         }else{
           this.$Message.error(res.message)
         }

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

@@ -125,7 +125,8 @@ export default {
      */
     createdInit(){
       // this.primaryKey = 'dataId'     // 设置主键
-      console.log('formType',this.formType)
+      // console.log('formType',this.formType)
+      console.log(this.$route.exMenuUuid)
     },
     /**
      *   @desc   : 行点击事件

+ 136 - 38
src/view/pdm/data-collection/outKiln-add.vue

@@ -9,28 +9,34 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem :span="5" :required="true" prop="stationId" :data-type="$config.dataType.number" :label="$t('stationId')">
+          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+                      :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
-          <!--窑炉编码-->
-          <DkFormItem :required="true" prop="kilnCode" :span="5">
-            <InputPop ref="kilnCode" v-model="formData.kilnCode"/>
-          </DkFormItem>
           <!--生产工号-->
-          <DkFormItem :required="true" prop="makeUserName" :span="5">
-            <InputPop ref="makeUserName" v-model="formData.makeUserName"/>
+          <!--          <DkFormItem :required="true" prop="prodUserCode" :span="5">-->
+          <DkFormItem :required="true" prop="prodUserCode" >
+            <InputPop ref="prodUserCode" v-model="formData.prodUserCode" @on-blur="onProdUserCode" />
           </DkFormItem>
-          <!--窑炉车号-->
-          <DkFormItem :required="true" prop="KilnCarNumber" :span="5">
-            <InputPop ref="KilnCarNumber" v-model="formData.KilnCarNumber"/>
+          <!--窑炉编码-->
+          <!--          <DkFormItem :required="true" prop="kilnCode" :span="5">-->
+          <DkFormItem :required="true" prop="kilnCode" >
+            <InputPop ref="kilnCode" v-model="formData.kilnCode" />
           </DkFormItem>
-          <DkFormItem :span="2">
-            <!--产品查询-->
-            <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>
+          <!--窑炉车号-->
+          <!--          <DkFormItem :required="true" prop="KilnCarNumber" :span="5">-->
+          <DkFormItem :required="true" prop="KilnCarNumber" >
+            <InputPop :readonly="!formData.kilnCode"  ref="KilnCarNumber" v-model="formData.KilnCarNumber" @on-blur="onCarCode"  />
           </DkFormItem>
+
+          <!--          <DkFormItem :span="2">-->
+          <!--          &lt;!&ndash;产品查询&ndash;&gt;-->
+          <!--          <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>-->
+          <!--          </DkFormItem>-->
         </DkForm>
       </DkPanel>
 
@@ -42,29 +48,29 @@
                    :height="this.tableHeight" primaryKey="uniqueId"
                    :choose-flag="false">
             <!--产品条码-->
-            <DkTableColumn field="productCode" width="auto"></DkTableColumn>
+            <DkTableColumn field="uniqueCode" :title="$t('productCode')" width="auto"></DkTableColumn>
             <!--窑炉编码-->
             <DkTableColumn field="kilnCode" width="auto"></DkTableColumn>
             <!--窑车编码-->
-            <DkTableColumn field="KilnCarNumber" width="auto"></DkTableColumn>
+            <DkTableColumn field="carCode" width="auto"></DkTableColumn>
             <!--产品编码-->
             <DkTableColumn field="modelCode" width="auto"></DkTableColumn>
             <!--产品名称-->
             <DkTableColumn field="modelName" width="auto"></DkTableColumn>
             <!--生产工号-->
-            <DkTableColumn field="makeUserName" width="auto"></DkTableColumn>
-            <!--模具编码-->
-            <DkTableColumn field="modelCode" :title="$t('produceModelCode')" 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="moldingUser" width="auto"></DkTableColumn>
-            <!--TODO 公柸标识?-->
-            <!--          <DkTableColumn field="flgBindUnique" type="switch" :switch-disabled="true"></DkTableColumn>-->
-            <!--注浆次数-->
-            <DkTableColumn field="thisMoldedNum" :title="$t('slipCastingNum')" 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="colourName"  width="auto"></DkTableColumn>
           </DkTable>
         </div>
       </DkPanel>
@@ -72,11 +78,11 @@
     <!--      下部分按钮区域-->
     <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
   </div>
+
 </template>
 
 <script>
-  import { formMixin } from '@/mixins/form'
-
+  import {formMixin} from '@/mixins/form'
   export default {
     name: 'outKiln-add',
     components: {},
@@ -84,18 +90,22 @@
     data() {
       let self = this
       return {
-        loading: false,
+        loading:false,
         tableHeight: 600,
         split: 0.3,
         // 画面表单数据
         formData: {
-          stationId: null,
-          stationName: '',
-          kilnCode: '',
-          makeUserName: '',
-          KilnCarNumber: '',
+          stationId:null,
+          stationName:'',
+          kilnId:null,
+          kilnCode:'',
+          prodUserId: null,
+          prodUserCode : '',
+          ftyId: self.$store.state.user.ftyId,
         },
-        tableData: [],
+        flowNodeId:self.$route.meta.menuUuid,
+        tableData:[],
+        workStationList: [],//工位数据
       }
     },
     methods: {
@@ -107,7 +117,8 @@
       productSelect() {
         this.$refs['formInline'].validate().then(valid => {
           if (valid) {
-
+            //产品条码查询
+            this.onBarCode()
           }
         })
       },
@@ -117,15 +128,51 @@
        *   @author : 寇珊珊
        */
       chooseStation(row) {
-        console.log('chooseStation', row)
+        if (row && row[0]) {
+          this.formData.stationId = row[0].stationId
+          this.formData.stationName = row[0].stationName
+        }
       },
       /**
-       *   @desc   : 产品条码失焦事件
+       *   @desc   : 窑炉车号失焦事件
+       *   @date   : 2023/3/2 10:12
+       *   @author : 寇珊珊
+       */
+      onCarCode(){
+        let params = {
+          ftyId: this.formData.ftyId,
+          stationId:this.formData.stationId,
+          flowNodeId: this.flowNodeId,
+          carCode:this.formData.kilnCode+'-'+this.formData.KilnCarNumber
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.kilnId = res.data.carrier.kilnId
+            this.tableData = res.data.productList
+          }else{
+            this.$Message.error(res.message)
+          }
+        })
+      },
+      /**
+       *   @desc   : 生产工号失焦事件
        *   @date   : 2023/2/28 9:28
        *   @author : 寇珊珊
        */
-      onBlurBarCode(value) {
-        console.log('onBlurBarCode', value)
+      onProdUserCode() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          prodUserCode: this.formData.prodUserCode,
+          stationId:this.formData.stationId,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkProdUserCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.prodUserId =parseInt(res.data)
+          }else{
+            this.$Message.error(res.message)
+          }
+        })
       },
       /**
        *   @desc   : 保存
@@ -133,9 +180,60 @@
        *   @author : 寇珊珊
        */
       save() {
-
+        this.setParams()
+        this.loading =true
+        this.excute(this.$service.collectService, '/', this.params).then(res => {
+          this.loading =false
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.clear()
+          }
+        })
+      },
+      /**
+       *   @desc   : 设置参数
+       *   @date   : 2023/3/1 17:14
+       *   @author : 寇珊珊
+       */
+      setParams(){
+        this.params = this.formData
+        this.params.carCode=this.formData.kilnCode+'-'+this.formData.KilnCarNumber
+        this.params.flowNodeId = this.flowNodeId
+      },
+      /**
+       *   @desc   : 清空
+       *   @date   : 2023/3/2 13:18
+       *   @author : 寇珊珊
+       */
+      clear(){
+        this.formData.stationId = null
+        this.formData.stationName = null
+        this.formData.kilnId = null
+        this.formData.kilnCode = null
+        this.formData.prodUserId = null
+        this.formData.prodUserCode = null
+        this.tableData=[]
+      },
+      /**
+       *   @desc   : 获取工位
+       *   @date   : 2023/3/1 14:54
+       *   @author : 寇珊珊
+       */
+      getWorkStation() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.workStationList = res.data
+          }
+        })
       },
     },
+    created() {
+      //获取工位
+      this.getWorkStation()
+    }
   }
 </script>
 

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

@@ -212,6 +212,7 @@
       },
     },
     created() {
+      console.log(this.$route.meta.menuUuid)
       //获取工位
       this.getWorkStation()
     }

+ 131 - 35
src/view/pdm/data-collection/uninstallKiln-add.vue

@@ -9,28 +9,29 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem :span="5" :required="true" prop="stationId" :data-type="$config.dataType.number" :label="$t('stationId')">
+          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+                      :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
+          <!--生产工号-->
+          <DkFormItem :required="true" prop="prodUserCode">
+            <InputPop ref="prodUserCode" v-model="formData.prodUserCode"  @on-blur="onProdUserCode"/>
+          </DkFormItem>
           <!--窑炉编码-->
-          <DkFormItem :required="true" prop="kilnCode" :span="5">
+          <DkFormItem :required="true" prop="kilnCode" >
             <InputPop ref="kilnCode" v-model="formData.kilnCode" />
           </DkFormItem>
-          <!--生产工号-->
-          <DkFormItem :required="true" prop="makeUserName" :span="5">
-            <InputPop ref="makeUserName" v-model="formData.makeUserName" />
-          </DkFormItem>
           <!--窑炉车号-->
-          <DkFormItem :required="true" prop="KilnCarNumber" :span="5">
-            <InputPop ref="KilnCarNumber" v-model="formData.KilnCarNumber" />
-          </DkFormItem>
-          <DkFormItem :span="2">
-            <!--产品查询-->
-            <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>
+          <DkFormItem :required="true" prop="KilnCarNumber"  >
+            <InputPop :readonly="!formData.kilnCode" ref="KilnCarNumber" v-model="formData.KilnCarNumber" @on-blur="onCarCode" />
           </DkFormItem>
+
+          <!--产品查询-->
+          <!--          <DkButton type="primary" @click="productSelect">{{ $v('search') }}</DkButton>-->
         </DkForm>
       </DkPanel>
 
@@ -42,29 +43,29 @@
                    :height="this.tableHeight" primaryKey="uniqueId"
                    :choose-flag="false">
             <!--产品条码-->
-            <DkTableColumn field="productCode" width="auto"></DkTableColumn>
+            <DkTableColumn field="uniqueCode" :title="$t('productCode')" width="auto"></DkTableColumn>
             <!--窑炉编码-->
             <DkTableColumn field="kilnCode" width="auto"></DkTableColumn>
             <!--窑车编码-->
-            <DkTableColumn field="KilnCarNumber" width="auto"></DkTableColumn>
+            <DkTableColumn field="carCode" width="auto"></DkTableColumn>
             <!--产品编码-->
             <DkTableColumn field="modelCode" width="auto"></DkTableColumn>
             <!--产品名称-->
             <DkTableColumn field="modelName" width="auto"></DkTableColumn>
             <!--生产工号-->
-            <DkTableColumn field="makeUserName" width="auto"></DkTableColumn>
-            <!--模具编码-->
-            <DkTableColumn field="modelCode" :title="$t('produceModelCode')" 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="moldingUser" width="auto"></DkTableColumn>
-            <!--TODO 公柸标识?-->
-            <!--          <DkTableColumn field="flgBindUnique" type="switch" :switch-disabled="true"></DkTableColumn>-->
-            <!--注浆次数-->
-            <DkTableColumn field="thisMoldedNum" :title="$t('slipCastingNum')" 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="colourName"  width="auto"></DkTableColumn>
           </DkTable>
         </div>
       </DkPanel>
@@ -78,7 +79,7 @@
   import {formMixin} from '@/mixins/form'
 
   export default {
-  name: "uninstallKiln-add",
+    name: "uninstallKiln-add",
     components: {},
     mixins: [formMixin],
     data() {
@@ -86,16 +87,21 @@
       return {
         loading:false,
         tableHeight: 600,
-        split: 0.3,
         // 画面表单数据
         formData: {
           stationId:null,
           stationName:'',
+          kilnId:null,
           kilnCode:'',
-          makeUserName : '',
-          KilnCarNumber:'',
+          prodUserId: null,
+          prodUserCode : '',
+          KilnCarNumber:null,
+          carCode:'',
+          ftyId: self.$store.state.user.ftyId,
         },
+        flowNodeId:self.$route.meta.menuUuid,
         tableData:[],
+        workStationList: [],//工位数据
       }
     },
     methods: {
@@ -107,7 +113,8 @@
       productSelect() {
         this.$refs['formInline'].validate().then(valid => {
           if (valid) {
-
+            //产品条码查询
+            this.onBarCode()
           }
         })
       },
@@ -116,27 +123,116 @@
        *   @date   : 2023/2/28 9:24
        *   @author : 寇珊珊
        */
-      chooseStation(row){
-        console.log("chooseStation",row)
+      chooseStation(row) {
+        if (row && row[0]) {
+          this.formData.stationId = row[0].stationId
+          this.formData.stationName = row[0].stationName
+        }
+      },
+      /**
+       *   @desc   : 窑炉车号失焦事件
+       *   @date   : 2023/3/2 10:12
+       *   @author : 寇珊珊
+       */
+      onCarCode(){
+        let params = {
+          ftyId: this.formData.ftyId,
+          stationId:this.formData.stationId,
+          flowNodeId: this.flowNodeId,
+          carCode:this.formData.kilnCode+'-'+this.formData.KilnCarNumber
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkCarCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.kilnId = res.data.carrier.kilnId
+            this.tableData = res.data.productList
+          }else{
+            this.$Message.error(res.message)
+          }
+        })
       },
       /**
-       *   @desc   : 产品条码失焦事件
+       *   @desc   : 生产工号失焦事件
        *   @date   : 2023/2/28 9:28
        *   @author : 寇珊珊
        */
-      onBlurBarCode(value){
-        console.log("onBlurBarCode",value)
+      onProdUserCode() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          prodUserCode: this.formData.prodUserCode,
+          stationId:this.formData.stationId,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.collectService, this.$service.collectService.checkProdUserCode, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.formData.prodUserId =parseInt(res.data)
+          }else{
+            this.$Message.error(res.message)
+          }
+        })
       },
       /**
        *   @desc   : 保存
        *   @date   : 2023/2/28 9:25
        *   @author : 寇珊珊
        */
-      save(){
-
+      save() {
+        this.setParams()
+        this.loading =true
+        this.excute(this.$service.collectService, '/', this.params).then(res => {
+          this.loading =false
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.clear()
+          }
+        })
+      },
+      /**
+       *   @desc   : 设置参数
+       *   @date   : 2023/3/1 17:14
+       *   @author : 寇珊珊
+       */
+      setParams(){
+        this.params = this.formData
+        this.params.carCode=this.formData.kilnCode+'-'+this.formData.KilnCarNumber
+        this.params.flowNodeId = this.flowNodeId
+      },
+      /**
+       *   @desc   : 清空
+       *   @date   : 2023/3/2 13:18
+       *   @author : 寇珊珊
+       */
+      clear(){
+        this.formData.stationId = null
+        this.formData.stationName = null
+        this.formData.kilnId = null
+        this.formData.kilnCode = null
+        this.formData.prodUserId = null
+        this.formData.prodUserCode = null
+        this.formData.KilnCarNumber = null
+        this.formData.carCode = null
+        this.tableData=[]
+      },
+      /**
+       *   @desc   : 获取工位
+       *   @date   : 2023/3/1 14:54
+       *   @author : 寇珊珊
+       */
+      getWorkStation() {
+        let params = {
+          ftyId: this.formData.ftyId,
+          flowNodeId: this.flowNodeId,
+        }
+        this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.workStationList = res.data
+          }
+        })
       },
     },
-}
+    created() {
+      //获取工位
+      this.getWorkStation()
+    }
+  }
 </script>
 
 <style scoped>

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

@@ -15,13 +15,13 @@
           </DkFormItem>
           <!--起始条码-->
           <DkFormItem prop="produceBarCode">
-            <InputPop ref="produceBarCode" v-model="formData.produceBarCode"/>
+            <InputPop :readonly="productUniqueCodeCount==moldingRecordList.length" ref="produceBarCode" v-model="formData.produceBarCode"/>
           </DkFormItem>
           <!--    绑定条码    -->
-          <DkButton type="primary" @click="bindBarcodeButton" style="margin-right: 10px">{{ $v('bindBarcode') }}
+          <DkButton :disabled="productUniqueCodeCount==moldingRecordList.length" type="primary" @click="bindBarcodeButton" style="margin-right: 10px">{{ $v('bindBarcode') }}
           </DkButton>
           <!--    清空条码    -->
-          <DkButton @click="clearBindBarcode" s>{{ $v('clearBindBarcode') }}</DkButton>
+          <DkButton  :disabled="productUniqueCodeCount==moldingRecordList.length" @click="clearBindBarcode" s>{{ $v('clearBindBarcode') }}</DkButton>
         </DkForm>
       </DkPanel>
 
@@ -61,7 +61,7 @@
         formData: {
           moldingDate: new Date().toDateStr(),
           ftyId: this.$store.state.user.ftyId,
-          produceBarCode: null,//商品条码
+          produceBarCode: null,//起始条码
         },
         moldingRecordList: [],// 成型记录明细信息
         // 成型记录明细列表
@@ -104,6 +104,7 @@
           // 备注
           { field: 'productRemarks', type: 'text', width: 'auto' },
         ],
+        productUniqueCodeCount:0,//绑定条码个数
         //商品条码-数字正则
         checkProduceBarCode: function (value) {
           const reg = /^.*\d+.*$/
@@ -209,6 +210,10 @@
               i.moldingItemId = i.itemId
               if (i.productUniqueCode) {
                 this.$set(i, 'readOnly', ['productUniqueCode'])
+                this.productUniqueCodeCount++
+              }
+              if(!i.flgMolding){
+                this.productUniqueCodeCount++
               }
             }
           }