Przeglądaj źródła

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

周兴 3 lat temu
rodzic
commit
25c1aee232
47 zmienionych plików z 975 dodań i 736 usunięć
  1. 14 0
      src/api/pages/mst/model-carrier.js
  2. 14 0
      src/api/pages/mst/model-equipment.js
  3. 14 0
      src/api/pages/mst/model-material.js
  4. 14 0
      src/api/pages/mst/model-mould.js
  5. 1 0
      src/api/pages/mst/mould.js
  6. 1 0
      src/api/pages/pdm/molding-record.js
  7. 4 0
      src/api/pages/report/detail-report.js
  8. BIN
      src/assets/images/app-image/carrier_printing.png
  9. BIN
      src/assets/images/app-image/carrier_reprinting.png
  10. BIN
      src/assets/images/app-image/mould_printing.png
  11. BIN
      src/assets/images/app-image/mould_reprinting.png
  12. 7 6
      src/components/base/dk-perspective/dk-pivot.vue
  13. 106 46
      src/components/base/dk-perspective/echarts.vue
  14. 35 27
      src/components/business/print/modal.vue
  15. 83 287
      src/components/business/print/template.vue
  16. 22 12
      src/components/business/process/node-modal/node-modal.vue
  17. 3 1
      src/components/business/table-select/table-select.vue
  18. 12 3
      src/config/index.js
  19. 13 4
      src/locale/lang/zh-CN.js
  20. 4 4
      src/view-app/app/piecework-procedure/half-check/record-process.vue
  21. 49 77
      src/view-app/app/piecework-procedure/register/index.vue
  22. 141 74
      src/view-app/app/prod-management/barcode-printing/index.vue
  23. 6 3
      src/view-app/app/prod-management/bind-carrier/index.vue
  24. 21 29
      src/view-app/app/prod-management/unbind-carrier/index.vue
  25. 50 39
      src/view-app/app/prod-management/working-procedure-undo/index.vue
  26. 3 1
      src/view/mst/label-print-layout/index.vue
  27. 70 39
      src/view/mst/label-print-layout/setting.vue
  28. 3 10
      src/view/mst/model-product/index.vue
  29. 18 1
      src/view/mst/model/index.vue
  30. 17 1
      src/view/mst/mould/index.vue
  31. 16 29
      src/view/pdm/data-collection/finishCheck-add.vue
  32. 15 28
      src/view/pdm/data-collection/halfCheck-add.vue
  33. 0 3
      src/view/pdm/data-collection/register-add.vue
  34. 1 0
      src/view/pdm/molding-record/form.vue
  35. 17 0
      src/view/pdm/molding-record/index.vue
  36. 2 1
      src/view/pdm/prod-defect/add.vue
  37. 1 1
      src/view/process/process-flow/config/ProcessConfig.js
  38. 2 2
      src/view/process/process-flow/process-setting.vue
  39. 1 1
      src/view/report/code-change-report/index.vue
  40. 1 1
      src/view/report/delivery-blank/index.vue
  41. 1 1
      src/view/report/in-product-report/index.vue
  42. 1 1
      src/view/report/missed-scan-report/index.vue
  43. 1 1
      src/view/report/molding-record-report/index.vue
  44. 1 1
      src/view/report/process-output/index.vue
  45. 188 0
      src/view/report/product-follow-report/index.vue
  46. 1 1
      src/view/report/product-report/index.vue
  47. 1 1
      src/view/report/production-report/index.vue

+ 14 - 0
src/api/pages/mst/model-carrier.js

@@ -6,5 +6,19 @@
 export default {
   modelCarrierService:{
     prefix:'/mdm-server/mst/model_carrier/',
+    //打印
+    print: 'print_pdf',
   }
 }
+
+/**
+ * @desc   : 路由
+ * @author : 洪旭东
+ * @date   : 2023-04-14 09:12
+ */
+export const routeUrl = {
+  modelCarrier: {
+    //打印
+    print:{key: 'print', method: 'print'},
+  },
+}

+ 14 - 0
src/api/pages/mst/model-equipment.js

@@ -6,5 +6,19 @@
 export default {
   modelEquipmentService:{
     prefix:'/mdm-server/mst/model_equipment/',
+    //打印
+    print: 'print_pdf',
   }
 }
+
+/**
+ * @desc   : 路由
+ * @author : 洪旭东
+ * @date   : 2023-04-14 09:12
+ */
+export const routeUrl = {
+  modelEquipment: {
+    //打印
+    print:{key: 'print', method: 'print'},
+  },
+}

+ 14 - 0
src/api/pages/mst/model-material.js

@@ -6,5 +6,19 @@
 export default {
   modelMaterialService:{
     prefix:'/mdm-server/mst/model_material/',
+    //打印
+    print: 'print_pdf',
   }
 }
+
+/**
+ * @desc   : 路由
+ * @author : 洪旭东
+ * @date   : 2023-04-14 09:12
+ */
+export const routeUrl = {
+  modelMaterial: {
+    //打印
+    print:{key: 'print', method: 'print'},
+  },
+}

+ 14 - 0
src/api/pages/mst/model-mould.js

@@ -6,5 +6,19 @@
 export default {
   modelMouldService:{
     prefix:'/mdm-server/mst/model_mould/',
+    //打印
+    print: 'print_pdf',
   }
 }
+
+/**
+ * @desc   : 路由
+ * @author : 洪旭东
+ * @date   : 2023-04-14 09:12
+ */
+export const routeUrl = {
+  modelMould: {
+    //打印
+    print:{key: 'print', method: 'print'},
+  },
+}

+ 1 - 0
src/api/pages/mst/mould.js

@@ -33,5 +33,6 @@ export const routeUrl = {
     mouldChangeStdNum: {key: 'mouldChangeStdNum', method: 'mouldChangeStdNum'},
     changeStdNum: {key: 'changeStdNum', method: 'changeStdNum'},
     modelMouldChange: {key: 'modelMouldChange', method: 'modelMouldChange'},
+    print: {key: 'print', method: 'print'},
   }
 }

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

@@ -36,5 +36,6 @@ export const routeUrl = {
     bindBarcodeButton:{key: 'bindBarcodeButton', method: 'bindBarcodeButton'},
     clearBindBarcode:{key: 'clearBindBarcode', method: 'clearBindBarcode'},
     bindBarcode:{key: 'bind-barcode',url:'/pdm/molding-record/bind-barcode',chooseFlag: true},
+    print: {key: 'print', method: 'print'},
   }
 }

+ 4 - 0
src/api/pages/report/detail-report.js

@@ -23,6 +23,10 @@ export default {
     getDeliveryBlankReportByPage:'get_delivery_blank_report_by_page',
     // 工序产量明细表
     getProcessOutputReportByPage:'get_process_output_report_by_page',
+    // 产品跟踪明细表
+    getProductFollowReportByPage:'get_product_follow_report_by_page',
+    // 产品跟踪明细
+    getProductFollowItemReportByPage:'get_product_follow_item_report_by_page',
   }
 }
 

BIN
src/assets/images/app-image/carrier_printing.png


BIN
src/assets/images/app-image/carrier_reprinting.png


BIN
src/assets/images/app-image/mould_printing.png


BIN
src/assets/images/app-image/mould_reprinting.png


+ 7 - 6
src/components/base/dk-perspective/dk-pivot.vue

@@ -102,13 +102,14 @@
           </div>
         </DkSplit>
         <div style="height: 50px">
-          <DkButton @click="currentType=1">表格</DkButton>
-          <DkButton @click="currentType=2">柱状图</DkButton>
-          <DkButton @click="currentType=3">折线图</DkButton>
+          <DkButton @click="currentType='table'">表格</DkButton>
+          <DkButton @click="currentType='bar'">柱状图</DkButton>
+<!--          <DkButton @click="currentType='line'">折线图</DkButton>-->
+<!--          <DkButton @click="currentType='pie'">饼状图</DkButton>-->
         </div>
       </div>
 
-      <DkTable slot="right" v-show="currentType===1"
+      <DkTable slot="right" v-show="currentType==='table'"
                :id="'table-'+$options.name" ref="table-select" :data="tableData"
                :height="tableHeight"
                :choose-flag="false"
@@ -212,7 +213,7 @@
         </div>
 
       </DkTable>
-      <Echarts class="123112sdfsdf" slot="right" v-if="currentType!==1" :type="currentType"
+      <Echarts slot="right" v-if="currentType!='table'" :type="currentType" :columns="internal"
                :style="'height: '+tableHeight+'px; width: 100%'" :table-instance="$refs['table-select']"/>
     </DkSplit>
   </div>
@@ -321,7 +322,7 @@ export default {
       rowKeys: [],// 行列
       isDataLoading: false,
       reducer: (sum, item) => sum + 1,
-      currentType: 1
+      currentType: 'table'
     }
   },
   computed: {

+ 106 - 46
src/components/base/dk-perspective/echarts.vue

@@ -1,86 +1,147 @@
 <template>
-  <div id="chart">
+  <div :id="id">
   </div>
 </template>
 
 <script>
+import { uuid } from '@tinymce/tinymce-vue/lib/es2015/main/ts/Utils'
+
 export default {
   // name: 'echarts',
   props: {
     type: {
-      type: Number
+      type: String
     },
     tableInstance: {
       type: Object
+    },
+    columns: {
+      type: Object
     }
   },
   data() {
     return {
-      xCol: [],
-      yCol: []
+      id: uuid('chart'),
+    }
+  },
+  watch: {
+    type(){
+      this[this.type]()
     }
   },
   methods: {
-    drawBar() {
-      let col = this.tableInstance.$refs.table.getColumns().map(m => m.field).filter(f => f)
+    /**
+     * @desc   : 获取列信息
+     * @author : 洪旭东
+     * @date   : 2023-04-14 15:36
+     */
+    getColumn () {
+      //表格全部列
+      let colList = this.tableInstance.$refs.table.getColumns()
+      //去除行号列
+      colList.splice(0, 1)
+      return colList
+    },
+    /**
+     * @desc   : 柱状图
+     * @author : 洪旭东
+     * @date   : 2023-04-14 16:46
+     */
+    bar() {
       let tableData = this.tableInstance.$refs.table.getTableData().tableData
+      //表格全部列
+      let colList = this.getColumn()
+      //行
+      let xCol = colList.filter(f => this.columns.rowFieldKeys.indexOf(f.field)!==-1)[0]
+      //把行的列过滤掉,只保留值的列
+      let data = colList.filter(f => this.columns.rowFieldKeys.indexOf(f.field)===-1).map(c => {
+        return {
+          name: c.title,
+          data: tableData.map(m => m[c.field]),
+          type: 'bar',
+          showBackground: true,
+        }
+      })
 
       let echarts = require('echarts')
-      let bar = echarts.init(document.getElementById('chart'))
-      bar.setOption(
+      let chart = echarts.init(document.getElementById(this.id))
+      chart.setOption(
         {
-        //   legend: {},
-        //   tooltip: {},
-        //   dataset: {
-        //     source: [
-        //       ['', '2015', '2016', '2017'],
-        //       ['Matcha Latte', 43.3, 85.8, 93.7],
-        //       ['Milk Tea', 83.1, 73.4, 55.1],
-        //       ['Cheese Cocoa', 86.4, 65.2, 82.5],
-        //       ['Walnut Brownie', 72.4, 53.9, 39.1]
-        //     ]
-        //   },
-        //   xAxis: { type: 'category' },
-        //   yAxis: {},
-        //   series: [{ type: 'bar' }, { type: 'bar' }, { type: 'bar' }]
-        // }
-
-
           tooltip: {
             trigger: 'axis',
             axisPointer: {
               type: 'shadow'
             }
           },
-          grid: {
-            left: '3%',
-            right: '4%',
-            bottom: '3%',
-            containLabel: true
+          xAxis: {
+            type: 'category',
+            data: tableData.map(m => m[xCol.field] || 0)
+          },
+          yAxis: {
+            type: 'value'
+          },
+          series: data
+        }
+      )
+    },
+    line() {
+      let tableData = this.tableInstance.$refs.table.getTableData().tableData
+      //表格全部列
+      let colList = this.getColumn()
+      //行
+      let xCol = colList.filter(f => this.columns.rowFieldKeys.indexOf(f.field)!==-1)[0]
+      //把行的列过滤掉,只保留值的列
+      let data = colList.filter(f => this.columns.rowFieldKeys.indexOf(f.field)===-1).map(c => {
+        return {
+          name: c.title,
+          data: tableData.map(m => m[c.field] || 0),
+          type: 'line',
+          showBackground: true,
+        }
+      })
+
+      let echarts = require('echarts')
+      let chart = echarts.init(document.getElementById(this.id))
+      chart.setOption(
+        {
+          tooltip: {
+            trigger: 'item'
           },
           xAxis: {
             type: 'category',
-            data: tableData.map(m => m[col[0]])
+            data: tableData.map(m => m[xCol.field])
           },
           yAxis: {
             type: 'value',
             boundaryGap: [0, 0.01],
           },
+          series: data
+        }
+      )
+    },
+    pie() {
+      let _this = this
+      let col = this.tableInstance.$refs.table.getColumns().map(m => m.field).filter(f => f)
+      let tableData = this.tableInstance.$refs.table.getTableData().tableData
+
+      let echarts = require('echarts')
+      let chart = echarts.init(document.getElementById(this.id))
+      chart.setOption(
+        {
+          tooltip: {
+            trigger: 'item'
+          },
+          legend: {
+            orient: 'vertical',
+            left: 'left'
+          },
           series: [
             {
-              type: 'bar',
-              data: tableData.map(m => m[col[1]]),
-              barCategoryGap: 8,
-              itemStyle: {
-                normal: {
-                  //这里是重点
-                  color: function (params) {
-                    //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
-                    let colorList = ['#e58dc2', '#fbb8a1', '#fbe289', '#90e5e7', '#6fbae1', '#749f83', '#ca8622']
-                    return colorList[params.dataIndex]
-                  }
-                }
-              }
+              type: this.type,
+              data: tableData.map(m => {return {
+                value: m[col[1]],
+                name: m[col[0]]
+              }}),
             }
           ]
         }
@@ -88,8 +149,7 @@ export default {
     },
   },
   mounted() {
-    console.log('mounted', this.tableInstance.$refs.table.getColumns())
-    this.drawBar()
+    this[this.type]()
   }
 }
 </script>

+ 35 - 27
src/components/business/print/modal.vue

@@ -12,8 +12,8 @@
         <DkFormItem :label="$t('printLayoutId')" required>
           <SelectPop v-model="currentTemplate" :multiple="false"
                      :options="templateList"
-                     labelKey="tmName"
-                     valueKey="tmId">
+                     labelKey="layoutName"
+                     valueKey="layoutId">
           </SelectPop>
         </DkFormItem>
         <DkFormItem :label="$t('printerId')" required>
@@ -39,13 +39,22 @@ export default {
     orderType:{
       type:String,
       default:''
+    },
+    labelKind: {
+      type: String
+    },
+    service: {
+      type: Object
+    },
+    id: {
+      type: Number
     }
   },
   data() {
     return {
       printerList: [],
       templateList:[],
-      currentTemplate:32,
+      currentTemplate:null,
       currentPrinter:null,
       allAlign: null,
       showChooseTemplate:false,
@@ -55,39 +64,38 @@ export default {
     printBtn(){
       if(!this.currentTemplate){
         this.$Message.warning('请先选择一个模板再打印')
-        //todo
-        // return
+        return
       }
       if(!this.currentPrinter){
         this.$Message.warning('请先选择一个打印机再打印')
         return
       }
 
-      this.$emit('print', {
-        templateId: this.currentTemplate,
-        printerId: this.currentPrinter
+      this.excuteNoParams(this.service, this.service.print,
+        [this.currentTemplate, this.currentPrinter, this.id]).then(res=>{
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.showChooseTemplate = false
+          this.$Message.success(this.$t('I_001', {'param': this.$v('print')}))
+          this.currentTemplate = null
+          this.currentPrinter = null
+        } else {
+          this.$Message.error(res.message)
+        }
       })
+
     },
     getTemplateList() {
-      // printTemplateService.selectChooseTemplate(
-      //   {
-      //       docCode:this.orderType,
-      //       flgDel: false,
-      //       flgValid:true,
-      //       flgChoose:true,
-      //       sysId:this.$store.state.user.sysId,
-      //       cpId:this.$store.state.user.cpId
-      //    }
-      //   ).then(res=>{
-      //   if(res.code === 200){
-      //     this.templateList = res.data
-      //     this.templateList.forEach(it=>{
-      //       this.$set(it,'templateData',it.tmData)
-      //     })
-      //   }else{
-      //     this.$Message.error(res.message)
-      //   }
-      // })
+      this.excute(this.$service.labelPrintLayoutService, this.$service.labelPrintLayoutService.selectByCond, {flgValid: true, labelKind: this.labelKind}).then(res=>{
+        if(res.code === 200){
+          this.templateList = res.data.list
+          this.templateList.forEach(it=>{
+            this.$set(it,'templateData',it.layoutData)
+          })
+          console.log(this.templateList)
+        }else{
+          this.$Message.error(res.message)
+        }
+      })
     },
     /**
      * @desc   : 查询打印机

+ 83 - 287
src/components/business/print/template.vue

@@ -1,10 +1,7 @@
 <!-- @desc:打印模板  @auth:洪旭东  @time:2022-05-20 14:31 -->
 <template>
   <div class="print-template" style="height: 100%;background: #f2f2f2;" onselectstart="return false">
-    <!--    {{tableColTemp}}-->
-    <!--    {{tableCol}}-->
-    <!--    {{tableColTemp}}-->
-    <!--    {{backgroundConfig}}-->
+    {{tableInfo}}
     <div class="header">
       <img style="height: 60%;" src="http://www.dongkesoft.com/public/static/dongke/img/0logo.png"/>
       <div style="display:flex;">
@@ -23,17 +20,18 @@
                    @on-select="paperTypeChange" label-key="label" value-key="value"
                    :options="paperTypeList" :placeholder="$t('selectWords', { 'search-name': $t('paperType') })"
         />
-        <InputNumberPop name="displayNo" :digits="0" v-model="displayNo" label="displayNo"
-                        style="width:100px;margin-left: 10px;"/>
+        <div style="color: white;line-height: 33px;margin-left: 10px;" v-if="paperType==0">宽度</div>
+        <InputNumberPop v-model="customWidth" style="width: 200px;margin-left: 10px;" :digits="1"
+                        @on-blur="(val)=> paperTypeList[0].width = val" v-if="paperType==0"/>
+        <div style="color: white;line-height: 33px;margin-left: 10px;" v-if="paperType==0">高度</div>
+        <InputNumberPop v-model="customHeight" style="width: 200px;margin-left: 10px;" :digits="1"
+                        @on-blur="(val)=> paperTypeList[0].height = val" v-if="paperType==0"/>
       </div>
       <div>
-        <Button type="primary" @click="close" style="margin-right: 10px;">取消</Button>
+<!--        <Button type="primary" @click="close" style="margin-right: 10px;">取消</Button>-->
         <Button @click="save">保存</Button>
       </div>
     </div>
-    <!--    <div> {{currentIndex}}</div>-->
-    <!--    <div>{{ moveList }}</div>-->
-    <!--    <div>{{ this.currentColIndex }}</div>-->
 
     <div class="print-content" v-if="templateType">
       <!--   左侧部分   -->
@@ -167,7 +165,7 @@
                            :x="item.left">
             <img :src="item.path" style="width: 100%;height: 100%;" v-if="item.name != '$scanCode' && item.name != '$barCode'"/>
             <img :src="scanCode" style="width: 100%;height: 100%;" v-if="item.name == '$scanCode'"/>
-<!--            <img :src="$barCode" style="width: 100%;height: 100%;" v-if="item.name == '$barCode'"/>-->
+            <img :src="scanCode" style="width: 100%;height: 100%;" v-if="item.name == '$barCode'"/>
           </vue-drag-resize>
 
         </div>
@@ -704,10 +702,13 @@ export default {
       organizationList: [],
       organization: null,
       paperTypeList: self.$config.paperTypeList,
-      paperType: 0,
+      paperType: 1,
       lastPaperType: 0,
       // 显示顺序
-      displayNo: null
+      displayNo: null,
+      //自定义纸大小
+      customWidth: 0,
+      customHeight: 0
     }
   },
   watch: {
@@ -818,7 +819,7 @@ export default {
             flag = false
           }
         })
-        if ((this.tableInfo.width + this.tableInfo.left) > widthPx || (this.tableInfo.top + 90) > heightPx) {
+        if (this.tableInfo && ((this.tableInfo.width + this.tableInfo.left) > widthPx || (this.tableInfo.top + 90) > heightPx)) {
           flag = false
         }
         resolve(flag)
@@ -876,12 +877,8 @@ export default {
           this.lastTemplateType = this.editRow.docCode
           this.templateType = this.editRow.docCode
           this.templateName = this.editRow.tmName
-          this.tableColTemp = this.templateTypeList.filter(it => {
-            return it.value === this.editRow.docCode
-          })[0].tableColTemp
-          this.dataSource = this.templateTypeList.filter(it => {
-            return it.value === this.editRow.docCode
-          })[0].dataSource
+          this.tableColTemp = this.templateTypeList[0].tableColTemp
+          this.dataSource = this.templateTypeList[0].dataSource
           this.displayNo = this.editRow.displayNo
           this.moveList = this.editRow.templateData.mainList
           this.imgList = this.editRow.templateData.imgList
@@ -891,6 +888,10 @@ export default {
           this.organization = this.editRow.orgId
           this.backgroundConfig = this.editRow.templateData.backgroundConfig
           this.paperType = this.paperTypeList.map(it => it.label).indexOf(this.editRow.templateData.paperInfo.label)
+          this.paperTypeList[0].width = this.editRow.templateData.paperInfo.width
+          this.customWidth = this.editRow.templateData.paperInfo.width
+          this.paperTypeList[0].height = this.editRow.templateData.paperInfo.height
+          this.customHeight = this.editRow.templateData.paperInfo.height
           this.lastPaperType = this.paperType
           this.lastPaperDirection = this.paperDirection
           //通过这种方式去渲染,避免双向绑定冲突问题
@@ -1352,6 +1353,7 @@ export default {
       if (current[0].type === 'text') {
         this.moveList[current[0].index].currentFlag = true
         this.currentIndex = current[0].index
+        console.log(this.moveList)
       }
 
       if (current[0].type === 'col') {
@@ -1514,14 +1516,6 @@ export default {
               left: document.getElementById('paper').clientWidth * 0.05
             }
           }, 100)
-          // this.tableCol = [...this.tableColTemp]
-          // this.tableInfo = {
-          //   active: false,
-          //   width: 520,
-          //   height: 30,
-          //   top: e.offsetY - 45 <= 0 ? 0 : e.offsetY - 45,
-          //   left: e.offsetX - 260 <= 0 ? 0 : e.offsetX - 260
-          // }
           break
         case 'img':
           let imgInfo = {
@@ -1683,36 +1677,34 @@ export default {
         return
       }
 
-      if (!this.templateName) {
-        // this.$Message.warning('请输入模板名称')
-        this.$Message.error(this.$t('W_001', { 'param': this.$t('templateName') }))
-        return
-      }
-
-      // todo 洪旭东 暂时不选组织机构
-      // if (!this.organization) {
-      //   this.$Message.warning('请选择组织机构')
+      // if (!this.templateName) {
+      //   // this.$Message.warning('请输入模板名称')
+      //   this.$Message.error(this.$t('W_001', { 'param': this.$t('templateName') }))
       //   return
       // }
 
-      if (this.displayNo == null) {
-        this.$Message.error(this.$t('W_001', { 'param': this.$t('displayNo') }))
-        return
-      }
+
+      // if (this.displayNo == null) {
+      //   this.$Message.error(this.$t('W_001', { 'param': this.$t('displayNo') }))
+      //   return
+      // }
 
       // 提交时 重新处理一下width
       let table = document.getElementById('printTemplateTable')
       console.log('tableCol', this.tableCol)
-      for (let j = 0; j < table.rows[0].cells.length; j++) {
-        console.log('offsetWidth', table.rows[0].cells[j].getAttribute('data-key'))
-        let width = table.rows[0].cells[j].offsetWidth
-        this.tableCol.forEach(tcIt => {
-          if (tcIt.key === table.rows[0].cells[j].getAttribute('data-key')) {
-            console.log(tcIt.key, width)
-            tcIt.width = parseInt(width)
-          }
-        })
+      if (table) {
+        for (let j = 0; j < table.rows[0].cells.length; j++) {
+          console.log('offsetWidth', table.rows[0].cells[j].getAttribute('data-key'))
+          let width = table.rows[0].cells[j].offsetWidth
+          this.tableCol.forEach(tcIt => {
+            if (tcIt.key === table.rows[0].cells[j].getAttribute('data-key')) {
+              console.log(tcIt.key, width)
+              tcIt.width = parseInt(width)
+            }
+          })
+        }
       }
+
       // return;
       let result = {
         backgroundConfig: this.backgroundConfig,
@@ -1725,6 +1717,12 @@ export default {
         typeCode: this.templateType
       }
 
+      //自定义纸张大小
+      if (this.paperType == 0) {
+        result.paperInfo.width = this.customWidth
+        result.paperInfo.height = this.customHeight
+      }
+
       let currentType = this.templateTypeList.filter(it => {
         return it.value === this.templateType
       })[0]
@@ -1845,35 +1843,36 @@ export default {
 
         // this.tableCol = templateObj.dataSource.detail
         this.dataSource = { ...templateObj.dataSource }
-        setTimeout(() => {
-          this.tableInfo = {
-            active: false,
-            width: document.getElementById('paper').clientWidth * 0.9,
-            height: 30,
-            top: paperHeight - 120,
-            left: document.getElementById('paper').clientWidth * 0.05
-          }
-
-
-          /* 设置表格 列宽 */
-          const tableWidth = this.tableInfo.width
-          let currentSurplusWidth = this.tableInfo.width
-          templateObj.tableColTemp.forEach((it, index) => {
-            if (index === templateObj.tableColTemp.length - 1) {
-              it.width = currentSurplusWidth
-            } else {
-              const currentWidth = (it.width / 100) * tableWidth
-              it.width = currentWidth
-              currentSurplusWidth -= currentWidth
-            }
-          })
-          this.tableColTemp = [...templateObj.tableColTemp]
-          this.$nextTick(() => {
-            this.tableColTemp.forEach(it => {
-              document.getElementById(it.key).setAttribute('width', it.width)
-            })
-          })
-        }, 100)
+        // todo 默认表格、?
+        // setTimeout(() => {
+        //   this.tableInfo = {
+        //     active: false,
+        //     width: document.getElementById('paper').clientWidth * 0.9,
+        //     height: 30,
+        //     top: paperHeight - 120,
+        //     left: document.getElementById('paper').clientWidth * 0.05
+        //   }
+        //
+        //
+        //   /* 设置表格 列宽 */
+        //   const tableWidth = this.tableInfo.width
+        //   let currentSurplusWidth = this.tableInfo.width
+        //   templateObj.tableColTemp.forEach((it, index) => {
+        //     if (index === templateObj.tableColTemp.length - 1) {
+        //       it.width = currentSurplusWidth
+        //     } else {
+        //       const currentWidth = (it.width / 100) * tableWidth
+        //       it.width = currentWidth
+        //       currentSurplusWidth -= currentWidth
+        //     }
+        //   })
+        //   this.tableColTemp = [...templateObj.tableColTemp]
+        //   this.$nextTick(() => {
+        //     this.tableColTemp.forEach(it => {
+        //       document.getElementById(it.key).setAttribute('width', it.width)
+        //     })
+        //   })
+        // }, 100)
       })
       this.lastTemplateType = val
     },
@@ -2055,7 +2054,7 @@ export default {
      * @date   : 2022-05-20 16:51
      */
     close() {
-      this.closeTag(this.$route)
+      this.$emit('close')
     },
     /*
      * @desc   : 查询数据源
@@ -2063,210 +2062,6 @@ export default {
      * @date   : 2022/6/28 9:54
      */
     selectDataSource() {
-      // let res = {
-      //   'code': 200,
-      //   'message': '操作成功',
-      //   'exception': null,
-      //   'data': [{
-      //     'tableColTemp': [],
-      //     'label': '使用收款',
-      //     'value': '使用收款',
-      //     'dataSource': { 'main': [], 'detail': [] }
-      //   }, { 'tableColTemp': [], 'label': '客户取款', 'value': '客户取款', 'dataSource': { 'main': [], 'detail': [] } }, {
-      //     'tableColTemp': [{
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '商品名称',
-      //       'fontStyle': false,
-      //       'key': 'skuName'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '备注',
-      //       'fontStyle': false,
-      //       'key': 'remarks'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '商品数量',
-      //       'fontStyle': false,
-      //       'key': 'tItemQuantity'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '使用位置',
-      //       'fontStyle': false,
-      //       'key': 'usedLocation'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '赠品标识',
-      //       'fontStyle': false,
-      //       'key': 'flgGift'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '商品编码',
-      //       'fontStyle': false,
-      //       'key': 'skuCode'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '金额',
-      //       'fontStyle': false,
-      //       'key': 'tItemAmount'
-      //     }, {
-      //       'align2': 'center',
-      //       'align1': 'center',
-      //       'width': 10,
-      //       'fontSize': 14,
-      //       'bold': false,
-      //       'title': '售价',
-      //       'fontStyle': false,
-      //       'key': 'priceSale'
-      //     }], 'label': '销售订单', 'value': '销售订单', 'dataSource': {
-      //       'main': [{ 'title': '标价合计金额', 'value': 1234.56, 'key': 'tSumStandard' }, {
-      //         'title': '总体积',
-      //         'value': 1234.56,
-      //         'key': 'sumVolume'
-      //       }, { 'title': '剩余应收', 'value': 1234.56, 'key': 'receivable' }, {
-      //         'title': '整单标价折扣',
-      //         'value': 90.0,
-      //         'key': 'tDiscountStandard'
-      //       }, { 'title': '合计使用预存金额', 'value': 1234.56, 'key': 'sumUsePrestore' }, {
-      //         'title': '合计出库金额',
-      //         'value': 1234.56,
-      //         'key': 'sumOutAmount'
-      //       }, { 'title': '货物金额', 'value': 1234.56, 'key': 'tSumGoodsAmount' }, {
-      //         'title': '送货时间',
-      //         'value': '2022-06-01',
-      //         'key': 'deliveryTime'
-      //       }, { 'title': '合计退货金额', 'value': 1234.56, 'key': 'sumRejectAmount' }, {
-      //         'title': '制单人',
-      //         'value': '制单人',
-      //         'key': 'makingUser'
-      //       }, { 'title': '合计金额', 'value': 1234.56, 'key': 'tSumAmount' }, {
-      //         'title': '行政区划',
-      //         'value': '北京市/东城区',
-      //         'key': 'addressAreaName'
-      //       }, { 'title': '制单时间', 'value': '2022-06-01', 'key': 'makingTime' }, {
-      //         'title': '主业务部门',
-      //         'value': '主业务部门',
-      //         'key': 'orgName'
-      //       }, { 'title': '标准售价', 'value': 1234.56, 'key': 'sumPromotion' }, {
-      //         'title': '货物金额',
-      //         'value': 1234.56,
-      //         'key': 'sumGoodsAmount'
-      //       }, { 'title': '整单标价折扣', 'value': 90.0, 'key': 'discountStandard' }, {
-      //         'title': '标准售价',
-      //         'value': 1234.56,
-      //         'key': 'tSumPromotion'
-      //       }, { 'title': '货物金额(大写)', 'value': '壹仟贰佰叁拾肆元伍角陆分', 'key': 'sumUsePrestore' }, {
-      //         'title': '备注',
-      //         'value': '备注',
-      //         'key': 'remarks'
-      //       }, { 'title': '整单标准售价折扣', 'value': 90.0, 'key': 'tDiscountPromotion' }, {
-      //         'title': '主业务员',
-      //         'value': '主业务员',
-      //         'key': 'staffName'
-      //       }, { 'title': '客户名称', 'value': '张先生', 'key': 'customerName' }, {
-      //         'title': '客户电话',
-      //         'value': '18812345678',
-      //         'key': 'customerPhone'
-      //       }, { 'title': '联系人', 'value': '张先生', 'key': 'contactName' }, {
-      //         'title': '联系电话',
-      //         'value': '18812345678',
-      //         'key': 'contactPhones'
-      //       }, { 'title': '客户来源', 'value': '进店', 'key': 'customerFrom' }, {
-      //         'title': '小区或POI',
-      //         'value': '小区名称',
-      //         'key': 'addressName'
-      //       }, { 'title': '商品总数量', 'value': 1234.56, 'key': 'sumQuantity' }, {
-      //         'title': '门牌号',
-      //         'value': '门牌号',
-      //         'key': 'addressNo'
-      //       }, { 'title': '详细地址', 'value': '详细地址', 'key': 'addressFull' }, {
-      //         'title': '总重量',
-      //         'value': 1234.56,
-      //         'key': 'sumWeight'
-      //       }, { 'title': '小区档案', 'value': '小区档案名称', 'key': 'estateName' }, {
-      //         'title': '标价合计金额',
-      //         'value': 1234.56,
-      //         'key': 'sumStandard'
-      //       }, { 'title': '商品总数量', 'value': 1234.56, 'key': 'tSumQuantity' }, {
-      //         'title': '订单号',
-      //         'value': 'SA-ABCD-XYZ-202206011234',
-      //         'key': 'orderNo'
-      //       }, { 'title': '合计费用金额', 'value': 1234.56, 'key': 'sumFeeAmount' }, {
-      //         'title': '合计金额',
-      //         'value': 1234.56,
-      //         'key': 'sumAmount'
-      //       }, { 'title': '整单标准售价折扣', 'value': 90.0, 'key': 'discountPromotion' }, {
-      //         'title': '合计收款金额(定金)',
-      //         'value': 1234.56,
-      //         'key': 'sumReceiptAmount'
-      //       }],
-      //       'detail': [{ 'title': '活动名称', 'value': '活动名称', 'key': 'activityName' }, {
-      //         'title': '商品名称',
-      //         'value': 'Q9智能一体机',
-      //         'key': 'skuName'
-      //       }, { 'title': '玻璃参数', 'value': '8mm', 'key': 'glassParameters' }, {
-      //         'title': '玻璃厚度',
-      //         'value': '8mm',
-      //         'key': 'glassThickness'
-      //       }, { 'title': '重量', 'value': 1234.56, 'key': 'skuWeight' }, {
-      //         'title': '玻璃工艺',
-      //         'value': '拉丝',
-      //         'key': 'glassCraft'
-      //       }, { 'title': '基材颜色', 'value': '黑色', 'key': 'substrateColor' }, {
-      //         'title': '备注',
-      //         'value': '备注',
-      //         'key': 'remarks'
-      //       }, { 'title': '商品数量', 'value': 1234.56, 'key': 'tItemQuantity' }, {
-      //         'title': '使用位置',
-      //         'value': '一楼主卫',
-      //         'key': 'usedLocation'
-      //       }, { 'title': '明细序号', 'value': 123, 'key': 'itemIndex' }, {
-      //         'title': '商品型号',
-      //         'value': 'FFFFFFFFF',
-      //         'key': 'skuModel'
-      //       }, { 'title': '体积', 'value': 1234.56, 'key': 'skuVolume' }, {
-      //         'title': '赠品标识',
-      //         'value': '是',
-      //         'key': 'flgGift'
-      //       }, { 'title': '非标备注', 'value': '非标备注', 'key': 'nonstandardRemarks' }, {
-      //         'title': '商品编码',
-      //         'value': 'FFFFFFFFF',
-      //         'key': 'skuCode'
-      //       }, { 'title': '金额', 'value': 1234.56, 'key': 'tItemAmount' }, {
-      //         'title': 'BOM编码',
-      //         'value': 'BOM编码',
-      //         'key': 'bomSkuCode'
-      //       }, { 'title': '售价', 'value': 1234.56, 'key': 'priceSale' }]
-      //     }
-      //   }, { 'tableColTemp': [], 'label': '客户收款', 'value': '客户收款', 'dataSource': { 'main': [], 'detail': [] } }]
-      // }
       this.excute(this.$service.commonService, this.$service.commonService.getLabelPrintItem, {
         labelKind: this.labelKind
       }).then(res=>{
@@ -2295,8 +2090,7 @@ export default {
                 return {
                   'title':m.itemName,
                   'value':m.itemSample,
-                  'key':m.itemCode
-                  // 'key':m.dataKey
+                  'key':m.dataKey
                 }
                 }), 'detail': [] }
             }
@@ -2305,7 +2099,9 @@ export default {
           setTimeout(() => {
             this.visibleChange(this.editRow)
             this.templateType = this.$t(titleItem)
-            this.changeFunc(this.$t(titleItem))
+            if(!this.editRow) {
+              this.changeFunc(this.$t(titleItem))
+            }
           }, 500)
         }
       } else {

+ 22 - 12
src/components/business/process/node-modal/node-modal.vue

@@ -227,6 +227,7 @@
                      :enabledRepeat="false"
                      :show-setting-flag="false"/>
           <!--    无线路由    -->
+<!--          {{nodeData.routerType}}-->
           <EditTable ref="routerTable" :title='"无线路由"' :data="nodeData.routerList"
                      v-if="nodeControl?.routerTable?.visible&&routerTableFlag"
                      :columns="nodeData.routerType===4||nodeData.recycledKind===$config.recycledKind.after?routerColumns_noNode1AndBack:routerColumns"
@@ -405,6 +406,7 @@ export default {
           width: 'auto',
         },
         { field: 'defectName', type: 'disabled', width: 'auto' },
+        { field: 'defectTypesName', type: 'disabled', width: 'auto' },
         {
           field: 'jobId',
           type: 'select',
@@ -511,6 +513,20 @@ export default {
   methods: {
     ...mapMutations(['setProcessNodeModalDisplay', 'setCurrentNodeId']),
     /**
+     * @desc   : 处理无线路由类别 1:画面中连线 2:到达检验节点的设置 3:回收节点设置 4:跨流程设置
+     * @author : 张潇木
+     * @date   : 2023/3/31 14:11
+     */
+    handleRouterType() {
+      this.nodeData.routerType=4
+      if([this.$config.nodeKind.halfCheck,this.$config.nodeKind.finishCheck].includes(this.nodeData.nodeKind)){
+        this.nodeData.routerType=2
+      }
+      if(this.$config.recycledKind.before===this.nodeData.recycledKind&&this.nodeData.nodeKind===this.$config.nodeKind.recover){
+        this.nodeData.routerType=3
+      }
+    },
+    /**
      * @desc   : 改变独立检验
      * @author : 张潇木
      * @date   : 2023/4/6 16:19
@@ -564,11 +580,13 @@ export default {
       }
       // 回收时,结束节点,回收初始方式只能是后续流程
       if (this.nodeData.flowKind === this.$config.flowKind.end) {
+        this.nodeControl.routerTable.visible=false
         this.recycledKindList = this.recycledKindListSocial.filter(it => it.kindCode === this.$config.recycledKind.after)
         this.$nextTick(() => {
           this.nodeData.recycledKind = this.$config.recycledKind.after
         })
       } else {
+        this.nodeControl.routerTable.visible=true
         this.recycledKindList = this.recycledKindListSocial.copy()
       }
       this.$refs['formInline'].clearValidate()
@@ -646,6 +664,7 @@ export default {
      * @date   : 2023/2/16 16:21
      */
     setParams() {
+      // console.log('this.$refs?.defectTable?.getTableDataFilter()',this.$refs?.jobDefectTable?.getTableDataFilter())
       // console.log("routerTable?.getTableDataFilter()",this.$refs?.routerTable?.getTableDataFilter())
       // region 设置表单数据
       // 半检、成检、成型 直接指定为生产工号类型
@@ -719,6 +738,7 @@ export default {
           pdtDefectId: it.pdtDefectId,
           defectCode: it.defectCode,
           defectName: it.defectName,
+          defectTypesName: it.defectTypesName,
           remarks: it.remarks,
           ftyId: this.$store.state.user.ftyId
         }
@@ -838,7 +858,7 @@ export default {
         })
       }
       // 结束节点不能作为起点 特殊处理:(后续流程+回收)允许有出线
-      if (this.nodeData?.flowKind == this.$config.flowKind.end && cell?.nodeKind === this.$config.nodeKind.recover && cell.recycledKind != this.$config.recycledKind.after) {
+      if (this.nodeData?.flowKind == this.$config.flowKind.end ) {
         this.graph.getOutgoingEdges(cell)?.forEach(it => {
           this.graph.removeEdge(it.id)
         })
@@ -894,17 +914,7 @@ export default {
       // 工艺类别
       this.techTypeList = this.dictionaryDataList.filter(it => it.dictCode === this.$config.dictType.techType)
     },
-    /**
-     * @desc   : 处理无线路由类别 1:画面中连线 2:到达检验节点的设置 3:回收节点设置 4:跨流程设置
-     * @author : 张潇木
-     * @date   : 2023/3/31 14:11
-     */
-    handleRouterType() {
-      this.nodeData.routerType=4
-      if([this.$config.nodeKind.halfCheck,this.$config.nodeKind.finishCheck].includes(this.nodeData.nodeKind)){
-        this.nodeData.routerType=2
-      }
-    },
+
     /**
      * @desc   : 计算高度
      * @author : 周兴

+ 3 - 1
src/components/business/table-select/table-select.vue

@@ -1479,11 +1479,13 @@ export default {
         this.selectLabel = 'defectName'
         this.columns = [
           {field: 'defectCode', width: '120'},
-          {field: 'defectName', width: 'auto'},
+          {field: 'defectName', width: '120'},
+          {field: 'defectTypesName', width: 'auto'},
         ]
         this.columnsDetail = [
           {field: 'defectCode', width: '150'},
           {field: 'defectName', width: '150'},
+          {field: 'defectTypesName', width: '120'},
           {field: 'remarks', width: 'auto'},
         ]
       }

+ 12 - 3
src/config/index.js

@@ -519,6 +519,14 @@ export default {
     prodCarryoverItem: 'prodCarryoverItem',
   },
   /**
+   * @desc   : 产品跟踪明细
+   * @author : 姜宁
+   * @date   : 2023/4/14 14:34
+   */
+  productFollowItemTab: {
+    productFollowItem: 'prodCarryoverItem',
+  },
+  /**
    * @desc   : 生产工号
    * @author : 姜宁
    * @date   : 2023/2/7 15:37
@@ -1482,9 +1490,10 @@ export default {
    * @date   : 2022-5-13 13:10
    */
   paperTypeList: [
-    { label: 'A4 (21cm x 29.7cm)', value: 0, width: 21, height: 29.7 },
-    { label: 'A5 (14.8cm x 21cm)', value: 1, width: 14.8, height: 21 },
-    { label: 'B5 (17.6cm x 25cm)', value: 2, width: 17.6, height: 25 }
+    { label: '自定义', value: 0, width: 0, height: 0 },
+    { label: 'A4 (21cm x 29.7cm)', value: 1, width: 21, height: 29.7 },
+    { label: 'A5 (14.8cm x 21cm)', value: 2, width: 14.8, height: 21 },
+    { label: 'B5 (17.6cm x 25cm)', value: 3, width: 17.6, height: 25 },,
   ],
 
   uploadFileConfig: {

+ 13 - 4
src/locale/lang/zh-CN.js

@@ -254,6 +254,7 @@ export const formTitle = {
   'product_pic': '产品图片',
   'product_draw': '画布',
   'pic_list': '图片列表',
+  'product_follow_item':'产品跟踪明细',
 }
 
 /**
@@ -376,6 +377,7 @@ export const columns = {
   saveDetail: '保存至明细',
   clearDefect: '清空',
   userMessage:'员工信息',
+  reverseMessage:'撤销信息',
 
   categoryCode: '分类编码',
   categoryName: '分类名称',
@@ -804,9 +806,9 @@ export const columns = {
   notCounted: '未盘点',
   counted: '已盘点',
   inventoryProfit: '盘盈',
-  finishTimeStart: '完成时间',
+  finishTimeStart: '开始时间',
   finishTimeEnd: '结束时间',
-  makeTimeStart: '生产时间',
+  makeTimeStart: '开始时间',
   makeTimeEnd: '结束时间',
   flowNodeIdList: '盘点工序',
   checkModelCategory: '产品类别',
@@ -834,7 +836,7 @@ export const columns = {
   recordTime: '记录时间',
   temperature: '温度(℃)',
   humidity: '湿度(%RH)',
-  thmeterRecord: '湿温度计',
+  thmeterRecord: '温湿度计',
 
   //报工
   workRecord:'报工记录',
@@ -845,6 +847,7 @@ export const columns = {
   workTimes:'报工工时',
   wordAmount:'报工金额',
   flgOvertime:'加班标识',
+  workJob:'报工工种',
 
   //工位打卡
   replaceStaffName: '替班员工',
@@ -853,7 +856,7 @@ export const columns = {
   relief: '替班员工',
   currentStaffName: '当前员工',
 
-  //在产品明细表
+  //明细表
   opnUserCode: '生产工号',
   moldingUserCode: '成型工号',
   carrierUniqueCode: '载具编码',
@@ -904,6 +907,10 @@ export const columns = {
   userOrgName:'所属部门',
   startNo:'起始序号',
   carCount:'窑车数量',
+  pdtProdStatusName:'产品状态',
+  packagingBarcode:'包装码',
+  processName:'工序名称',
+  operatingInstructions:'操作说明',
 
   // 自定义报表
   reportName: '报表名称',
@@ -1458,6 +1465,7 @@ export const appColumns = {
   appOpnTime: '操作日期',
   appCurrentNode: '当前工序',
   appLableInput: '请输入{param}',
+  appPrint: '打印',
 }
 /**
  * @desc   : app按钮
@@ -1565,6 +1573,7 @@ export const appOthers = {
   appDefectsOperation:'当前操作有未记录的缺陷',
   appProductionKilnWrong:'当前窑炉车号不存在',
   appNotDetailIsLoss:'当前无修改记录,无法保存',
+  appRepealMenuUuid:'e6a31228-5893-487b-bcc2-2fae990d8e37',
 }
 
 

+ 4 - 4
src/view-app/app/piecework-procedure/half-check/record-process.vue

@@ -451,10 +451,10 @@ export default {
         return false;
       }
       //缺陷扣罚
-      if (!this.formData.defectDeductionId) {
-        this.appToastFail(this.$t('selectWords', {'search-name': this.$t('appDefectDeduction')}));
-        return false;
-      }
+      // if (!this.formData.defectDeductionId) {
+      //   this.appToastFail(this.$t('selectWords', {'search-name': this.$t('appDefectDeduction')}));
+      //   return false;
+      // }
       //缺陷位置
       if (!this.formData.placeCode) {
         this.appToastFail(this.$t('inputWords', {'search-name': this.$t('appDefectName')}));

+ 49 - 77
src/view-app/app/piecework-procedure/register/index.vue

@@ -2,63 +2,36 @@
   <!--  计件工序(单点 和 集中)     -->
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
-    <dk-app-nav-bar :title="appActiveTitle"
-                    @click-left="onClickLeft"   @click-right="onClickRight"></dk-app-nav-bar>
+    <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" @click-right="onClickRight"></dk-app-nav-bar>
     <!-- 选择工位 -->
-    <dk-app-field
-      v-if="stationList.length>0"
-      v-model="formData.stationName"
-      :label="$t('stationName')"
-      :readonly="true"
-      @click="showStation = true"
-      placeholderType="choose" is-link arrow-direction="down"
-    />
+    <dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')" :readonly="true"
+      @click="showStation = true" placeholderType="choose" is-link arrow-direction="down" />
     <!-- 生产工号 -->
-    <dk-app-field
-      :readonly="!userKind || userKind == $config.operationUserType.produceUser"
-      v-model="formData.prodUserCode"
-      ref="prodUser"
-      :label="$t('appProductionJobNumber')"
-      placeholderType="scan"
-      @changeBarCode="queryUser"
-
-    />
+    <dk-app-field :readonly="!userKind || userKind == $config.operationUserType.produceUser"
+      v-model="formData.prodUserCode" ref="prodUser" :label="$t('appProductionJobNumber')" placeholderType="scan"
+      @changeBarCode="queryUser" />
     <!-- 装载具/卸载具-->
-    <dk-app-field
-      v-if="opnKind && (opnKind !=$config.processType.productCode)"
-      :label="opnKind ==$config.processType.dressKilnCar?$t('dressKilnCar'):
-                    (opnKind ==$config.processType.unloadKilnCar?$t('unloadKilnCar'):
-                    (opnKind ==$config.processType.kilnCode?$t('vehicleCode'):$t('newCarCode'))
-                    )"
-      :readonly="(opnKind && (opnKind ==$config.processType.exchangeKilnCar ||opnKind ==$config.processType.dressKilnCar) && tableRowData.length>0)"
-      ref="carCode"
-      v-model="formData.carCode"
-      @changeBarCode="onCarCode('carCode')"
+    <dk-app-field v-if="opnKind && (opnKind != $config.processType.productCode)" :label="opnKind == $config.processType.dressKilnCar ? $t('dressKilnCar') :
+      (opnKind == $config.processType.unloadKilnCar ? $t('unloadKilnCar') :
+        (opnKind == $config.processType.kilnCode ? $t('vehicleCode') : $t('newCarCode'))
+      )"
+      :readonly="(opnKind && (opnKind == $config.processType.exchangeKilnCar || opnKind == $config.processType.dressKilnCar) && tableRowData.length > 0)"
+      ref="carCode" v-model="formData.carCode" @changeBarCode="onCarCode('carCode')"
       placeholderType="scan"></dk-app-field>
     <!-- 原载具-->
-    <dk-app-field
-      v-if="opnKind && (opnKind ==$config.processType.exchangeKilnCar)"
-      :label="$t('oldCarCode')"
-      ref="perCarCode"
-      v-model="formData.perCarCode"
-      @changeBarCode="onCarCode('productCode')"
-      :readonly="!formData.carCode"
-      placeholderType="scan"></dk-app-field>
+    <dk-app-field v-if="opnKind && (opnKind == $config.processType.exchangeKilnCar)" :label="$t('oldCarCode')"
+      ref="perCarCode" v-model="formData.perCarCode" @changeBarCode="onCarCode('productCode')"
+      :readonly="!formData.carCode" placeholderType="scan"></dk-app-field>
     <!--    产品条码-->
     <dk-app-field
-      v-if="opnKind && (opnKind ==$config.processType.productCode || opnKind ==$config.processType.dressKilnCar)"
-      :label="$t('appProductCode')"
-      ref="barCode"
-      v-model="formData.barCode"
-      @changeBarCode="onBarCode" s
-      :readonly="opnKind &&opnKind ==$config.processType.dressKilnCar?
-                                !formData.carCode:
-                                !formData.prodUserId"
-      placeholderType="scan"></dk-app-field>
+      v-if="opnKind && (opnKind == $config.processType.productCode || opnKind == $config.processType.dressKilnCar)"
+      :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="onBarCode" s :readonly="opnKind && opnKind == $config.processType.dressKilnCar ?
+        !formData.carCode :
+        !formData.prodUserId" 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>
@@ -73,14 +46,13 @@
     <dk-app-loading :loading="loading"></dk-app-loading>
     <div style=" height: 0">
       <dk-app-popup :showPopup="showPopup" :gridItemList="gridItemList" @onClose="onClose"
-                    @onClick="onClick"></dk-app-popup>
+        @onClick="onClick"></dk-app-popup>
       <!--   工位 -->
       <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>
+        @mutiClose="mutiClose('register')" :ids="[formData.stationId]"
+        @mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
       <!-- 验证标签-->
-      <van-popup
-        :close-on-click-overlay="false" style="overflow: hidden;width: 85%; height:300px; border-radius: 10px"
+      <van-popup :close-on-click-overlay="false" style="overflow: hidden;width: 85%; height:300px; border-radius: 10px"
         v-model="labelModal">
         <van-sticky scroll-top="0">
           <div style="height: 5vw;background: #fff;"></div>
@@ -88,20 +60,16 @@
             {{ modalTitle }}
           </div>
         </van-sticky>
-        <div v-for="(item,index) in pdtLabelKinds"
-             :key="index">
-          <dk-app-field
-            :label="item.labelName" v-model="item.labelCode" placeholderType="input"></dk-app-field>
+        <div v-for="(item, index) in pdtLabelKinds" :key="index">
+          <dk-app-field :label="item.labelName" v-model="item.labelCode" placeholderType="input"></dk-app-field>
         </div>
         <div class="popup-button">
           <div>
-            <van-button style="border-radius: 8px;width:95px !important;" plain color="#1B365D"
-                        @click="reset">取消
+            <van-button style="border-radius: 8px;width:95px !important;" plain color="#1B365D" @click="reset">取消
             </van-button>
           </div>
           <div>
-            <van-button style="border-radius: 8px;width:95px !important;" color="#1B365D"
-                        @click="saveLabel">确定
+            <van-button style="border-radius: 8px;width:95px !important;" color="#1B365D" @click="saveLabel">确定
             </van-button>
           </div>
 
@@ -113,7 +81,7 @@
 
 <script>
 
-import {appFormMixin} from '@/mixins/appform.js'
+import { appFormMixin } from '@/mixins/appform.js'
 
 export default {
   name: "app-register",
@@ -132,14 +100,14 @@ export default {
         },
       ],
       rows: [
-        {name: 'uniqueCode', title: self.$t('appProductCodeB')},         //产品编码
-        {name: 'modelCode', title: self.$t('modelCode')},                //型号编码
-        {name: 'modelName', title: self.$t('appmodelKindT')},            //模具型号
-        {name: 'logoName', title: self.$t('appLogoName')},               //商标名称
-        {name: 'moldingDate', title: self.$t('appFormingDate')},         //成型日期
-        {name: 'moldingUserCode', title: self.$t('appMoldingStationNo')},//成型工号
-        {name: 'modelMouldCode', title: self.$t('appMoldNo')},           //模具编号
-        {name: 'colourName', title: self.$t('colourName')},              //釉色名称
+        { name: 'uniqueCode', title: self.$t('appProductCodeB') },         //产品编码
+        { name: 'modelCode', title: self.$t('modelCode') },                //型号编码
+        { name: 'modelName', title: self.$t('appmodelKindT') },            //模具型号
+        { name: 'logoName', title: self.$t('appLogoName') },               //商标名称
+        { name: 'moldingDate', title: self.$t('appFormingDate') },         //成型日期
+        { name: 'moldingUserCode', title: self.$t('appMoldingStationNo') },//成型工号
+        { name: 'modelMouldCode', title: self.$t('appMoldNo') },           //模具编号
+        { name: 'colourName', title: self.$t('colourName') },              //釉色名称
       ],//每一条的内容
       tableRowData: [],
       //标题
@@ -166,7 +134,7 @@ export default {
       IsPieceSingleFlag: true,       // 是否是单点采集
       resData: null,         // barcode 返回的数据
       labelFlag: false,      //默认验证标签
-      pdtLabelKinds: [{labelName: "1"}, {labelName: "2"}],     //开的验证标签
+      pdtLabelKinds: [{ labelName: "1" }, { labelName: "2" }],     //开的验证标签
       labelModal: false,     //验证标签modal
       modalTitle: null,
       labelFormData: {},
@@ -195,7 +163,7 @@ export default {
           }
           this.opnKind = res.data.opnKind
           if (res.data.userKind == null) { // 验证 此工序无此用户
-            this.$appDialog.alert({message: this.$t('W_117'),}).then(() => {
+            this.$appDialog.alert({ message: this.$t('W_117'), }).then(() => {
               // 弹出alert后的逻辑处理
 
             });
@@ -265,7 +233,7 @@ export default {
       let pdtLabelKinds = this.pdtLabelKinds
       for (let i = 0; i < pdtLabelKinds.size(); i++) {
         if (!pdtLabelKinds[i].labelCode) {
-          this.appToastFail(this.$t('appLableInput', {'param': pdtLabelKinds[i].labelName}));
+          this.appToastFail(this.$t('appLableInput', { 'param': pdtLabelKinds[i].labelName }));
           return false
         }
       }
@@ -441,8 +409,12 @@ export default {
       if (typeName === 'register') {
         this.formData.stationName = e.names//显示 选中的 工位名称
         this.formData.stationId = Number(e.ids) //选中的 工位id
-        //校验打卡
-        this.queryUser()
+
+        if (this.userKind == this.$config.operationUserType.produceUser) {
+          //校验打卡
+          this.queryUser()
+        }
+
         this.setFocus("prodUser") //焦点给到生产工号
       }
     },
@@ -466,7 +438,7 @@ export default {
     onClick(item) {
       //跳转新页面
       item.form = {} //要传的参数
-      this.$router.push({name: item.routerName, params: {item: item}})
+      this.$router.push({ name: item.routerName, params: { item: item } })
 
     },
     /**
@@ -538,7 +510,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
     },
@@ -563,7 +535,7 @@ export default {
       if (!this.opnKind) {
         let carCode = this.opnKind == this.$config.processType.dressKilnCar ? this.$t('dressKilnCar') :
           (this.opnKind == this.$config.processType.unloadKilnCar ? this.$t('unloadKilnCar') :
-              (this.opnKind == this.$config.processType.kilnCode ? this.$t('vehicleCode') : this.$t('newCarCode'))
+            (this.opnKind == this.$config.processType.kilnCode ? this.$t('vehicleCode') : this.$t('newCarCode'))
           )
         this.appToastFail((carCode + this.$t('appNotNull')));
         return false;

+ 141 - 74
src/view-app/app/prod-management/barcode-printing/index.vue

@@ -1,127 +1,195 @@
 <template>
-  <!--条码打印-->
+  <!--条码打印  于继渤-->
 
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
-    <dk-app-nav-bar :title="$t('appBarcodePrintingTitle')"
-                    @click-left="onClickLeft" ></dk-app-nav-bar>
+    <dk-app-nav-bar :title="title" @click-left="onClickLeft"></dk-app-nav-bar>
+
+    <!-- 模板分类 -->
+    <dk-app-field :label="$t('appPrintTemplate')" v-model="formData.printLayoutName" :readonly="true"
+      @click="openDropdown('labelPrintLayout')" placeholderType="choose" is-link arrow-direction="down" />
+    <!--    打印机-->
+    <dk-app-field v-model="formData.printerName" :label="$t('appPrinter')" :readonly="true"
+      @click="openDropdown('labelPrinter')" placeholderType="choose" is-link arrow-direction="down" />
 
     <!--    产品条码-->
-    <dk-app-field
-      :label="$t('appProductBarcode')"
-      v-model="formData.productBarcode"
-      placeholderType="scan"></dk-app-field>
+    <dk-app-field v-model="formData.mouldKindName" :label="$t('appProductBarcode')"
+      @changeBarCode="queryBarCode"></dk-app-field>
+
+    <!-- 打印 -->
+    <div class="app_save_bottom-class">
+      <dk-app-button :soundEffectFlag="false" :disabled="loading" @click="save">{{ $t('appPrint') }}
+      </dk-app-button>
+    </div>
+
+
+
+
+
 
     <!--    工位-->
-    <dk-app-field
-      :label="$t('appStation')"
-      :readonly="true"
-      v-model="formData.productBarcode"
-      placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
-
-    <!--    服务器打印机-->
-    <dk-app-field
-      :label="$t('appServerPrinter')"
-      :readonly="true"
-      v-model="formData.productBarcode"
-      placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
-    <!--    外箱码打印机1-->
-    <dk-app-field
-      :label="$t('appOuterBoxCodePrinter1')"
-      :readonly="true"
-      v-model="formData.productBarcode"
-      placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
-    <!--    外箱码打印机2-->
-    <dk-app-field
-      :label="$t('appOuterBoxCodePrinter2')"
-      :readonly="true"
-      v-model="formData.productBarcode"
-      placeholderType="choose" is-link arrow-direction="down"></dk-app-field>
+    <dk-app-single-dropdown typeName="workStationAll" :show="workStationAllFlag"
+      @mutiClose="singleClose('workStationAll')" :ids="ids" apiType="web"
+      @mutiCommit="singleCommit($event, 'workStationAll')"></dk-app-single-dropdown>
+
+
+    <!--    打印机-->
+    <dk-app-single-dropdown typeName="labelPrinter" :show="labelPrinterFlag" @mutiClose="singleClose('labelPrinter')"
+      :ids="[formData.printerId]" apiType="web"
+      @mutiCommit="singleCommit($event, 'labelPrinter')"></dk-app-single-dropdown>
+
+
+    <!--    打印模板-->
+    <dk-app-single-dropdown typeName="labelPrintLayout" :show="labelPrintLayoutFlag"
+      @mutiClose="singleClose('labelPrintLayout')" :ids="[formData.printLayoutId]" apiType="web"
+      @mutiCommit="singleCommit($event, 'labelPrintLayout')"></dk-app-single-dropdown>
+
 
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
 
   </div>
-
 </template>
 
 <script>
+
+import { appFormMixin } from '@/mixins/appform.js'
 export default {
   name: "app-barcode-reprinting",
+  mixins: [appFormMixin],
   data() {
     let self = this
     return {
-      moldingMoldManagementActiveTitle:'',
-
-
-      //标题
+      title: '',
+      loading: false,
+      workStationAllFlag: false,
+      labelPrinterFlag: false, //打印机
+      labelPrintLayoutFlag: false, //打印模板
+      ids: [],
       formData: {
-        productBarcode: '',//产品条码
-        flgValid: '',//有效标识
-        ftyId: 1,//工厂ID
+        printerId: null, //打印机
+        printerName: '',
+        printLayoutId: null, //打印机模板
+        printLayoutName: '',
       },
     }
   },
   methods: {
 
 
-    // region 基础数据源
+    // region 控件 回调
+    /**
+        * @desc   : 侧拉打开事件
+        * @author : 于继渤
+        * @date   : 2023/2/13 13:25
+        */
+    openDropdown(e) {
+      //列表下拉
+      if (e === 'labelPrinter') { //打印机
+        this.labelPrinterFlag = true
+      }
+      if (e === 'labelPrintLayout') { //打印模板
+        this.labelPrintLayoutFlag = true
+      }
+    },
+
+
+    /**
+     * @desc   : 单选侧拉关闭
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    singleClose(e) {
+      if (e === 'labelPrinter') {
+        this.labelPrinterFlag = false
+      }
+      if (e === 'labelPrintType') {
+        this.labelPrintTypeFlag = false
+      }
+      if (e === 'labelPrintLayout') {
+        this.labelPrintLayoutFlag = false
+      }
+      if (e === 'workStationAll') {
+        this.workStationAllFlag = false
+      }
+      this.ids = []
+    },
 
+    /**
+ * @desc   : 单选侧拉确定
+ * @author : 于继渤
+ * @date   : 2023/2/7 17:26
+ */
+    singleCommit(e, typeName) {
+      if (typeName === 'labelPrinter') {  //打印机
+        this.$set(this.formData, 'printerId', e.ids ? Number(e.ids) : null)
+        this.$set(this.formData, 'printerName', e.names)
+      }
 
+      if (typeName === 'labelPrintLayout') {  //打印模板
+        this.$set(this.formData, 'printLayoutId', e.ids ? Number(e.ids) : null)
+        this.$set(this.formData, 'printLayoutName', e.names)
+      }
 
-    // endregion
 
-    // region 控件 回调
+    },
     /**
-     * @desc   : 根据输入的usercode 查询 userid
-     * @author : 王英杰
-     * @date   : 2023/2/10 9:16
+     * @desc   : 重置
+     * @author : 于继渤
+     * @date   : 2023/3/13 13:39
      */
+    onClickRightIcon(item) {
+      if (item.key === 'labelPrinter') {
+        this.formData.printerId = null
+        this.formData.printerName = ''
+        this.formData.printerId_Name = ''
+      }
 
-    queryUser() {
-      let params = {
-        ftyId: this.$store.state.user.ftyId,
-        userCode: this.formData.makeUserName,
+      if (item.key === 'labelPrintLayout') {
+        this.formData.printLayoutId = null
+        this.formData.printLayoutName = ''
       }
-      this.excute(this.$service.appCommonService, this.$service.appCommonService.selectUser, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          if (res.data) {
-            this.formData.makeUser = res.data.userId
-          } else { //没查找
-            this.appToastFail((this.$t('appProductionJobNumbeErro')));
-            this.formData.makeUserName = ""
-            this.formData.makeUser = ""
-          }
-        }
-      })
+
     },
+
+
     //点击标题左侧返回事件
     onClickLeft() {
       this.$router.go(-1)
     },
 
+    /**
+     * @desc   : 查询编码
+     * @author : 于继渤
+     * @date   : 2023/2/10 11:46
+     */
+    queryBarCode() {
 
+    },
 
     // endregion
 
     // region 保存
     /**
      * @desc   : 给参数赋值
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     setParams() {
-      this.params = {...this.formData}
+      this.params = { ...this.formData }
     },
     /**
      * @desc   : 检验
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     validData(flag) {
-      // 生产工号不能为空
-      if (!this.formData.makeUser) {
-        this.appToastSuccess((this.$t('appProductionJobNumbeWrong')));
+      if (!this.formData.printerId) { //打印机
+        this.appToastFail(this.$t('selectWords', { 'search-name': this.$t('appPrinter') }))
+        return false;
+      }
+      if (!this.formData.printLayoutId) { //打印模板
+        this.appToastFail(this.$t('selectWords', { 'search-name': this.$t('appPrintTemplate') }))
         return false;
       }
 
@@ -129,23 +197,22 @@ export default {
     },
     /**
      * @desc   : 保存方法
-     * @author : 王英杰
+     * @author : 于继渤
      * @date   : 2023/2/10 11:46
      */
     saveData() {
-      return this.excute(this.$service.appMouldService, this.$service.appMouldService.insert, this.params);
+      //  return this.excute(this.$service.appMouldService, this.$service.appMouldService.insert, this.params);
     },
     // endregion
 
   },
-  mounted() {
-    // 设置滚动的位置和高度
-    this.setAppTableHeight(false, null)
+  created() {
+    //设置标题
+    this.title = '' + this.$t('appStationPrinterSettingsTitle')
   },
 
+
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 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>

+ 3 - 1
src/view/mst/label-print-layout/index.vue

@@ -90,8 +90,10 @@
       v-model="showSetTemplate"
       fullscreen
       :title="$v('searchSet')"
+      :footer-flag="false"
     >
-      <Setting :label-kind="labelKind"/>
+      <Setting :label-kind="labelKind" :id="$refs['table-select'] ? $refs['table-select'].batchKeys[0]:null" v-if="showSetTemplate"
+      @close="showSetTemplate=false"/>
     </DkModal>
   </div>
 </template>

+ 70 - 39
src/view/mst/label-print-layout/setting.vue

@@ -16,6 +16,9 @@ export default {
   props: {
     labelKind: {
       type: String
+    },
+    id: {
+      type: Number
     }
   },
   data() {
@@ -30,34 +33,48 @@ export default {
      * @date   : 2022/5/5 10:46
      */
     saveTemplate(val) {
-      let params = {
-        tmId: val.tmId,
-        tmName: val.name,
-        docCode: val.typeCode,
-        tmData: val.templateInfo,
-        displayNo: val.displayNo,
-        cpId: this.$store.state.user.cpId,
-        sysId: this.$store.state.user.sysId
-      }
-      if (val.tmId) {
-        PrintTemplateService.update(params).then(res => {
-          if (res.code === 200) {
-            this.$Message.success(res.message)
-            this.closeTag(this.$route)
-          } else {
-            this.$Message.error(res.message)
-          }
-        })
-      } else {
-        PrintTemplateService.insert(params).then(res => {
-          if (res.code === 200) {
-            this.$Message.success(res.message)
-            this.closeTag(this.$route)
-          } else {
-            this.$Message.error(res.message)
-          }
-        })
-      }
+      console.log(val)
+
+      this.excute(this.$service.labelPrintLayoutService, this.$service.labelPrintLayoutService.update, {
+        layoutId: this.id,
+        layoutData: val.templateInfo
+      }).then(res=>{
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.$Message.success(res.message)
+          this.$emit('close')
+        } else {
+          this.$Message.error(res.message)
+        }
+      })
+
+      // let params = {
+      //   tmId: val.tmId,
+      //   tmName: val.name,
+      //   docCode: val.typeCode,
+      //   tmData: val.templateInfo,
+      //   displayNo: val.displayNo,
+      //   cpId: this.$store.state.user.cpId,
+      //   sysId: this.$store.state.user.sysId
+      // }
+      // if (val.tmId) {
+      //   PrintTemplateService.update(params).then(res => {
+      //     if (res.code === 200) {
+      //       this.$Message.success(res.message)
+      //       this.closeTag(this.$route)
+      //     } else {
+      //       this.$Message.error(res.message)
+      //     }
+      //   })
+      // } else {
+      //   PrintTemplateService.insert(params).then(res => {
+      //     if (res.code === 200) {
+      //       this.$Message.success(res.message)
+      //       this.closeTag(this.$route)
+      //     } else {
+      //       this.$Message.error(res.message)
+      //     }
+      //   })
+      // }
     },
     /**
      * @desc   : 重写计算表格高度方法,避免报错
@@ -111,19 +128,32 @@ export default {
      * @date   : 2022-05-20 16:30
      */
     detail() {
-      this.loading = true
-      // 通过id查询
-      PrintTemplateService.selectById(this.$route.params.id).then(res => {
-        if (res.code === 200) {
-          res.data.templateData = res.data.tmData
-          delete res.data.tmData
-          this.editRow = res.data
-          this.loading = false
-        } else {
-          this.$Message.error(res.message)
-          this.loading = false
+      this.excuteNoParam(this.$service.labelPrintLayoutService, this.$service.labelPrintLayoutService.selectById,
+        [this.id], false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data.layoutData && Object.keys(res.data.layoutData).length > 0) {
+            this.editRow = {
+              templateData: res.data.layoutData
+            }
+          }
+
         }
       })
+
+
+      // this.loading = true
+      // // 通过id查询
+      // PrintTemplateService.selectById(this.$route.params.id).then(res => {
+      //   if (res.code === 200) {
+      //     res.data.templateData = res.data.tmData
+      //     delete res.data.tmData
+      //     this.editRow = res.data
+      //     this.loading = false
+      //   } else {
+      //     this.$Message.error(res.message)
+      //     this.loading = false
+      //   }
+      // })
     },
   },
   /**
@@ -133,6 +163,7 @@ export default {
    */
   created() {
     console.log('重写created')
+    this.detail()
     this.addKeyBoardEvent()
   },
 }

+ 3 - 10
src/view/mst/model-product/index.vue

@@ -96,7 +96,9 @@
       </div>
     </DkSplit>
 
-    <PrintModal ref="printModal" @print="printPdf"/>
+    <PrintModal ref="printModal" :label-kind="$config.modelKind.modelProduct"
+                :service="$service.modelProductService"
+                :id="($refs['table-select'] && $refs['table-select'].batchKeys && $refs['table-select'].batchKeys[0]) ? $refs['table-select'].batchKeys[0]:null"/>
 
   </div>
 </template>
@@ -216,15 +218,6 @@ export default {
     print(){
       this.$refs.printModal.showChooseTemplate = true
     },
-    /**
-     * @desc   : 打印
-     * @author : 洪旭东
-     * @date   : 2023-04-10 13:30
-     */
-    printPdf({ templateId, printerId }){
-      this.excuteNoParam(this.$service.labelPrintLayoutService, this.$service.labelPrintLayoutService.print,
-        [templateId, printerId, this.$refs['table-select'].batchKeys[0]])
-    },
     // endregion
 
   },

+ 18 - 1
src/view/mst/model/index.vue

@@ -10,6 +10,8 @@
         <BaseIndexButton right-button="model-mould-clear" ref="clear" name="clear"></BaseIndexButton>
         <!--    编辑    -->
         <BaseIndexButton right-button="model-mould-edit" ref="edit" name="edit"></BaseIndexButton>
+        <!--    打印    -->
+        <BaseIndexButton ref="print" name="print"></BaseIndexButton>
       </template>
       <template #right>
         <!--   新建     -->
@@ -198,14 +200,21 @@
                    :columns="editTableRangeColumn"></EditTable>
       </div>
     </DkModal>
+
+    <PrintModal ref="printModal" :label-kind="modelKind"
+                :service="service"
+                :id="($refs['table-select'] && $refs['table-select'].batchKeys && $refs['table-select'].batchKeys[0]) ? $refs['table-select'].batchKeys[0]:null"/>
+
   </div>
 </template>
 
 <script>
 import {indexMixin} from '@/mixins'
+import PrintModal from '_c/business/print/modal'
 
 export default {
   mixins: [indexMixin],
+  components: {PrintModal},
   data() {
     let self = this
     return {
@@ -690,7 +699,15 @@ export default {
       if (!parseInt(val)) {
         this.formData.stdNum = 1
       }
-    }
+    },
+    /**
+     * @desc   : 选择模板、打印机
+     * @author : 洪旭东
+     * @date   : 2023-04-10 13:45
+     */
+    print(){
+      this.$refs.printModal.showChooseTemplate = true
+    },
     // endregion
   },
   created() {

+ 17 - 1
src/view/mst/mould/index.vue

@@ -17,6 +17,8 @@
         <BaseIndexButton right-button="mould-scrap" ref="scrap" name="scrap"/>
         <!--    撤销    -->
         <BaseIndexButton right-button="mould-reverse" ref="reverse" name="reverse"/>
+        <!--    打印    -->
+        <BaseIndexButton ref="print" name="print"></BaseIndexButton>
       </template>
       <template #right>
         <BaseIndexButton right-button="mould-add" ref="add" name="add"></BaseIndexButton>
@@ -162,16 +164,23 @@
           </DkSplit>
       </div>
     </DkModal>
+
+    <PrintModal ref="printModal" :label-kind="$config.modelKind.modelMould"
+                :service="$service.modelMouldService"
+                :id="($refs['table-select'] && $refs['table-select'].batchRows && $refs['table-select'].batchRows[0]) ?
+                $refs['table-select'].batchRows[0].modelId:null"/>
   </div>
 </template>
 
 <script>
 
 import {indexMixin} from '@/mixins'
+import PrintModal from '_c/business/print/modal'
 
 export default {
   name: 'mould',
   mixins: [indexMixin],
+  components: {PrintModal},
   data() {
     let self = this
     return {
@@ -744,7 +753,14 @@ export default {
         }
       })
     },
-
+    /**
+     * @desc   : 选择模板、打印机
+     * @author : 洪旭东
+     * @date   : 2023-04-10 13:45
+     */
+    print(){
+      this.$refs.printModal.showChooseTemplate = true
+    },
     // endregion
   },
   created() {

+ 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) {

+ 1 - 0
src/view/pdm/molding-record/form.vue

@@ -1014,6 +1014,7 @@ export default {
             templist[it] = itt[it]
           })
           templist.ftyId = this.formData.ftyId
+          templist.manageUser =this.$store.state.user.id
           // 取出当前成型线对应的模具记录明细
           let temp = table.filter(it => it.groupId === itt.groupId)
           if (temp && temp.length > 0) {

+ 17 - 0
src/view/pdm/molding-record/index.vue

@@ -13,6 +13,8 @@
         <BaseIndexButton v-if="formType==$config.formCode.moldDamage" right-button="user-moldDamage" ref="moldDamage" name="moldDamage"></BaseIndexButton>
         <!--    绑定条码    -->
         <BaseIndexButton v-if="formType==$config.formCode.moldingRecord" right-button="user-bindBarcode" ref="bindBarcode" name="bindBarcode"></BaseIndexButton>
+        <!--    打印    -->
+        <BaseIndexButton ref="print" name="print"></BaseIndexButton>
       </template>
       <template #right>
         <!--   新建     -->
@@ -61,16 +63,23 @@
         <DkTableColumn field="remarks" width="auto"></DkTableColumn>
       </DkTable>
     </div>
+
+    <PrintModal ref="printModal" :label-kind="$config.modelKind.modelProduct"
+                :service="$service.modelProductService"
+                :id="($refs['table-select'] && $refs['table-select'].batchRows && $refs['table-select'].batchRows[0]) ?
+                $refs['table-select'].batchRows[0].modelId:null"/>
   </div>
 </template>
 
 <script>
 
 import {indexMixin} from '@/mixins'
+import PrintModal from '_c/business/print/modal'
 
 export default {
   name: 'molding-record',
   mixins: [indexMixin],
+  components: {PrintModal},
   data() {
     let self = this
     return {
@@ -182,6 +191,14 @@ export default {
       this.primaryKey = 'moldingId'  // 设置主键Id
       this.routeObjName = 'moldingRecord'  // 设置路由名称
     },
+    /**
+     * @desc   : 选择模板、打印机
+     * @author : 洪旭东
+     * @date   : 2023-04-10 13:45
+     */
+    print(){
+      this.$refs.printModal.showChooseTemplate = true
+    },
     // endregion
   },
   created() {

+ 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) {

+ 1 - 1
src/view/process/process-flow/config/ProcessConfig.js

@@ -146,7 +146,7 @@ export default class Process {
             return false
           }
           // 结束节点不能作为连线起点 特殊处理:(后续流程+回收)允许有出线
-          if(source?.flowKind==config.flowKind.end&&source?.nodeKind===config.nodeKind.recover&&source.recycledKind!=config.recycledKind.after) {
+          if(source?.flowKind==config.flowKind.end) {
             return false
           }
           // 回收节点不能作为结束

+ 2 - 2
src/view/process/process-flow/process-setting.vue

@@ -212,8 +212,8 @@ export default {
       })
       if (startNodesNoCloseLoop.length > 0) return false
 
-      //检查所有开始节点是否能够连接到结束节点
-      let endNodesNoCloseLoop=endNodes.filter(it=>{
+      //检查所有结束节点是否都有开始节点(回收不校验)
+      let endNodesNoCloseLoop=endNodes.filter(it=>it.getData()?.nodeKind!==this.$config.nodeKind.recover).filter(it=>{
         let startCount = this.graph.getPredecessors(it)?.filter(it=>it.getData()?.flowKind===this.$config.flowKind.start)
         if (startCount<1) {
           this.$Message.error('结束节点为 [' + it.getData()?.nodeName + '] 的流程未闭环,请检查')

+ 1 - 1
src/view/report/code-change-report/index.vue

@@ -64,7 +64,7 @@ export default {
         },
         {
           itemCode: 'changeDate',//变更日期
-          valueFormat: {code: 'hisTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+          valueFormat: {code: 'hisTime'},
           valueKind: 'DATE_RANGE'
         },
       ],

+ 1 - 1
src/view/report/delivery-blank/index.vue

@@ -95,7 +95,7 @@ export default {
           },
           {
             itemCode: 'renderMTime',
-            valueFormat: {code: 'renderMTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'renderMTime'},
             valueKind: 'DATE_RANGE',
           },
         ],

+ 1 - 1
src/view/report/in-product-report/index.vue

@@ -107,7 +107,7 @@ export default {
           },
           {
             itemCode: 'renderMTime',
-            valueFormat: {code: 'renderMTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'renderMTime'},
             valueKind: 'DATE_RANGE',
           },
           // {

+ 1 - 1
src/view/report/missed-scan-report/index.vue

@@ -90,7 +90,7 @@ export default {
           },
           {
             itemCode: 'operationTime',
-            valueFormat: {code: 'opnTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'opnTime'},
             valueKind: 'DATE_RANGE',
           },
         ],

+ 1 - 1
src/view/report/molding-record-report/index.vue

@@ -112,7 +112,7 @@ export default {
           },
           {
             itemCode: 'moldingDate',
-            valueFormat: {code: 'moldingDate', default: [new Date().toDateStr(), new Date().toDateStr()]},
+            valueFormat: {code: 'moldingDate'},
             valueKind: 'DATE_RANGE',
           },
           {

+ 1 - 1
src/view/report/process-output/index.vue

@@ -101,7 +101,7 @@ export default {
           },
           {
             itemCode: 'operationTime',
-            valueFormat: {code: 'opnTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'opnTime'},
             valueKind: 'DATE_RANGE',
           },
         ],

+ 188 - 0
src/view/report/product-follow-report/index.vue

@@ -0,0 +1,188 @@
+<!-- @desc:在产品明细表  @auth:姜宁  @time:2023/3/2 17:14 -->
+<template>
+  <div class="main-div">
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <!--    查询    -->
+        <BaseIndexButton right-button="in-product-report-select" ref="search" name="search"></BaseIndexButton>
+        <!--清空查询条件-->
+        <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
+      </template>
+    </BaseIndexButtonGroup>
+    <!--  查询条件区域  -->
+    <div id="search-cond-div" ref="search-cond-div" style="margin-top: 1px;padding: 0">
+      <SearchCond ref="searchCond" v-model="searchCond"
+                  @collapse-change="collapseChange" :setFlag="false"
+                  :searchContent="searchContent"
+      ></SearchCond>
+    </div>
+
+    <!--  表格部分  -->
+    <DkSplit mode="vertical" v-model="split" :height="tableHeight">
+      <DkTable slot="top" :id="'table-'+$options.name" ref="table-select" :data="tableData"
+               :height="this.tableHeight * split - 35" primaryKey="pdtUniqueId" @pageChange="pageSizeChange"
+               :pageFlag="false"
+               :choose-flag="false"
+               @current-change="currentChangeEvent($event)"
+               name="table">
+        <DkTableColumn field="pdtUniqueCode" :title="$t('pdtBarcode')" ></DkTableColumn>
+        <DkTableColumn field="modelCode" :title="$t('productCode')"></DkTableColumn>
+        <DkTableColumn field="modelName" :title="$t('productName')"></DkTableColumn>
+        <DkTableColumn field="categoryName" :title="$t('productCategoryName')"></DkTableColumn>
+        <DkTableColumn field="logoName" :title="$t('pdtLogoName')"></DkTableColumn>
+        <DkTableColumn field="colourName" :title="$t('pdtColourName')"></DkTableColumn>
+        <DkTableColumn field="erpModelCode"></DkTableColumn>
+        <DkTableColumn field="pdtSpecs"></DkTableColumn>
+        <DkTableColumn field="moldlineCode"></DkTableColumn>
+        <DkTableColumn field="mouldUniqueCode" :title="$t('moldingModelCode')"></DkTableColumn>
+        <DkTableColumn field="thisMoldedNum" data-type="number"></DkTableColumn>
+        <DkTableColumn field="moldingUserCode"></DkTableColumn>
+        <DkTableColumn field="moldingDate" data-type="date"></DkTableColumn>
+        <DkTableColumn field="moldingBatch" data-type="number"></DkTableColumn>
+        <DkTableColumn field="pdtProdStatusName"></DkTableColumn>
+        <DkTableColumn field="gradeKindName"></DkTableColumn>
+        <DkTableColumn field="flgScrap" type="switch" :switch-disabled="true"></DkTableColumn>
+      </DkTable>
+
+      <div slot="bottom" >
+        <DkTabs v-model="productFollowItemTab" :options="detailOptions"></DkTabs>
+        <!--结转明细信息-->
+        <DkTable v-if="productFollowItemTab === this.$config.productFollowItemTab.productFollowItem"
+                 :height="this.tableHeight * (1-split) - 25"
+                 primaryKey="itemId"
+                 :id="'table-'+$options.name"
+                 name="table"
+                 ref="receipt-select"
+                 :choose-flag="false"
+                 :data="nodeItem"
+                 :pageFlag="true"
+                 :page-total="detailPageInfo.total"
+                 :current-page="detailPageInfo.currentPage"
+                 @pageChange="detailPageSizeChange">
+          <DkTableColumn field="flowName"></DkTableColumn>
+          <DkTableColumn field="nodeName" :title="$t('processName')"></DkTableColumn>
+          <DkTableColumn field="prodUserCode"></DkTableColumn>
+          <DkTableColumn field="opnTime" :title="$t('operationTime')" data-type="dateTime"></DkTableColumn>
+          <DkTableColumn field="opCreateUserCode"></DkTableColumn>
+          <DkTableColumn field="opnUserName"></DkTableColumn>
+<!--          <DkTableColumn field="operatingInstructions" width="auto"></DkTableColumn>-->
+          <DkTableColumn field="remarks" width="auto"></DkTableColumn>
+        </DkTable>
+      </div>
+    </DkSplit>
+
+  </div>
+</template>
+
+<script>
+
+import {indexMixin} from '@/mixins'
+
+export default {
+  name: 'product-follow-report',
+  mixins: [indexMixin],
+  data() {
+    let self = this
+    return {
+      searchContent:
+        [
+          {
+            itemCode: 'pdtBarcode',
+            valueFormat: {code: 'pdtUniqueCode'},
+            required:true
+          },
+        ],
+      split: 0.2,// 分区的默认
+      // 表单
+      formData: {},
+      detailPageInfo: {
+        total: 0,
+        pageSize: this.$config.pageSize,
+        currentPage: 1
+      },
+      nodeItem:[],
+      productFollowItemTab: this.$config.productFollowItemTab.productFollowItem,
+      detailOptions: [{label: self.$t('product_follow_item'), name: 'productFollowItem'}, //结转明细
+      ],
+    }
+  },
+  methods: {
+    // region 其他操作
+    /**
+     * @desc   : 获取数据
+     * @author : 姜宁
+     * @date   : 2023/1/29 11:11
+     */
+    getData(params) {
+      // 查询数据
+      return this.excute(this.$service.detailReportService, this.$service.detailReportService.getProductFollowReportByPage, params);
+    },
+    /**
+     * @desc   : 行切换事件
+     * @author : 姜宁
+     * @date   : 2023/3/21 15:57
+     */
+    currentChangeEvent({row}) {
+      if (row != null) {
+        // 获取生产数据明细
+        this.getProductFollowItem(row.pdtUniqueId, this.detailPageInfo).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.nodeItem = res.data.list;
+            if (this.detailPageInfo.currentPage == 1) {
+              this.detailPageInfo.total = res.data.total
+              this.detailPageInfo.currentPage = 1;
+            }
+          }
+        });
+      }
+    },
+    /**
+     * @desc   : 分页查询
+     * @author : 姜宁
+     * @date   : 2023/3/22 15:20
+     */
+    detailPageSizeChange(detailPageInfo){
+      // 查询数据
+      this.getProductFollowItem(this.$refs['table-select'].batchKeys[0],detailPageInfo).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.nodeItem = res.data.list;
+          if (this.detailPageInfo.currentPage == 1) {
+            this.detailPageInfo.total = res.data.total
+            this.detailPageInfo.currentPage = 1;
+          }
+        }
+      });
+    },
+    /**
+     * @desc   : 获取生产数据明细
+     * @author : 姜宁
+     * @date   : 2023/4/14 14:16
+     */
+    getProductFollowItem(pdtUniqueId,detailPageInfo) {
+      this.detailPageInfo.currentPage = detailPageInfo.currentPage;
+      this.detailPageInfo.pageSize = detailPageInfo.pageSize;
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        pdtUniqueId: pdtUniqueId,
+        currentPage : this.detailPageInfo.currentPage,
+        pageSize : this.detailPageInfo.pageSize
+      }
+      return this.excute(this.$service.detailReportService, this.$service.detailReportService.getProductFollowItemReportByPage, params)
+    },
+    // endregion
+  },
+
+  activated() {
+  }
+  ,
+  created() {
+    this.routeObjName = 'detailReoprt'  // 设置路由名称
+  }
+}
+</script>
+
+<style scoped>
+/deep/ .ivu-modal-fullscreen{
+  height: 100%;
+}
+</style>

+ 1 - 1
src/view/report/product-report/index.vue

@@ -89,7 +89,7 @@ export default {
           },
           {
             itemCode: 'finishTime',
-            valueFormat: {code: 'finishTime', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'finishTime'},
             valueKind: 'DATE_RANGE',
           },
           {

+ 1 - 1
src/view/report/production-report/index.vue

@@ -80,7 +80,7 @@ export default {
           },
           {
             itemCode: 'makeDate',
-            valueFormat: {code: 'makeDate', default: [new Date().toDateStr(), new Date().addDays(1).toDateStr()]},
+            valueFormat: {code: 'makeDate'},
             valueKind: 'DATE_RANGE',
           },
         ],