Parcourir la source

Merge remote-tracking branch 'origin/master'

wangyingjie il y a 3 ans
Parent
commit
09fbf54a60
33 fichiers modifiés avec 2730 ajouts et 118 suppressions
  1. 5 1
      package.json
  2. 4 0
      src/api/pages/common/common.js
  3. BIN
      src/assets/images/app-image/in_process_inventory_list.png
  4. 130 0
      src/components/base/dk-perspective/data.js
  5. 518 0
      src/components/base/dk-perspective/dk-perspective.vue
  6. 21 0
      src/components/base/dk-perspective/index.js
  7. 217 0
      src/components/base/dk-pivot/FieldLabel.vue
  8. 19 0
      src/components/base/dk-pivot/HashTable.js
  9. 640 0
      src/components/base/dk-pivot/dk-pivot.vue
  10. 2 0
      src/components/base/dk-pivot/index.js
  11. 37 6
      src/components/base/dk-table/dk-table.vue
  12. 1 1
      src/components/base/input-number-pop/input-number-pop.vue
  13. 0 2
      src/components/business/process/node-modal/node-modal.vue
  14. 54 0
      src/components/business/table-select/table-select.vue
  15. 1 0
      src/config/index.js
  16. 21 0
      src/libs/update-columns/index.js
  17. 5 0
      src/locale/lang/zh-CN.js
  18. 9 1
      src/main.js
  19. 375 0
      src/view-app/app/prod-management/in-process-inventory-list/detail.vue
  20. 375 0
      src/view-app/app/prod-management/in-process-inventory-list/index.vue
  21. 1 1
      src/view/mst/busobj/index.vue
  22. 10 1
      src/view/pdm/data-collection/climbKiln-add.vue
  23. 10 2
      src/view/pdm/data-collection/finishCheck-add.vue
  24. 178 97
      src/view/pdm/data-collection/halfCheck-add.vue
  25. 9 1
      src/view/pdm/data-collection/inKiln-add.vue
  26. 9 1
      src/view/pdm/data-collection/outKiln-add.vue
  27. 9 2
      src/view/pdm/data-collection/recover-add.vue
  28. 9 1
      src/view/pdm/data-collection/register-add.vue
  29. 9 1
      src/view/pdm/data-collection/uninstallKiln-add.vue
  30. 13 0
      src/view/pdm/process_node_reverse/index.vue
  31. 13 0
      src/view/pdm/prod-defect/index.vue
  32. 13 0
      src/view/pdm/prod_carryover/index.vue
  33. 13 0
      src/view/pdm/prod_check/index.vue

+ 5 - 1
package.json

@@ -90,6 +90,9 @@
     "babel-plugin-import": "^1.13.0",
     "chai": "^4.3.7",
     "eslint-plugin-cypress": "^2.0.1",
+    "javascript-natural-sort": "^0.7.1",
+    "flag-icon-css": "^3.4.6",
+    "friendly-errors-webpack-plugin": "^1.7.0",
     "less": "^2.7.3",
     "less-loader": "^4.0.5",
     "lint-staged": "^6.0.0",
@@ -99,7 +102,8 @@
     "vue-awesome-swiper": "^4.1.1",
     "vue-svg-icon": "^1.2.9",
     "vue-template-compiler": "^2.7.14",
-    "xml-loader": "^1.2.1"
+    "xml-loader": "^1.2.1",
+    "bootstrap": "^4.3.1"
   },
   "browserslist": [
     "> 1%",

+ 4 - 0
src/api/pages/common/common.js

@@ -127,6 +127,10 @@ export default {
     getLabelPrinter:'get_label_printer',
     //查询打印模板
     getLabelPrintLayout:'get_label_print_layout',
+    //生产查询工种
+    getJobByPage: 'get_job_by_page',
+    //生产查询员工
+    getTeamStaff: 'get_team_staff',
   },
   appCommonService: {
     prefix: 'mdm-server/app/mst/common/',

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


+ 130 - 0
src/components/base/dk-perspective/data.js

@@ -0,0 +1,130 @@
+export default [
+  {"country": "United States", "year": 2010, "gender": "male", "count": 153295220, score: 100},
+  {"country": "United States", "year": 2010, "gender": "female", "count": 156588400, score: 100},
+  {"country": "United States", "year": 2011, "gender": "male", "count": 154591960, score: 100},
+  {"country": "United States", "year": 2011, "gender": "female", "count": 157800200, score: 100},
+  {"country": "United States", "year": 2012, "gender": "male", "count": 155851840, score: 100},
+  {"country": "United States", "year": 2012, "gender": "female", "count": 158944800, score: 100},
+  {"country": "China", "year": 2010, "gender": "male", "count": 690256342, score: 100},
+  {"country": "China", "year": 2010, "gender": "female", "count": 650712406, score: 100},
+  {"country": "China", "year": 2011, "gender": "male", "count": 694106441, score: 100},
+  {"country": "China", "year": 2011, "gender": "female", "count": 654068030, score: 100},
+  {"country": "China", "year": 2012, "gender": "male", "count": 697964288, score: 100},
+  {"country": "China", "year": 2012, "gender": "female", "count": 657422649, score: 100},
+  {"country": "China", "year": 2013, "gender": "male", "count": 701775013,score:100},
+  {"country": "China", "year": 2013, "gender": "female", "count": 660739286,score:100},
+  {"country": "China", "year": 2014, "gender": "male", "count": 705465988,score:100},
+  {"country": "China", "year": 2014, "gender": "female", "count": 663969676,score:100},
+  // {"country": "China", "year": 2015, "gender": "male", "count": 708977128,score:100},
+  // {"country": "China", "year": 2015, "gender": "female", "count": 667071829,score:100},
+  // {"country": "China", "year": 2016, "gender": "male", "count": 712290052,score:100},
+  // {"country": "China", "year": 2016, "gender": "female", "count": 670033273,score:100},
+  // {"country": "China", "year": 2017, "gender": "male", "count": 715392990,score:100},
+  // {"country": "China", "year": 2017, "gender": "female", "count": 672839688,score:100},
+  // {"country": "China", "year": 2018, "gender": "male", "count": 718240829,score:100},
+  // {"country": "China", "year": 2018, "gender": "female", "count": 675445659,score:100},
+  {"country": "India", "year": 2010, "gender": "male", "count": 638354751, score: 100},
+  {"country": "India", "year": 2010, "gender": "female", "count": 592629727, score: 100},
+  {"country": "India", "year": 2011, "gender": "male", "count": 646873890, score: 100},
+  {"country": "India", "year": 2011, "gender": "female", "count": 600572093, score: 100},
+  {"country": "India", "year": 2012, "gender": "male", "count": 655193693, score: 100},
+  {"country": "India", "year": 2012, "gender": "female", "count": 608395922, score: 100},
+  {"country": "France", "year": 2010, "gender": "male", "count": 30675773, score: 100},
+  {"country": "France", "year": 2010, "gender": "female", "count": 32285363, score: 100},
+  {"country": "France", "year": 2011, "gender": "male", "count": 30815839, score: 100},
+  {"country": "France", "year": 2011, "gender": "female", "count": 32452566, score: 100},
+  {"country": "France", "year": 2012, "gender": "male", "count": 30948916, score: 100},
+  {"country": "France", "year": 2012, "gender": "female", "count": 32612882, score: 100},
+  {"country": "Australia", "year": 2010, "gender": "male", "count": 11124254, score: 100},
+  {"country": "Australia", "year": 2010, "gender": "female", "count": 11218144, score: 100},
+  {"country": "Australia", "year": 2011, "gender": "male", "count": 11260747, score: 100},
+  {"country": "Australia", "year": 2011, "gender": "female", "count": 11359807, score: 100},
+  {"country": "Australia", "year": 2012, "gender": "male", "count": 11280804, score: 100},
+  {"country": "Australia", "year": 2012, "gender": "female", "count": 11402769},
+
+  // {"country": "United States1", "year": 2010, "gender": "male", "count": 153295220, score: 100},
+  // {"country": "United States1", "year": 2010, "gender": "female", "count": 156588400, score: 100},
+  // {"country": "United States1", "year": 2011, "gender": "male", "count": 154591960, score: 100},
+  // {"country": "United States1", "year": 2011, "gender": "female", "count": 157800200, score: 100},
+  // {"country": "United States1", "year": 2012, "gender": "male", "count": 155851840, score: 100},
+  // {"country": "United States1", "year": 2012, "gender": "female", "count": 158944800, score: 100},
+  // {"country": "China1", "year": 2010, "gender": "male", "count": 690256342, score: 100},
+  // {"country": "China1", "year": 2010, "gender": "female", "count": 650712406, score: 100},
+  // {"country": "China1", "year": 2011, "gender": "male", "count": 694106441, score: 100},
+  // {"country": "China1", "year": 2011, "gender": "female", "count": 654068030, score: 100},
+  // {"country": "China1", "year": 2012, "gender": "male", "count": 697964288, score: 100},
+  // {"country": "China1", "year": 2012, "gender": "female", "count": 657422649, score: 100},
+  // {"country": "China1", "year": 2013, "gender": "male", "count": 701775013,score:100},
+  // {"country": "China1", "year": 2013, "gender": "female", "count": 660739286,score:100},
+  // {"country": "China1", "year": 2014, "gender": "male", "count": 705465988,score:100},
+  // {"country": "China1", "year": 2014, "gender": "female", "count": 663969676,score:100},
+  // {"country": "China1", "year": 2015, "gender": "male", "count": 708977128,score:100},
+  // {"country": "China1", "year": 2015, "gender": "female", "count": 667071829,score:100},
+  // {"country": "China1", "year": 2016, "gender": "male", "count": 712290052,score:100},
+  // {"country": "China1", "year": 2016, "gender": "female", "count": 670033273,score:100},
+  // {"country": "China1", "year": 2017, "gender": "male", "count": 715392990,score:100},
+  // {"country": "China1", "year": 2017, "gender": "female", "count": 672839688,score:100},
+  // {"country": "China1", "year": 2018, "gender": "male", "count": 718240829,score:100},
+  // {"country": "China1", "year": 2018, "gender": "female", "count": 675445659,score:100},
+  // {"country": "India1", "year": 2010, "gender": "male", "count": 638354751, score: 100},
+  // {"country": "India1", "year": 2010, "gender": "female", "count": 592629727, score: 100},
+  // {"country": "India1", "year": 2011, "gender": "male", "count": 646873890, score: 100},
+  // {"country": "India1", "year": 2011, "gender": "female", "count": 600572093, score: 100},
+  // {"country": "India1", "year": 2012, "gender": "male", "count": 655193693, score: 100},
+  // {"country": "India1", "year": 2012, "gender": "female", "count": 608395922, score: 100},
+  // {"country": "France1", "year": 2010, "gender": "male", "count": 30675773, score: 100},
+  // {"country": "France1", "year": 2010, "gender": "female", "count": 32285363, score: 100},
+  // {"country": "France1", "year": 2011, "gender": "male", "count": 30815839, score: 100},
+  // {"country": "France1", "year": 2011, "gender": "female", "count": 32452566, score: 100},
+  // {"country": "France1", "year": 2012, "gender": "male", "count": 30948916, score: 100},
+  // {"country": "France1", "year": 2012, "gender": "female", "count": 32612882, score: 100},
+  // {"country": "Australia1", "year": 2010, "gender": "male", "count": 11124254, score: 100},
+  // {"country": "Australia1", "year": 2010, "gender": "female", "count": 11218144, score: 100},
+  // {"country": "Australia1", "year": 2011, "gender": "male", "count": 11260747, score: 100},
+  // {"country": "Australia1", "year": 2011, "gender": "female", "count": 11359807, score: 100},
+  // {"country": "Australia1", "year": 2012, "gender": "male", "count": 11280804, score: 100},
+  // {"country": "Australia1", "year": 2012, "gender": "female", "count": 11402769},
+  //
+  // {"country": "United States2", "year": 2010, "gender": "male", "count": 153295220, score: 100},
+  // {"country": "United States2", "year": 2010, "gender": "female", "count": 156588400, score: 100},
+  // {"country": "United States2", "year": 2011, "gender": "male", "count": 154591960, score: 100},
+  // {"country": "United States2", "year": 2011, "gender": "female", "count": 157800200, score: 100},
+  // {"country": "United States2", "year": 2012, "gender": "male", "count": 155851840, score: 100},
+  // {"country": "United States2", "year": 2012, "gender": "female", "count": 158944800, score: 100},
+  // {"country": "China2", "year": 2010, "gender": "male", "count": 690256342, score: 100},
+  // {"country": "China2", "year": 2010, "gender": "female", "count": 650712406, score: 100},
+  // {"country": "China2", "year": 2011, "gender": "male", "count": 694106441, score: 100},
+  // {"country": "China2", "year": 2011, "gender": "female", "count": 654068030, score: 100},
+  // {"country": "China2", "year": 2012, "gender": "male", "count": 697964288, score: 100},
+  // {"country": "China2", "year": 2012, "gender": "female", "count": 657422649, score: 100},
+  // {"country": "China2", "year": 2013, "gender": "male", "count": 701775013,score:100},
+  // {"country": "China2", "year": 2013, "gender": "female", "count": 660739286,score:100},
+  // {"country": "China2", "year": 2014, "gender": "male", "count": 705465988,score:100},
+  // {"country": "China2", "year": 2014, "gender": "female", "count": 663969676,score:100},
+  // {"country": "China2", "year": 2015, "gender": "male", "count": 708977128,score:100},
+  // {"country": "China2", "year": 2015, "gender": "female", "count": 667071829,score:100},
+  // {"country": "China2", "year": 2016, "gender": "male", "count": 712290052,score:100},
+  // {"country": "China2", "year": 2016, "gender": "female", "count": 670033273,score:100},
+  // {"country": "China2", "year": 2017, "gender": "male", "count": 715392990,score:100},
+  // {"country": "China2", "year": 2017, "gender": "female", "count": 672839688,score:100},
+  // {"country": "China2", "year": 2018, "gender": "male", "count": 718240829,score:100},
+  // {"country": "China2", "year": 2018, "gender": "female", "count": 675445659,score:100},
+  // {"country": "India2", "year": 2010, "gender": "male", "count": 638354751, score: 100},
+  // {"country": "India2", "year": 2010, "gender": "female", "count": 592629727, score: 100},
+  // {"country": "India2", "year": 2011, "gender": "male", "count": 646873890, score: 100},
+  // {"country": "India2", "year": 2011, "gender": "female", "count": 600572093, score: 100},
+  // {"country": "India2", "year": 2012, "gender": "male", "count": 655193693, score: 100},
+  // {"country": "India2", "year": 2012, "gender": "female", "count": 608395922, score: 100},
+  // {"country": "France2", "year": 2010, "gender": "male", "count": 30675773, score: 100},
+  // {"country": "France2", "year": 2010, "gender": "female", "count": 32285363, score: 100},
+  // {"country": "France2", "year": 2011, "gender": "male", "count": 30815839, score: 100},
+  // {"country": "France2", "year": 2011, "gender": "female", "count": 32452566, score: 100},
+  // {"country": "France2", "year": 2012, "gender": "male", "count": 30948916, score: 100},
+  // {"country": "France2", "year": 2012, "gender": "female", "count": 32612882, score: 100},
+  // {"country": "Australia2", "year": 2010, "gender": "male", "count": 11124254, score: 100},
+  // {"country": "Australia2", "year": 2010, "gender": "female", "count": 11218144, score: 100},
+  // {"country": "Australia2", "year": 2011, "gender": "male", "count": 11260747, score: 100},
+  // {"country": "Australia2", "year": 2011, "gender": "female", "count": 11359807, score: 100},
+  // {"country": "Australia2", "year": 2012, "gender": "male", "count": 11280804, score: 100},
+  // {"country": "Australia2", "year": 2012, "gender": "female", "count": 11402769},
+]

+ 518 - 0
src/components/base/dk-perspective/dk-perspective.vue

@@ -0,0 +1,518 @@
+<!-- @desc:透视表  @auth:周兴  @time:2023/3/18 17:21 -->
+<template>
+  <DkModal
+    :title="title"
+    v-model="visible"
+    :mask-closable="false"
+    :mask="false"
+    :closable="false"
+    draggable
+    sticky
+    fullscreen
+    :autoClearFlag="false"
+    @modalOk="modalOk"
+    @modalCancel="modalCancel">
+    <DkButton @click="handleConfirm">{{ vm.$t('confirm') }}</DkButton>
+    <DkPivot
+      :data="asyncData"
+      :fields="fields"
+      :available-field-keys="availableFieldKeys"
+      :row-field-keys="rowFieldKeys"
+      :col-field-keys="colFieldKeys"
+      :data-field-keys="dataFieldKeys"
+      :reducer="reducer"
+      :default-show-settings="defaultShowSettings"
+    >
+      <template v-slot:value="{ value }">
+        {{ value | number }}
+      </template>
+      <template v-slot:countryFlagHeader="{value }">
+        <span :class="`flag-icon flag-icon-${countryCode(value)}`"></span>
+      </template>
+      <template v-slot:countryNameHeader="{value }">
+        {{ value | capitalize }}
+      </template>
+      <template v-slot:genderHeader="{value }">
+        <svg v-if="value == 'female'" aria-hidden="true" data-prefix="fas" data-icon="venus" role="img"
+             xmlns="http://www.w3.org/2000/svg" viewBox="0 0 288 512" class="svg-inline--fa fa-venus fa-fw">
+          <path fill="currentColor"
+                d="M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z"
+                class=""></path>
+        </svg>
+        <svg v-else-if="value == 'male'" aria-hidden="true" data-prefix="fas" data-icon="mars" role="img"
+             xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="svg-inline--fa fa-mars fa-fw">
+          <path fill="currentColor"
+                d="M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c0-6.6-5.4-12-12-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"
+                class=""></path>
+        </svg>
+        {{ value | capitalize }}
+      </template>
+      <template v-slot:computing>
+        <div class="position-absolute w-100 h-100 text-center" style="z-index: 1;">
+          <div class="position-sticky bg-white d-inline-block mt-5 p-3" style="top: 0;">
+            <svg aria-hidden="true" data-prefix="fas" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg"
+                 viewBox="0 0 512 512" class="svg-inline--fa fa-spinner fa-fw fa-pulse">
+              <path fill="currentColor"
+                    d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"
+                    class=""></path>
+            </svg>
+            Loading table values...
+          </div>
+        </div>
+      </template>
+    </DkPivot>
+    <!--    <DkSplit v-model="split">-->
+    <!--      <div slot="left">-->
+    <!--        <div :height="600" style="display: flex">-->
+    <!--          <DkTable :id="'table-'+$options.name" ref="social" :data="columns"-->
+    <!--                   :height="tableHeight"-->
+    <!--                   :choose-flag="false"-->
+    <!--                   :show-setting-flag="false"-->
+    <!--                   :pageFlag="false">-->
+    <!--            <DkTableColumn field="title" width="auto" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           title="列名"></DkTableColumn>-->
+    <!--            <DkTableColumn field="data" width="60" type="switch" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           :switch-disabled="false"-->
+    <!--                           @on-switch-change="switchChange(Object.assign($event,{switchType:'data'}))"-->
+    <!--                           title="数据"></DkTableColumn>-->
+    <!--            <DkTableColumn field="col" width="60" type="switch" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           :switch-disabled="false"-->
+    <!--                           @on-switch-change="switchChange(Object.assign($event,{switchType:'col'}))"-->
+    <!--                           title="列"></DkTableColumn>-->
+    <!--            <DkTableColumn field="row" width="60" type="switch" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           :switch-disabled="false"-->
+    <!--                           @on-switch-change="switchChange(Object.assign($event,{switchType:'row'}))"-->
+    <!--                           title="行"></DkTableColumn>-->
+    <!--          </DkTable>-->
+    <!--          <DkTable :id="'table-'+$options.name" ref="data" :data="columnsData"-->
+    <!--                   :height="tableHeight"-->
+    <!--                   :choose-flag="false"-->
+    <!--                   :show-setting-flag="false"-->
+    <!--                   :pageFlag="false">-->
+    <!--            <DkTableColumn field="title" width="auto" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           title="列名"></DkTableColumn>-->
+    <!--          </DkTable>-->
+    <!--        </div>-->
+    <!--        <div :height="600" style="display: flex">-->
+    <!--          <DkTable :id="'table-'+$options.name" ref="column" :data="columnsCol"-->
+    <!--                   :height="tableHeight"-->
+    <!--                   :choose-flag="false"-->
+    <!--                   :show-setting-flag="false"-->
+    <!--                   :pageFlag="false">-->
+    <!--            <DkTableColumn field="title" width="auto" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           title="列名"></DkTableColumn>-->
+    <!--          </DkTable>-->
+    <!--          <DkTable :id="'table-'+$options.name" ref="row" :data="columnsRow"-->
+    <!--                   :height="tableHeight"-->
+    <!--                   :choose-flag="false"-->
+    <!--                   :show-setting-flag="false"-->
+    <!--                   :pageFlag="false">-->
+    <!--            <DkTableColumn field="title" width="auto" :filter="false" :freeze="false" :sortable="false"-->
+    <!--                           title="列名"></DkTableColumn>-->
+    <!--          </DkTable>-->
+    <!--        </div>-->
+    <!--      </div>-->
+
+    <!--      <DkTable slot="right" :id="'table-'+$options.name" ref="table-select" :data="tableData"-->
+    <!--               :height="tableHeight"-->
+    <!--               :choose-flag="false"-->
+    <!--               :show-setting-flag="false"-->
+    <!--               :pageFlag="false">-->
+    <!--      </DkTable>-->
+    <!--    </DkSplit>-->
+  </DkModal>
+</template>
+
+<script>
+import {button as buttonList} from "@/locale/lang/zh-CN";
+import data from './data'
+import Sortable from "sortablejs";
+
+export default {
+  name: "dk-perspective",
+  data() {
+    const vm = window.vm;
+    return {
+      documentKeyDownContent: Object,
+      vm: vm,
+      split: 0.5,
+      title: '系统提示',//标题
+      visible: false,//显示控制
+      okFunc: () => {
+      },//确定回调
+      changeFunc: () => {
+      },
+      okText: vm.$t('confirm'),
+      searchText: '', // 查询内容
+      exchangeText: '',// 替换内容
+      options: [],   // 源数据
+      tableData: [],
+      columns: [],
+      columnsData: [],  // 数据列
+      columnsCol: [],  // 列数据
+      columnsRow: [],  // 行数据
+      tableHeight: 400,
+      component: null,
+      equalFlag: false,// 是否单元格匹配
+      sortable: null,
+      sortableData: null,
+      mouseLocation: {},// 鼠标所在位置
+      currentTable: null, // 鼠标拖入的表格
+      asyncData: [],
+
+      // Pivot params
+      fields: [{
+        key: 'country',
+        getter: item => item.country,
+        label: 'Country',
+        headers: [{
+          slotName: 'countryFlagHeader',
+          label: 'Flag',
+          checked: true
+        }, {
+          slotName: 'countryNameHeader',
+          label: 'Name',
+          checked: true
+        }],
+        headerAttributeFilter: true,
+        valueFilter: true
+      }, {
+        key: 'gender',
+        getter: item => item.gender,
+        label: 'Gender',
+        headerSlotName: 'genderHeader',
+        valueFilter: true,
+        valueFilterSlotName: 'genderHeader'
+      }, {
+        key: 'year',
+        getter: item => item.year,
+        label: 'Year',
+        valueFilter: true
+      }, {
+        key: 'count',
+        getter: item => item.count,
+        label: 'count',
+      }, {
+        key: 'score',
+        getter: item => item.score,
+        label: 'score',
+      }],
+      availableFieldKeys: [],
+      rowFieldKeys: ['country', 'gender'],
+      colFieldKeys: ['year'],
+      dataFieldKeys: ['count', 'score'],
+      reducer: (sum, item) => sum + item.count,
+      defaultShowSettings: true,
+      isDataLoading: false,
+
+      // Pivot table standalone field params
+      rowFields: [{
+        getter: item => item.country,
+        label: 'Country',
+        headerSlotNames: ['countryFlagHeader', 'countryNameHeader']
+      }, {
+        getter: item => item.gender,
+        label: 'Gender',
+        headerSlotName: 'genderHeader'
+      }],
+      colFields: [{
+        getter: item => item.year,
+        label: 'Year'
+      }],
+      dataFields: [{
+        getter: item => item.count,
+        label: 'count'
+      }]
+    }
+  },
+  watch: {
+    visible(n, o) {
+      if (!n) {
+        //回复快捷键
+        document.onkeydown = this.documentKeyDownContent;
+      }
+    }
+  },
+  methods: {
+    modalOk() {
+
+    },
+    modalCancel() {
+    },
+    countryCode: function (country) {
+      switch (country) {
+        case 'Australia':
+          return 'au'
+        case 'China':
+          return 'cn'
+        case 'France':
+          return 'fr'
+        case 'India':
+          return 'in'
+        case 'United States':
+          return 'us'
+      }
+    },
+    /**
+     * @desc   : 确定
+     * @author : 周兴
+     * @date   : 2023/3/19 16:44
+     */
+    handleConfirm() {
+
+    },
+    /**
+     * @desc   : 把列加入数据,列和行
+     * @author : 周兴
+     * @date   : 2023/3/19 14:36
+     */
+    switchChange(e) {
+      //开启时,需要关闭其他
+      if (e.checked) {
+        if (e.switchType === 'data') {
+          this.columnsData.push(({title: e.title, field: e.field}))
+          if (e.col) {
+            this.columnsCol = this.columnsCol.filter(it => it.field !== e.field)
+          }
+          if (e.row) {
+            this.columnsRow = this.columnsRow.filter(it => it.field !== e.field)
+          }
+          this.$set(e, 'col', false)
+          this.$set(e, 'row', false)
+        } else if (e.switchType === 'col') {
+          this.columnsCol.push(({title: e.title, field: e.field}))
+          if (e.data) {
+            this.columnsData = this.columnsData.filter(it => it.field !== e.field)
+          }
+          if (e.row) {
+            this.columnsRow = this.columnsRow.filter(it => it.field !== e.field)
+          }
+          this.$set(e, 'data', false)
+          this.$set(e, 'row', false)
+        } else if (e.switchType === 'row') {
+          this.columnsRow.push(({title: e.title, field: e.field}))
+          if (e.data) {
+            this.columnsData = this.columnsData.filter(it => it.field !== e.field)
+          }
+          if (e.col) {
+            this.columnsCol = this.columnsCol.filter(it => it.field !== e.field)
+          }
+          this.$set(e, 'col', false)
+          this.$set(e, 'data', false)
+        }
+      }
+    },
+    /**
+     * @desc   : 判断鼠标在哪个区域位置
+     * @author : 周兴
+     * @date   : 2023/3/18 19:29
+     */
+    checkMouseLocation() {
+      let tableData = this.$refs['data'];
+      let tt = tableData.$el
+      console.log('tt', tt.offsetTop, tt.offsetHeight, tt.offsetLeft, tt.offsetWidth, this.mouseLocation, this.currentTable)
+    },
+    /**
+     * @desc   : 移动行
+     * @author : 周兴
+     * @date   : 2022/12/15 16:28
+     */
+    rowDrop() {
+      this.$nextTick(() => {
+        let xTable = this.$refs['social'];
+        this.sortable = Sortable.create(
+          xTable.$el.querySelector(".body--wrapper>.vxe-table--body tbody"),
+          {
+            handle: ".vxe-body--row",
+            animation: 150,
+            bubbles: false,
+            onMove: (evt, originalEvent) => {
+
+            },
+            onEnd: (event) => {
+              console.log('ddf', event)
+              const {newIndex, oldIndex} = event
+              this.checkMouseLocation();
+              let flag = false;
+              // this.$refs['data'].$el.addEventListener('mouseover',function (e){
+              //   flag = true;
+              //   console.log('ff')
+              // })
+              this.columns.splice(newIndex, 0, this.columns.splice(oldIndex, 1)[0]);
+              let newArray = this.columns.slice(0);
+              this.columns = [];
+              this.$nextTick(function () {
+                this.columns = newArray;
+              });
+            },
+          }
+        );
+        let xTableData = this.$refs['data'];
+        this.sortableData = Sortable.create(
+          xTableData.$el.querySelector(".body--wrapper>.vxe-table--body tbody"),
+          {
+            handle: ".vxe-body--row",
+            animation: 150,
+            onEnd: ({newIndex, oldIndex}) => {
+              // this.columns.splice(newIndex, 0, this.columns.splice(oldIndex, 1)[0]);
+              // let newArray = this.columns.slice(0);
+              // this.columns = [];
+              // this.$nextTick(function () {
+              //   this.columns = newArray;
+              // });
+            },
+          }
+        );
+      });
+    },
+    /**
+     * @desc   : 设置序号的数据源
+     * @author : 周兴
+     * @date   : 2022/12/5 11:38
+     */
+    setDisplayTable() {
+      if (this.columns && this.columns.length > 0) {
+        // for (let i = 0; i < this.columns.length; i++) {
+        //   if (this.columns[i].type == 'checkbox' || this.columns[i].type == 'radio') {
+        //     this.columns[i].label = '选择'
+        //   } else {
+        //     this.columns[i].label = this.columns[i].title
+        //   }
+        // }
+        console.log('333', this.columns)
+      }
+    },
+    /**
+     * @desc   : 获取列
+     * @author : 周兴
+     * @date   : 2023/3/18 18:10
+     */
+    getComponentColumns() {
+      let fields = []
+      // 获取显示的列
+      let tableColumns = this.component.getTableColumn()
+      if (tableColumns && tableColumns.visibleColumn && tableColumns.visibleColumn.length > 0) {
+        tableColumns.visibleColumn.forEach(it => {
+          // 按时不支持数值
+          if (!it.type || (it.type && it.type !== 'select' && it.type !== 'tableSelect' && it.type !== 'checkbox'
+            && it.type !== 'radio' && it.type !== 'number')) {
+            fields.pushNoRepeat(it);
+          }
+        })
+      }
+      this.fields = fields;
+    },
+    /**
+     * @desc   : 监听全局键盘按钮按下的事件
+     * @author : 周兴
+     * @date   : 2022/3/4 16:57
+     */
+    addKeyBoardEvent() {
+      let code = 0
+      let self = this
+      this.documentKeyDownContent = document.onkeydown;
+      document.onkeydown = function (e) {
+        const evn = e || event
+        const key = evn.keyCode || evn.which || evn.charCode
+        // alt:code = 18
+        if (key === 18) {
+          code = 18
+        }
+        let btList = []
+        for (let itKey in buttonList) {
+          if (!buttonList[itKey].includes('(')) {
+            continue
+          }
+          btList.push({
+            name: itKey,
+            hotKey: buttonList[itKey].substring(buttonList[itKey].length - 2, buttonList[itKey].length - 1)
+          })
+        }
+
+        // Q:code = 81 查询
+        btList.forEach(forIt => {
+          if (code === 18 && forIt.hotKey.toLowerCase() === e.key.toLowerCase()) {
+            e.returnValue = false
+            if (self.$refs[forIt.name]) {
+              self.$refs[forIt.name].$el.click()
+            }
+          }
+        })
+      }
+      // 监听全局键盘按钮松开的事件
+      document.onkeyup = function (e) {
+        const evn = e || event
+        const key = evn.keyCode || evn.which || evn.charCode
+        if (key === 18) {
+          code = 0
+        }
+      }
+    },
+  },
+  created() {
+    // Simulate async data loading
+    this.isDataLoading = true
+    setTimeout(() => {
+      this.asyncData = data
+      this.isDataLoading = false
+    }, 3000)
+    this.$nextTick(() => {
+      this.addKeyBoardEvent()   // 增加快捷键
+      let self = this;
+      // window.addEventListener('mouseover', function (e) {
+      //   // console.log('eeee1',e)
+      //   // 获取鼠标实时位置
+      //   self.currentTable = 'data'
+      //   self.mouseLocation = e;
+      // })
+      // window.addEventListener('mouseup', function (e) {
+      //   console.log('eeee2',e)
+      //   // 获取鼠标实时位置
+      //   // self.currentTable = 'data'
+      //   // self.mouseLocation = e;
+      // })
+      // self.$refs.data.$el.addEventListener('mouseenter', function (e) {
+      //   // console.log('eeee1',e)
+      //   // 获取鼠标实时位置
+      //   self.currentTable = 'data'
+      //   // self.mouseLocation = {
+      //   //   x: e.clientX,
+      //   //   y: e.clientY,
+      //   //   screenX:e.screenX,
+      //   //   screenY:e.screenY,
+      //   //   offsetX:e.offsetX,
+      //   //   offsetY:e.offsetY
+      //   // }
+      // })
+      // self.$refs.data.$el.addEventListener('mouseleave', function (e) {
+      //   self.currentTable = null
+      //   console.log('eeee2',e)
+      // })
+    })
+    this.setDisplayTable(); // 获取组件的所有显示列
+  },
+  filters: {
+    number: function (value) {
+      return value.toLocaleString()
+    },
+    capitalize: function (value) {
+      return value.replace(/\b\w/g, l => l.toUpperCase())
+    }
+  },
+  mounted() {
+    // this.rowDrop();   // 行拖拽
+  },
+  beforeDestroy() {
+    if (this.sortable) {
+      this.sortable.destroy();
+    }
+    if (this.sortableData) {
+      this.sortableData.destroy();
+    }
+  },
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 21 - 0
src/components/base/dk-perspective/index.js

@@ -0,0 +1,21 @@
+import Vue from 'vue'
+import Perspective from './dk-perspective.vue'
+
+const messageBox = Vue.extend(Perspective)
+
+Perspective.install = function (options, {ok}) {
+  // if (typeof options === 'object') {
+  //   options = {
+  //     location: options
+  //   }
+  // }
+  let instance = new messageBox({
+    data: Object.assign(options, {okFunc: ok})
+  }).$mount()
+  document.body.appendChild(instance.$el)
+
+  Vue.nextTick(() => {
+    instance.visible = true
+  })
+}
+export default Perspective

+ 217 - 0
src/components/base/dk-pivot/FieldLabel.vue

@@ -0,0 +1,217 @@
+<template>
+  <div>
+    <!-- Label -->
+    <div class="btn-group">
+      <!-- Draggable button -->
+      <button
+        type="button"
+        class="btn btn-draggable"
+        :class="`btn-${variant}`">
+        <div class="d-flex align-items-center">
+          <svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 270 512"
+               class="svg-inline--fa fa-grip-vertical fa-w-10">
+            <path fill="currentColor"
+                  d="M64 208c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zM16 104c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zm0 304c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48z M204 208c26.5 0 48 21.5 48 48s-21.5 48 -48 48 -48 -21.5 -48 -48 21.5 -48 48 -48zM156 104c0 26.5 21.5 48 48 48s48 -21.5 48 -48 -21.5 -48 -48 -48 -48 21.5 -48 48zm0 304c0 26.5 21.5 48 48 48s48 -21.5 48 -48 -21.5 -48 -48 -48 -48 21.5 -48 48z"
+                  class=""></path>
+          </svg>
+          <span style="margin-left: 0.5rem; text-align: left;">
+            <slot v-if="field.labelSlotName" :name="field.labelSlotName">
+              Missing slot <code>{{ field.labelSlotName }}</code>
+            </slot>
+            <template v-else>
+              {{ field.label }}
+            </template>
+          </span>
+        </div>
+      </button>
+
+      <!-- Dropdown button -->
+      <button
+        type="button"
+        class="btn dropdown-toggle-split"
+        :class="`btn-${variant}`"
+        v-if="hasDropdown"
+        @click="toggleShowDropdown(field)">
+        <svg v-if="!showDropdown" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-down"
+             role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"
+             class="svg-inline--fa fa-caret-down fa-w-10">
+          <path fill="currentColor"
+                d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
+                class=""></path>
+        </svg>
+        <svg v-else aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-up" role="img"
+             xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline--fa fa-caret-up fa-w-10">
+          <path fill="currentColor"
+                d="M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"
+                class=""></path>
+        </svg>
+      </button>
+    </div>
+
+    <!-- Settings dropdown -->
+    <div
+      class="field-dropdown-menu"
+      v-if="hasDropdown"
+      v-show="showDropdown">
+      <!-- Headers filter -->
+      <template v-if="field.headerAttributeFilter">
+        <h6 class="dropdown-header">Attributes</h6>
+        <div class="dropdown-list px-4 py-2">
+          <div v-for="(header, index) in field.headers" class="mb-1">
+            <div class="custom-control custom-checkbox">
+              <input
+                type="checkbox"
+                class="custom-control-input"
+                :id="`checkbox-${field.key}-header-${index}`"
+                v-model="header.checked">
+              <label class="custom-control-label" :for="`checkbox-${field.key}-header-${index}`">
+                {{ header.label }}
+              </label>
+            </div>
+          </div>
+        </div>
+      </template>
+
+      <div class="dropdown-divider" v-if="field.headerAttributeFilter && field.valueFilter"></div>
+
+      <!-- Values filter -->
+      <template v-if="field.valueFilter">
+        <h6 class="dropdown-header">Values</h6>
+        <div class="dropdown-item" style="cursor: pointer;" @click="toggleAllValues(!allValuesSelected)">
+          <template v-if="allValuesSelected">
+            {{ unselectAllText }}
+          </template>
+          <template v-else>
+            {{ selectAllText }}
+          </template>
+        </div>
+        <div class="dropdown-list px-4 py-2">
+          <div v-for="(item, index) in fieldValues" class="mb-1">
+            <div class="custom-control custom-checkbox">
+              <input
+                type="checkbox"
+                class="custom-control-input"
+                :id="`checkbox-${field.key}-value-${index}`"
+                v-model="item.checked">
+              <label class="custom-control-label" :for="`checkbox-${field.key}-value-${index}`">
+                <slot v-if="field.valueFilterSlotName" :name="field.valueFilterSlotName" v-bind:value="item.value">
+                  Missing slot <code>{{ field.valueFilterSlotName }}</code>
+                </slot>
+                <template v-else>
+                  {{ item.value }}
+                </template>
+              </label>
+            </div>
+          </div>
+        </div>
+      </template>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  model: {
+    prop: 'fieldValues',
+  },
+  props: {
+    fieldValues: {
+      type: Array
+    },
+    field: {
+      type: Object
+    },
+    variant: {
+      type: String,
+      default: 'primary'
+    },
+    selectAllText: {
+      type: String
+    },
+    unselectAllText: {
+      type: String
+    }
+  },
+  data: function () {
+    return {
+      showDropdown: false
+    }
+  },
+  computed: {
+    hasDropdown: function () {
+      return this.field.headerAttributeFilter && this.field.headers || this.field.valueFilter
+    },
+    allValuesSelected: function () {
+      let allValuesSelected = true
+
+      for (let valueObject of this.fieldValues) {
+        if (!valueObject.checked) {
+          allValuesSelected = false
+          break
+        }
+      }
+
+      return allValuesSelected
+    }
+  },
+  methods: {
+    toggleShowDropdown: function () {
+      this.showDropdown = !this.showDropdown
+    },
+    toggleAllValues: function (target) {
+      this.fieldValues.forEach(valueObject => {
+        valueObject.checked = target
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+/* Grid with gutter */
+.gutter-x-sm, .gutter-sm {
+  margin-left: -.5rem;
+
+  > * {
+    margin-left: .5rem;
+  }
+}
+
+/* Handle icon (mix of grip-vertical & ellipsis-v) */
+.svg-inline--fa.fa-w-10 {
+  width: 0.625em;
+}
+
+.svg-inline--fa {
+  display: inline-block;
+  font-size: inherit;
+  height: 1em;
+  overflow: visible;
+  vertical-align: -.125em;
+}
+
+.btn-draggable {
+  cursor: move !important;
+  z-index: 999;
+  padding-left: 0.5625rem;
+}
+
+.field-dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  float: left;
+  min-width: 200px;
+  padding: 0.5rem 0;
+  margin: 0.125rem 0 0;
+  background-color: #fff;
+  background-clip: padding-box;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+}
+
+.dropdown-list {
+  max-height: 175px;
+  overflow: auto;
+}
+</style>

+ 19 - 0
src/components/base/dk-pivot/HashTable.js

@@ -0,0 +1,19 @@
+export default class HashTable {
+  constructor() {
+    this.values = {}
+  }
+
+  calculateHash(key) {
+    return JSON.stringify(key, Object.keys(key).sort())
+  }
+
+  set(key, value) {
+    const hash = this.calculateHash(key)
+    this.values[hash] = value
+  }
+
+  get(key) {
+    const hash = this.calculateHash(key)
+    return this.values[hash]
+  }
+}

+ 640 - 0
src/components/base/dk-pivot/dk-pivot.vue

@@ -0,0 +1,640 @@
+<template>
+  <div>
+    <!-- Top row -->
+    <div v-if="showSettings" class="d-flex flex-nowrap gutter mb-3">
+      <div class="left-col">
+        <button class="btn btn-primary" @click="toggleShowSettings">
+          {{ hideSettingsText }}
+        </button>
+      </div>
+
+      <!-- Available fields -->
+      <div class="flex-fill drag-area" :class="dragAreaClass">
+        <div class="drag-area-title mb-3">{{ availableFieldsLabelText }}</div>
+        <draggable
+          v-model="internal.availableFieldKeys"
+          class="d-flex flex-row gutter-sm drag-area-zone"
+          group="fields"
+          handle=".btn-draggable"
+          @start="start"
+          @end="end">
+          <div v-for="key in internal.availableFieldKeys" :key="key" class="field">
+            <field-label
+              :field="fieldsWithValues[key]"
+              v-model="fieldValues[key]"
+              :select-all-text="selectAllText"
+              :unselect-all-text="unselectAllText"
+              variant="secondary">
+              <!-- pass down scoped slots -->
+              <template v-for="(_, slot) of $scopedSlots" v-slot:[slot]="scope">
+                <slot :name="slot" v-bind="scope"/>
+              </template>
+            </field-label>
+          </div>
+        </draggable>
+      </div>
+    </div>
+
+    <div v-else class="mb-3">
+      <button class="btn btn-primary" @click="toggleShowSettings">
+        {{ showSettingsText }}
+      </button>
+    </div>
+
+    <div class="d-flex gutter mb-3" v-if="showSettings">
+      <!-- Top left zone - TODO: renderer select menu -->
+      <div class="left-col"></div>
+
+      <!-- Column fields -->
+      <div class="flex-fill drag-area border-primary" :class="dragAreaClass">
+        <div class="drag-area-title mb-3">{{ colsLabelText }}</div>
+        <draggable
+          v-model="internal.colFieldKeys"
+          class="d-flex flex-row gutter-sm drag-area-zone"
+          group="fields"
+          handle=".btn-draggable"
+          @start="start"
+          @end="end">
+          <div v-for="key in internal.colFieldKeys" :key="key" class="field">
+            <field-label
+              :field="fieldsWithValues[key]"
+              v-model="fieldValues[key]"
+              :select-all-text="selectAllText"
+              :unselect-all-text="unselectAllText">
+              <!-- pass down scoped slots -->
+              <template v-for="(_, slot) of $scopedSlots" v-slot:[slot]="scope">
+                <slot :name="slot" v-bind="scope"/>
+              </template>
+            </field-label>
+          </div>
+        </draggable>
+      </div>
+    </div>
+
+    <div class="d-flex flex-nowrap gutter">
+      <!-- Row fields -->
+      <div v-if="showSettings" class="left-col">
+        <div class="drag-area border-primary" :class="dragAreaClass">
+          <div class="drag-area-title mb-3">{{ rowsLabelText }}</div>
+          <draggable
+            v-model="internal.rowFieldKeys"
+            class="d-flex flex-column align-items-start gutter-sm drag-area-zone"
+            group="fields"
+            handle=".btn-draggable"
+            @start="start"
+            @end="end">
+            <div v-for="key in internal.rowFieldKeys" :key="key" class="field">
+              <field-label
+                :field="fieldsWithValues[key]"
+                v-model="fieldValues[key]"
+                :select-all-text="selectAllText"
+                :unselect-all-text="unselectAllText">
+                <!-- pass down scoped slots -->
+                <template v-for="(_, slot) of $scopedSlots" v-slot:[slot]="scope">
+                  <slot :name="slot" v-bind="scope"/>
+                </template>
+              </field-label>
+            </div>
+          </draggable>
+        </div>
+      </div>
+    </div>
+
+    <div class="d-flex flex-nowrap gutter">
+      <!-- data fields -->
+      <div v-if="showSettings" class="left-col">
+        <div class="drag-area border-primary" :class="dragAreaClass">
+          <div class="drag-area-title mb-3">{{ dataLabelText }}</div>
+          <draggable
+            v-model="internal.dataFieldKeys"
+            class="d-flex flex-column align-items-start gutter-sm drag-area-zone"
+            group="fields"
+            handle=".btn-draggable"
+            @start="start"
+            @end="end">
+            <div v-for="key in internal.dataFieldKeys" :key="key" class="field">
+              <field-label
+                :field="fieldsWithValues[key]"
+                v-model="fieldValues[key]"
+                :select-all-text="selectAllText"
+                :unselect-all-text="unselectAllText">
+                <!-- pass down scoped slots -->
+                <template v-for="(_, slot) of $scopedSlots" v-slot:[slot]="scope">
+                  <slot :name="slot" v-bind="scope"/>
+                </template>
+              </field-label>
+            </div>
+          </draggable>
+        </div>
+      </div>
+
+      <!-- Table -->
+      <div class="flex-fill" :style="tableWrapperStyle">
+        {{ colFields }}
+        <DkTable slot="right" :id="'table-'+$options.name" ref="table-select" :data="tableData"
+                 :height="300"
+                 :choose-flag="false"
+                 :show-setting-flag="false"
+                 :pageFlag="false"
+                 :loading="isDataLoading">
+          <!--行维度-->
+          <div v-for="(item,index) in rowFields" :key="index">
+            <DkTableColumn :field="item.key" width="auto" :filter="false"
+                           :freeze="false"
+                           :title="item.label"></DkTableColumn>
+          </div>
+
+          <div v-if="colFields && colFields.length > 0 && colFlag ">
+            <!--列维度(单维度)-->
+            <div v-if="colFields.length === 1 && dataFields.length <= 1">
+              <DkTableColumn v-for="(item,index) in [...colFields[0].valuesFiltered]"
+                             :key="index"
+                             :field="item+''"
+                             width="auto" :filter="false" :freeze="false"
+                             :title="item+''"></DkTableColumn>
+            </div>
+            <!--列维度(多维度)-->
+            <div v-else>
+              <!--顶层-->
+              <vxe-colgroup :title="itemTop+''" v-for="(itemTop,index) in [...colFields[0].valuesFiltered]"
+                            :key="index">
+                <!--中间层-->
+                <div v-if="groupCols && groupCols.length > 0">
+                  <div v-for="(it,gIndex) in groupCols" :key="gIndex">
+                    <vxe-colgroup :title="item+''" v-for="(item,index) in [...groupCols[gIndex].valuesFiltered]"
+                                  :key="index">
+                      <div v-if="gIndex === groupCols.length - 1 && dataFields.length <= 1">
+                        <!--子级(无值列或者一个值列)-->
+                        <DkTableColumn v-for="(cItem,cIndex) in [...colFields[colFields.length - 1].valuesFiltered]"
+                                       :key="cIndex"
+                                       :field="itemTop+'_'"
+                                       width="auto" :filter="false" :freeze="false"
+                                       :title="cItem+''"></DkTableColumn>
+                      </div>
+                      <div v-if="gIndex === groupCols.length - 1 && dataFields.length > 1">
+                        <!--子级(有多个值列)-->
+                        <DkTableColumn v-for="(cItem,cIndex) in dataFields"
+                                       :key="cIndex"
+                                       :field="cItem.key"
+                                       width="auto" :filter="false" :freeze="false"
+                                       :title="cItem.label"></DkTableColumn>
+                      </div>
+                    </vxe-colgroup>
+                  </div>
+                </div>
+                <div v-else>
+                  <div v-if="dataFields.length <= 1">
+                    <!--子级(无值列或者一个值列)-->
+                    <DkTableColumn v-for="(cItem,cIndex) in [...colFields[colFields.length - 1].valuesFiltered]"
+                                   :key="cIndex"
+                                   :field="cItem+''"
+                                   width="auto" :filter="false" :freeze="false"
+                                   :title="cItem+''"></DkTableColumn>
+                  </div>
+                  <div v-else>
+                    <!--子级(有多个值列)-->
+                    <DkTableColumn v-for="(cItem,cIndex) in dataFields"
+                                   :key="cIndex"
+                                   :field="cItem.key"
+                                   width="auto" :filter="false" :freeze="false"
+                                   :title="cItem.label"></DkTableColumn>
+                  </div>
+                </div>
+              </vxe-colgroup>
+
+              <!--              </vxe-colgroup>-->
+              <!--              <vxe-colgroup :title="item+''" v-for="(item,index) in [...colFields[0].valuesFiltered]" :key="index">-->
+              <!--                <div v-for="(cItem,cIndex) in [...colFields[1].valuesFiltered]" :key="cIndex">-->
+              <!--                  <DkTableColumn-->
+              <!--                    :field="cItem+''"-->
+              <!--                    width="auto" :filter="false" :freeze="false"-->
+              <!--                    :title="cItem+''"></DkTableColumn>-->
+              <!--                </div>-->
+              <!--              </vxe-colgroup>-->
+            </div>
+          </div>
+        </DkTable>
+        <!--        <pivot-table :data="data" :row-fields="rowFields" :col-fields="colFields" :data-fields="dataFields"-->
+        <!--                     :reducer="reducer"-->
+        <!--                     :no-data-warning-text="noDataWarningText" :is-data-loading="isDataLoading">-->
+        <!--          &lt;!&ndash; pass down scoped slots &ndash;&gt;-->
+        <!--          <template v-for="(_, slot) of $scopedSlots" v-slot:[slot]="scope">-->
+        <!--            <slot :name="slot" v-bind="scope"/>-->
+        <!--          </template>-->
+        <!--        </pivot-table>-->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import FieldLabel from './FieldLabel.vue'
+import Draggable from 'vuedraggable'
+import naturalSort from 'javascript-natural-sort'
+
+export default {
+  name: 'dk-pivot',
+  components: {FieldLabel, Draggable},
+  props: {
+    data: {
+      type: Array,
+      default: () => []
+    },
+    fields: {
+      type: Array,
+      default: () => []
+    },
+    availableFieldKeys: {
+      type: Array,
+      default: () => []
+    },
+    rowFieldKeys: {
+      type: Array,
+      default: () => []
+    },
+    dataFieldKeys: {
+      type: Array,
+      default: () => []
+    },
+    colFieldKeys: {
+      type: Array,
+      default: () => []
+    },
+    reducer: {
+      type: Function,
+      default: (sum, item) => sum + 1
+    },
+    defaultShowSettings: {
+      type: Boolean,
+      default: true
+    },
+    availableFieldsLabelText: {
+      type: String,
+      default: 'Available fields'
+    },
+    colsLabelText: {
+      type: String,
+      default: 'Columns'
+    },
+    rowsLabelText: {
+      type: String,
+      default: 'Rows'
+    },
+    dataLabelText: {
+      type: String,
+      default: 'data'
+    },
+    hideSettingsText: {
+      type: String,
+      default: 'Hide settings'
+    },
+    showSettingsText: {
+      type: String,
+      default: 'Show settings'
+    },
+    noDataWarningText: {
+      type: String,
+      default: 'No data to display.'
+    },
+    selectAllText: {
+      type: String,
+      default: 'Select all'
+    },
+    unselectAllText: {
+      type: String,
+      default: 'Unselect all'
+    },
+    isDataLoading: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data: function () {
+    const fieldValues = {}
+    this.fields.filter(field => field.valueFilter).forEach(field => {
+      fieldValues[field.key] = {}
+    })
+
+    return {
+      internal: {
+        availableFieldKeys: this.availableFieldKeys,
+        rowFieldKeys: this.rowFieldKeys,
+        colFieldKeys: this.colFieldKeys,
+        dataFieldKeys: this.dataFieldKeys,
+      },
+      tableData: [],
+      groupCols: [],// 分组列集合
+      fieldValues,
+      dragging: false,
+      showSettings: true,
+      colFlag: false,
+      computingInterval: null
+    }
+  },
+  computed: {
+    // Fields with values extracted from data (if field has valueFilter)
+    fieldsWithValues: function () {
+      // Create object: field.key => field
+      const fieldsWithValues = {}
+
+      this.fields.forEach(field => {
+        fieldsWithValues[field.key] = field
+      })
+
+      // Add valuesSet
+      const valueFilterableFields = this.fields.filter(field => field.valueFilter)
+
+      // Create valuesSet for each value filterable field
+      valueFilterableFields.forEach(field => {
+        fieldsWithValues[field.key].valuesSet = new Set()
+      })
+
+      // 获取没有过滤,需要处理值,这些列都可能作为列和行出现
+      const valueNoFilterableFields = this.fields.filter(field => !field.valueFilter)
+      valueNoFilterableFields.forEach(field => {
+        fieldsWithValues[field.key].valuesFiltered = new Set()
+      })
+
+      // Iterate on data once
+      this.data.forEach(item => {
+        // 有过滤
+        valueFilterableFields.forEach(field => {
+          let value = field.getter(item);
+          if(value){
+            fieldsWithValues[field.key].valuesSet.add(value)
+          }
+        })
+        // 无过滤
+        valueNoFilterableFields.forEach(field => {
+          let value = field.getter(item);
+          if(value){
+            fieldsWithValues[field.key].valuesFiltered.add(value)
+          }
+        })
+      })
+
+      // Creates values sorted from valuesSet
+      valueFilterableFields.forEach(field => {
+        fieldsWithValues[field.key].values = Array.from(fieldsWithValues[field.key].valuesSet).sort(field.sort || naturalSort)
+      })
+      console.log('fieldsWithValues',fieldsWithValues)
+      return fieldsWithValues
+    },
+    // Fields selected values as set
+    valuesFiltered: function () {
+      const valuesFiltered = {}
+
+      for (let [key, valuesObject] of Object.entries(this.fieldValues)) {
+        valuesFiltered[key] = new Set()
+        valuesObject.forEach(valueObject => {
+          if (valueObject.checked) {
+            valuesFiltered[key].add(valueObject.value)
+          }
+        })
+      }
+
+      return valuesFiltered
+    },
+    // Pivot table props from Pivot props & data
+    rowFields: function () {
+      const rowFields = []
+
+      this.internal.rowFieldKeys.forEach(key => {
+        const field = this.fields.find(field => field.key === key)
+
+        // Generate headerSlotNames from headers
+        if (field.headers) {
+          field.headerSlotNames = field.headers
+            .filter(header => header.checked)
+            .map(header => header.slotName)
+        }
+
+        // Add selected values
+        if (field.valueFilter) {
+          field.valuesFiltered = this.valuesFiltered[field.key]
+        }
+
+        rowFields.push(field)
+      })
+
+      return rowFields
+    },
+    colFields: function () {
+      this.colFlag = false;
+      const colFields = []
+
+      this.internal.colFieldKeys.forEach(key => {
+        const field = this.fields.find(field => field.key === key)
+
+        // Generate headerSlotNames from headers
+        if (field.headers) {
+          field.headerSlotNames = field.headers
+            .filter(header => header.checked)
+            .map(header => header.slotName)
+        }
+
+        // Add selected values
+        if (field.valueFilter) {
+          field.valuesFiltered = this.valuesFiltered[field.key]
+        }
+
+        colFields.push(field)
+      })
+      // 说明多个值列,要展开
+      if (this.dataFields && this.dataFields.length > 1) {
+        this.groupCols = colFields.filter((a, b) => b !== 0)
+      } else {
+        this.groupCols = colFields.filter((a, b) => b !== colFields.length - 1 && b !== 0)
+      }
+      console.log('col', colFields)
+      setTimeout(() => {
+        this.colFlag = true;
+      }, 300)
+
+      return colFields
+    },
+    dataFields: function () {
+      const dataFields = []
+
+      this.internal.dataFieldKeys.forEach(key => {
+        const field = this.fields.find(field => field.key === key)
+
+        // Generate headerSlotNames from headers
+        if (field.headers) {
+          field.headerSlotNames = field.headers
+            .filter(header => header.checked)
+            .map(header => header.slotName)
+        }
+
+        // Add selected values
+        if (field.valueFilter) {
+          field.valuesFiltered = this.valuesFiltered[field.key]
+        }
+
+        dataFields.push(field)
+      })
+      console.log('dataFields',dataFields)
+      return dataFields
+    },
+    // Drag area class
+    dragAreaClass: function () {
+      return this.dragging ? 'drag-area-highlight' : null
+    },
+    // Table wrapper style
+    tableWrapperStyle: function () {
+      const maxWidth = this.showSettings ? 'calc(100% - 200px - 2rem)' : '100%'
+      return `max-width: ${maxWidth};`
+    }
+  },
+  methods: {
+    // Toggle settings
+    toggleShowSettings() {
+      this.showSettings = !this.showSettings
+    },
+    // Update dragging boolean
+    start() {
+      this.dragging = true
+    },
+    end() {
+      this.dragging = false
+    },
+    /**
+     * @desc   : 设置表格的列名
+     * @author : 周兴
+     * @date   : 2023/3/21 9:19
+     */
+    setField(){
+      let field = ''
+      // 最顶级
+      if(this.colFields && this.colFields.length > 0){
+        field = this.colFields[0]
+      }
+      // 中间层
+      if(this.groupCols && this.groupCols.length > 0){
+        this.groupCols.forEach(it=>{
+          field = field + '_' + it
+        })
+      }
+    },
+    /**
+     * @desc   : 更新表头列
+     * @author : 周兴
+     * @date   : 2023/3/21 9:02
+     */
+    updateFieldValues() {
+      for (let [key, field] of Object.entries(this.fieldsWithValues)) {
+        if (field.valueFilter) {
+          this.fieldValues[key] = []
+          field.values.forEach(value => {
+            this.fieldValues[key].push({value, checked: true})
+          })
+        }
+      }
+    },
+    /**
+     * @desc   : 更新数据
+     * @author : 周兴
+     * @date   : 2023/3/21 9:03
+     */
+    updateValues(updateValuesHashTable = true){
+      this.isDataComputing = true;
+      // Start a task to avoid blocking the page
+      clearInterval(this.computingInterval)
+      this.computingInterval = setTimeout(() => {
+
+      })
+      this.isDataComputing = false
+      // this.updateInternalFields()
+    },
+    /**
+     * @desc   : 复制列
+     * @author : 周兴
+     * @date   : 2023/3/21 9:04
+     */
+    updateInternalFields() {
+      // this.internalRowFields = cloneDeep(this.rowFields)
+      // this.internalColFields = cloneDeep(this.colFields)
+    }
+  },
+  watch: {
+    data: function () {
+      this.updateFieldValues(); // 更新列
+      this.updateValues();        // 更新数据
+    }
+  },
+  created() {
+    this.showSettings = this.defaultShowSettings
+    this.updateFieldValues(); // 更新列
+    this.updateValues();  // 更新数据
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+/* Left column width */
+.left-col {
+  min-width: 200px;
+  max-width: 200px;
+}
+
+/* Grid with gutter */
+.gutter, .gutter-y {
+  margin-top: -1rem;
+
+  > * {
+    margin-top: 1rem;
+  }
+}
+
+.gutter-x, .gutter {
+  margin-left: -1rem;
+
+  > * {
+    margin-left: 1rem;
+  }
+}
+
+.gutter-sm, .gutter-y-sm {
+  margin-top: -.5rem;
+
+  > * {
+    margin-top: .5rem;
+  }
+}
+
+.gutter-x-sm, .gutter-sm {
+  margin-left: -.5rem;
+
+  > * {
+    margin-left: .5rem;
+  }
+}
+
+/* Drag & drop stuff */
+.drag-area {
+  border: 1px dashed #ccc;
+  padding: 0.75rem;
+  transition: background-color 0.4s;
+
+  .drag-area-title {
+    line-height: 1;
+  }
+
+  .drag-area-zone {
+    min-width: 10rem;
+    min-height: 46px;
+  }
+}
+
+.drag-area-highlight {
+  background-color: #f3f3f3;
+}
+
+.sortable-ghost {
+  opacity: 0.4;
+}
+
+.field {
+  position: relative;
+}
+</style>

+ 2 - 0
src/components/base/dk-pivot/index.js

@@ -0,0 +1,2 @@
+import DkPivot  from './dk-pivot.vue'
+export default DkPivot;

+ 37 - 6
src/components/base/dk-table/dk-table.vue

@@ -10,6 +10,7 @@
       :border="border"
       row-id="id"
       :ref="name"
+      :loading="loading"
       :tableWidth="width + 'px'"
       :height="height +'px'"
       :stripe="true"
@@ -322,9 +323,14 @@ export default {
       default: 1,
     },
     // 是否显示序号tip
-    showTip:{
-      type:Boolean,
-      default:false
+    showTip: {
+      type: Boolean,
+      default: false
+    },
+    // 加载标识
+    loading:{
+      type: Boolean,
+      default: false
     }
   },
   provide() {
@@ -371,6 +377,10 @@ export default {
                 {code: 'colPosition', name: vm.$t('colPosition'), disabled: false, visible: true},
               ]
             },
+            // 透视
+            {
+              code: 'perspective', name: vm.$t('perspective'), disabled: false, visible: true
+            },
             // <!--自适应列宽-->
             {
               code: 'adaption', name: vm.$t('adaption'), disabled: false, visible: true, children: [
@@ -813,7 +823,7 @@ export default {
         return {textAlign: this.treeFlag ? 'left' : "center"}
       }
       if (column.type === 'checkbox' || column.type === 'radio' || column.type === 'switch'
-          || column.type === 'image') {
+        || column.type === 'image') {
         return {textAlign: "center"}
       }
       // column.property===?也可根据列名判断,也可根据column对象的属性灵活配置
@@ -1112,11 +1122,32 @@ export default {
         this.handleFreeze(e);
       } else if (e.menu.code == 'clearFreeze') {  // 解除冻结
         this.unFreeze(e);
+      } else if (e.menu.code == 'perspective') { // 透视
+        this.handlePerspective(e);
       }
       setTimeout(() => {
       }, 400)
     },
     /**
+     * @desc   : 透视
+     * @author : 周兴
+     * @date   : 2023/3/18 17:44
+     */
+    handlePerspective(e) {
+      let data = this.dataFinal?.copy();
+      const tableColumns = this.$refs[this.name].getTableColumn()
+      if (tableColumns && tableColumns.visibleColumn && data && data.length > 0) {
+        let columns = [...tableColumns.visibleColumn];
+        columns = columns.filter(it => it.type != 'seq' && it.type != 'checkbox' && it.type != 'radio').filterColumns(['field','title'])
+        this.$Perspective({
+            component: this.$refs[this.name],
+            columns: columns,
+            tableData: data
+          },
+          {})
+      }
+    },
+    /**
      * @desc   : 导出excel
      * @author : 周兴
      * @date   : 2023/2/23 12:52
@@ -1130,9 +1161,9 @@ export default {
           ok: (val) => {
             this.handleExportAll(true); // 控制不允许再次点击导出
             let params = {...this.exportCondition}
-            console.log('ttt',Object.assign({'seq':'序号'},val))
+            console.log('ttt', Object.assign({'seq': '序号'}, val))
             // 增加序号
-            params.condition = Object.assign({'seq':'序号'},val);
+            params.condition = Object.assign({'seq': '序号'}, val);
             params.ftyId = this.$store.state.user.ftyId;
             if (e && params.pageSize) {
               // 默认导出最大设置值

+ 1 - 1
src/components/base/input-number-pop/input-number-pop.vue

@@ -143,7 +143,7 @@ export default {
         let e = {target: {value: 1}}
         this.handleChange(e);
       }
-      this.value2 = n ? n : 0;
+      this.value2 = n ? n : null;
       //只有直接进入才会处理
       if (!this.inputing) {
         if (this.formatThousandth == undefined || this.formatThousandth) {

+ 0 - 2
src/components/business/process/node-modal/node-modal.vue

@@ -707,8 +707,6 @@ export default {
         (this.nodeData.nodeKind === this.$config.nodeKind.inKiln && this.nodeData.opnKind === this.$config.processType.kilnCode ) ||
         (this.nodeData.nodeKind === this.$config.nodeKind.outKiln && this.nodeData.opnKind === this.$config.processType.kilnCode )){
         let carTable = this.$refs.carTable?.getTableDataFilter();
-        console.log('344',this.nodeData.opnKind,carTable)
-
         if(!carTable || carTable.length === 0){
           this.$message.error(this.$t('W_042', {
             'param': this.$t('KilnCar')

+ 54 - 0
src/components/business/table-select/table-select.vue

@@ -1489,6 +1489,60 @@ export default {
           {field: 'remarks', width: 'auto'},
         ]
       }
+      //工种
+      else if (this.dataType === this.$config.tableSelectType.job) {
+        this.service = this.$service.commonService
+        this.methodsName = 'getJobByPage'
+        this.methodsNameDetail = 'getJobByPage'
+        // 查询条件
+        this.searchContent = [
+          {
+            valueFormat: {code: 'jobCode'},
+            itemName: 'blameJobCode',
+          },
+          {
+            valueFormat: {code: 'jobName'},
+            itemName: 'blameJobName',
+          },
+        ]
+        this.selectKey = 'jobId'
+        this.selectLabel = 'jobName'
+        this.columns = [
+          {field: 'jobCode', title:this.$t('blameJobCode'), width: 'auto'},
+          {field: 'jobName', title:this.$t('blameJobName'), width: 'auto'},
+        ]
+        this.columnsDetail = [
+          {field: 'jobCode', title:this.$t('blameJobCode'), width: 'auto'},
+          {field: 'jobName', title:this.$t('blameJobName'), width: 'auto'},
+        ]
+      }
+      //责任工号
+      else if (this.dataType === this.$config.tableSelectType.blameUser) {
+        this.service = this.$service.commonService
+        this.methodsName = 'getUserByPage'
+        this.methodsNameDetail = 'getUserByPage'
+        // 查询条件
+        this.searchContent = [
+          {
+            valueFormat: {code: 'userCode'},
+            itemName: 'blameUserCode',
+          },
+          {
+            valueFormat: {code: 'userName'},
+            itemName: 'blameUserName',
+          },
+        ]
+        this.selectKey = 'userId'
+        this.selectLabel = 'userName'
+        this.columns = [
+          {field: 'userCode', title:this.$t('blameUserCode'), width: 'auto'},
+          {field: 'userName', title:this.$t('blameUserName'), width: 'auto'},
+        ]
+        this.columnsDetail = [
+          {field: 'userCode', title:this.$t('blameUserCode'), width: 'auto'},
+          {field: 'userName', title:this.$t('blameUserName'), width: 'auto'},
+        ]
+      }
     },
     /**
      * @desc   : 设置传入数据源的列

+ 1 - 0
src/config/index.js

@@ -757,6 +757,7 @@ export default {
     product: 'product',
     carrier: 'carrier',
     defect: 'defect',
+    blameUser: 'blameUser',
   },
   /**
    * @desc   : 选择类型

+ 21 - 0
src/libs/update-columns/index.js

@@ -251,5 +251,26 @@ export default {
   halfCheckStaff:[
     {updateField: 'blameStaffId', valueFiled: 'staffId'},
     {updateField: 'staffName', valueFiled: 'staffName'},
+    {updateField: 'staffCode', valueFiled: 'staffCode'},
+  ],
+ /**
+  *   @desc   : 半检选择工号
+  *   @date   : 2023/3/7 14:36
+  *   @author : 寇珊珊
+  */
+  halfCheckUser:[
+    {updateField: 'userId', valueFiled: 'userId'},
+    {updateField: 'userName', valueFiled: 'userName'},
+    {updateField: 'userCode', valueFiled: 'userCode'},
+  ],
+ /**
+  *   @desc   : 半检选择工种
+  *   @date   : 2023/3/7 14:36
+  *   @author : 寇珊珊
+  */
+  halfCheckJob:[
+    {updateField: 'jobId', valueFiled: 'jobId'},
+    {updateField: 'jobName', valueFiled: 'jobName'},
+    {updateField: 'jobCode', valueFiled: 'jobCode'},
   ],
 }

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

@@ -303,6 +303,7 @@ export const columns = {
   postName: '职务',
   jobId: '工种',
   jobName: '工种',
+  jobCode: '工种编码',
   userCode: '用户编码',
   userName: '用户名称',
   roleIds: '所属角色',
@@ -736,6 +737,10 @@ export const columns = {
   vehicleCode:'载具码',
   dftFineName:'缺陷扣罚',
   vehicleBarcode:'载具条码',
+  blameUserCode:'工号编码',
+  blameUserName:'工号名称',
+  blameJobCode:'工种编码',
+  blameJobName:'工种名称',
   //工位打卡
   replaceStaffName:'替班员工',
   saveOffWork:'下班(F)',

+ 9 - 1
src/main.js

@@ -18,6 +18,8 @@ import '@/assets/al-icon/iconfont.css'
 import '@/assets/al-icon/iconfont.js'
 import 'viewerjs/dist/viewer.css'
 
+import 'bootstrap/scss/bootstrap.scss';
+
 import '@/libs/tools/date-tools'
 import '@/libs/tools/array-tools'
 import '@/libs/tools/string-tools'
@@ -165,11 +167,14 @@ import DkSplit from '_c/base/dk-split'
 Vue.component('DkSplit', DkSplit)
 
 import DkCollapse from '_c/base/dk-collapse'
-
 Vue.component('DkCollapse', DkCollapse)
+
 import DkPanel from '_c/base/dk-collapse/dk-panel'
 Vue.component('DkPanel', DkPanel)
 
+import DkPivot from '_c/base/dk-pivot'
+Vue.component('DkPivot', DkPivot)
+
 import DkButton from '_c/base/dk-button'
 Vue.component('DkButton', DkButton)
 
@@ -588,6 +593,9 @@ Vue.prototype.$SearchForm = SearchForm.install
 import Position from '_c/base/dk-position'
 Vue.prototype.$Position = Position.install
 
+import Perspective from '_c/base/dk-perspective'
+Vue.prototype.$Perspective = Perspective.install
+
 import Export from '_c/base/dk-export'
 Vue.prototype.$Export = Export.install
 

+ 375 - 0
src/view-app/app/prod-management/in-process-inventory-list/detail.vue

@@ -0,0 +1,375 @@
+<template>
+  <!--  在产盘点 新建-->
+  <div class="main-app-form">
+    <!-- 顶部导航栏 -->
+    <dk-app-nav-bar :title="$t('appAddProdCheckTitle')"
+                    @click-left="onClickLeft"></dk-app-nav-bar>
+    <!-- 盘点单名 -->
+    <dk-app-field
+      ref="checkName"
+      v-model="formData.checkName"
+      :label="$t('appCheckName')"
+      @input="onInput($event,'checkName')"
+    />
+
+    <!--    盘点工序-->
+    <dk-app-field
+      v-model="formData.processNodeName"
+      :label="$t('appProdCheckNode')"
+      :readonly="true"
+      @click="openMutiDropdown('processNode')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+    <!--    完成时间-->
+    <dk-app-field
+      v-model="formData.finishTimeName"
+      :label="$t('appFinishTime')"
+      :readonly="true"
+      :clearable="true"
+      @click="onClickFinishTime"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+    <!--    生产工号-->
+    <dk-app-field
+      v-model="formData.prodUserName"
+      :label="$t('appProductionUserIds')"
+      :readonly="true"
+      @click="openMutiDropdown('prodUser')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    产品型号-->
+    <dk-app-field
+      v-model="formData.modelProductName"
+      :label="$t('appProductModel')"
+      :readonly="true"
+      @click="openMutiDropdown('modelProduct')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    盘点工号-->
+    <dk-app-field
+      v-model="formData.checkUserNames"
+      :label="$t('appCheckUserIds')"
+      :readonly="true"
+      @click="openMutiDropdown('user')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    保存-->
+    <div class="app_save_bottom-class">
+      <dk-app-button :soundEffectFlag="false" :disabled="loading" @click="save">{{ $t('appSave') }}
+      </dk-app-button>
+    </div>
+    <div>
+
+      <!--      完成日期组件-->
+      <dk-app-dropdown-date-day :show="finishTimeFlag" @dateCommit="dateCommit" @onClose="onCloseDateDay"
+                                @onCloseChooseDate="onCloseDateDay"></dk-app-dropdown-date-day>
+      <!--      盘点工序-->
+      <dk-app-muti-dropdown typeName="processNode" :show="processNodeFlag" :ids="ids"
+                            @mutiClose="mutiClose('processNode')"
+                            @mutiCommit="mutiCommit($event,'processNode')"></dk-app-muti-dropdown>
+      <!--      员工-->
+      <dk-app-muti-dropdown typeName="user" :show="userFlag" :ids="ids"
+                            @mutiClose="mutiClose('user')"
+                            @mutiCommit="mutiCommit($event,'user')"></dk-app-muti-dropdown>
+      <!--      产品型号-->
+      <dk-app-muti-dropdown typeName="modelProduct" :show="modelProductFlag"
+                            @mutiClose="mutiClose('modelProduct')" :ids="ids"
+                            @mutiCommit="mutiCommit($event,'modelProduct')"></dk-app-muti-dropdown>
+      <!--      生产工号-->
+      <dk-app-muti-dropdown typeName="user" :show="prodUserFlag" :ids="ids"
+                            @mutiClose="mutiClose('prodUser')"
+                            @mutiCommit="mutiCommit($event,'prodUser')"></dk-app-muti-dropdown>
+      <dk-app-loading :loading="loading"></dk-app-loading>
+    </div>
+
+  </div>
+</template>
+
+<script>
+
+import {appFormMixin} from '@/mixins/appform.js'
+
+export default {
+  name: "app-in-process-inventory-detail",
+  mixins: [appFormMixin],
+  data() {
+    return {
+      ids: [],
+      showFinishTime: false,
+      prodUserFlag: false,
+      modelProductFlag: false,
+      finishTimeDefaultSearch: null,
+      userFlag: false, //员工标识
+      finishTimeFlag: false, //生产日期标识
+      modelCategoryFlag: false, //模具种类标识
+      processNodeFlag: false, //盘点工序
+      formData: {
+        checkName: '', //盘点单名
+        processNodeIds: null,//盘点工序
+        processNodeName: "",//盘点工序
+        checkUserIds: null,//盘点工号
+        checkUserNames: '', //盘点工号名称
+        modelProductName: '', //产品型号
+        modelProductIds: null, //产品型号id
+        prodUserName: '', //生产工号
+        prodUserIds: null, //生产工号id
+        finishTime: null,
+        finishTimeName: '', //完成日期
+        remarks: '', //备注
+        makeItems: {},  //制单条件
+        makeUserId: this.$store.state.user.id, //制单工号
+        ftyId: this.$store.state.user.ftyId //工厂id
+      },
+
+    }
+  },
+  methods: {
+
+    // region 保存
+
+    /**
+     * @desc   : 参数赋值
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    setParams() {
+      this.params = {...this.formData}
+      this.params.checkCode = new Date().getTime() + ''
+      this.params.finishTimeStart = this.formData.finishTime ? this.formData.finishTime[0] : ''
+      this.params.finishTimeEnd = this.formData.finishTime ? this.formData.finishTime[1] : ''
+      //处理制单条件
+      this.params.makeItems = {
+        finishTime: this.params.finishTime ? this.params.finishTime : [],//完成日期范围
+        checkUserIds: this.params.checkUserIds ? this.params.checkUserIds : [],//盘点工号
+        prodUserIds: this.params.prodUserIds ? this.params.prodUserIds : [],//生产工号
+        modelProductIds: this.params.modelProductIds ? this.params.modelProductIds : [],//产品型号
+        processNodeIds: this.params.processNodeIds ? this.params.processNodeIds : [],//盘点工序
+      }
+    },
+
+    /**
+     * @desc   : 检验
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    validData(flag) {
+      //盘点单名不能为空判
+      if (!this.formData.checkName) {
+        this.$appToast(this.$t('inputWords', {'search-name': this.$t('appCheckName')}));
+        return false;
+      }
+      if (!this.params.processNodeIds || this.params.processNodeIds.length === 0) {
+        this.$appToast(this.$t('selectWords', {'search-name': this.$t('appProdCheckNode')}));
+        return false;
+      }
+      return true;
+    },
+
+    /**
+     * @desc   : 保存方法
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    saveData() {
+      return this.excute(this.$service.appProdCheckService, this.$service.appProdCheckService.insert, this.params)
+    },
+    /**
+     * @desc   : 清空表单
+     * @author : 于继渤
+     * @date   : 2023/3/7 10:59
+     */
+    clear() {
+      this.ids = []
+      this.formData = {
+        checkName: '', //盘点单名
+        processNodeIds: null,//盘点工序
+        processNodeName: "",//盘点工序
+        checkUserIds: null,//盘点工号
+        checkUserNames: '', //盘点工号名称
+        modelProductName: '', //产品型号
+        modelProductIds: null, //产品型号id
+        prodUserName: '', //生产工号
+        prodUserIds: null, //生产工号id
+        finishTime: null,
+        finishTimeName: '', //完成日期
+        remarks: '', //备注
+        makeItems: {},  //制单条件
+        makeUserId: this.$store.state.user.id, //制单工号
+        ftyId: this.$store.state.user.ftyId //工厂id
+      }
+    },
+    // endregion
+
+    // region 控件事件
+    /**
+     * @desc   : 输入事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onInput(e, key) {
+      this.formData[key] = e
+    },
+
+    /**
+     * @desc   : 生产日期打开选择事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onClickFinishTime(e) {
+      this.finishTimeFlag = true
+      this.finishTimeDefaultSearch = [new Date(), new Date()]
+    },
+
+
+    /**
+     * @desc   : 生产日期关闭选择事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onCloseDateDay() {
+      this.finishTimeFlag = false
+    },
+
+    /**
+     * @desc   : 时间日期确定事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    dateCommit(e) {
+      this.finishTimeFlag = false
+      this.formData.finishTimeName = (e.date[0]) + ' 至 ' + (e.date[1])
+      this.formData.finishTime = [(e.date[0]), (e.date[1])]
+    },
+
+
+    /**
+     * @desc   : 日期格式返回方法
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    formatDate(date) {
+      return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
+    },
+
+    /**
+     * @desc   : 生产日期确定时间
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onConfirmProduceDate(date) {
+      this.showFinishTime = false;
+      this.finishTime = this.formatDate(date);
+    },
+
+    /**
+     * @desc   : 多选侧拉打开
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    openMutiDropdown(e) {
+
+      if (e === 'user') {
+        this.userFlag = true
+        this.ids = this.formData.checkUserIds
+      }
+      if (e === 'processNode') { //盘点工序
+        this.processNodeFlag = true
+        this.ids = this.formData.processNodeIds
+      }
+      //产品型号
+      if (e === 'modelProduct') {
+        this.modelProductFlag = true
+        this.ids = this.formData.modelProductIds
+      }
+
+      //盘点工序
+      if (e === 'processNode') {
+        this.processNodeFlag = true
+        this.ids = this.formData.processNodeIds
+      }
+      if (e === 'prodUser') {
+        this.prodUserFlag = true
+        this.ids = this.formData.prodUserIds
+      }
+
+    },
+    /**
+     * @desc   : 多选侧拉关闭
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    mutiClose(e) {
+      if (e === 'user') {
+        this.userFlag = false
+      }
+      if (e === 'processNode') {
+        this.processNodeFlag = false
+      }
+      //模具种类
+      if (e === 'modelProduct') {
+        this.modelProductFlag = false
+      }
+      if (e === 'prodUser') {
+        this.prodUserFlag = false
+      }
+
+    },
+    /**
+     * @desc   : 多选侧拉确定
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    mutiCommit(e, typeName) {
+      if (typeName === 'user') {
+        this.formData.checkUserNames = e.names
+        this.formData.checkUserIds = e.idList
+      }
+      if (typeName === 'processNode') {
+        this.formData.processNodeName = e.names
+        this.formData.processNodeIds = e.idList
+      }
+      //产品型号
+      if (typeName === 'modelProduct') {
+        this.formData.modelProductName = e.names
+        this.formData.modelProductIds = e.idList
+
+      }
+      //模具型号
+      if (typeName === 'modelMould') {
+        this.formData.modelMouldName = e.names
+        this.formData.modelMouldIds = e.idList
+      }
+      //生产工号
+      if (typeName === 'prodUser') {
+        this.formData.prodUserName = e.names
+        this.formData.prodUserIds = e.idList
+      }
+
+
+    },
+
+    // endregion
+
+  },
+
+  mounted() {
+    // 因为是封装的组件所以是两层
+    this.$refs.checkName.$refs.input.focus()
+  },
+  /**
+   * @desc   : 初始生命周期
+   * @author : 于继渤
+   * @date   : 2023/2/7 17:26
+   */
+  created(e) {
+
+
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 375 - 0
src/view-app/app/prod-management/in-process-inventory-list/index.vue

@@ -0,0 +1,375 @@
+<template>
+  <!--  在产盘点 新建-->
+  <div class="main-app-form">
+    <!-- 顶部导航栏 -->
+    <dk-app-nav-bar :title="$t('appAddProdCheckTitle')"
+                    @click-left="onClickLeft"></dk-app-nav-bar>
+    <!-- 盘点单名 -->
+    <dk-app-field
+      ref="checkName"
+      v-model="formData.checkName"
+      :label="$t('appCheckName')"
+      @input="onInput($event,'checkName')"
+    />
+
+    <!--    盘点工序-->
+    <dk-app-field
+      v-model="formData.processNodeName"
+      :label="$t('appProdCheckNode')"
+      :readonly="true"
+      @click="openMutiDropdown('processNode')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+    <!--    完成时间-->
+    <dk-app-field
+      v-model="formData.finishTimeName"
+      :label="$t('appFinishTime')"
+      :readonly="true"
+      :clearable="true"
+      @click="onClickFinishTime"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+    <!--    生产工号-->
+    <dk-app-field
+      v-model="formData.prodUserName"
+      :label="$t('appProductionUserIds')"
+      :readonly="true"
+      @click="openMutiDropdown('prodUser')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    产品型号-->
+    <dk-app-field
+      v-model="formData.modelProductName"
+      :label="$t('appProductModel')"
+      :readonly="true"
+      @click="openMutiDropdown('modelProduct')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    盘点工号-->
+    <dk-app-field
+      v-model="formData.checkUserNames"
+      :label="$t('appCheckUserIds')"
+      :readonly="true"
+      @click="openMutiDropdown('user')"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
+
+    <!--    保存-->
+    <div class="app_save_bottom-class">
+      <dk-app-button :soundEffectFlag="false" :disabled="loading" @click="save">{{ $t('appSave') }}
+      </dk-app-button>
+    </div>
+    <div>
+
+      <!--      完成日期组件-->
+      <dk-app-dropdown-date-day :show="finishTimeFlag" @dateCommit="dateCommit" @onClose="onCloseDateDay"
+                                @onCloseChooseDate="onCloseDateDay"></dk-app-dropdown-date-day>
+      <!--      盘点工序-->
+      <dk-app-muti-dropdown typeName="processNode" :show="processNodeFlag" :ids="ids"
+                            @mutiClose="mutiClose('processNode')"
+                            @mutiCommit="mutiCommit($event,'processNode')"></dk-app-muti-dropdown>
+      <!--      员工-->
+      <dk-app-muti-dropdown typeName="user" :show="userFlag" :ids="ids"
+                            @mutiClose="mutiClose('user')"
+                            @mutiCommit="mutiCommit($event,'user')"></dk-app-muti-dropdown>
+      <!--      产品型号-->
+      <dk-app-muti-dropdown typeName="modelProduct" :show="modelProductFlag"
+                            @mutiClose="mutiClose('modelProduct')" :ids="ids"
+                            @mutiCommit="mutiCommit($event,'modelProduct')"></dk-app-muti-dropdown>
+      <!--      生产工号-->
+      <dk-app-muti-dropdown typeName="user" :show="prodUserFlag" :ids="ids"
+                            @mutiClose="mutiClose('prodUser')"
+                            @mutiCommit="mutiCommit($event,'prodUser')"></dk-app-muti-dropdown>
+      <dk-app-loading :loading="loading"></dk-app-loading>
+    </div>
+
+  </div>
+</template>
+
+<script>
+
+import {appFormMixin} from '@/mixins/appform.js'
+
+export default {
+  name: "app-in-process-inventory-list",
+  mixins: [appFormMixin],
+  data() {
+    return {
+      ids: [],
+      showFinishTime: false,
+      prodUserFlag: false,
+      modelProductFlag: false,
+      finishTimeDefaultSearch: null,
+      userFlag: false, //员工标识
+      finishTimeFlag: false, //生产日期标识
+      modelCategoryFlag: false, //模具种类标识
+      processNodeFlag: false, //盘点工序
+      formData: {
+        checkName: '', //盘点单名
+        processNodeIds: null,//盘点工序
+        processNodeName: "",//盘点工序
+        checkUserIds: null,//盘点工号
+        checkUserNames: '', //盘点工号名称
+        modelProductName: '', //产品型号
+        modelProductIds: null, //产品型号id
+        prodUserName: '', //生产工号
+        prodUserIds: null, //生产工号id
+        finishTime: null,
+        finishTimeName: '', //完成日期
+        remarks: '', //备注
+        makeItems: {},  //制单条件
+        makeUserId: this.$store.state.user.id, //制单工号
+        ftyId: this.$store.state.user.ftyId //工厂id
+      },
+
+    }
+  },
+  methods: {
+
+    // region 保存
+
+    /**
+     * @desc   : 参数赋值
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    setParams() {
+      this.params = {...this.formData}
+      this.params.checkCode = new Date().getTime() + ''
+      this.params.finishTimeStart = this.formData.finishTime ? this.formData.finishTime[0] : ''
+      this.params.finishTimeEnd = this.formData.finishTime ? this.formData.finishTime[1] : ''
+      //处理制单条件
+      this.params.makeItems = {
+        finishTime: this.params.finishTime ? this.params.finishTime : [],//完成日期范围
+        checkUserIds: this.params.checkUserIds ? this.params.checkUserIds : [],//盘点工号
+        prodUserIds: this.params.prodUserIds ? this.params.prodUserIds : [],//生产工号
+        modelProductIds: this.params.modelProductIds ? this.params.modelProductIds : [],//产品型号
+        processNodeIds: this.params.processNodeIds ? this.params.processNodeIds : [],//盘点工序
+      }
+    },
+
+    /**
+     * @desc   : 检验
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    validData(flag) {
+      //盘点单名不能为空判
+      if (!this.formData.checkName) {
+        this.$appToast(this.$t('inputWords', {'search-name': this.$t('appCheckName')}));
+        return false;
+      }
+      if (!this.params.processNodeIds || this.params.processNodeIds.length === 0) {
+        this.$appToast(this.$t('selectWords', {'search-name': this.$t('appProdCheckNode')}));
+        return false;
+      }
+      return true;
+    },
+
+    /**
+     * @desc   : 保存方法
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    saveData() {
+      return this.excute(this.$service.appProdCheckService, this.$service.appProdCheckService.insert, this.params)
+    },
+    /**
+     * @desc   : 清空表单
+     * @author : 于继渤
+     * @date   : 2023/3/7 10:59
+     */
+    clear() {
+      this.ids = []
+      this.formData = {
+        checkName: '', //盘点单名
+        processNodeIds: null,//盘点工序
+        processNodeName: "",//盘点工序
+        checkUserIds: null,//盘点工号
+        checkUserNames: '', //盘点工号名称
+        modelProductName: '', //产品型号
+        modelProductIds: null, //产品型号id
+        prodUserName: '', //生产工号
+        prodUserIds: null, //生产工号id
+        finishTime: null,
+        finishTimeName: '', //完成日期
+        remarks: '', //备注
+        makeItems: {},  //制单条件
+        makeUserId: this.$store.state.user.id, //制单工号
+        ftyId: this.$store.state.user.ftyId //工厂id
+      }
+    },
+    // endregion
+
+    // region 控件事件
+    /**
+     * @desc   : 输入事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onInput(e, key) {
+      this.formData[key] = e
+    },
+
+    /**
+     * @desc   : 生产日期打开选择事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onClickFinishTime(e) {
+      this.finishTimeFlag = true
+      this.finishTimeDefaultSearch = [new Date(), new Date()]
+    },
+
+
+    /**
+     * @desc   : 生产日期关闭选择事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onCloseDateDay() {
+      this.finishTimeFlag = false
+    },
+
+    /**
+     * @desc   : 时间日期确定事件
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    dateCommit(e) {
+      this.finishTimeFlag = false
+      this.formData.finishTimeName = (e.date[0]) + ' 至 ' + (e.date[1])
+      this.formData.finishTime = [(e.date[0]), (e.date[1])]
+    },
+
+
+    /**
+     * @desc   : 日期格式返回方法
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    formatDate(date) {
+      return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
+    },
+
+    /**
+     * @desc   : 生产日期确定时间
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    onConfirmProduceDate(date) {
+      this.showFinishTime = false;
+      this.finishTime = this.formatDate(date);
+    },
+
+    /**
+     * @desc   : 多选侧拉打开
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    openMutiDropdown(e) {
+
+      if (e === 'user') {
+        this.userFlag = true
+        this.ids = this.formData.checkUserIds
+      }
+      if (e === 'processNode') { //盘点工序
+        this.processNodeFlag = true
+        this.ids = this.formData.processNodeIds
+      }
+      //产品型号
+      if (e === 'modelProduct') {
+        this.modelProductFlag = true
+        this.ids = this.formData.modelProductIds
+      }
+
+      //盘点工序
+      if (e === 'processNode') {
+        this.processNodeFlag = true
+        this.ids = this.formData.processNodeIds
+      }
+      if (e === 'prodUser') {
+        this.prodUserFlag = true
+        this.ids = this.formData.prodUserIds
+      }
+
+    },
+    /**
+     * @desc   : 多选侧拉关闭
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    mutiClose(e) {
+      if (e === 'user') {
+        this.userFlag = false
+      }
+      if (e === 'processNode') {
+        this.processNodeFlag = false
+      }
+      //模具种类
+      if (e === 'modelProduct') {
+        this.modelProductFlag = false
+      }
+      if (e === 'prodUser') {
+        this.prodUserFlag = false
+      }
+
+    },
+    /**
+     * @desc   : 多选侧拉确定
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:26
+     */
+    mutiCommit(e, typeName) {
+      if (typeName === 'user') {
+        this.formData.checkUserNames = e.names
+        this.formData.checkUserIds = e.idList
+      }
+      if (typeName === 'processNode') {
+        this.formData.processNodeName = e.names
+        this.formData.processNodeIds = e.idList
+      }
+      //产品型号
+      if (typeName === 'modelProduct') {
+        this.formData.modelProductName = e.names
+        this.formData.modelProductIds = e.idList
+
+      }
+      //模具型号
+      if (typeName === 'modelMould') {
+        this.formData.modelMouldName = e.names
+        this.formData.modelMouldIds = e.idList
+      }
+      //生产工号
+      if (typeName === 'prodUser') {
+        this.formData.prodUserName = e.names
+        this.formData.prodUserIds = e.idList
+      }
+
+
+    },
+
+    // endregion
+
+  },
+
+  mounted() {
+    // 因为是封装的组件所以是两层
+    this.$refs.checkName.$refs.input.focus()
+  },
+  /**
+   * @desc   : 初始生命周期
+   * @author : 于继渤
+   * @date   : 2023/2/7 17:26
+   */
+  created(e) {
+
+
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 1 - 1
src/view/mst/busobj/index.vue

@@ -7,7 +7,7 @@
         <!--    查询    -->
         <BaseIndexButton right-button="busobj-select" ref="search" name="search"></BaseIndexButton>
         <!--    清空条件    -->
-        <BaseIndexButton right-button="busobj-clear" ref="clear" name="clear"></BaseIndexButton>
+ <BaseIndexButton right-button="busobj-clear" ref="clear" name="clear"></BaseIndexButton>
         <!--    编辑    -->
         <BaseIndexButton right-button="busobj-edit" ref="edit" name="edit"></BaseIndexButton>
       </template>

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

@@ -10,11 +10,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -124,6 +125,8 @@
         workStationList: [],//工位数据
         barCodeList: [],//产品条码集合
         userKind: null,//用户类型
+        stationFlag:false,//默认工位标识
+
       }
     },
     methods: {
@@ -319,6 +322,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 10 - 2
src/view/pdm/data-collection/finishCheck-add.vue

@@ -11,11 +11,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -268,6 +269,7 @@
         defectPlaceModal: false,//缺陷弹窗
         modalTitle: self.$config.formMode.setDefectPlace,
         defectPlaceList: [],//缺陷位置
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -735,7 +737,7 @@
             if(this.params.productionDefectList[it].blameWsJobId){
               i.blameWsJobId = this.params.productionDefectList[it].blameWsJobId
             }else{
-              i.blameWsJobId=jobId
+              i.blameWsJobId=0
             }
           }
         }
@@ -841,6 +843,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 178 - 97
src/view/pdm/data-collection/halfCheck-add.vue

@@ -11,11 +11,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -72,22 +73,20 @@
                        :height="tableHeight-500"
                        :freeze="false"
                        :add-flag="false" :delete-flag="false"
-                       @current-change="currentChange"
                        @chooseData="chooseData"
                        controlId="defectCode"
                        @changeValue="changeValue"
             ></EditTable>
             <!--责任员工-->
-            <EditTable slot="right" ref="staffTable" :data="staffList" :show-setting-flag="false"
-                       :enabledRepeat="false" enabled-repeat-id="staffId"
-                       :height="tableHeight-500"
-                       :showSettingFlag="false"
-                       :columns="staffColumn"
-                       :add-flag="false" :delete-flag="false"
-                       @delRow="delGroupStaff"
-                       @chooseData="saveDetailChange" @onBatchChoose="saveDetailChange"
-            ></EditTable>
-
+            <DkTable slot="right" ref="staff-table-select" :data="staffList" multiple
+                     :height="tableHeight-500" primaryKey="staffId"
+                     :pageFlag="false"
+                     :pageTotalFlag="false"
+                     :linkClickChecked="true"
+                     @select-change="staffSelectChange($event)"
+                     name="table">
+              <DkTableColumn field="staffName" :title="$t('staffName')" width="auto"></DkTableColumn>
+            </DkTable>
           </DkSplit>
         </DkPanel>
 
@@ -160,8 +159,6 @@
         detailList: [],// 成型记录明细信息
         defectFines: [],//缺陷扣罚
         defectNodeList: [],//责任工序
-        userList: [],//责任工号
-        jobList: [],//责任工种
         staffList: [],//责任员工
         dutyUserList: [],//责任人
         jobId: null,//责任工种
@@ -203,21 +200,41 @@
           },
           // 责任工号
           {
-            field: 'blameUserId',
-            type: 'select',
-            options: () => self.userList,
-            labelKey: 'userName',
-            valueKey: 'userId',
-            width: 'auto'
+            field: 'userName',
+            title: self.$t('blameUserId'),
+            width: 'auto',
+            sortBoolean: false,
+            multiple: false,
+            type: 'tableSelect',
+            param: () => {
+              return {
+                nodeId: self.blameNodeId ? parseInt(self.blameNodeId) : null,
+                productId: self.formData.productId,
+              }
+            },
+            dataType: self.$config.tableSelectType.blameUser,
+            fieldUpdate: self.$updateColumns.halfCheckUser,
+            searchDetailFlag: false,
           },
           // 责任工种
           {
-            field: 'blameWsJobId',
-            type: 'select',
-            options: () => self.jobList,
-            labelKey: 'jobName',
-            valueKey: 'jobId',
-            width: 'auto'
+            field: 'jobName',
+            title: self.$t('blameWsJobId'),
+            width: 'auto',
+            sortBoolean: false,
+            multiple: false,
+            type: 'tableSelect',
+            param: () => {
+              return {
+                nodeId: self.blameNodeId ? parseInt(self.blameNodeId) : null,
+                productId: self.formData.productId,
+                userId: self.userId ? parseInt(self.userId) : null,
+                defectId: self.pdtDefectId ? parseInt(self.pdtDefectId) : null,
+              }
+            },
+            dataType: self.$config.tableSelectType.job,
+            fieldUpdate: self.$updateColumns.halfCheckJob,
+            searchDetailFlag: false
           },
         ],
         //责任员工
@@ -268,6 +285,10 @@
         defectPlaceModal: false,//缺陷弹窗
         modalTitle: self.$config.formMode.setDefectPlace,
         defectPlaceList: [],//缺陷位置
+        stationFlag: false,//默认工位标识
+        userId: null,//当前选择的工号
+        blameNodeId: null,//当前选择的工序
+        pdtDefectId: null,//当前选择的缺陷
       }
     },
     methods: {
@@ -358,6 +379,37 @@
           }
         })
       },
+      /**
+       *   @desc   : 查询员工
+       *   @date   : 2023/3/20 13:18
+       *   @author : 寇珊珊
+       */
+      getStaff() {
+        if (this.blameNodeId) {
+          return
+        }
+        let params = {
+          ftyId: this.formData.ftyId,
+          userId: this.userId?parseInt(this.userId):null,
+        }
+        this.excute(this.$service.commonService, this.$service.commonService.getTeamStaff, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.staffList = res.data.list
+            for(let i  of this.staffList){
+              i.blameStaffId=i.staffId
+              i.blameWsJobId=i.jobId
+            }
+            if(!this.jobId ||this.staffList.filter(it=>it.jobId==this.jobId).length==0){
+              let _this = this
+              setTimeout(()=>{
+                _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
+              }, 200)
+            }
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      },
 
       //endregion
 
@@ -384,7 +436,6 @@
           let list = this.gradeList.filter(it => it.gradeId == row)
           if (list.length > 0) {
             this.formData.opnGradeKind = list[0].gradeKind
-            console.log('this.formData.opnGradeKind', this.formData.opnGradeKind)
             //产品等级不为优
             if (this.formData.opnGradeKind != this.$config.gradeKindType.excellent) {
               //调用查询缺陷位置
@@ -417,50 +468,65 @@
               dftFineName: list[0].fineName
             })
           }
-          //查询缺陷数据
-          this.getDefect(rowIndex)
+
         }
         //责任工序
         else if (colItem.field == 'blameNodeId') {
           let list = this.defectNodeList.filter(it => it.nodeId == row.blameNodeId)
           if (list.length > 0) {
-            this.userList = list[0].userList
-            this.jobList = list[0].jobList
+            this.blameNodeId = list[0].nodeId
             //责任工序
             this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
               blameNodeId: list[0].nodeId,
               blameNodeName: list[0].nodeName,
               //责任工号
-              blameUserId: null,
-              blameUserId_Name: null,
+              blameUserId: list[0].userId,
+              blameUserName: list[0].userName,
+              userName: list[0].userName,
               //责任工种
-              blameWsJobId: null,
-              blameWsJobId_Name: null,
+              blameWsJobId: list[0].jobId,
+              blameWsJobName: list[0].jobName,
+              jobName: list[0].jobName,
             })
+            this.userId = list[0].userId
+            this.jobId = list[0].jobId
+            this.detailColumns[6].disabled=true
+            this.detailColumns[7].disabled=true
+            //员工
+            this.staffList= list[0].clockList
+            for(let i  of this.staffList){
+              i.blameStaffId=i.staffId
+              i.blameWsJobId=i.jobId
+            }
+            if(!this.jobId ||this.staffList.filter(it=>it.jobId==this.jobId).length==0){
+              let _this = this
+              setTimeout(()=>{
+                _this.$refs['staff-table-select'].$refs.table.setAllCheckboxRow(true)
+              }, 200)
+            }
           }
         }
         //责任工号
-        else if (colItem.field == 'blameUserId') {
-          let list = this.userList.filter(it => it.userId == row.blameUserId)
-          if (list.length > 0) {
-            //责任工号
-            this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
-              blameUserId: list[0].userId,
-              blameUserName: list[0].userName,
-            })
+      else if (colItem.field == 'userName') {
+          this.userId = row.userId
+          this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
+            blameUserId: row.userId,
+            blameUserName: row.userName,
+          })
+          if(this.userId){
+            //查询员工
+            this.getStaff()
           }
         }
         //责任工种
-        else if (colItem.field == 'blameWsJobId') {
-          let list = this.jobList.filter(it => it.jobId == row.blameWsJobId)
-          if (list.length > 0) {
-            this.jobId = row.blameWsJobId
-            this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
-              //责任工种
-              blameWsJobId: list[0].jobId,
-              blameWsJobName: list[0].jobName,
-            })
-          }
+        else if (colItem.field == 'jobName') {
+          this.jobId = row.jobId
+          this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
+            //责任工种
+            blameWsJobId: row.jobId,
+            blameWsJobName: row.jobName,
+          })
+
         }
         //缺陷位置
         if (colItem.field == 'pdtPlaceId') {
@@ -500,48 +566,41 @@
               //扣罚id
               this.$set(this.detailList[rowIndex], 'pdtDefectId', res.data.defectId)
               this.$set(this.detailList[rowIndex], 'defectName', res.data.defectName)
+              this.pdtDefectId = res.data.defectId
               this.defectFines = res.data.defectFines
+              //查询缺陷数据
+              this.getDefect(rowIndex)
             } else {
               this.$Message.error(res.message)
             }
           })
         }
+        //todo  现在没有小叉叉的清除事件
+        else if (field === 'blameNodeId') {
+          this.detailList[rowIndex] = Object.assign(this.detailList[rowIndex], {
+            blameNodeId:null,
+            blameNodeName: null,
+            //责任工号
+            blameUserId: null,
+            blameUserName: null,
+            userName: null,
+            //责任工种
+            blameWsJobId: null,
+            blameWsJobName: null,
+            jobName: null,
+          })
+          this.userId = null
+          this.jobId = null
+        }
       },
       /**
-       *   @desc   : 删除责任员工
-       *   @date   : 2023/3/7 14:23
-       *   @author : 寇珊珊
-       */
-      delGroupStaff(row, rowIndex) {
-        this.staffList.splice(rowIndex, 1)
-        this.detailList[this.$refs.detailList.currentRowIndex].staffList = this.staffList
-      },
-      /**
-       *   @desc   : 保存责任员工的改动
-       *   @date   : 2023/3/7 14:25
-       *   @author : 寇珊珊
-       */
-      saveDetailChange(field, row, rowIndex) {
-        this.currentChange({
-          rowIndex: this.$refs.recordTable.currentRowIndex,
-          oldRowIndex: this.$refs.recordTable.currentRowIndex
-        })
-      },
-      /**
-       *   @desc   : 行改变时间
-       *   @date   : 2023/2/28 11:22
+       *   @desc   : 责任员工选择
+       *   @date   : 2023/3/20 10:38
        *   @author : 寇珊珊
        */
-      currentChange(e) {
-        if (!this.detailList[e.rowIndex]) {
-          this.detailList[e.rowIndex] = {}
-        }
-        if (Object.keys(e).length == 2 && this.detailList[e.oldRowIndex]) {
-          this.detailList[e.oldRowIndex].prodDefectStaffList = this.$refs.staffTable.tableData
-        }
-        this.staffList = this.detailList[e.rowIndex].prodDefectStaffList || []
+      staffSelectChange(list, row, checked, allFlag) {
+        console.log('staffSelectChange', list, row, checked, allFlag)
       },
-
       /**
        *   @desc   : 删除提交行数据
        *   @date   : 2023/3/10 11:26
@@ -584,26 +643,36 @@
         }
         //endregion
 
-        //region 扣除数
-        if (item.deductNum == null) {
-          this.$Message.error(this.$t('W_069', { 'param': this.$t('deductNum') }))
+        //region 缺陷位置
+        if (item && this.formData.opnGradeKind != this.$config.gradeKindType.excellent &&  item.pdtPlaceId == null) {
+          this.$Message.error(this.$t('W_069', { 'param': this.$t('pdtPlaceId') }))
           this.setErrToRow(item, this.$t('W_093', {
-            'param': this.$t('deductNum')
+            'param': this.$t('pdtPlaceId')
           }))// 给行增加错误提示信息
           return false
         }
         //endregion
 
-        //region 责任工序
-        if (item.blameNodeId == null) {
-          this.$Message.error(this.$t('W_069', { 'param': this.$t('blameNodeId') }))
+        //region 扣除数
+        if (item.deductNum == null) {
+          this.$Message.error(this.$t('W_069', { 'param': this.$t('deductNum') }))
           this.setErrToRow(item, this.$t('W_093', {
-            'param': this.$t('blameNodeId')
+            'param': this.$t('deductNum')
           }))// 给行增加错误提示信息
           return false
         }
         //endregion
 
+        //region 责任工序  todo  目前不是必填的
+        // if (item.blameNodeId == null) {
+        //   this.$Message.error(this.$t('W_069', { 'param': this.$t('blameNodeId') }))
+        //   this.setErrToRow(item, this.$t('W_093', {
+        //     'param': this.$t('blameNodeId')
+        //   }))// 给行增加错误提示信息
+        //   return false
+        // }
+        //endregion
+
         //region 责任工号
         if (item.blameUserId == null) {
           this.$Message.error(this.$t('W_069', { 'param': this.$t('blameUserId') }))
@@ -648,8 +717,9 @@
         if (!this.validDataAddRow()) {
           return
         }
-        this.detailList[0].info =null
-        this.detailList[0].blameStaffName = this.detailList[0].prodDefectStaffList.map(map => map.blameStaffId).toString()
+        this.detailList[0].info = null
+        this.detailList[0].blameStaffName = this.$refs['staff-table-select'].$refs.table.getCheckboxRecords().map(map => map.staffName).toString()
+        this.detailList[0].prodDefectStaffList =this.$refs['staff-table-select'].$refs.table.getCheckboxRecords()
         //缺陷编码
         this.detailList[0].pdtDefectCode = this.detailList[0].defectCode
         //缺陷名称
@@ -730,10 +800,10 @@
           // "pdtViewImageId": 7,
           //   "dftCoordinate": {},
           for (let i of  this.params.productionDefectList[it].prodDefectStaffList) {
-            if(this.params.productionDefectList[it].blameWsJobId){
+            if (this.params.productionDefectList[it].blameWsJobId) {
               i.blameWsJobId = this.params.productionDefectList[it].blameWsJobId
-            }else{
-              i.blameWsJobId=jobId
+            } else {
+              i.blameWsJobId = 0
             }
           }
         }
@@ -839,6 +909,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if (res.data.stationId) {
+              this.formData.stationId = res.data.stationId
+              this.formData.stationName = res.data.stationName
+              this.stationFlag = true
+            }
           } else {
             this.$Message.error(res.message)
           }
@@ -856,6 +932,11 @@
       this.getWorkStation()
       //根据节点id查询工序节点
       this.selectProcessNode()
+    },
+    watch: {
+      staffList(){
+        console.log('staffList', this.staffList)
+      }
     }
   }
 </script>

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

@@ -10,11 +10,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -117,6 +118,7 @@
         userKind: null,//用户类型
         pieceKind: null,//计件模式
         carCodeList: [],//车码集合
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -313,6 +315,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 9 - 1
src/view/pdm/data-collection/outKiln-add.vue

@@ -10,11 +10,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -115,6 +116,7 @@
         userKind: null,//用户类型
         pieceKind: null,//计件模式
         carCodeList: [],//车码集合
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -311,6 +313,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 9 - 2
src/view/pdm/data-collection/recover-add.vue

@@ -9,11 +9,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -93,7 +94,7 @@
         barCodeList: [],//产品条码集合
         pieceKind: null,//计件
         userKind: null,//用户类型
-
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -236,6 +237,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

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

@@ -11,11 +11,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -124,6 +125,7 @@
         opnKind: null,//工序类型
         pieceKind: null,//计件模式
         userKind: null,//用户类型
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -328,6 +330,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 9 - 1
src/view/pdm/data-collection/uninstallKiln-add.vue

@@ -10,11 +10,12 @@
         <!--  下拉区域  -->
         <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--选择工位-->
-          <DkFormItem v-if="workStationList.length>0" :required="true" prop="stationId"
+          <DkFormItem v-if="workStationList.length>0 || formData.stationId" :required="true" prop="stationId"
                       :data-type="$config.dataType.number" :label="$t('stationId')">
             <SelectMagnifier v-model="formData.stationId" :display-text="formData.stationName"
                              :type="this.$config.MagnifierType.station"
                              :multiple="false"
+                             :disabled="stationFlag"
                              :search-info="{flowNodeId:flowNodeId}"
                              @ok="chooseStation"></SelectMagnifier>
           </DkFormItem>
@@ -103,6 +104,7 @@
         workStationList: [],//工位数据
         userKind: null,//用户类型
         carCodeList: [],//车码集合
+        stationFlag:false,//默认工位标识
       }
     },
     methods: {
@@ -258,6 +260,12 @@
               this.formData.prodUserCode = this.$store.state.user.userCode
               this.formData.prodUserId = this.$store.state.user.id
             }
+            //默认工位
+            if(res.data.stationId){
+              this.formData.stationId= res.data.stationId
+              this.formData.stationName= res.data.stationName
+              this.stationFlag=true
+            }
           } else {
             this.$Message.error(res.message)
           }

+ 13 - 0
src/view/pdm/process_node_reverse/index.vue

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

+ 13 - 0
src/view/pdm/prod-defect/index.vue

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

+ 13 - 0
src/view/pdm/prod_carryover/index.vue

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

+ 13 - 0
src/view/pdm/prod_check/index.vue

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