Просмотр исходного кода

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

hongxudong 2 лет назад
Родитель
Сommit
776ac47283
55 измененных файлов с 1090 добавлено и 589 удалено
  1. 1 0
      package.json
  2. 18 6
      src/assets/al-icon/iconfont.css
  3. BIN
      src/assets/al-icon/iconfont.eot
  4. 0 0
      src/assets/al-icon/iconfont.js
  5. 21 0
      src/assets/al-icon/iconfont.json
  6. 4 0
      src/assets/al-icon/iconfont.svg
  7. BIN
      src/assets/al-icon/iconfont.ttf
  8. BIN
      src/assets/al-icon/iconfont.woff
  9. BIN
      src/assets/al-icon/iconfont.woff2
  10. BIN
      src/assets/icons/火炉1.png
  11. 5 0
      src/components/base/dk-collapse/dk-panel.vue
  12. 93 66
      src/components/base/dk-month-range-picker-pop/dk-month-range-picker-pop.vue
  13. 14 1
      src/components/base/edit-table/edit-table.vue
  14. 75 13
      src/components/base/index-button-group/base-index-button.vue
  15. 136 116
      src/components/business/print/modal.vue
  16. 55 34
      src/components/business/process/node-modal/node-modal.vue
  17. 22 3
      src/components/business/search-cond/index.vue
  18. 1 3
      src/components/business/select-magnifier/select-magnifier.vue
  19. 2 34
      src/config/index.js
  20. 4 0
      src/font-less/font-12.less
  21. 4 0
      src/font-less/font-13.less
  22. 4 0
      src/font-less/font-14.less
  23. 8 82
      src/index.less
  24. 5 3
      src/locale/lang/zh-CN.js
  25. 14 5
      src/mixins/form.js
  26. 37 11
      src/mixins/index.js
  27. 2 2
      src/router/routers.js
  28. 0 3
      src/view/core/job/index.vue
  29. 1 1
      src/view/core/staff/index.vue
  30. 14 5
      src/view/login/login-form.vue
  31. 7 7
      src/view/login/login.less
  32. 6 6
      src/view/login/login.vue
  33. 1 0
      src/view/mst/product-view/config/ProductView.js
  34. 50 24
      src/view/mst/work-book/form.vue
  35. 76 18
      src/view/mst/work-book/index.vue
  36. 1 1
      src/view/mst/work-project/form.vue
  37. 13 0
      src/view/pdm/label-print/index.vue
  38. 13 0
      src/view/pdm/label-reprint/index.vue
  39. 0 1
      src/view/pdm/molding-record/bind-barcode-group.vue
  40. 0 1
      src/view/pdm/molding-record/bind-barcode.vue
  41. 127 46
      src/view/process/process-flow/config/ProcessConfig.js
  42. 2 2
      src/view/process/process-flow/index.vue
  43. 109 26
      src/view/process/process-flow/process-setting.vue
  44. 9 8
      src/view/report/code-change-report/index.vue
  45. 7 6
      src/view/report/custom-report/form.vue
  46. 1 1
      src/view/report/custom-report/index.vue
  47. 47 0
      src/view/report/custom-report/report.vue
  48. 9 8
      src/view/report/delivery-blank/index.vue
  49. 15 9
      src/view/report/in-product-report/index.vue
  50. 8 7
      src/view/report/missed-scan-report/index.vue
  51. 9 0
      src/view/report/molding-record-report/index.vue
  52. 15 14
      src/view/report/process-output/index.vue
  53. 1 0
      src/view/report/product-follow-report/index.vue
  54. 15 8
      src/view/report/product-report/index.vue
  55. 9 8
      src/view/report/production-report/index.vue

+ 1 - 0
package.json

@@ -20,6 +20,7 @@
     "@antv/x6-plugin-export": "^2.1.5",
     "@antv/x6-plugin-history": "^2.1.2",
     "@antv/x6-plugin-keyboard": "^2.1.4",
+    "@antv/x6-plugin-minimap": "^2.0.5",
     "@antv/x6-plugin-selection": "^2.1.5",
     "@antv/x6-plugin-snapline": "^2.1.6",
     "@antv/x6-plugin-stencil": "^2.0.2",

+ 18 - 6
src/assets/al-icon/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3389785 */
-  src: url('iconfont.eot?t=1688967827113'); /* IE9 */
-  src: url('iconfont.eot?t=1688967827113#iefix') format('embedded-opentype'), /* IE6-IE8 */
-       url('iconfont.woff2?t=1688967827113') format('woff2'),
-       url('iconfont.woff?t=1688967827113') format('woff'),
-       url('iconfont.ttf?t=1688967827113') format('truetype'),
-       url('iconfont.svg?t=1688967827113#iconfont') format('svg');
+  src: url('iconfont.eot?t=1689317959970'); /* IE9 */
+  src: url('iconfont.eot?t=1689317959970#iefix') format('embedded-opentype'), /* IE6-IE8 */
+       url('iconfont.woff2?t=1689317959970') format('woff2'),
+       url('iconfont.woff?t=1689317959970') format('woff'),
+       url('iconfont.ttf?t=1689317959970') format('truetype'),
+       url('iconfont.svg?t=1689317959970#iconfont') format('svg');
 }
 
 .iconfont {
@@ -16,6 +16,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-juzhong:before {
+  content: "\e633";
+}
+
+.icon-one2one:before {
+  content: "\e912";
+}
+
+.icon-huolu:before {
+  content: "\e644";
+}
+
 .icon-calendar:before {
   content: "\e9ab";
 }

BIN
src/assets/al-icon/iconfont.eot


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/assets/al-icon/iconfont.js


+ 21 - 0
src/assets/al-icon/iconfont.json

@@ -6,6 +6,27 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "19658047",
+      "name": "文字居中对齐",
+      "font_class": "juzhong",
+      "unicode": "e633",
+      "unicode_decimal": 58931
+    },
+    {
+      "icon_id": "9230689",
+      "name": "1:1",
+      "font_class": "one2one",
+      "unicode": "e912",
+      "unicode_decimal": 59666
+    },
+    {
+      "icon_id": "5482495",
+      "name": "火炉",
+      "font_class": "huolu",
+      "unicode": "e644",
+      "unicode_decimal": 58948
+    },
+    {
       "icon_id": "18170357",
       "name": "日历,日期",
       "font_class": "calendar",

Разница между файлами не показана из-за своего большого размера
+ 4 - 0
src/assets/al-icon/iconfont.svg


BIN
src/assets/al-icon/iconfont.ttf


BIN
src/assets/al-icon/iconfont.woff


BIN
src/assets/al-icon/iconfont.woff2


BIN
src/assets/icons/火炉1.png


+ 5 - 0
src/components/base/dk-collapse/dk-panel.vue

@@ -54,6 +54,11 @@ export default {
     hideArrow: {
       type: Boolean,
       default: false
+    },
+    // 平分高度
+    averageHeightFlag:{
+      type:Boolean,
+      default:false,
     }
   },
   watch:{

+ 93 - 66
src/components/base/dk-month-range-picker-pop/dk-month-range-picker-pop.vue

@@ -2,7 +2,7 @@
 <template>
   <Poptip popper-class="month-popper-class" class="month-popper-class" trigger="click" transfer placement="bottom-start"
           v-model="visible">
-    <Input ref="input" v-model="model" :readonly="readonly" @on-click="handleClickInput" @on-blur="handleBlurInput"
+    <Input ref="input" v-model="model" :readonly="readonly" @on-click="handleClickInput" @on-blur="chooseDatas"
            :placeholder="placeholderData"/>
     <Icon class="calendar-class" type="iconfont iconfont icon-calendar"/>
     <!--内容-->
@@ -129,6 +129,7 @@ export default {
       choosedMonths: [],// 已选择月份
       betweenMonths: {},// 期间月份
       visible: false,// pop是否显示
+      clickFlag: false,
       monthData: [
         {value: 1, text: '1月'},
         {value: 2, text: '2月'},
@@ -160,15 +161,15 @@ export default {
       }
       this.$emit('input', n)
     },
-    visible(n,o){
-      if(n){
+    visible(n, o) {
+      if (n) {
         // 把开始年份设置到第一个日期
-        if(this.choosedMonths && this.choosedMonths.length > 0){
+        if (this.choosedMonths && this.choosedMonths.length > 0) {
           this.startYear = this.choosedMonths[0].year;
           this.endYear = this.startYear + 1;
         }
       }
-    }
+    },
   },
   methods: {
     /**
@@ -219,10 +220,6 @@ export default {
      * @date   : 2023/7/7 15:17
      */
     handleClickInput(e) {
-      if(!this.visible){
-        console.log('bbb',this.chooseMonths,this.choosedMonths)
-      }
-      console.log('bbb',this.chooseMonths,this.choosedMonths)
       this.visible = true;
     },
     /**
@@ -230,51 +227,61 @@ export default {
      * @author : 周兴
      * @date   : 2023/7/10 16:52
      */
-    handleBlurInput(e) {
-      if(!this.model)return;
-      let values = this.model.split(this.separator);
-      let startMonth = {};
-      let endMonth = {};
-      if (values && values.length === 2) {
-        try {
-          let v1 = values[0].split('-');
-          let v2 = values[1].split('-');
-          // 非法输入,恢复到原值
-          if(!v1 || v1.length != 2 || !v2 || v2.length != 2){
-            this.model = this.rightModel?.model;
-            this.chooseMonths = this.rightModel?.choosedMonths;
+    chooseDatas(e) {
+      setTimeout(() => {
+        if (!this.model || this.clickFlag) return;
+        let rightModel = this.rightModel
+        let values = this.model.split(this.separator);
+        let startMonth = {};
+        let endMonth = {};
+        if (values && values.length === 2) {
+          try {
+            let v1 = values[0].split('-');
+            let v2 = values[1].split('-');
+            // 非法输入,恢复到原值
+            if (!v1 || v1.length != 2 || !v2 || v2.length != 2) {
+              this.model = rightModel?.model;
+              this.chooseMonths = rightModel?.choosedMonths?.copy();
+              startMonth = this.chooseMonths[0]
+              endMonth = this.chooseMonths[1]
+            } else {
+              let date1 = new Date(values[0] + '-1');
+              let date2 = new Date(values[1] + '-1');
+              if (date1 < date2) {
+                startMonth.date = date1;
+                startMonth.year = date1.getFullYear();
+                startMonth.month = date1.getMonth() + 1;
+                endMonth.date = date2;
+                endMonth.year = date2.getFullYear();
+                endMonth.month = date2.getMonth() + 1;
+              } else {
+                startMonth.date = date2;
+                startMonth.year = date2.getFullYear();
+                startMonth.month = date2.getMonth() + 1;
+                endMonth.date = date1;
+                endMonth.year = date1.getFullYear();
+                endMonth.month = date1.getMonth() + 1;
+              }
+              startMonth.yearMonth = startMonth.year + '-' + startMonth.month
+              endMonth.yearMonth = endMonth.year + '-' + endMonth.month
+            }
+          } catch (e) {
+            this.model = rightModel?.model;
+            this.chooseMonths = rightModel?.choosedMonths?.copy();
+            startMonth = this.chooseMonths[0]
+            endMonth = this.chooseMonths[1]
           }
-          let date1 = new Date(values[0] + '-1') ;
-          let date2 = new Date(values[1] + '-1') ;
-          if (date1 < date2) {
-            startMonth.date = date1;
-            startMonth.year = date1.getFullYear();
-            startMonth.month = date1.getMonth() + 1;
-            endMonth.date = date2;
-            endMonth.year = date2.getFullYear();
-            endMonth.month = date2.getMonth() + 1;
-          } else {
-            startMonth.date = date2;
-            startMonth.year = date2.getFullYear();
-            startMonth.month = date2.getMonth() + 1;
-            endMonth.date = date1;
-            endMonth.year = date1.getFullYear();
-            endMonth.month = date1.getMonth() + 1;
-          }
-          startMonth.yearMonth =  startMonth.year + '-' + startMonth.month
-          endMonth.yearMonth =  endMonth.year + '-' + endMonth.month
-        } catch (e) {
-          this.model = this.rightModel?.model;
-          this.chooseMonths = this.rightModel?.choosedMonths;
         }
-      }
-      if (!values || values.length !== 2) {
-        // 恢复为原来的值
-        this.model = this.rightModel?.model;
-        this.chooseMonths = this.rightModel?.choosedMonths;
-      }
-      // 选择日期
-      this._chooseDates(startMonth, endMonth);
+        if (!values || values.length !== 2) {
+          // 恢复为原来的值
+          this.model = rightModel?.model;
+          this.chooseMonths = rightModel?.choosedMonths?.copy();
+          startMonth = this.chooseMonths[0]
+          endMonth = this.chooseMonths[1]
+        }
+        // 选择日期
+        this._chooseDates(startMonth, endMonth);
+      }, 300)
     },
     /**
      * @desc   : 恢复月份的值
@@ -319,6 +326,12 @@ export default {
      * @date   : 2023/7/10 11:44
      */
     setBetweenMonth(betweenMonths) {
+      if(typeof betweenMonths.min === 'string'){
+        betweenMonths.min = new Date(betweenMonths.min)
+      }
+      if(typeof betweenMonths.max === 'string'){
+        betweenMonths.max = new Date(betweenMonths.max)
+      }
       let date = betweenMonths.min.addMonths(1)
       let filters = []
       while (date <= betweenMonths.max) {
@@ -391,7 +404,7 @@ export default {
         startMonth.yearMonth = startMonth.year + '-' + startMonth.month
       }
       // 选择日期
-      this._chooseDates();
+      this._chooseDates(startMonth, endMonth);
     },
     /**
      * @desc   : 选择日期
@@ -399,15 +412,18 @@ export default {
      * @date   : 2023/7/10 17:13
      */
     _chooseDates(startMonth, endMonth) {
+      this.chooseMonths = []
       this.chooseMonths.push({
         yearMonth: startMonth.yearMonth,
         month: startMonth.month,
         year: startMonth.year,
+        date: startMonth.date,
       })
       this.chooseMonths.push({
         yearMonth: endMonth.yearMonth,
         month: endMonth.month,
         year: endMonth.year,
+        date: endMonth.date,
       })
       this.$nextTick(() => {
         this.visible = false;
@@ -424,6 +440,7 @@ export default {
           this.setBetweenMonth(betweenMonths);
         }
       })
+      this.$emit('on-change',this.model.split(this.separator) )
     },
     /**
      * @desc   : 点击月份
@@ -431,6 +448,7 @@ export default {
      * @date   : 2023/7/7 14:52
      */
     handleClickMonth(item, year) {
+      this.clickFlag = true;
       if (this.chooseMonths.length === 0) {
         // 如果点上月份,清空已选
         this.choosedMonths = []
@@ -445,6 +463,10 @@ export default {
       let yearMonth = year + '-' + item.value;
       // let filters = this.chooseMonths.filter(it => it.yearMonth === yearMonth);
       // if (!filters || filters.length === 0) {
+      if (this.chooseMonths.length === 2) {
+        // 如果到两个了清空
+        this.chooseMonths = []
+      }
       this.chooseMonths.push({
         yearMonth: yearMonth,
         month: item.value,
@@ -459,7 +481,11 @@ export default {
         this.visible = false;
         // 处理值的显示
         this.handleDisplayText(this.chooseMonths);
+        this.$emit('on-change',this.model.split(this.separator) )
       }
+      setTimeout(() => {
+        this.clickFlag = false
+      }, 1000)
     },
     /**
      * @desc   : 显示
@@ -480,26 +506,27 @@ export default {
       // 清空当前
       this.chooseMonths = []
       this.model = text;
-      this.rightModel = {
-        model:text,
-        choosedMonths:this.choosedMonths
-      }
+      this.rightModel =
+        this.rightModel = {
+          model: text,
+          choosedMonths: this.choosedMonths?.copy()
+        }
     },
     /**
      * @desc   : 处理数据
      * @author : 周兴
      * @date   : 2023/7/11 9:44
      */
-    handleValue(){
-      if(this.value){
+    handleValue(value) {
+      if (value) {
         // 数组
-        if(Array.isArray(this.value)){
-          this.model = this.value.join(this.separator)
-        }else{
-          this.model = this.value;
-          // 处理字符串数据
-          this.handleBlurInput();
+        if (Array.isArray(value)) {
+          this.model = value.join(this.separator)
+        } else {
+          this.model = value;
         }
+        // 处理字符串数据
+        this.chooseDatas();
       }
     },
   },
@@ -514,7 +541,7 @@ export default {
       this.placeholderData = this.$t('inputWords', {'search-name': this.dkFormItem.label ? this.dkFormItem.label : this.$t(this.prop)})
     }
     // 处理数据
-    this.handleValue();
+    this.handleValue(this.value);
   }
 }
 </script>

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

@@ -17,6 +17,7 @@
       auto-resize
       sync-resize
       :ref="name"
+      :row-class-name="setRowClassName"
       :edit-rules="validRules"
       :valid-config="{showMessage:false}"
       :data="tableData"
@@ -840,6 +841,18 @@ export default {
   },
   methods: {
     /**
+     * @desc   : 给行赋值是否可以拖动
+     * @author : 周兴
+     * @date   : 2023/7/11 15:59
+     */
+    setRowClassName({row,rowIndex}){
+      let className = 'row_drop_class'
+      if(this.$refs[this.name] && this.$refs[this.name].isActiveByRow(row)){
+        className = ''
+      }
+      return className;
+    },
+    /**
      * @desc   : 重新加载列
      * @author : 周兴
      * @date   : 2023/4/4 16:24
@@ -2776,7 +2789,7 @@ export default {
         this.sortable = Sortable.create(
           xTable.$el.querySelector(".body--wrapper>.vxe-table--body tbody"),
           {
-            handle: ".vxe-body--row",
+            handle: ".row_drop_class",
             animation: 150,
             onEnd: ({newIndex, oldIndex}) => {
               let tableData = this.tableData.copy();

+ 75 - 13
src/components/base/index-button-group/base-index-button.vue

@@ -1,11 +1,27 @@
 <!-- @desc:工具栏组件按钮  @auth:周兴  @time:2022/11/15 9:55 -->
 <template>
-  <Button ref="button"  :loading="loading"
+  <Button ref="button" :loading="loading"
           :disabled="disabledFlag"
           :icon="'iconfont iconfont icon-' + (!this.$config.buttonIcon[name]?'':this.$config.buttonIcon[name].icon)"
           :type="name=='add'?'success':'default'" @click="handleClick">{{ vm.$t(name) }}
+    <Poptip popper-class="base-button-class" trigger="hover" transfer placement="bottom" v-model="visible">
+      <Icon type="ios-arrow-down" v-if="childOptions.length > 0 && !visible"></Icon>
+      <Icon type="ios-arrow-up" v-if="childOptions.length > 0 && visible"></Icon>
+      <!--下拉按钮-->
+      <div slot="content" class="child-class">
+        <div v-for="(item,index) in childOptions" :key="index"
+             :class="item.disabled?'child-item-disabled-class':'child-item-class'" :ref="'child_' + item.name"
+             :id="item.name" @click="handleChildClick(item)">
+          <div style="display: flex;align-items: center">
+            <Icon style="margin-right: 10px"
+                  :type="'iconfont iconfont icon-' +  (!$config.buttonIcon[item.name]?'':$config.buttonIcon[item.name].icon)"></Icon>
+            {{ item.title ? item.title : vm.$v(item.name) }}
+          </div>
+        </div>
+      </div>
+    </Poptip>
   </Button>
-<!--  v-if="vm.$libaray.checkButtonHasRight(rightButton,this)"-->
+  <!--  v-if="vm.$libaray.checkButtonHasRight(rightButton,this)"-->
 </template>
 
 <script>
@@ -19,9 +35,9 @@ export default {
       default: ''
     },
     // 加载中
-    loading:{
-      type:Boolean,
-      default:false
+    loading: {
+      type: Boolean,
+      default: false
     },
     //验证权限按钮的名称
     rightButton: {
@@ -34,9 +50,14 @@ export default {
       default: false,
     },
     // 是否选择
-    isMustChooseFlag:{
-      type:Boolean,
-      default:true,
+    isMustChooseFlag: {
+      type: Boolean,
+      default: true,
+    },
+    // 子级下拉的数据源
+    childOptions: {
+      type: Array,
+      default: () => []
     }
   },
   data() {
@@ -44,12 +65,14 @@ export default {
     let self = this;
     return {
       vm: vm,
-      disabledFlag:self.disabled
+      visible: false,
+      disabledFlag: self.disabled
     }
   },
-  watch:{
-    disabled(n){
+  watch: {
+    disabled(n) {
       this.disabledFlag = n;
+      this.visible = false;
     }
   },
   methods: {
@@ -63,12 +86,22 @@ export default {
       this.$emit('click')
     },
     /**
+     * @desc   : 点击子级按钮事件
+     * @author : 周兴
+     * @date   : 2023/7/13 9:34
+     */
+    handleChildClick(item) {
+      this.$refs.button.$el.focus();
+      this.$emit('item-click', item)
+      this.visible = false;
+    },
+    /**
      * @desc   : 添加到组中
      * @author : 周兴
      * @date   : 2023/3/3 17:26
      */
-    addGroup(){
-      if(this.buttonGroup ){
+    addGroup() {
+      if (this.buttonGroup) {
         this.buttonGroup.items.push(this);
       }
     },
@@ -112,5 +145,34 @@ export default {
   /*border: #2E406B;*/
   /*padding: 0 8px 0 8px !important;*/
 }
+
+.child-item-disabled-class {
+  height: 28px;
+  line-height: 28px;
+  cursor: pointer;
+  padding: 0 16px;
+  background-color: #F7F7F7;
+  color: #C5C8CE;
+}
+
+
+.child-item-class {
+  height: 28px;
+  line-height: 28px;
+  cursor: pointer;
+  padding: 0 16px;
+}
+
+.child-item-class:hover {
+  color: #fff;
+  background: #2E406B;
+  border-color: #2E406B;
+}
+
+.child-class {
+  overflow: hidden;
+  padding: 5px 0;
+}
+
 </style>
 

+ 136 - 116
src/components/business/print/modal.vue

@@ -9,13 +9,6 @@
       @on-cancel="showChooseTemplate = false"
     >
       <DkForm :col-count="1">
-        <DkFormItem :label="$t('printLayoutId')" required>
-          <SelectPop v-model="currentTemplate" :multiple="false"
-                     :options="templateList"
-                     labelKey="layoutName"
-                     valueKey="layoutId">
-          </SelectPop>
-        </DkFormItem>
         <DkFormItem :label="$t('printerId')" required>
           <SelectPop v-model="currentPrinter" :multiple="false"
                      :options="printerList"
@@ -23,6 +16,13 @@
                      valueKey="printerCode">
           </SelectPop>
         </DkFormItem>
+        <DkFormItem :label="$t('printLayoutId')" required>
+          <SelectPop v-model="currentTemplate" :multiple="false"
+                     :options="templateList"
+                     labelKey="layoutName"
+                     valueKey="layoutId">
+          </SelectPop>
+        </DkFormItem>
       </DkForm>
     </DkModal>
   </div>
@@ -30,126 +30,146 @@
 
 <script>
 
-import { hiprint } from 'vue-plugin-hiprint'
-export default {
-  name: 'print_modal',
-  components:{
-  },
-  props:{
-    orderType:{
-      type:String,
-      default:''
-    },
-    labelKind: {
-      type: String
-    },
-    service: {
-      type: Object
-    },
-    id: {
-      type: Number
+  import { hiprint } from 'vue-plugin-hiprint'
+
+  export default {
+    name: 'print_modal',
+    components: {},
+    props: {
+      orderType: {
+        type: String,
+        default: ''
+      },
+      labelKind: {
+        type: String
+      },
+      service: {
+        type: Object
+      },
+      id: {
+        type: Number
+      },
     },
-  },
-  data() {
-    return {
-      printerList: [],
-      templateList:[],
-      currentTemplate:null,
-      currentPrinter:null,
-      allAlign: null,
-      showChooseTemplate:false,
-    }
-  },
-  methods: {
-    printBtn(){
-      if(!this.currentTemplate){
-        this.$Message.warning('请先选择一个模板再打印')
-        return
-      }
-      if(!this.currentPrinter){
-        this.$Message.warning('请先选择一个打印机再打印')
-        return
+    data() {
+      return {
+        printerList: [],
+        templateList: [],
+        currentTemplate: null,
+        currentPrinter: null,
+        allAlign: null,
+        showChooseTemplate: false,
       }
-      if(!this.id){
-        this.$Message.warning('请先选择一条数据再打印')
-        return
-      }
-
-      //pdf后端打印
-      // 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.warning(res.message)
-      //   }
-      // })
-
-      console.log('currentTemplate',this.currentTemplate)
-      console.log('currentPrinter',this.currentPrinter)
-      let template=this.templateList.find(it=>it.layoutId==this.currentTemplate)?.layoutData
-      console.log('template',template)
+    },
+    methods: {
+      printBtn() {
+        if (!this.currentTemplate) {
+          this.$Message.warning('请先选择一个模板再打印')
+          return
+        }
+        if (!this.currentPrinter) {
+          this.$Message.warning('请先选择一个打印机再打印')
+          return
+        }
+        if (!this.id) {
+          this.$Message.warning('请先选择一条数据再打印')
+          return
+        }
 
-      //获取打印数据
-      this.excuteNoParams(this.$service.printDataService, this.$service.printDataService.getPrintData, [this.id]).then(res=>{
-        if(res.code === 200&&res.data){
-          let printData =res.data
+        //pdf后端打印
+        // 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.warning(res.message)
+        //   }
+        // })
 
-          //创建模板
-          let hiprintTemplate=new hiprint.PrintTemplate({
-            template: template,
-          });
+        // console.log('currentTemplate', this.currentTemplate)
+        // console.log('currentPrinter', this.currentPrinter)
+        let template = this.templateList.find(it => it.layoutId == this.currentTemplate)?.layoutData
+        // console.log('template', template)
 
-          //调用打印服务
-          this.$dkprint.hiwebSocket.setHost('http://192.168.0.215:17521',(connected, e) => {
-            if(connected){
-              console.log('打印数据:',printData)
-              console.log('模板:',hiprintTemplate)
-              console.log('当前打印机',this.currentPrinter)
-              //根据模板进行静默打印
-              hiprintTemplate.print2(printData)
-            }
-          })
-        }else{
-          this.$Message.warning(res.message)
+        // 打印机code,保存到缓存
+        let data = localStorage.getItem('currentPrinter')
+        if (data) {
+          data = JSON.parse(localStorage.getItem('currentPrinter'))
+        } else {
+          data = {}
         }
-      })
+        data[this.$store.state.user.ftyId] = this.currentPrinter
+        localStorage.setItem('currentPrinter', JSON.stringify(data))
+        //获取打印数据
+        this.excuteNoParams(this.$service.printDataService, this.$service.printDataService.getPrintData, [this.id]).then(res => {
+          if (res.code === 200 && res.data) {
+            let printData = res.data
 
+            //创建模板
+            let hiprintTemplate = new hiprint.PrintTemplate({
+              template: template,
+            })
 
+            //调用打印服务
+            this.$dkprint.hiwebSocket.setHost('http://192.168.0.215:17521', (connected, e) => {
+              if (connected) {
+                console.log('打印数据:', printData)
+                console.log('模板:', hiprintTemplate)
+                console.log('当前打印机', this.currentPrinter)
+                //根据模板进行静默打印
+                hiprintTemplate.print2(printData)
+              }
+            })
+          } else {
+            this.$Message.warning(res.message)
+          }
+        })
+      },
+      getTemplateList() {
+        this.excute(this.$service.labelPrintLayoutService, this.$service.labelPrintLayoutService.selectByCond, {
+          flgValid: true,
+          labelKind: this.labelKind,
+          ftyId: this.$store.state.user.ftyId
+        }).then(res => {
+          if (res.code === 200) {
+            this.templateList = res.data.list
+          } else {
+            this.$Message.warning(res.message)
+          }
+        })
+      },
+      /**
+       * @desc   : 查询打印机
+       * @author : 洪旭东
+       * @date   : 2023-04-10 13:04
+       */
+      getPrinter() {
+        this.excute(this.$service.labelPrinterService, this.$service.labelPrinterService.selectByCond, { flgValid: true,ftyId: this.$store.state.user.ftyId
+      }).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.printerList = res.data.list
+            //从缓存中取出打印机code
+            if (localStorage.getItem('currentPrinter')) {
+              let localPrinterCode = JSON.parse(localStorage.getItem('currentPrinter'))[this.$store.state.user.ftyId]
+              let list = this.printerList.filter(it => it.printerCode == localPrinterCode)
+              if (localPrinterCode && list.length > 0) {
+                this.currentPrinter = localPrinterCode
+              }
+            }
+          } else {
+            this.$Message.warning(res.message)
+          }
+        })
+      }
     },
-    getTemplateList() {
-      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
-        }else{
-          this.$Message.warning(res.message)
-        }
-      })
+    created() {
+      this.getTemplateList()
+      this.getPrinter()
     },
-    /**
-     * @desc   : 查询打印机
-     * @author : 洪旭东
-     * @date   : 2023-04-10 13:04
-     */
-    getPrinter(){
-      this.excute(this.$service.labelPrinterService, this.$service.labelPrinterService.selectByCond, {flgValid: true}).then(res=>{
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.printerList = res.data.list
-        } else {
-          this.$Message.warning(res.message)
-        }
-      })
-    }
-  },
-  created() {
-    this.getTemplateList()
-    this.getPrinter()
-  },
 
-}
+  }
 </script>
 
 <style scoped>

+ 55 - 34
src/components/business/process/node-modal/node-modal.vue

@@ -14,19 +14,8 @@
       @on-cancel="modalCancel">
         <DkTabs ref='tabs' :options="tabsOptions" v-model="currentTab" @on-click="changeTabs" style="margin: 10px 0;"/>
 
-        <!--          &lt;!&ndash;    返回工序    &ndash;&gt;-->
-        <!--          <DkFormItem prop="backNodeId" v-if="nodeControl?.backNodeId?.visible">-->
-        <!--            <SelectPop ref="backNodeId" v-model="nodeData.backNodeId" label-key="name" value-key="id" :multiple="false"-->
-        <!--                       :options="allNodes"/>-->
-        <!--          </DkFormItem>-->
 
-        <!--          &lt;!&ndash;    组装方式    &ndash;&gt;-->
-        <!--          <DkFormItem prop="packKind" v-if="nodeControl?.packKind?.visible">-->
-        <!--            <SelectPop ref="packKind" v-model="nodeData.packKind" label-key="kindName" value-key="kindCode"-->
-        <!--                       :multiple="false" :options="packKindList"/>-->
-        <!--          </DkFormItem>-->
-
-<!--        {{ nodeData }}<br/>-->
+        {{ nodeData }}<br/>
 
         <!--   tab1 - 基本信息    -->
         <DkForm ref="formInline" v-if="currentTab =='tab1'" v-model="nodeData" :label-max-words="6" :colCount="2">
@@ -180,7 +169,7 @@
                       v-if="nodeControl?.backGradeIds?.visible && ([$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge)"
                       :data-type="$config.dataType.array">
             <SelectPop ref="backGradeIds" v-model="nodeData.backGradeIds" label-key="gradeName" value-key="gradeId"
-                       :multiple="true" :options="productGradeList" />
+                       :multiple="true" :options="productGradeList" @on-select="changeBackGradeIds" />
           </DkFormItem>
         </DkForm>
         <!--   tab4 - 流程控制    -->
@@ -247,10 +236,11 @@
                        v-if="(([$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge)
                               ||$config.nodeKind.recover==nodeData.nodeKind)
                               &&checkRecoverTableFlag"
-                       :columns="nodeData?.backGradeIds?.length>0||nodeData.recycledKind==$config.recycledKind.before?checkRecoverColumns:checkRecoverColumns_noBack"
+                       :columns="([$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge)
+                              ||($config.nodeKind.recover==nodeData.nodeKind&&nodeData.recycledKind==$config.recycledKind.before)?checkRecoverColumns:checkRecoverColumns_noBack"
                        :controlId="'node1Id'"
                        :height="200"
-                       :enabledRepeatId="['node1Id','backNodeId']"
+                       :enabledRepeatId="['node1Id','backNodeIds']"
                        :enabledRepeat="false"
                        :show-setting-flag="false"/>
           </div>
@@ -496,12 +486,14 @@ export default {
           width: 'auto'
         },
         {
-          field: 'backNodeId',
+          field: 'backNodeIds',
           type: 'select',
           options: () => self.allNodes.filter(it => !it.flgAloneJudge && it.id != self.process.currentNodeId),
           labelKey: 'name',
           valueKey: 'id',
-          width: 'auto'
+          width: 'auto',
+          multiple: true,
+          info:'未设置时,默认为下一道工序'
         },
         { field: 'remarks', type: 'text', width: 'auto' },
       ],
@@ -599,15 +591,17 @@ export default {
   },
   watch: {
     //监听返回分级,处理检验table
-    'nodeData.backGradeIds'(n, o){
-      if(!n||!o||n.isEmptyArray()||o.isEmptyArray()){
-        this.checkRecoverRouterList = []
-        this.checkRecoverTableFlag=false
-        this.$nextTick(() => {
-          this.checkRecoverTableFlag=true
-        })
-      }
-    },
+    // 'nodeData.backGradeIds'(n, o){
+    //   console.log('o',o)
+    //   console.log('n',n)
+    //   if(!n||!o||n.isEmptyArray()||o.isEmptyArray()){
+    //     this.checkRecoverRouterList = []
+    //     this.checkRecoverTableFlag=false
+    //     this.$nextTick(() => {
+    //       this.checkRecoverTableFlag=true
+    //     })
+    //   }
+    // },
   },
   methods: {
     ...mapMutations(['setProcessNodeModalDisplay', 'setProcessNodeModalIndexDisplay','setCurrentNodeId']),
@@ -649,6 +643,30 @@ export default {
       }
     },
     /**
+     * @desc   : 改变返回分级事件
+     * @author : 张潇木
+     * @date   : 2023/7/13 16:20
+     */
+    changeBackGradeIds(e){
+      //如果清空了返回分级,清空检验设置table
+      if(!e||e.isEmptyArray()){
+        this.checkRecoverRouterList = []
+        this.checkRecoverTableFlag=false
+        this.$nextTick(() => {
+          this.checkRecoverTableFlag=true
+          this.$nextTick(() => {
+            //重新渲染回收/检验设置table列名
+            if (this.$refs.checkRecoverTable
+              && [this.$config.nodeKind.recover, this.$config.nodeKind.halfCheck, this.$config.nodeKind.finishCheck].includes(this.nodeData.nodeKind)) {
+              let columnTile = this.nodeData.nodeKind === this.$config.nodeKind.recover ? '报废前工序' : '可检验工序'
+              console.log('columnTile',columnTile)
+              this.$refs.checkRecoverTable.changeColumnTitle('node1Id', columnTile)
+            }
+          })
+        })
+      }
+    },
+    /**
      * @desc   : 当前tab改变事件
      * @author : 张潇木
      * @date   : 2023/5/29 14:50
@@ -683,13 +701,16 @@ export default {
       })
       this.checkRecoverTableFlag = !this.checkRecoverTableFlag
       this.$nextTick(() => {
-        //重新渲染回收/检验设置table列名
-        if (e == 'tab3' &&this.$refs.checkRecoverTable
-          && [this.$config.nodeKind.recover, this.$config.nodeKind.halfCheck, this.$config.nodeKind.finishCheck].includes(this.nodeData.nodeKind)) {
-          let columnTile = this.nodeData.nodeKind === this.$config.nodeKind.recover ? '报废前工序' : '可检验工序'
-          this.$refs.checkRecoverTable.changeColumnTitle('node1Id', columnTile)
-        }
         this.checkRecoverTableFlag = !this.checkRecoverTableFlag
+          this.$nextTick(() => {
+            //重新渲染回收/检验设置table列名
+            if (e == 'tab3' &&this.$refs.checkRecoverTable
+              && [this.$config.nodeKind.recover, this.$config.nodeKind.halfCheck, this.$config.nodeKind.finishCheck].includes(this.nodeData.nodeKind)) {
+              let columnTile = this.nodeData.nodeKind === this.$config.nodeKind.recover ? '报废前工序' : '可检验工序'
+              console.log('columnTile',columnTile)
+              this.$refs.checkRecoverTable.changeColumnTitle('node1Id', columnTile)
+            }
+          })
       })
       //endregion
 
@@ -980,8 +1001,8 @@ export default {
             ftyId: this.$store.state.user.ftyId
           }
         })
-        this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1  // 工种缺陷数量,产生缺陷为true时设置成 -1
       }
+      this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1  // 工种缺陷数量,产生缺陷为true时设置成 -1
       //endregion
 
       //region检验/回收设置
@@ -996,7 +1017,7 @@ export default {
             nodeId: this.process.currentNodeId,
             node1Id: it.node1Id,
             node2Id: this.process.currentNodeId,
-            backNodeId: it.backNodeId,
+            backNodeIds: it.backNodeIds,
             productGrade: it.productGrade,
             moldlineTags: it.moldlineTags,
             remarks: it.remarks,

+ 22 - 3
src/components/business/search-cond/index.vue

@@ -22,9 +22,9 @@
           <Form ref="formData" :model="formData._value" label-position="top" inline :rules="rule">
             <!--            <Row v-for="(it,itIndex) in Math.ceil(searchCond.length/colCount + 0.000000001)" :key="itIndex">-->
             <Row>
-              <Col :span="item.valueKind==='DATE_RANGE'?2*spanData:spanData" class="Col"
-                   :style="{ width: (item.valueKind==='DATE_RANGE' ? 'calc(' + 100/(24/(2*spanData)) + '% - 43px)' : ''),
-                    maxWidth: (item.valueKind==='DATE_RANGE' ?  90/(24/(2*spanData)) + '%' : 90/(24/spanData) + '%')}"
+              <Col :span="item.valueKind.indexOf('RANGE')>=0?2*spanData:spanData" class="Col"
+                   :style="{ width: (item.valueKind.indexOf('RANGE')>=0 ? 'calc(' + 100/(24/(2*spanData)) + '% - 43px)' : ''),
+                    maxWidth: (item.valueKind.indexOf('RANGE')>=0 ?  90/(24/(2*spanData)) + '%' : 90/(24/spanData) + '%')}"
                    v-for="(item,index) in searchCond "
                    :key="index">
                 <!--          输入类型    -->
@@ -65,6 +65,17 @@
                   </Prepend>
                 </FormItem>
 
+                <!--       月份范围       -->
+                <FormItem v-if="item.valueKind==='MONTH_RANGE'" :prop="item.valueFormat.code" style="width:100% ;">
+                  <Prepend :label="item.itemName" :required=item.required>
+                    <MonthRangePickerPop type="monthrange" clearable size="small" :editable="true"
+                                   :ref="item.valueFormat.code" transfer
+                                   placement="bottom-end" @on-change="(val) => dateChange(item.valueFormat.code, val)"
+                                   :placeholder="vm.$t('inputWords',{'search-name':item.itemName})"
+                                   style="width:100%" :short-cut-flag="true"></MonthRangePickerPop>
+                  </Prepend>
+                </FormItem>
+
                 <!--       月份      -->
                 <FormItem v-if="item.valueKind==='MONTH'" :prop="item.valueFormat.code" style="width:100% ;">
                   <Prepend :label="item.itemName" :required=item.required>
@@ -471,6 +482,14 @@ export default {
             this.dateChange(code, defaultValue);
           }
         })
+      } else if (valueKind && valueKind == 'MONTH_RANGE') {
+        this.$nextTick(() => {
+          if (defaultValue && this.$refs[code] && this.$refs[code].length > 0) {
+            this.$refs[code][0].model = defaultValue.join(this.$refs[code][0].separator)
+            this.$refs[code][0].chooseDatas();
+            this.dateChange(code, defaultValue);
+          }
+        })
       } else if (valueKind && valueKind == 'DATE') {
         this.$nextTick(() => {
           if (defaultValue && this.$refs[code] && this.$refs[code].length > 0) {

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

@@ -1860,15 +1860,13 @@ export default {
         self.methodsName = 'getProductGrade'
         self.methodsNameDetail = 'getProductGradeByPage'
         self.searchContent = [
-          {itemCode: 'gradeCode'},
           {itemCode: 'gradeName'},
         ]
         self.modalWidth = 800
         self.colCount = 2
         self.selectKey = 'gradeId'
-        self.selectLabel = 'gradeCode'
+        self.selectLabel = 'gradeName'
         self.columns = [
-          {field: 'gradeCode', width: 'auto'},
           {field: 'gradeName', width: 'auto'},
           {field: 'gradeKind', width: 'auto'},
         ]

+ 2 - 34
src/config/index.js

@@ -603,6 +603,7 @@ export default {
     halfCheck: '工艺节点-半检',
     finishCheck: '工艺节点-成检',
     bookWay: '报工方式',
+    bookStatus: '单据状态',
   },
   /**
    * @desc   : 产品erp型号-产品bom/产品型号验证标签
@@ -1839,6 +1840,7 @@ export default {
     str: '文本',
     date: '日期',
     dateRange: '日期范围',
+    monthRange:'月份范围',
     month: '月份',
     single: '下拉单选',
     multiple: '下拉多选',
@@ -2025,40 +2027,6 @@ export default {
   },
 
   /**
-   * @desc   : 工序类别名称
-   * @author : 张潇木
-   * @date   : 2023/5/24 10:12
-   */
-  nodeKindName:{
-    register: '标准计件',
-    climbKiln: '装窑车',
-    inKiln: '窑车入窑',
-    outKiln: '窑车出窑',
-    uninstallKiln: '卸窑车',
-    halfCheck: '半成品检验',
-    finishCheck: '成品检验',
-    recover: '废品回收',
-    shaping: '成型绑码',
-  },
-
-  /**
-   * @desc   : 工序类别描述
-   * @author : 张潇木
-   * @date   : 2023/5/24 10:12
-   */
-  nodeKindDesc:{
-    register: '计件',
-    climbKiln: '登窑',
-    inKiln: '入窑',
-    outKiln: '出窑',
-    uninstallKiln: '卸窑',
-    halfCheck: '半检',
-    finishCheck: '成检',
-    recover: '回收',
-    shaping: '成型',
-  },
-
-  /**
    *   @desc   : 成型线Info说明
    *   @date   : 2023/5/8 14:29
    *   @author : 寇珊珊

+ 4 - 0
src/font-less/font-12.less

@@ -173,3 +173,7 @@ xm-select *{
 .menu-title{
   font-size: @font_size !important;
 }
+
+.child-item-class{
+  font-size: @font-title !important;
+}

+ 4 - 0
src/font-less/font-13.less

@@ -172,3 +172,7 @@ xm-select *{
 .menu-title{
   font-size: @font_size !important;
 }
+
+.child-item-class{
+  font-size: @font-title !important;
+}

+ 4 - 0
src/font-less/font-14.less

@@ -173,3 +173,7 @@ xm-select *{
 .menu-title{
   font-size: @font_size !important;
 }
+
+.child-item-class{
+  font-size: @font-title !important;
+}

+ 8 - 82
src/index.less

@@ -793,19 +793,19 @@
 }
 
 .vxe-table--render-default .vxe-body--row.row--current{
-  background-color: #c3d0ef !important;
+  background-color: #c4d9ff !important;
 }
 
 .vxe-table--render-default .vxe-body--row.row--current .vxe-body--column .vxe-cell .vxe-button{
-  background-color: #c3d0ef !important;
+  background-color: #c4d9ff !important;
 }
 
 .vxe-table--render-default .vxe-body--row.row--checked, .vxe-table--render-default .vxe-body--row.row--radio .vxe-body--column .vxe-cell .vxe-button{
-  background-color: #c3d0ef !important;
+  background-color: #c4d9ff !important;
 }
 
 .vxe-table--render-default .vxe-body--row.row--checked, .vxe-table--render-default .vxe-body--row.row--radio {
-  background-color: #c3d0ef !important;
+  background-color: #c4d9ff !important;
 }
 
 .vxe-table--render-default .vxe-body--row.row--current .vxe-body--column{
@@ -821,88 +821,14 @@
   text-align: right;
 }
 
-
-
-/**************app的共同样式****************/
-:root {
-  --appFootPaddingBottom: 60px;
-  --appTableHeight: 100%;
-}
-
-.main-app {
-  padding: 0 0 0 0px;
-  position: fixed;
-  top: 0;
-  left: 0;
-  height: 100%;
-  width: 100%;
-  overflow-y: hidden;
-  overflow-x: hidden;
-  background-color: #f8f9fd;
-}
-
-.main-app::-webkit-scrollbar {
-  /*滚动条整体样式*/
-  width: 0px; /*高宽分别对应横竖滚动条的尺寸*/
-  height: 0;
+.base-button-class .ivu-poptip-content{
+  width: 120px !important;
 }
 
-.main-app::-webkit-scrollbar-thumb:hover {
-  /*滚动条里面小方块*/
-  border-radius: 10px;
-  box-shadow: inset 0 0 5px #2d8cf0;
-  background: #2d8cf0;
-}
-
-.main-app::-webkit-scrollbar-track:hover {
-  /*滚动条里面轨道*/
-  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-  border-radius: 10px;
-  background: #ededed;
+.base-button-class .ivu-poptip-body{
+  padding: 1px 0 0 0 ;
 }
 
-.main-app::-webkit-scrollbar-thumb {
-  /*滚动条里面小方块*/
-  border-radius: 10px;
-  box-shadow: inset 0 0 5px #f5f7f9;
-  background: #f5f7f9;
-}
-
-.main-app::-webkit-scrollbar-track {
-  /*滚动条里面轨道*/
-  box-shadow: inset 0 0 5px #f5f7f9;
-  border-radius: 10px;
-  background: #f5f7f9;
-}
-
-.main-app-form {
-  height: 100%;
-  width: 100%;
-  //overflow-y: hidden;
-  overflow-x: hidden;
-  background-color: #f8f9fd;
-}
-
-.app_save_bottom-class {
-  /*保存画面的按钮样式*/
-  background: #fff;
-  position: fixed;
-  bottom: 0;
-  width: 100%;
-  height: 60px;
-  border-top: 1px solid #efefef;
-  z-index: 7;
-  box-shadow: 0px -4px 12px rgba(0, 16, 39, 0.1);
-  padding: 10px;
-}
-
-//table滚动样式
-.main-app-table {
-  overflow-y: auto;
-  height: var(--appTableHeight);
-  //padding-bottom: var(--appFootPaddingBottom);
-
-}
 
 
 .index-grid-item-class {

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

@@ -633,6 +633,7 @@ export const columns = {
   flgAloneJudge: '独立检验',
   backGradeIds: '返回分级',
   backNodeId: '返回工序',
+  backNodeIds: '返回工序',
   recycledGradeIds: '可回收分级',
   recycledKind: '回收后到达',
   packKind: '组装方式',
@@ -1106,7 +1107,7 @@ export const columns = {
   staffCodeName:'员工',
 
   operate: '操作',
-  moldlineTagNames:'实验标识',
+  moldlineTagNames:'成型标签',
   defectCodeName:'产品缺陷',
 
   modelUnits:'计量单位',
@@ -1151,7 +1152,7 @@ export const columns = {
   bookWay:'报工方式',
   bookWayName:'报工方式',
   workBookItemKindName:'明细类型',
-  bookAmount:'报工金额(元)',
+  bookAmount:'报工金额',
   bookStatus:'报工状态',
   bookStatusName:'报工状态',
   bookDate:'报工日期',
@@ -1166,13 +1167,14 @@ export const columns = {
   projectKindName:'报工类型',
   modelUnitName:'型号单位',
   bookQty:'报工数量',
-  bookAmt:'报工金额(元)',
+  bookAmt:'报工金额',
   workBookStaff:'报工员工',
   workBookItem:'报工明细',
   bookStaff:'报工员工',
   modelTypeName:'成型线类型',
   checkOpinion:'审核意见',
   tableSetting:'表格设置',
+  yuan:'元',
 }
 
 /**

+ 14 - 5
src/mixins/form.js

@@ -42,6 +42,7 @@ export const formMixin = {
       editKeys: [], // 批量编辑信息
       editIndex: 1, // 批量编辑的序号,默认是第一个
       resizeTableFlag: false,//是否重新计算table的高度
+      morePanelFlag:false,// 多个panel需要平分
     }
   },
   watch: {
@@ -251,14 +252,12 @@ export const formMixin = {
      * @date   : 2022/12/8 13:12
      */
     save(arg) {
-      console.log('b0')
       // 1、校验
       this._validData(arg).then(res => {
         if (!res) {
           return;
         }
         this.loading = true;
-        console.log('b1')
         // 2、给参数赋值
         this.setParams(arg)
         this.params.ftyId = this.$store.state.user.ftyId;// 给工厂赋默认值
@@ -387,9 +386,18 @@ export const formMixin = {
           let panels = 0;
           if (this.$refs.collapse && this.$refs.collapse.$children) {
             let childrens = this.$refs.collapse.$children;
-            // 不需要最後一個
-            for (let i = 0; i < childrens.length - 1; i++) {
-              panels += childrens[i].$el.clientHeight;
+            if(!this.averageHeightFlag){
+              // 不需要最後一個
+              for (let i = 0; i < childrens.length - 1; i++) {
+                panels += childrens[i].$el.clientHeight;
+              }
+            }else{
+              // 是否要平均分
+              for (let i = 0; i < childrens.length; i++) {
+                if(!childrens[i].averageHeightFlag){
+                  panels += childrens[i].$el.clientHeight;
+                }
+              }
             }
           }
           let formRefHeight = 0;
@@ -402,6 +410,7 @@ export const formMixin = {
           }
           // console.log('toolsHeight',mainHeight,footInfoHeight,panels)
           this.tableHeight = mainHeight - footInfoHeight - panels - toolsHeight - formRefHeight - 70
+          console.log('bt',this.tableHeight)
         })
       }
     },

+ 37 - 11
src/mixins/index.js

@@ -19,7 +19,7 @@ export const indexMixin = {
   },
   data() {
     return {
-      printData:undefined, //打印数据
+      printData: undefined, //打印数据
       loading: false,        // 加载标识
       modalVisible: false,    // 弹框显示
       existsFlag: true,
@@ -57,6 +57,7 @@ export const indexMixin = {
       routeNameByExport: null, // 路由的名称 导出时用
       _tableRefList: [],// 给表格右键使用(销毁使用)
       _buttonList: [],// 给按钮使用(销毁使用)
+      _childButtonList: [],// 给子级按钮使用(销毁使用)
       modalParams: {      // 打开modal传入的参数
         modalRef: 'modal_editAdd',
         button: 'add',
@@ -117,6 +118,7 @@ export const indexMixin = {
       if (!routeUrl || !routeUrl.key) {
         return;
       }
+      console.log('bbb',isMustChooseFlag)
       let name = routeUrl.key
       let url = routeUrl.url
       let chooseKeys = tableRef ? this.$refs[tableRef]?.batchKeys : []
@@ -221,7 +223,8 @@ export const indexMixin = {
         let requiredColumns = this.$refs['searchCond'].requiredColumns
         for (let i in requiredColumns) {
           // 如果是范围需要判断范围
-          if (requiredColumns[i].valueKind == this.$config.docUserInput.dateRange) {
+          if (requiredColumns[i].valueKind == this.$config.docUserInput.dateRange
+            || requiredColumns[i].valueKind == this.$config.docUserInput.monthRange) {
             if (this.searchCond && this.searchCond._value && requiredColumns[i].valueFormat
               && requiredColumns[i].valueFormat.code
               && (!this.searchCond._value[requiredColumns[i].valueFormat.code + 'Start']
@@ -949,6 +952,7 @@ export const indexMixin = {
       }
       // 给dk-table列表注册cellMenu事件
       _this._buttonList = []
+      _this._childButtonList = []
       _this._tableRefList = []
       if (_this.$refs) {
         let arr = Object.keys(_this.$refs);
@@ -978,6 +982,19 @@ export const indexMixin = {
                 if (buttonRef === 'search') {
                   obj = _this.$config.routeUrl[buttonRef]
                 }
+                // 增加子级
+                if (_this.$refs[it].$vnode.componentInstance.childOptions && _this.$refs[it].$vnode.componentInstance.childOptions.length > 0) {
+                  _this.$refs[it].$vnode.componentInstance.childOptions.forEach(c => {
+                    // console.log('bb4', _this.$refs[it].$vnode.componentInstance.childOptions)
+                    if (_this.$refs[it].$vnode.componentInstance.$refs['child_' + c.name]) {
+                      _this._childButtonList.push({
+                        button: _this.$refs[it].$vnode.componentInstance.$refs['child_' + c.name][0],
+                        obj: _this.$config.routeUrl[this.routeObjName][c.name],
+                        isMustChooseFlag: c.isMustChooseFlag ? true : false
+                      })
+                    }
+                  })
+                }
                 // 记录按钮,用于销毁
                 _this._buttonList.push({button: _this.$refs[it].$vnode.componentInstance, obj: obj});
                 // _this.$refs[it].$vnode.componentInstance.$el.addEventListener('click', _this.buttonClick, false);
@@ -995,18 +1012,20 @@ export const indexMixin = {
                   }
                 })
                 ele.addEventListener('click', listener.get(ele), false)
-                // _this.$refs[it].$vnode.componentInstance.$el.addEventListener('click', function (e) {
-                //   if (!_this.$refs[it].$vnode.componentInstance.disabledFlag) {
-                //     _this.$refs[it].$vnode.componentInstance.disabledFlag = true;
-                //     _this.open(obj, _this.tableRef, _this.$refs[it].$vnode.componentInstance.isMustChooseFlag)
-                //     setTimeout(() => {
-                //       _this.$refs[it].$vnode.componentInstance.disabledFlag = false;
-                //     }, 1000)
-                //   }
-                // });
               }
             }
           })
+          // 子级按钮点击
+          if (_this._childButtonList && _this._childButtonList.length > 0) {
+            _this._childButtonList.forEach(it => {
+              const listener = new WeakMap()
+              let ele = it.button;
+              listener.set(ele, function (e) {
+                _this.open(it.obj, _this.tableRef, it.isMustChooseFlag)
+              })
+              ele.addEventListener('click', listener.get(ele), false)
+            })
+          }
         }
       }
       // 初始时,需要查询数据库 TODO
@@ -1054,6 +1073,13 @@ export const indexMixin = {
         })
         _this._buttonList = []
       }
+      // 移除子级button的监听
+      if (_this._childButtonList && _this._childButtonList) {
+        _this._childButtonList.forEach(it => {
+          it.removeEventListener('click', _this._childButtonList)
+        })
+        _this._childButtonList = []
+      }
     } catch (e) {
     }
     window.removeEventListener('resize', _this.resizeTable)

+ 2 - 2
src/router/routers.js

@@ -57,8 +57,8 @@ let menu = [
       },
       // 自定义报表的预览
       {
-        path: '/report/custom-report/report/custom-report-detail-:id',
-        name: 'custom-report-detail',
+        path: '/report/custom-report/report/custom-report-detail-preview-:id',
+        name: 'custom-report-detail-preview',
         meta: {
           title: '预览',
           hideInMenu: true,

+ 0 - 3
src/view/core/job/index.vue

@@ -56,9 +56,6 @@
         <DkFormItem prop="jobName" :required="true">
           <InputPop v-model="formData.jobName" ref="jobName"/>
         </DkFormItem>
-<!--        <DkFormItem prop="displayNo" >-->
-<!--          <MonthPickerPop />-->
-<!--        </DkFormItem>-->
         <!--显示顺序-->
         <DkFormItem prop="displayNo" :required="true" :data-type="$config.dataType.number">
           <InputNumberPop v-model="formData.displayNo" :digits=0 :min="0"/>

+ 1 - 1
src/view/core/staff/index.vue

@@ -48,7 +48,7 @@
         <DkTableColumn field="staffName"></DkTableColumn>
 <!--        <DkTableColumn field="orgName"></DkTableColumn>-->
         <DkTableColumn field="orgLevelName" width="300"></DkTableColumn>
-        <DkTableColumn field="jobName" :title="$t('jobName2')"></DkTableColumn>
+        <DkTableColumn field="jobName" :title="$t('jobName')"></DkTableColumn>
         <DkTableColumn field="postName"></DkTableColumn>
         <DkTableColumn field="staffStatusName"></DkTableColumn>
         <DkTableColumn field="remarks" width="auto"></DkTableColumn>

+ 14 - 5
src/view/login/login-form.vue

@@ -24,7 +24,7 @@
       </Input>
     </FormItem>
     <Checkbox v-model="rememberMe">&nbsp;&nbsp;记住工厂/用户名</Checkbox>
-    <FormItem style="padding-top: 8px">
+    <FormItem style="padding-top: 4px;margin-bottom: 10px !important;">
       <Button class="login-class" @click="handleSubmit" size="large" type="primary" long :disabled="loading">
         <span v-if="!loading">{{ $t('login') }}</span>
         <span v-else>loading...</span>
@@ -178,7 +178,7 @@ export default {
 <style lang="less" scoped>
 
 /deep/.ivu-form-item {
-  margin-bottom: 22px !important;
+  margin-bottom: 20px !important;
 }
 
 /deep/ input::-webkit-input-placeholder {
@@ -195,9 +195,9 @@ export default {
 
 
 /deep/ .ivu-input {
-  border: 1px solid #1B365D;
-  border-radius: 8px !important;
-  font-size: 15px !important;
+  border-radius: 4px !important;
+  height: 32px !important;
+  font-size: 14px !important;
   color: #1B365D !important;
 }
 
@@ -213,4 +213,13 @@ export default {
   line-height: 40px;
 }
 
+/deep/.ivu-form-item-error-tip{
+  padding-top: 4px !important;
+}
+
+/deep/.ivu-input-wrapper-large .ivu-input-prefix i{
+  font-size: 16px;
+  line-height: 32px;
+}
+
 </style>

+ 7 - 7
src/view/login/login.less

@@ -38,8 +38,8 @@
           //height: 55%;
           top:50%;
           left: 50%;
-          width: 500px;
-          height: 480px;
+          width: 400px;
+          height: 380px;
           margin-top: -250px;
           margin-left: -230px;
           //min-width: 460px;
@@ -48,10 +48,10 @@
           mix-blend-mode: normal;
           backdrop-filter: blur(50px);
           /* Note: backdrop-filter has minimal browser support */
-          border-radius: 15px;
+          border-radius: 5px;
 
           .hj-logo{
-            padding-top: 30px;
+            padding-top: 20px;
             display: flex;
             justify-content: center;
           }
@@ -66,7 +66,7 @@
             .btn-class{
               cursor: pointer;
               font-weight: 500;
-              font-size: 26px;
+              font-size: 20px;
               line-height: 40px;
               display: flex;
               align-items: center;
@@ -77,7 +77,7 @@
               font-weight: 500;
               text-decoration: underline;
               text-underline-offset: 10px;
-              font-size: 26px;
+              font-size: 20px;
               line-height: 40px;
               display: flex;
               align-items: center;
@@ -85,7 +85,7 @@
             }
           }
           .content{
-            padding-top: 18px;
+            padding-top: 25px;
             width: 66%;
             margin-left: 17%;
             justify-content: center;

+ 6 - 6
src/view/login/login.vue

@@ -29,18 +29,18 @@
       <div class="form-con">
         <div class="hj-logo">
           <div style="display: flex;align-items: center">
-            <img :src="dk_logo" style="width: 50px;height: 50px"/>
-            <img :src="mes_logo" style="width: 280px;height: 60px"/>
+            <img :src="dk_logo" style="width: 40px;height: 40px"/>
+            <img :src="mes_logo" style="width: 280px;height: 50px"/>
 <!--            <div style="display: flex;align-items: center;font-size: 40px;font-weight: 500">iBOSS*MES3.0</div>-->
           </div>
         </div>
         <div style="width: 90%;display: flex;justify-content: end">
           东科智能业务运行支撑系统·厂商云
         </div>
-        <div class="tab-class">
-          <div :class="active == 0? 'btn-active-class':'btn-class' " id="user" @click="changeMode">密码登录</div>
-          <div :class="active == 1? 'btn-active-class':'btn-class' " id="scan" @click="changeMode">扫码登录</div>
-        </div>
+<!--        <div class="tab-class">-->
+<!--          <div :class="active == 0? 'btn-active-class':'btn-class' " id="user" @click="changeMode">密码登录</div>-->
+<!--          <div :class="active == 1? 'btn-active-class':'btn-class' " id="scan" @click="changeMode">扫码登录</div>-->
+<!--        </div>-->
         <div v-show="active == 0" class="content">
           <login-form @on-success-valid="handleSubmit" :loading="loading"></login-form>
         </div>

+ 1 - 0
src/view/mst/product-view/config/ProductView.js

@@ -61,6 +61,7 @@ export default class Product {
         //节点是否可移动
         return !readonly
       },
+      //画布缩放
       scroller: {
         enabled: true,
         pageVisible: true,

+ 50 - 24
src/view/mst/work-book/form.vue

@@ -15,7 +15,7 @@
                   @pageChange="editPageChange"></DkPageButton>
     <DkCollapse ref="collapse" @on-change="changeCollapse">
       <DkPanel prop="essentialInformation">
-        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="5">
+        <DkForm slot="content" ref="formInline" v-model="formData">
           <!--  报工项目  -->
           <DkFormItem prop="projectId" :required="true" :data-type="$config.dataType.number">
             <SelectMagnifier ref="projectId" v-model="formData.projectId"
@@ -32,7 +32,8 @@
           </DkFormItem>
           <!--  报工金额  -->
           <DkFormItem prop="bookAmount" :data-type="$config.dataType.number">
-            <InputNumberPop v-model="formData.bookAmount" readonly :digits=2 :negative="true" ref="bookAmount"/>
+            <InputNumberPop v-model="formData.bookAmount" readonly :digits=2 :negative="true" ref="bookAmount"
+                            :unit="$t('yuan')"/>
           </DkFormItem>
           <!--报工日期-->
           <DkFormItem prop="bookDate" :required="true" :data-type="$config.dataType.date">
@@ -52,12 +53,12 @@
           </DkFormItem>
         </DkForm>
       </DkPanel>
-      <DkPanel prop="workBookStaff">
-        <div slot="content" :style="'height: ' + tableHeight + 'px'">
+      <DkPanel prop="workBookStaff" :averageHeightFlag="true">
+        <div slot="content" :style="'height: ' + tableHeight / tableNum + 'px'">
           <!-- 报工员工 -->
           <EditTable v-if="visRefreshTable" ref="workBookStaff" :data="formData.workBookStaffList"
-                     :columns="formData.projectKind === $config.projectKind.shuLiang ? staffShuLiangColumns: staffJinEColumns"
-                     :height="tableHeight"
+                     :columns="formData.projectKind === $config.projectKind.jinE ? staffJinEColumns: staffShuLiangColumns"
+                     :height="tableHeight / tableNum"
                      :operate-flag="true"
                      :new-row-flag="true"
                      :freeze="false"
@@ -65,8 +66,8 @@
                      @changeValue="workBookStaffChangeValue"></EditTable>
         </div>
       </DkPanel>
-      <DkPanel v-if="visWorkBookItem" prop="workBookItem">
-        <div slot="content" :style="'height: ' + (tableHeight + addTableHeight) + 'px'">
+      <DkPanel v-if="visWorkBookItem" prop="workBookItem" :averageHeightFlag="true">
+        <div slot="content" :style="'height: ' + tableHeight/2 + 'px'">
           <!--      添加报工明细数据表单    -->
           <DkForm v-if="visAddWorkItemForm" slot="content" ref="formInline" style="margin-bottom: 5px">
             <!--    型号    -->
@@ -100,17 +101,17 @@
                      :operateFlag="canOperate"
                      :add-flag="false"
                      :auto-width-flag="false"
-                     :height="tableHeight"
+                     :height="tableHeight/2 - 30"
                      :showSettingFlag="false"
                      @delRow="delZhiLiangItem">
               <DkTableColumn field="modelName" :title="$t('modelName')"></DkTableColumn>
               <DkTableColumn field="modelUnitName" :title="$t('modelUnitName')"></DkTableColumn>
-              <DkTableColumn field="unitPrice" :title="$t('unitPrice')" :digits="2"
-                             :data-type="$config.dataType.number"></DkTableColumn>
+              <!--              <DkTableColumn field="unitPrice" :title="$t('unitPrice')" :digits="2"-->
+              <!--                             :data-type="$config.dataType.number"></DkTableColumn>-->
               <DkTableColumn field="bookQty" :title="$t('bookQty')"
                              :data-type="$config.dataType.number"></DkTableColumn>
-              <DkTableColumn field="bookAmt" :title="$t('bookAmt')" :digits="2"
-                             :data-type="$config.dataType.number"></DkTableColumn>
+              <!--              <DkTableColumn field="bookAmt" :title="$t('bookAmt')" :digits="2"-->
+              <!--                             :data-type="$config.dataType.number"></DkTableColumn>-->
               <vxe-colgroup title="产品分级">
                 <vxe-column v-for="(cItem,cIndex) in dataFenJi" width="100" height="100" min-width="80" :key="cIndex"
                             show-overflow="ellipsis" :field="cItem.field"
@@ -119,7 +120,8 @@
                   <template #default="{ row }">
                     <!--数字类型-->
                     <vxe-input size="mini"
-                               type="Number"
+                               type="float"
+                               :digits="row.decimalPlaces"
                                :min="-9999999"
                                :max="9999999" v-model="row[cItem.field]"
                                @blur="handleBlur(row, cItem,'grade')"></vxe-input>
@@ -156,7 +158,7 @@
             <EditTable v-if="visRefreshTable" ref="workBookItem"
                        :data="formData.workBookItemList"
                        :columns="formData.projectKind === $config.projectKind.shuLiang ? shuLiangColumns : jinEColumns"
-                       :height="tableHeight"
+                       :height="tableHeight/2 - 35"
                        :operate-flag="false"
                        :operateFlag="canOperate"
                        :add-flag="false"
@@ -193,6 +195,7 @@ export default {
     return {
       loading: false,
       tableHeight: 300,
+      tableNum: 2,                // 当前页table数量
       addTableHeight: 0,          // 明细类型为自填时,明细表需要增加的高度
       visWorkBookItem: true,      // 是否显示报工明细
       visRefreshTable: true,      // 控制表格是否显示
@@ -204,9 +207,8 @@ export default {
       dataFenJi: [],              // 分级列
       dataQueXian: [],            // 缺陷列
       modelUnitList: [],          // 报工单位数据源
-      bookWayList: [],
-      // 是否显示清空按钮
-      editFlag: true,
+      bookWayList: [],            // 报工方式数据
+      editFlag: true,             // 是否显示清空按钮
       // 画面表单数据
       formData: {
         bookWay: null,
@@ -215,7 +217,7 @@ export default {
         projectKind: null,
         projectKindName: '',
         itemKind: '',
-        bookAmount: 0.00,
+        bookAmount: 0,
         bookStatus: this.$config.bookStatus.zanCun,
         bookDate: new Date(),
         remarks: '',
@@ -235,6 +237,7 @@ export default {
         bookQty: null,
         bookAmt: null,
         remarks: null,
+        decimalPlaces:0,
         ftyId: self.$store.state.user.ftyId,
       },
       // 报工员工列-数量
@@ -359,7 +362,6 @@ export default {
       if (this.type === this.$config.formMode.add) {
         this.editFlag = false;
         this.formData.bookWay = '报工方式-自报';
-
         // 获取班组员工
         this.getTeamStaff();
       } else if (this.type === this.$config.formMode.addTogether) {
@@ -436,6 +438,7 @@ export default {
 
             // 如果明细类型不是无,显示报工明细
             this.visWorkBookItem = this.formData.itemKind === this.$config.workBookItemKind.wu ? false : true;
+            this.tableNum = this.formData.itemKind === this.$config.workBookItemKind.wu ? 1 : 2;
 
             res.data["WorkProjectItem"].forEach(it => {
               it.remarks = null
@@ -515,7 +518,7 @@ export default {
         }
 
         row["bookQty"] = sumQty;
-        row["bookAmt"] = (sumQty * parseFloat(row["unitPrice"])).toFixed(2);
+        // row["bookAmt"] = (sumQty * parseFloat(row["unitPrice"])).toFixed(2);
 
       } else if (type === 'defect') {
         let workBookItemDefectList = row.workBookItemDefectList || [];
@@ -604,6 +607,11 @@ export default {
       var modelUnitName = document.getElementById("modelUnit");
       this.formDataWorkItem.modelUnitName = modelUnitName.innerText;
 
+      let list = this.modelUnitList.filter(it => it.unitName == modelUnitName.innerText)
+      if (list.length > 0) {
+        this.formDataWorkItem.decimalPlaces = list[0].unitScale;
+      }
+
       // 复制到报工明细中
       this.formData.workBookItemList.push({...this.formDataWorkItem});
     },
@@ -703,6 +711,18 @@ export default {
         return false
       }
 
+      // 判断员工是否都填写了
+      for (let i = 0; i < dtWorkBookStaff.length; i++) {
+        if (dtWorkBookStaff[i]["staffId"] == null) {
+          this.$Message.warning(this.$t('W_007', {'param': "报工员工第" + (i + 1) + "行,员工为空"}))
+          return false
+        }
+        if (dtWorkBookStaff[i]["jobId"] == null) {
+          this.$Message.warning(this.$t('W_007', {'param': "报工员工第" + (i + 1) + "行,工种为空"}))
+          return false
+        }
+      }
+
       // 如果报工明细类型不是自填,则需要计算报工员工和报工明细的数量、金额合计是否一致
       if (this.formData.itemKind !== this.$config.workBookItemKind.wu) {
 
@@ -801,8 +821,14 @@ export default {
      * @date   : 2023/6/25 14:32
      */
     clear() {
+      this.formData.projectId = null;
+      this.formData.projectName = '';
+      this.formData.projectKind = null;
+      this.formData.projectKindName = '';
+      this.formData.itemKind = '';
+      this.formData.bookAmount = 0;
+      this.formData.remarks = '';
       this.formData.bookDate = new Date();
-      this.formData.workBookItemList = null;
       this.formData.workBookStaffList = [];
       this.formData.workBookItemList = [];
     },
@@ -828,6 +854,7 @@ export default {
 
         // 如果明细类型不是无,显示报工明细
         this.visWorkBookItem = this.formData.itemKind === this.$config.workBookItemKind.wu ? false : true;
+        this.tableNum = this.formData.itemKind === this.$config.workBookItemKind.wu ? 1 : 2;
 
         // 小数位数
         data["workBook"].wbItemList.forEach(it => {
@@ -890,8 +917,6 @@ export default {
       }
     },
   },
-
-
   /**
    * @desc   : 在实例创建完成后被立即同步调用
    * @author : 周兴
@@ -900,6 +925,7 @@ export default {
   created() {
     this.primaryKey = 'bookId'  // 设置主键Id
     this.resizeTableFlag = true;  // 计算表格高度
+    this.averageHeightFlag = true;
   },
 }
 </script>

+ 76 - 18
src/view/mst/work-book/index.vue

@@ -11,21 +11,23 @@
         <!--    清空条件    -->
         <BaseIndexButton right-button="work-book-clear" ref="clear" name="clear"></BaseIndexButton>
         <!--    编辑    -->
-        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-edit" ref="edit" name="edit"></BaseIndexButton>
+        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-edit" ref="edit"
+                         name="edit"></BaseIndexButton>
         <!--    审核    -->
-        <BaseIndexButton v-if="formType == $config.formCode.workBookAudit" right-button="work-book-to_examine" ref="toExamine" name="toExamine"
-                         @click="toAsk()"></BaseIndexButton>
+        <BaseIndexButton v-if="formType == $config.formCode.workBookAudit" right-button="work-book-to_examine"
+                         ref="toExamine" name="toExamine" @click="toAsk()"></BaseIndexButton>
         <!--    完成    -->
-        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-finish" ref="finish" name="finish"
-                         @click="toOperate($config.bookStatus.wanCheng)"></BaseIndexButton>
+        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-finish" ref="finish"
+                         name="finish" @click="toOperate($config.bookStatus.wanCheng)"></BaseIndexButton>
         <!--    关闭    -->
-        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-close" ref="close" name="close"
-                         @click="toOperate($config.bookStatus.guanBi)"></BaseIndexButton>
+        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-close" ref="close"
+                         name="close" @click="toOperate($config.bookStatus.guanBi)"></BaseIndexButton>
       </template>
       <template #right>
         <!--   新建     -->
-        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit"  right-button="work-book-add" ref="add" name="add"></BaseIndexButton>
-<!--        <BaseIndexButton right-button="work-book-add-together" ref="addTogether" name="addTongYi"></BaseIndexButton>-->
+        <BaseIndexButton v-if="formType != $config.formCode.workBookAudit" right-button="work-book-add" ref="add"
+                         name="add"></BaseIndexButton>
+        <!--        <BaseIndexButton right-button="work-book-add-together" ref="addTogether" name="addTongYi"></BaseIndexButton>-->
       </template>
     </BaseIndexButtonGroup>
 
@@ -46,6 +48,7 @@
                :height="tableHeight * split - 35"
                :multiple="true"
                :choose-flag="true"
+               :showSettingFlag="true"
                @pageChange="pageSizeChange"
                @current-change="currentChangeEvent">
         <!--报工单号-->
@@ -86,9 +89,9 @@
       </DkTable>
 
       <div slot="bottom">
-        <DkSplit v-model="detailSplit" :height="tableHeight * (1-split)">
+        <DkSplit v-model="detailSplit" :height="tableHeight * (1-split)" ref="toolSplit">
           <DkTable v-if="visStaffTable" slot="left" :data="workBookStaffList" ref="groupTable"
-                   :height="tableHeight * (1-split)" primaryKey="groupId"
+                   :height="tableHeight * (1-split)" primaryKey="groupId" :showSettingFlag="true"
                    :choose-flag="false" :page-flag="false"
           >
             <!--报工方式-->
@@ -102,7 +105,7 @@
           </DkTable>
 
           <DkTable v-if="visJinETable" slot="right" :data="workBookItemList" ref="itemTable"
-                   :height="tableHeight * (1-split)" primaryKey="itemId"
+                   :height="tableHeight * (1-split)" primaryKey="itemId" :showSettingFlag="true"
                    :choose-flag="false" :page-flag="false"
           >
             <DkTableColumn field="modelName"></DkTableColumn>
@@ -191,6 +194,16 @@ export default {
           valueKind: self.$config.docUserInput.mChoice
         },
         {
+          // 报工状态
+          itemCode: 'bookStatusList',
+          itemName: 'bookStatus',
+          valueFormat: {
+            code: 'bookStatusList', data: [], valueKey: 'kindCode', labelKey: 'kindName',
+            default: [this.$config.bookStatus.zanCun, this.$config.bookStatus.daiShenHe, this.$config.bookStatus.shenHeJuJue, this.$config.bookStatus.shenHeTongGuo, this.$config.bookStatus.wanCheng]
+          },
+          valueKind: self.$config.docUserInput.mChoice
+        },
+        {
           itemCode: 'bookDate',//报工日期
           valueFormat: {code: 'bookDate', default: [new Date().toDateStr(), new Date().toDateStr()]},
           valueKind: 'DATE_RANGE'
@@ -227,6 +240,9 @@ export default {
     initData() {
       // 获取报工方式
       this.getBookWay();
+
+      // 获取报工状态
+      this.getBookStatus();
     },
 
     /**
@@ -240,6 +256,12 @@ export default {
       }
       this.excute(this.$service.commonService, this.$service.commonService.getDataKind, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
+          if (this.formType === this.$config.formCode.workBook) { // 自主报工
+            res.data.splice(0, 1);
+          } else if (this.formType === this.$config.formCode.workBookTogether) {
+            res.data.splice(1, 1);
+          }
+
           let list = this.searchContent.filter(it => it.valueFormat.code == 'bookWayList')
           if (list.length > 0) {
             list[0].valueFormat.data = res.data
@@ -247,6 +269,26 @@ export default {
         }
       })
     },
+
+    /**
+     * @desc   : 获取报工状态
+     * @author : 付斌
+     * @date   : 2023-06-30 11:23
+     */
+    getBookStatus() {
+      let params = {
+        kindType: this.$config.kindType.bookStatus,
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getDataKind, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+
+          let list = this.searchContent.filter(it => it.valueFormat.code == 'bookStatusList')
+          if (list.length > 0) {
+            list[0].valueFormat.data = res.data
+          }
+        }
+      })
+    },
     // endregion
 
     /**
@@ -256,6 +298,14 @@ export default {
      */
     currentChangeEvent({row}) {
       this.loading = true
+
+      if (row.itemKind === this.$config.workBookItemKind.wu) {
+        this.$refs['toolSplit'].hidePane(false);
+      } else {
+        // 显示缺陷列表
+        this.$refs['toolSplit'].showPane();
+      }
+
       this.excuteNoParam(this.$service.workBookService, this.$service.workBookService.selectById, [parseInt(row.bookId)], false).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
 
@@ -317,9 +367,9 @@ export default {
      *   @author : 付斌
      */
     add() {
-      if(this.formType === this.$config.formCode.workBook){ // 自主报工
+      if (this.formType === this.$config.formCode.workBook) { // 自主报工
         this.$router.push('/mst/work-book/add');
-      }else {
+      } else {
         this.$router.push('/mst/work-book/add-together');
       }
     },
@@ -329,6 +379,14 @@ export default {
      *   @author : 付斌
      */
     getData(params) {
+
+      // 根据页面代码,设置报工方式
+      if (this.formType === this.$config.formCode.workBook) {
+        params.bookWayList = [this.$config.bookWay.ziBao]
+      } else if (this.formType === this.$config.formCode.workBookTogether) {
+        params.bookWayList = [this.$config.bookWay.tongBao]
+      }
+
       return this.excute(this.$service.workBookService, this.$service.workBookService.selectByCond, params)
     },
     /**
@@ -375,7 +433,7 @@ export default {
           }
 
           this.loading = true;
-          return this.excute(this.$service.workBookService, this.$service.workBookService.updateInvoiceStatus, params).then(res => {
+          return this.excute(this.$service.workBookService, this.$service.workBookService.updateInvoiceStatus, params, false).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
               this.$Message.success(this.$t('I_001', {'param': "审核"}));
               this.searchData();
@@ -383,7 +441,7 @@ export default {
               this.loading = false;
               this.isToExamineModal = false;
             } else {
-              this.$Message.success(this.$t('W_181', {'param': res.data}));
+              this.$Message.warning(this.$t('W_181', {'param': res.message}));
               this.loading = false;
             }
           })
@@ -425,13 +483,13 @@ export default {
                 }
 
                 this.loading = true;
-                return this.excute(this.$service.workBookService, this.$service.workBookService.updateInvoiceStatus, params).then(res => {
+                return this.excute(this.$service.workBookService, this.$service.workBookService.updateInvoiceStatus, params, false).then(res => {
                   if (res.code === this.$config.SUCCESS_CODE) {
                     this.$Message.success(this.$t('I_001', {'param': ""}));
                     this.searchData();
                     this.loading = false;
                   } else {
-                    this.$Message.success(this.$t('W_181', {'param': res.data}));
+                    this.$Message.warning(this.$t('W_181', {'param': res.message}));
                     this.loading = false;
                   }
                 })

+ 1 - 1
src/view/mst/work-project/form.vue

@@ -26,7 +26,7 @@
           <!--报工明细-->
           <DkFormItem prop="itemKind" :label="$t('projectItemKind')" :required="true">
             <SelectPop v-model="formData.itemKind" ref="itemKind" :multiple="false"
-                       :options="itemKindList"
+                       :options="formData.projectKind === this.$t('projectKindQuality')?itemKindList.filter(it=>it.kindCode != this.$t('projectItemNull')):itemKindList"
                        labelKey="kindName"
                        valueKey="kindCode"
             >

+ 13 - 0
src/view/pdm/label-print/index.vue

@@ -0,0 +1,13 @@
+<template>
+
+</template>
+
+<script>
+export default {
+name: "label-print"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 0
src/view/pdm/label-reprint/index.vue

@@ -0,0 +1,13 @@
+<template>
+
+</template>
+
+<script>
+export default {
+  name: "label-reprint"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 1
src/view/pdm/molding-record/bind-barcode-group.vue

@@ -367,7 +367,6 @@
        *   @author : 寇珊珊
        */
       checkDetail(oldRow, newRow) {
-        console.log("new",newRow)
         for (let it of this.moldingRecordList) {
           let index = 0
           for (let item of it.bomItems) {

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

@@ -343,7 +343,6 @@
               this.$set(this.moldingRecordList[index], 'productUniqueFlag', true)
             } else {
               this.$set(this.moldingRecordList[index], 'canReturnProductUniqueCode', barCodeRow.barcode)
-              this.$set(this.moldingRecordList[index], 'productUniqueFlag', true)
             }
           }
           index++

+ 127 - 46
src/view/process/process-flow/config/ProcessConfig.js

@@ -7,6 +7,7 @@ import { Keyboard } from '@antv/x6-plugin-keyboard'
 import { Clipboard } from '@antv/x6-plugin-clipboard'
 import { History } from '@antv/x6-plugin-history'
 import { Export } from "@antv/x6-plugin-export";
+import { MiniMap } from '@antv/x6-plugin-minimap'
 import { getImg } from '../../../../libs/base/x6-utils'
 import router from '@/router'
 import config from '@/config'
@@ -38,7 +39,8 @@ export default class Process {
   ctrlPressed = false//ctrl键是是否按下
 
   // region 初始化图形
-  static init(dom,showGraph=true){
+  static init(dom,miniMapDom=null,nodeKindList,showGraph=true){
+    console.log('nodeKindList',nodeKindList)
 
     // region 画布配置
     this.graph = new Graph({
@@ -95,7 +97,7 @@ export default class Process {
         anchor: 'center',
         connectionPoint: 'anchor',
         allowBlank: false,//不允许连接到画布空白位置的点
-        allowLoop: false,//不允许创建循环连线
+        allowLoop: true,//不允许创建循环连线
         allowMulti:true,//允许在相同的起始工序和终止之间创建多条边
         snap: {
           radius: 20,
@@ -232,6 +234,12 @@ export default class Process {
       .use(new History({//撤销重做
         enabled: true,
       }))
+      .use( new MiniMap({
+        container: miniMapDom,
+        width: 200,
+        height: 160,
+        padding: 10,
+      }))
       .use(new Export({//导出
         enabled:true
       }));
@@ -432,15 +440,22 @@ export default class Process {
     // endregion
 
     // region 鼠标移入移出 连接桩显示/隐藏
-    this.graph.on('node:mouseenter', FunctionExt.debounce(() => {
+    this.graph.on('node:mouseenter', () => {
       const ports =  dom.querySelectorAll('.x6-port-body')
       this.showPorts(ports, true)
-    }), 500,)
+    })
 
     this.graph.on('node:mouseleave', () => {
       const ports =  dom.querySelectorAll('.x6-port-body')
       this.showPorts(ports, false)
     })
+
+    // 监听节点选中
+    this.graph.on('node:selected', () => {
+      //取消连接桩显示
+      const ports =  dom.querySelectorAll('.x6-port-body')
+      this.showPorts(ports, false)
+    });
     // endregion
 
     // region 鼠标移入移出 动态添加连接线托拽工具 废弃
@@ -466,28 +481,6 @@ export default class Process {
     // this.graph.on('edge:mouseleave', ({ cell }) => {
     //   cell.removeTools()
     // })
-    this.graph.on('edge:selected', (args) => {
-      // console.log('edge:selected')
-      args.edge.addTools( [
-          { name: 'boundary',
-            args: {
-              padding: 5,
-              attrs: {
-                fill: '#2d8cf0',
-                stroke: 'white',
-                'stroke-width': 0.2,
-                'fill-opacity': 0.2,
-              },
-            },
-          },
-        ])
-    });
-    // 边取消选中
-    this.graph.on('edge:unselected', (args) => {
-      // console.log('edge:unselected')
-      args.edge.removeTools();
-    });
-
 
     //endregion
 
@@ -695,7 +688,13 @@ export default class Process {
       //工序
       if(cell.shape=='custom-image'){
         //添加工序设置业务数据id
-        cell.setData({'nodeId':cell.id,'ftyId': store.state.user.ftyId,'flowId':parseInt(router.app._route.params.id),"isValid":false})
+        cell.setData({
+          'nodeId':cell.id,
+          'ftyId': store.state.user.ftyId,
+          'flowId':parseInt(router.app._route.params.id),
+          "displayNo":this.graph.getNodes()?.length,
+          "isValid":!([config.nodeKind.halfCheck,config.nodeKind.finishCheck].includes(cell.getData().nodeKind)),
+        })
       }
       //连接线
       if(cell.shape=='edge'){
@@ -705,6 +704,57 @@ export default class Process {
     });
     // endregion
 
+    // region 选中边改变样式
+    // 边选中
+    this.graph.on('edge:selected', (args) => {
+      args.edge.addTools( [
+        { name: 'boundary',
+          args: {
+            padding: 5,
+            attrs: {
+              fill: '#2d8cf0',
+              stroke: 'white',
+              'stroke-width': 0.2,
+              'fill-opacity': 0.2,
+            },
+          },
+        },
+      ])
+    });
+
+    // 边取消选中
+    this.graph.on('edge:unselected', (args) => {
+      args.edge.removeTools();
+    });
+    // endregion
+
+    // region 移入边调整起点终点
+    // 移入边
+    this.graph.on('edge:mouseenter', ({ cell }) => {
+      const ports =  dom.querySelectorAll('.x6-port-body')
+      this.showPorts(ports, true)
+      cell.addTools([
+        { name: 'source-arrowhead',  },
+        {
+          name: 'target-arrowhead',
+          args: {
+            attrs: {
+              fill: 'red',
+            },
+          },
+        },
+      ])
+    })
+
+    // 移出边
+    this.graph.on('edge:mouseleave', ({ cell }) => {
+      //显示连接桩
+      const ports =  dom.querySelectorAll('.x6-port-body')
+      this.showPorts(ports, false)
+      cell.removeTools()
+    })
+    // endregion
+
     // endregion
 
     // region 工序上下左右的四个连接桩
@@ -770,6 +820,21 @@ export default class Process {
             },
           },
         },
+        angle:{
+          position: 'absolute',
+          attrs: {
+            circle: {
+              r: 4,
+              magnet: true,
+              stroke: '#5F95FF',
+              strokeWidth: 1,
+              fill: '#fff',
+              style: {
+                visibility: 'hidden',
+              },
+            },
+          },
+        },
       },
       items: [
         {
@@ -784,6 +849,22 @@ export default class Process {
         {
           group: 'left',
         },
+        {
+          group: 'angle',
+          args: { x: '99%', y: '99%' },
+        },
+        {
+          group: 'angle',
+          args: { x: '99%', y: '1%' },
+        },
+        {
+          group: 'angle',
+          args: { x: '1%', y: '99%' },
+        },
+        {
+          group: 'angle',
+          args: { x: '1%', y: '1%' },
+        },
       ],
     }
     // endregion
@@ -850,10 +931,10 @@ export default class Process {
       //region 计件模型
       const countImages = [
         {
-          label: config.nodeKindDesc.register,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.register)?.gradeKindDesc,
           image:getImg('登记.png'),
           nodeKind:config.nodeKind.register,
-          nodeKindName:config.nodeKindName.register,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.register)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -863,10 +944,10 @@ export default class Process {
           flgUndo:true,
         },
         {
-          label: config.nodeKindDesc.climbKiln,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.climbKiln)?.gradeKindDesc,
           image:getImg('装卸.png'),
           nodeKind:config.nodeKind.climbKiln,
-          nodeKindName:config.nodeKindName.climbKiln,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.climbKiln)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -876,10 +957,10 @@ export default class Process {
           flgUndo:true,
         },
         {
-          label: config.nodeKindDesc.inKiln,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.inKiln)?.gradeKindDesc,
           image:getImg('火炉.png'),
           nodeKind:config.nodeKind.inKiln,
-          nodeKindName:config.nodeKindName.inKiln,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.inKiln)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -889,10 +970,10 @@ export default class Process {
           flgUndo:false,
         },
         {
-          label: config.nodeKindDesc.outKiln,
-          image:getImg('火炉.png'),
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.outKiln)?.gradeKindDesc,
+          image:getImg('火炉1.png'),
           nodeKind:config.nodeKind.outKiln,
-          nodeKindName:config.nodeKindName.outKiln,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.outKiln)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -902,10 +983,10 @@ export default class Process {
           flgUndo:false,
         },
         {
-          label: config.nodeKindDesc.uninstallKiln,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.uninstallKiln)?.gradeKindDesc,
           image:getImg('装卸.png'),
           nodeKind:config.nodeKind.uninstallKiln,
-          nodeKindName:config.nodeKindName.uninstallKiln,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.uninstallKiln)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -939,10 +1020,10 @@ export default class Process {
       //region 检验模型
       const testImages = [
           {
-            label: config.nodeKindDesc.halfCheck,
+            label: nodeKindList.find(it=>it.kindCode==config.nodeKind.halfCheck)?.gradeKindDesc,
             image:getImg('检查.png'),
             nodeKind:config.nodeKind.halfCheck,
-            nodeKindName:config.nodeKindName.halfCheck,
+            nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.halfCheck)?.kindName,
             flgJobDefect:true,
             flowKind:config.flowKind.middle,
             userKind:config.userKind.product,
@@ -952,10 +1033,10 @@ export default class Process {
             flgUndo:false,
           },
           {
-            label: config.nodeKindDesc.finishCheck,
+            label: nodeKindList.find(it=>it.kindCode==config.nodeKind.finishCheck)?.gradeKindDesc,
             image:getImg('检查.png'),
             nodeKind:config.nodeKind.finishCheck,
-            nodeKindName:config.nodeKindName.finishCheck,
+            nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.finishCheck)?.kindName,
             flgJobDefect:true,
             flowKind:config.flowKind.middle,
             userKind:config.userKind.product,
@@ -989,10 +1070,10 @@ export default class Process {
       //region 特殊模型
       const specialImages = [
         {
-          label: config.nodeKindDesc.recover,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.recover)?.gradeKindDesc,
           image:getImg('回收.png'),
           nodeKind:config.nodeKind.recover,
-          nodeKindName:config.nodeKindName.recover,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.recover)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.middle,
           userKind:config.userKind.product,
@@ -1003,10 +1084,10 @@ export default class Process {
           recycledKind:config.recycledKind.before,
         },
         {
-          label: config.nodeKindDesc.shaping,
+          label: nodeKindList.find(it=>it.kindCode==config.nodeKind.shaping)?.gradeKindDesc,
           image:getImg('马桶.png'),
           nodeKind:config.nodeKind.shaping,
-          nodeKindName:config.nodeKindName.shaping,
+          nodeKindName:nodeKindList.find(it=>it.kindCode==config.nodeKind.shaping)?.kindName,
           flgJobDefect:true,
           flowKind:config.flowKind.start,
           userKind:config.userKind.product,

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

@@ -14,7 +14,7 @@
         <!--    编辑明细    -->
         <BaseIndexButton right-button="process-edit" ref="editDetail" name="editDetail" @click="openNodeModal(currentDetail)"/>
         <!--    流程    -->
-        <BaseIndexButton right-button="process-setting" ref="processSetting" name="processSetting" @click="open($config.routeUrl.process.processSetting)"/>
+        <BaseIndexButton right-button="process-setting" ref="processSetting" name="processSetting"/>
       </template>
       <template #right>
         <!--   新建     -->
@@ -381,7 +381,7 @@ export default {
     this.setCurrentNodeId(undefined)
   },
   mounted() {
-    this.graph = Process.init(this.$refs.graph,false)
+    this.graph = Process.init(this.$refs.graph,null,[],false)
     //注册监听事件
     queryUtil.$on("process-setting-ok",(row)=>{
       this.changeCurrentFlow(row)

+ 109 - 26
src/view/process/process-flow/process-setting.vue

@@ -96,7 +96,13 @@
               </div>
             </Poptip>
             <Tooltip content="节点居中">
-              <Button icon="md-contract" @click="()=>{this.graph.zoomToFit({ maxScale: 1 });this.graph.centerContent(); this.graph.cleanSelection()}"></Button>
+              <Button icon="iconfont iconfont icon-juzhong" @click="()=>{this.graph.centerContent(); this.graph.cleanSelection()}"></Button>
+            </Tooltip>
+            <Tooltip content="适应窗口">
+              <Button icon="md-expand" @click="()=>{this.graph.zoomToFit(); this.graph.cleanSelection()}"></Button>
+            </Tooltip>
+            <Tooltip content="原始比例">
+              <Button icon="iconfont iconfont icon-one2one" @click="()=>{this.graph.zoomToFit({ maxScale: 1 }); this.graph.cleanSelection()}"></Button>
             </Tooltip>
             <Tooltip content="导出PNG">
               <Button icon="md-images" @click="()=>{this.graph.exportPNG('',{padding:50})}"></Button>
@@ -117,6 +123,23 @@
         </Footer>
       </Layout>
     </Layout>
+    <!--  缩放比例  -->
+    <div class="scale">
+      <InputNumber v-model="scaleValue"
+                   :min="scaleMin"
+                   :max="scaleMax"
+                   :step="0.1"
+                   controls-outside
+                   :editable="false"
+                   style="width: 180px"
+                   :formatter="value => `缩放比例:${(value * 100).toFixed(0)}%`"
+                   :parser="value => value.replace('%', '').replace('缩放比例:', '')"
+                   @on-change="(e)=>{this.graph.zoomTo(e)}"
+      ></InputNumber>
+    </div>
+    <!--  小地图  -->
+    <div id="miniMap" ref="miniMap" class="miniMap"/>
+    <!--  弹窗组件  -->
     <transition-group name="fade">
       <!--  节点弹窗  -->
       <NodeModal key="node" v-if="process.nodeModal.display"
@@ -157,6 +180,9 @@ export default {
   },
   data() {
     return {
+      scaleValue: 1,
+      scaleMax: 3,
+      scaleMin: 0.5,
       graph: null,//图形对象
       exportData: undefined,
       importValue: undefined,
@@ -175,10 +201,7 @@ export default {
     this.setProcessEdgeModalDisplay(null)
   },
   mounted() {
-    //创建流程图对象
-    this.graph = Process.init(this.$refs.container)
-    //监听删除节点
-    this.bindDeleteNodes()
+    console.log('mounted')
   },
   computed: {
     ...mapState(['process']),
@@ -186,6 +209,7 @@ export default {
 
   methods: {
     ...mapMutations(['setProcessNodeModalDisplay', 'setProcessEdgeModalDisplay', 'setCurrentNodeId', 'setCurrentEdgeId']),
+
     /**
      * @desc   : 导出json方法
      * @author : 张潇木
@@ -195,6 +219,7 @@ export default {
       // JSON.stringify(data, null, 2): 格式化json数据 方便阅读
       FileSaver.saveAs(new Blob([JSON.stringify(this.graph.toJSON(),null,2)], {type: 'application/json'}), 'flow.json')
     },
+
     /**
      * @desc   : 导入json
      * @author : 张潇木
@@ -234,18 +259,14 @@ export default {
 
       return false
     },
+
     /**
      * @desc   : 获取基础数据
      * @author : 张潇木
      * @date   : 2023/1/31 13:42
      */
     initData() {
-      // 获取数据类别
-      this.excute(this.$service.commonService, this.$service.commonService.getDataKind, {}).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.dataKindList = res.data
-        }
-      })
+
       // 获取产品等级
       this.excute(this.$service.productGradeService, this.$service.productGradeService.selectByCond, {
         flgValid: true,
@@ -291,6 +312,35 @@ export default {
         }
       })
     },
+
+    /**
+     * @desc   : 初始化流程设计器
+     * @author : 张潇木
+     * @date   : 2023/7/14 16:22
+     */
+    initGraph(){
+      //创建流程图对象
+      this.graph = Process.init(this.$refs.container,this.$refs.miniMap,this.dataKindList.filter(it=>it.kindType===this.$config.dataKind.nodeKind))
+      //监听删除节点
+      this.bindDeleteNodes()
+      //监听画布缩放
+      this.bindGraphScale()
+      //初始化数据
+      this.graph.fromJSON(this.formData.flowLayout || { cells: [] })
+      //再重新渲染群组大小
+      this.graph.getNodes().filter(it => it.shape == 'groupNode').forEach((it) => {
+        // console.log('group-data',it.getData())
+        //解构
+        let { isCollapsed, expandSize } = it.getData()
+        //设置展开大小
+        it.setExpandSize(expandSize)
+        //如果不是收起的,展开并还原大小
+        if (!isCollapsed) {
+          it.toggleCollapse(isCollapsed)
+        }
+      })
+    },
+
     /**
      * @desc   : 提交保存
      * @author : 张潇木
@@ -324,6 +374,7 @@ export default {
         }
       })
     },
+
     /**
      * @desc   : 校验数据
      * @author : 张潇木
@@ -415,6 +466,18 @@ export default {
         }
       })
     },
+
+    /**
+     * @desc   : 监听画布缩放
+     * @author : 张潇木
+     * @date   : 2023/7/14 10:42
+     */
+    bindGraphScale() {
+      this.graph.on('scale', ({ sx, sy, ox, oy }) => {
+        this.scaleValue=sx
+      })
+    },
+
     /**
      * @desc   : 查询明细
      * @author : 张潇木
@@ -423,29 +486,25 @@ export default {
     detail(id) {
       return this.excuteNoParam(this.$service.processService, this.$service.processService.selectById, [id], false)
     },
+
     /**
-     * @desc   : 初始化
+     * @desc   : formData赋值
      * @author : 张潇木
      * @date   : 2023/2/7 8:50
      */
     setValuesByEdit(data) {
       this.formData = data
-      //初始化数据
-      this.graph.fromJSON(this.formData.flowLayout || { cells: [] })
-      //再重新渲染群组大小
-      this.graph.getNodes().filter(it => it.shape == 'groupNode').forEach((it) => {
-        // console.log('group-data',it.getData())
-        //解构
-        let { isCollapsed, expandSize } = it.getData()
-        //设置展开大小
-        it.setExpandSize(expandSize)
-        //如果不是收起的,展开并还原大小
-        if (!isCollapsed) {
-          it.toggleCollapse(isCollapsed)
+      // 获取数据类别
+      this.excute(this.$service.commonService, this.$service.commonService.getDataKind, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.dataKindList = res.data
+          //图形的初始化依赖于数据种类,需要根据DB变化名称等信息
+          this.initGraph();
         }
       })
     },
-  }
+  },
+
 }
 </script>
 <style scoped>
@@ -453,12 +512,12 @@ export default {
   display: flex;
   border: 1px solid #dfe3e8;
 }
-
 #stencil {
   width: 180px;
   height: 100%;
   position: relative;
   border-right: 1px solid #dfe3e8;
+  background-color: #f5f5f5;
 }
 
 #graph-container {
@@ -575,9 +634,15 @@ export default {
   border: none!important;
   outline:none!important;  /*去除点击时的蓝色边框*/
   box-shadow:none!important; /*同时去除阴影的蓝色边框*/
+  background: #F5F5F5;
   /*border-radius:0px!important;*/
 }
 
+/deep/ .iconfont{
+  font-size: 28px!important;
+  /*font-weight: bold;*/
+}
+
 /deep/ .ivu-tooltip{
   height: 48px!important;
 }
@@ -638,6 +703,24 @@ export default {
 .tools{
   background: #F2F7FA;
 }
+.scale{
+  position: absolute;
+  right: 30px;
+  top: 30px
+}
+/deep/ .scale .ivu-input-number-controls-outside-btn i {
+  font-size: 18px;
+  font-weight: bold;
+}
+/deep/ .scale .ivu-input-number-input{
+  text-align: center!important;
+}
+.miniMap{
+  position: absolute;
+  bottom: 100px;
+  right: 30px
+}
+
 </style>
 
 

+ 9 - 8
src/view/report/code-change-report/index.vue

@@ -67,6 +67,15 @@ export default {
     let self = this
     return {
       searchContent: [
+        //成型标签
+        {
+          itemCode: 'moldlineTags',
+          itemName: 'moldlineTags',
+          valueFormat: {code: 'moldlineTags'},
+          valueKind: self.$config.docUserInput.mSearch,
+          magnifierType: self.$config.MagnifierType.dictionaryData,
+          otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+        },
         {
           itemCode: 'pdtBarcode',//原产品条码
           itemName: 'oldPdtCode',//原产品条码
@@ -79,14 +88,6 @@ export default {
           valueFormat: {code: 'hisTime', default: [new Date().toDateStr(), new Date().toDateStr()]},
           valueKind: 'DATE_RANGE'
         },
-        {
-          itemCode: 'moldlineTags',
-          itemName: 'moldlineTags',
-          valueFormat: {code: 'moldlineTags'},
-          valueKind: self.$config.docUserInput.mSearch,
-          magnifierType: self.$config.MagnifierType.dictionaryData,
-          otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-        },
       ],
       formData: {},
     }

+ 7 - 6
src/view/report/custom-report/form.vue

@@ -648,9 +648,10 @@ export default {
     handleCellClick(e) {
       // 如果是日期多选打开设置界面
       if (e.$event.pointerType === 'mouse' && e.column.field === 'defaultValue' && e.row
-        && (e.row.kind === this.$config.reportKind.dateRange || e.row.kind === this.$config.reportKind.month)) {
+        && (e.row.kind === this.$config.reportKind.dateRange || e.row.kind === this.$config.reportKind.month
+          || e.row.kind === this.$config.reportKind.monthRange)) {
         // 月份用月份的数据源
-        if (e.row.kind === this.$config.reportKind.month) {
+        if (e.row.kind === this.$config.reportKind.month || e.row.kind === this.$config.reportKind.monthRange) {
           this.rangeSelList = this.$config.rangeSelMonthList;
         }
         this.settingDateRangeDefaultModal = true;
@@ -1513,7 +1514,8 @@ export default {
           it.otherCondition = null;
         }
         if (it.kind === this.$config.reportKind.dateRange
-          || it.kind === this.$config.reportKind.month) {
+          || it.kind === this.$config.reportKind.month
+          || it.kind === this.$config.reportKind.monthRange) {
           if (it['defaultValue_Info'] && it['defaultValue_Info'].rangeSel) {
             it.defaultValue = {...it['defaultValue_Info']}
             delete it['defaultValue_Info']
@@ -1535,9 +1537,8 @@ export default {
       params.conditionDeleteList = this.$refs['conditionTable'].getDeleteData();
       if (params.conditionDeleteList && params.conditionDeleteList.length > 0) {
         params.conditionDeleteList.forEach(it => {
-          if (it.defaultValue == '') {
-            it.defaultValue = null
-          }
+          // 默认值都置空
+          it.defaultValue = null
         })
       }
       // sql

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

@@ -299,7 +299,7 @@ export default {
       //   this.$Message.warning(this.$t('W_135'))
       //   return
       // }
-      return this.handleLink(Object.assign(rows[0], {url: '/report/custom-report/report/custom-report-detail-' + rows[0].reportId}))
+      return this.handleLink(Object.assign(rows[0], {url: '/report/custom-report/report/custom-report-detail-preview-' + rows[0].reportId}))
     },
     /**
      * @desc   : 查看sql

+ 47 - 0
src/view/report/custom-report/report.vue

@@ -764,6 +764,11 @@ export default {
             if (it.defaultValue && it.defaultValue.rangeSel) {
               item.valueFormat.default = this.handleMonthDefault(it.defaultValue)
             }
+          } else if (it.kind === this.$config.reportKind.monthRange) {
+            // 月份范围
+            if (it.defaultValue && it.defaultValue.rangeSel) {
+              item.valueFormat.default = this.handleMonthRangeDefault(it.defaultValue)
+            }
           } else if (it.kind === this.$config.reportKind.mSearch ||
             it.kind === this.$config.reportKind.sSearch) {
             // 类型
@@ -884,6 +889,46 @@ export default {
       return value;
     },
     /**
+     * @desc   : 处理月份范围的默认值
+     * @author : 周兴
+     * @date   : 2023/5/25 8:39
+     */
+    handleMonthRangeDefault(defaultValue) {
+      let value = null;
+      let values = [];
+      let now = new Date();
+      switch (defaultValue.rangeSel) {
+        // 本月
+        case this.$config.rangeSel.thisMonth.value:
+          value = now.toYearMonth2();
+          values = [value, value];
+          break;
+        // 近一月
+        case this.$config.rangeSel.nearlyMonth.value:
+          now = now.addMonths(-1);
+          value = now.toYearMonth2();
+          values = [value, now.toYearMonth2()];
+          break;
+        // 上一月
+        case this.$config.rangeSel.beforeMonth.value:
+          let beforeMonth = now.addMonths(-1);
+          value = beforeMonth.toYearMonth2();
+          values = [value, value];
+          break;
+        // 自定义
+        case this.$config.rangeSel.custom.value:
+          let beforeDayCustom = now;
+          // 间隔月份
+          if (defaultValue.intervalMonth) {
+            beforeDayCustom = beforeDayCustom.addMonths(-1 * defaultValue.intervalMonth)
+          }
+          value = beforeDayCustom;
+          values = [value.toYearMonth2(),now.toYearMonth2()]
+          break;
+      }
+      return values;
+    },
+    /**
      * @desc   : 处理报表的类型
      * @author : 周兴
      * @date   : 2023/4/20 8:53
@@ -900,6 +945,8 @@ export default {
         valueKind = this.$config.docUserInput.dateRange
       } else if (kind === this.$config.reportKind.month) {
         valueKind = this.$config.docUserInput.month
+      } else if (kind === this.$config.reportKind.monthRange) {
+        valueKind = this.$config.docUserInput.monthRange
       } else if (kind === this.$config.reportKind.mSearch) {
         valueKind = this.$config.docUserInput.mSearch
       } else if (kind === this.$config.reportKind.sSearch) {

+ 9 - 8
src/view/report/delivery-blank/index.vue

@@ -81,6 +81,15 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.moldline
           },
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+          },
           //产品分类
           {
             itemCode: 'productCategoryName',
@@ -123,14 +132,6 @@ export default {
             valueFormat: {code: 'renderMTime'},
             valueKind: 'DATE_RANGE',
           },
-          {
-            itemCode: 'moldlineTags',
-            itemName: 'moldlineTags',
-            valueFormat: {code: 'moldlineTags'},
-            valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.dictionaryData,
-            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-          },
         ],
       // 表单
       formData: {},

+ 15 - 9
src/view/report/in-product-report/index.vue

@@ -72,6 +72,7 @@ export default {
     return {
       searchContent:
         [
+          //工艺流程
          {
            itemCode: 'processFlow',
            valueFormat: {code: 'flowId'},
@@ -85,7 +86,15 @@ export default {
             valueFormat: {code: 'moldlineId'},
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.moldline
-
+          },
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
           },
           //产品分类
           {
@@ -103,6 +112,7 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.product
           },
+          //生产工号
           {
             itemCode: 'opnUserCode',
             valueFormat: {code: 'userId'},
@@ -110,29 +120,25 @@ export default {
             magnifierType: self.$config.MagnifierType.workUser,
             otherCondition : {userType: self.$config.userType.workTeam}
           },
+          //完成工序
           {
             itemCode: 'appCompleteTheProcess',
             valueFormat: {code: 'nodeId'},
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.processNode
           },
+          //产品条码
           {
             itemCode: 'pdtBarcode',
             valueFormat: {code: 'pdtUniqueCode'},
           },
+          //交胚时间
           {
             itemCode: 'renderMTime',
             valueFormat: {code: 'renderMTime'},
             valueKind: 'DATE_RANGE',
           },
-          {
-            itemCode: 'moldlineTags',
-            itemName: 'moldlineTags',
-            valueFormat: {code: 'moldlineTags'},
-            valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.dictionaryData,
-            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-          },
+
         ],
       // 表单
       formData: {},

+ 8 - 7
src/view/report/missed-scan-report/index.vue

@@ -101,13 +101,7 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.product
           },
-          //操作时间
-          {
-            itemCode: 'operationTime',
-            itemName: 'inspectMissTime',
-            valueFormat: {code: 'opnTime'},
-            valueKind: 'DATE_RANGE',
-          },
+          //成型标签
           {
             itemCode: 'moldlineTags',
             itemName: 'moldlineTags',
@@ -116,6 +110,13 @@ export default {
             magnifierType: self.$config.MagnifierType.dictionaryData,
             otherCondition:{dictCode:self.$config.dictType.moldlineTag}
           },
+          //操作时间
+          {
+            itemCode: 'operationTime',
+            itemName: 'inspectMissTime',
+            valueFormat: {code: 'opnTime'},
+            valueKind: 'DATE_RANGE',
+          },
         ],
       // 表单
       formData: {},

+ 9 - 0
src/view/report/molding-record-report/index.vue

@@ -119,6 +119,15 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.moldline
           },
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+          },
           //分组序号
           {
             itemCode: 'groupNo',

+ 15 - 14
src/view/report/process-output/index.vue

@@ -81,6 +81,15 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.processNode
           },
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+          },
           //产品分类
           {
             itemCode: 'productCategoryName',
@@ -111,20 +120,6 @@ export default {
             valueKind: self.$config.docUserInput.sSearch,
             magnifierType: self.$config.MagnifierType.product,
           },
-          //操作时间
-          {
-            itemCode: 'operationTime',
-            valueFormat: {code: 'opnTime'},
-            valueKind: 'DATE_RANGE',
-          },
-          {
-            itemCode: 'moldlineTags',
-            itemName: 'moldlineTags',
-            valueFormat: {code: 'moldlineTags'},
-            valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.dictionaryData,
-            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-          },
           //实验标识
           {
             itemCode: 'flgExperimentList',
@@ -138,6 +133,12 @@ export default {
             },
             valueKind: self.$config.docUserInput.mChoice
           },
+          //操作时间
+          {
+            itemCode: 'operationTime',
+            valueFormat: {code: 'opnTime'},
+            valueKind: 'DATE_RANGE',
+          },
         ],
       // 表单
       formData: {},

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

@@ -28,6 +28,7 @@
                :choose-flag="false"
                @current-change="currentChangeEvent($event)"
                name="table">
+        <DkTableColumn field="moldlineTagNames" ></DkTableColumn>
         <DkTableColumn field="pdtUniqueCode" :title="$t('pdtBarcode')" ></DkTableColumn>
 <!--        <DkTableColumn field="modelCode" :title="$t('productCode')"></DkTableColumn>-->
 <!--        <DkTableColumn field="modelName" :title="$t('productName')"></DkTableColumn>-->

+ 15 - 8
src/view/report/product-report/index.vue

@@ -73,18 +73,30 @@ export default {
     return {
       searchContent:
         [
+          //工艺流程
           {
             itemCode: 'processFlow',
             valueFormat: {code: 'flowId'},
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.processFlow
           },
+          //成型线编号
           {
             itemCode: 'moldLineCode',
             valueFormat: {code: 'moldlineId'},
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.moldline
           },
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+          },
+          //产品型号
           {
             itemCode: 'appProductName',
             itemName: self.$t('pdtModelCode'),
@@ -92,28 +104,23 @@ export default {
             valueKind: self.$config.docUserInput.mSearch,
             magnifierType: self.$config.MagnifierType.product
           },
+          //产品条码
           {
             itemCode: 'pdtBarcode',
             valueFormat: {code: 'pdtUniqueCode'},
           },
+          //完成时间
           {
             itemCode: 'finishTime',
             valueFormat: {code: 'finishTime'},
             valueKind: 'DATE_RANGE',
           },
+          //成型日期
           {
             itemCode: 'moldingDate',
             valueFormat: {code: 'moldingDate'},
             valueKind: 'DATE_RANGE',
           },
-          {
-            itemCode: 'moldlineTags',
-            itemName: 'moldlineTags',
-            valueFormat: {code: 'moldlineTags'},
-            valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.dictionaryData,
-            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-          },
         ],
       // 表单
       formData: {},

+ 9 - 8
src/view/report/production-report/index.vue

@@ -59,6 +59,15 @@ export default {
     return {
       searchContent:
         [
+          //成型标签
+          {
+            itemCode: 'moldlineTags',
+            itemName: 'moldlineTags',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
+          },
           //产品条码
           {
             itemCode: 'pdtBarcode',
@@ -94,14 +103,6 @@ export default {
             valueFormat: {code: 'makeDate', default: [new Date().toDateStr(), new Date().toDateStr()]},
             valueKind: 'DATE_RANGE',
           },
-          {
-            itemCode: 'moldlineTags',
-            itemName: 'moldlineTags',
-            valueFormat: {code: 'moldlineTags'},
-            valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.dictionaryData,
-            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
-          },
         ],
       // 表单
       formData: {},

Некоторые файлы не были показаны из-за большого количества измененных файлов