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

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

zhoux 2 лет назад
Родитель
Сommit
b98de8d625
35 измененных файлов с 1413 добавлено и 174 удалено
  1. 1 1
      package.json
  2. 2 0
      src/api/pages/common/common.js
  3. 38 0
      src/api/pages/sheet/sheetDispatch.js
  4. 2 2
      src/components/base/dk-date-picker-pop/dk-date-picker-pop.vue
  5. 3 0
      src/components/base/dk-form/dk-form-item.vue
  6. 21 2
      src/components/business/gantt/gantt.vue
  7. 1 1
      src/components/business/select-magnifier/select-magnifier.vue
  8. 74 46
      src/components/business/select-magnifier/setting.js
  9. 24 0
      src/components/business/table-select/table-select.vue
  10. 4 0
      src/config/index.js
  11. 20 0
      src/libs/update-columns/index.js
  12. 9 1
      src/locale/lang/zh-CN.js
  13. 25 0
      src/router/routers.js
  14. 8 8
      src/view/core/organization/index.vue
  15. 39 12
      src/view/core/staff/index.vue
  16. 1 1
      src/view/core/system-setting/index.vue
  17. 7 9
      src/view/core/user/form.vue
  18. 8 6
      src/view/core/user/index.vue
  19. 21 12
      src/view/mst/barcode-set/index.vue
  20. 1 1
      src/view/mst/dictionary/index.vue
  21. 3 0
      src/view/mst/equip-kiln/index.vue
  22. 1 3
      src/view/mst/factory-space/index.vue
  23. 277 19
      src/view/mst/label-print-layout/layout-setting.vue
  24. 6 0
      src/view/mst/label-printer/index.vue
  25. 2 1
      src/view/mst/model-category/index.vue
  26. 6 6
      src/view/mst/model-units/index.vue
  27. 17 4
      src/view/mst/model/index.vue
  28. 1 1
      src/view/mst/product-grade/index.vue
  29. 18 0
      src/view/sheet/dispatch/add.vue
  30. 18 0
      src/view/sheet/dispatch/edit.vue
  31. 363 0
      src/view/sheet/dispatch/form.vue
  32. 267 0
      src/view/sheet/dispatch/index.vue
  33. 66 2
      src/view/sheet/produce/form.vue
  34. 58 34
      src/view/sheet/produce/index.vue
  35. 1 2
      src/view/sheet/setting/index.vue

+ 1 - 1
package.json

@@ -75,7 +75,7 @@
     "vue-i18n": "^7.8.0",
     "vue-jsonp": "^2.0.0",
     "vue-pdf": "^4.3.0",
-    "vue-plugin-hiprint": "0.0.54-fix",
+    "vue-plugin-hiprint": "0.0.56",
     "vue-printjs": "^1.0.0",
     "vue-property-decorator": "^9.1.2",
     "vue-quill-editor": "^3.0.6",

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

@@ -205,6 +205,8 @@ export default {
     getSelectMagnifier: 'get_select_magnifier',
     // 获取理化检验单
     getPhysicalCollect: 'get_physical_collection_by_page',
+    // 获取理化检验单
+    getSheetProduce: 'get_sheet_produce_by_page',
   },
 }
 

+ 38 - 0
src/api/pages/sheet/sheetDispatch.js

@@ -0,0 +1,38 @@
+/**
+ * @desc   : 生产派工单
+ * @author : 洪旭东
+ * @date   : 2023-12-26 10:28
+ */
+export default {
+  sheetDispatchService:{
+    prefix:'/sheet-server/sht/sheet_dispatch/',
+    //新建编辑
+    insertUpdate:'insert_update',
+    //暂停
+    pause: 'pause',
+    //重启
+    restart: 'restart',
+    //取消
+    cancel: 'cancel',
+    //删除
+    delete: 'delete',
+  }
+}
+
+/**
+ * 路由
+ */
+export const routeUrl = {
+  sheetDispatch: {
+    dispatch2:{key: 'dispatch2', method: 'dispatch2'},
+    edit:{key:'edit',method:'edit'},
+    //暂停
+    pause:{key: 'pause', method: 'pause'},
+    //重启
+    restart:{key: 'restart', method: 'restart'},
+    //取消
+    cancel:{key: 'cancel', method: 'cancel'},
+    //删除
+    delete:{key: 'delete', method: 'delete'},
+  },
+}

+ 2 - 2
src/components/base/dk-date-picker-pop/dk-date-picker-pop.vue

@@ -113,9 +113,9 @@
             return 'yyyy'
           } else if (this.type === 'month') {
             return 'yyyy-MM'
-          } else {
-            return this.format
           }
+        }else{
+          return this.format
         }
       },
     },

+ 3 - 0
src/components/base/dk-form/dk-form-item.vue

@@ -81,6 +81,9 @@ export default {
     },
     required(n, o) {
       this.setRules(n);  // 设置必填项规则
+    },
+    label(n, o) {
+     this.labelData = n;
     }
   },
   data() {

+ 21 - 2
src/components/business/gantt/gantt.vue

@@ -45,10 +45,15 @@ export default {
       ]
     },
     data:{
-      type:Array,
+      type:Object,
       default: ()=> demo
     }
   },
+  watch: {
+    data () {
+      this.refresh()
+    }
+  },
   data() {
     return {
       tasks: {
@@ -85,7 +90,21 @@ export default {
     }
   },
   methods: {
-
+    init() {
+      //是否显示grid
+      gantt.config.show_grid = this.showGrid;
+      //设置列
+      gantt.config.columns = this.columns
+      //初始化
+      gantt.init(this.$refs.gantt)
+      this.refresh()
+    },
+    refresh() {
+      //清空数据源
+      gantt.clearAll()
+      //转换数据
+      gantt.parse(this.data)
+    }
   },
   mounted() {
     gantt.config.grid_resize = true;

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

@@ -1159,7 +1159,7 @@ export default {
       self = this.objectMerge(self, set)
       if(self.pageSize){
         self.pageInfo.pageSize = self.pageSize;
-        console.log('bbd34',self.pageSize)
+        // console.log('bbd34',self.pageSize)
       }
       // // 员工
       // if (self.type === self.$config.MagnifierType.staff) {

+ 74 - 46
src/components/business/select-magnifier/setting.js

@@ -17,7 +17,7 @@ const data = {
     // 默认页数
     pageSize:200,
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getStaff',
     // 放大镜查询方法
@@ -48,7 +48,7 @@ const data = {
   // 责任员工
   teamStaff: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getTeamStaff',
     // 放大镜查询方法
@@ -75,7 +75,7 @@ const data = {
   // 用户
   user: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getUser',
     // 放大镜查询方法
@@ -101,7 +101,7 @@ const data = {
   // 生产工号
   workUser: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getUser',
     // 放大镜查询方法
@@ -127,7 +127,7 @@ const data = {
   // 部门
   organization: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getOrganization',
     // 放大镜查询方法
@@ -155,7 +155,7 @@ const data = {
   // 产品信息(条码变更)
   productNodeChange: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProductForChange',
     // 放大镜查询方法
@@ -199,7 +199,7 @@ const data = {
   // 产品釉色设定
   productColour: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getColourForSet',
     // 放大镜查询方法
@@ -225,7 +225,7 @@ const data = {
   // 产品商标釉色设定
   productLogoColour: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getLogoForSet',
     // 放大镜查询方法
@@ -254,7 +254,7 @@ const data = {
   // 查询成型产品型号
   getProductModel: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProductModel',
     // 放大镜查询方法
@@ -283,7 +283,7 @@ const data = {
   // 工艺节点
   processNode: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProcessNode',
     // 放大镜查询方法
@@ -312,7 +312,7 @@ const data = {
   // 标签
   customTags: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getCustomTag',
     // 放大镜查询方法
@@ -339,7 +339,7 @@ const data = {
   // 角色
   role: {
     // 接口文件
-    service: 'roleService',
+    serviceStr: 'roleService',
     // 下拉的查询方法
     methodsName: 'selectByCond',
     // 放大镜查询方法
@@ -365,7 +365,7 @@ const data = {
   // 岗位
   job: {
     // 接口文件
-    service: 'jobService',
+    serviceStr: 'jobService',
     // 下拉的查询方法
     methodsName: 'selectByCond',
     // 放大镜查询方法
@@ -391,7 +391,7 @@ const data = {
   // 职务
   post: {
     // 接口文件
-    service: 'postService',
+    serviceStr: 'postService',
     // 下拉的查询方法
     methodsName: 'selectByCond',
     // 放大镜查询方法
@@ -417,7 +417,7 @@ const data = {
   // 渠道
   channel: {
     // 接口文件
-    service: 'channelService',
+    serviceStr: 'channelService',
     // 下拉的查询方法
     methodsName: 'selectByCond',
     // 放大镜查询方法
@@ -443,7 +443,7 @@ const data = {
   // 产品
   product: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelProduct',
     // 放大镜查询方法
@@ -473,7 +473,7 @@ const data = {
   // 模具
   mould: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMouldByPage',
     // 放大镜查询方法
@@ -498,7 +498,7 @@ const data = {
   // 型号
   modelMould: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelMould',
     // 放大镜查询方法
@@ -528,7 +528,7 @@ const data = {
   // 物料型号
   modelMaterial: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelMaterial',
     // 放大镜查询方法
@@ -554,7 +554,7 @@ const data = {
   // 产品型号变更-成型线分组
   moldlineGroup: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMoldlineGroupByPage',
     // 放大镜查询方法
@@ -586,7 +586,7 @@ const data = {
   // 上卸模-成型线分组
   moldlineGroupByMouldManager: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMoldlineGroupByPage',
     // 放大镜查询方法
@@ -618,7 +618,7 @@ const data = {
   // 成型线
   moldline: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMoldLinePage',
     // 放大镜查询方法
@@ -647,7 +647,7 @@ const data = {
   // 工号变更选择成型线
   jobNumberChangeMoldline: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMoldLinePage',
     // 放大镜查询方法
@@ -676,7 +676,7 @@ const data = {
   // 用户
   userAndClock: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getUserByCodePage',
     // 放大镜查询方法
@@ -704,7 +704,7 @@ const data = {
   // 产品类别
   modelCategory: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelCategory',
     // 放大镜查询方法
@@ -723,13 +723,14 @@ const data = {
     selectLabel: 'levelName',
     // 列表列
     columns: [
-      {field: 'levelName', width: '200', title: $t('productCategory')},
+      {field: 'categoryName', width: '200', title: $t('productCategory')},
+      {field: 'levelName', width: '200', title: $t('modelCategoryLevelName')},
     ],
   },
   // 窑炉
   kilnCode: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getKilnByPage',
     // 放大镜查询方法
@@ -755,7 +756,7 @@ const data = {
   // 工位工号(工位打卡选择用户)
   stationUser: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getWorkStationUserPage',
     // 放大镜查询方法
@@ -784,7 +785,7 @@ const data = {
   // 工位
   station: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getWorkStationByPage',
     // 放大镜查询方法
@@ -811,7 +812,7 @@ const data = {
   // 工艺流程
   processFlow: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProcessFlow',
     // 放大镜查询方法
@@ -837,7 +838,7 @@ const data = {
   // 产品类别(分页,在产品明细报表)
   modelCategoryReport: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelCategoryPage',
     // 放大镜查询方法
@@ -859,13 +860,14 @@ const data = {
     },
     // 列表列
     columns: [
+      {field: 'categoryName', width: '100', title: $t('modelCategoryLevelName')},
       {field: 'levelName', width: '200', title: $t('productCategory')},
     ],
   },
   // 模具类别(分页)
   getModelCategoryByPage: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelCategoryByPage',
     // 放大镜查询方法
@@ -884,13 +886,14 @@ const data = {
     selectLabel: 'levelName',
     // 列表列
     columns: [
+      {field: 'categoryName', width: '100', title: $t('modelCategoryLevelName')},
       {field: 'levelName', width: '200', title: $t('productCategory')},
     ],
   },
   // 湿温度计(分页)
   thmeterRecordByPage: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'thmeterRecordByPage',
     // 放大镜查询方法
@@ -917,7 +920,7 @@ const data = {
   // 工种
   workJob: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getJobByPage',
     // 放大镜查询方法
@@ -947,7 +950,7 @@ const data = {
   // 获取员工用于报工记录查询
   getStaffWithWork: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getStaffWithWork',
     // 放大镜查询方法
@@ -974,7 +977,7 @@ const data = {
   // 型号种类 成型线类型
   moldlineType: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getMoldlineType',
     // 放大镜查询方法
@@ -1000,7 +1003,7 @@ const data = {
   // 数据字典
   dictionaryData: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getDictionaryData',
     // 放大镜查询方法
@@ -1026,7 +1029,7 @@ const data = {
   // 报工项目
   workBook: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getWorkProject',
     // 放大镜查询方法
@@ -1056,7 +1059,7 @@ const data = {
   // 产品型号、物料型号
   modelBase: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelBase',
     // 放大镜查询方法
@@ -1084,7 +1087,7 @@ const data = {
   // 产品等级
   productGrade: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProductGrade',
     // 放大镜查询方法
@@ -1110,7 +1113,7 @@ const data = {
   // 产品缺陷
   productDefect: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getProductDefects',
     // 放大镜查询方法
@@ -1137,7 +1140,7 @@ const data = {
   // 产品型号
   modelProduct: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getModelProduct',
     // 放大镜查询方法
@@ -1164,7 +1167,7 @@ const data = {
   // 仓库
   warehouse: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getWarehouse',
     // 放大镜查询方法
@@ -1190,7 +1193,7 @@ const data = {
   // 仓位
   warehousePlace: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getWarehousePlace',
     // 放大镜查询方法
@@ -1216,7 +1219,7 @@ const data = {
   // 理化检验
   physicalCollect: {
     // 接口文件
-    service: 'commonService',
+    serviceStr: 'commonService',
     // 下拉的查询方法
     methodsName: 'getPhysicalCollect',
     // 放大镜查询方法
@@ -1238,12 +1241,37 @@ const data = {
       {field: 'collectNo', width: 'auto'},
     ],
   },
+  // 生产工单
+  sheetProduce: {
+    // 接口文件
+    service: 'commonService',
+    // 下拉的查询方法
+    methodsName: 'getSheetProduce',
+    // 放大镜查询方法
+    methodsNameDetail: 'getSheetProduce',
+    // 查询条件
+    searchContent: [
+      {itemCode: 'produceNo'},
+    ],
+    // 查询条件一行个数
+    colCount: 2,
+    // 弹窗的宽度
+    modalWidth: 550,
+    // 列表主键Id
+    selectKey: 'produceId',
+    // 列表主键名称
+    selectLabel: 'produceNo',
+    // 列表列
+    columns: [
+      {field: 'produceNo', width: 'auto'},
+    ],
+  },
 }
 
 
 export const setSetting = (services, type) => {
   let setting = data[type];
-  setting.service = services[setting.service]
+  setting.service = services[setting.serviceStr]
   return setting;
 }
 

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

@@ -1644,6 +1644,30 @@ export default {
           {field: 'placeName', width: 'auto'},
         ]
       }
+      // 工位
+      else if (this.dataType === this.$config.tableSelectType.workStation) {
+        this.service = this.$service.commonService
+        this.methodsName = 'getWorkStation'
+        this.methodsNameDetail = 'getWorkStation'
+        // 查询条件
+        this.searchContent = [
+          {
+            valueFormat: {code: 'stationName'},
+          },
+        ]
+        this.selectKey = 'stationId'
+        this.selectLabel = 'stationName'
+        this.modalWidth = 600
+        this.colCount = 2
+        this.columns = [
+          {field: 'stationCode', width: 'auto'},
+          {field: 'stationName', width: 'auto'},
+        ]
+        this.columnsDetail = [
+          {field: 'stationCode', minWidth: 'auto'},
+          {field: 'stationName', width: 'auto'},
+        ]
+      }
     },
     /**
      * @desc   : 设置传入数据源的列

+ 4 - 0
src/config/index.js

@@ -1217,6 +1217,8 @@ export default {
     warehousePlace: 'warehousePlace',
     //理化检验
     physicalCollect: 'physicalCollect',
+    //生产工单
+    sheetProduce: 'sheetProduce',
   },
 
   /**
@@ -1301,6 +1303,8 @@ export default {
     warehouse: 'warehouse',
     //仓位
     warehousePlace: 'warehousePlace',
+    //工位
+    workStation: 'workStation',
   },
   /**
    * @desc   : 选择类型

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

@@ -515,4 +515,24 @@ export default {
     {updateField: 'pdtModelName', valueFiled: 'modelName'},
     {updateField: 'unitId', valueFiled: 'unitId'},
   ],
+
+  /**
+   * @desc   : 生产派工单选工位
+   * @author : 洪旭东
+   * @date   : 2023-12-25 13:00
+   */
+  sheetProduceWorkStation: [
+    {updateField: 'stationId', valueFiled: 'stationId'},
+    {updateField: 'stationName', valueFiled: 'stationName'},
+  ],
+
+  /**
+   * @desc   : 工单报工选择工号
+   * @author : 洪旭东
+   * @date   : 2023-10-10 10:15
+   */
+  sheetDispatchUser: [
+    {updateField: 'prodUserId', valueFiled: 'userId'},
+    {updateField: 'prodUserCodeName', valueFiled: 'userCodeName'},
+  ],
 }

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

@@ -166,6 +166,7 @@ export const button = {
   release:'发布(F)',
   pause:'暂停(Z)',
   restart:'重启(R)',
+  dispatch2: '派工(N)',
 }
 
 /**
@@ -395,6 +396,7 @@ export const columns = {
   orgCode: '组织编号',
   orgName: '组织名称',
   orgLevelName: '组织全称',
+  organizationLevel: '组织机构',
   seq: '行号',
   displayNo: '显示顺序',
   flgValid: '状态',
@@ -472,6 +474,7 @@ export const columns = {
   spaceId: '工厂区域',
   spaceCode: '区域编号',
   spaceName: '区域名称',
+  spaceLevelName: '区域全称',
   spaceKind: '区域类型',
   parentSpace: '上级区域',
   workSpaceId: '所在区域',
@@ -552,6 +555,7 @@ export const columns = {
   modelName: '型号名称',
   modelCategory: '型号分类',
   modelCategoryName: '型号分类',
+  modelCategoryLevelName: '分类全称',
   modelCategoryItemName: '载具分类',
   stdNum: '标准次数',
   outputQty: '产出数量',
@@ -1191,6 +1195,7 @@ export const columns = {
   unitCode: '单位编号',
   unitName: '单位名称',
   unitScale: '小数位数',
+  externalCode: '外部编码',
 
   //条码规则
   barCodePreview: '条码预览',
@@ -1477,6 +1482,9 @@ export const columns = {
   reportStatusName2: '报工状态',
   actualStartTime: '实际开始时间',
   actualFinishTime: '实际完成时间',
+  //生产派工单
+  sheetDispatch: '派工单',
+  dispatchNo: '派工单号',
 }
 
 /**
@@ -1690,7 +1698,7 @@ export const messages = {
   Q_022: '是否确认关闭“生产条码”启用“成型绑码规则”',
   Q_023: '移出与移入数量不同,是否自动报损',
   Q_024: '工单正在执行,是否暂停工单?',
-
+  Q_025: '是否跳转至派工页面?',
 }
 
 /**

+ 25 - 0
src/router/routers.js

@@ -128,6 +128,31 @@ let menu = [
         },
         component: () => import('@/view/sheet/produce/edit.vue')
       },
+
+      {
+        path: '/sheet/dispatch',
+        name: 'sheet_dispatch',
+        meta: {
+          title: '生产派工单',
+        },
+        component: () => import('@/view/sheet/dispatch/index.vue')
+      },
+      {
+        path: '/sheet/dispatch/add',
+        name: 'sheet_dispatch_add',
+        meta: {
+          title: '生产派工单新建',
+        },
+        component: () => import('@/view/sheet/dispatch/add.vue')
+      },
+      {
+        path: '/sheet/dispatch/edit/:id',
+        name: 'sheet_dispatch_edit',
+        meta: {
+          title: '生产派工单编辑',
+        },
+        component: () => import('@/view/sheet/dispatch/edit.vue')
+      },
     ]
   },
   {

+ 8 - 8
src/view/core/organization/index.vue

@@ -35,10 +35,11 @@
                :expand-flag="true"
                tree-row-field="orgId"
                ref="table-select" name="table">
-        <DkTableColumn field="orgCode" width="260" :tree-node="true" type="link"
+        <DkTableColumn field="orgName" width="300" :tree-node="true" type="link"
                        @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
-        <DkTableColumn field="orgName" width="200"></DkTableColumn>
-        <DkTableColumn field="levelName" width="350" :title="$t('organizationLevelName')"></DkTableColumn>
+        <DkTableColumn field="levelName" width="350" :title="$t('orgLevelName')"></DkTableColumn>
+        <DkTableColumn field="orgCode" width="260" :title="$t('externalNo')"></DkTableColumn>
+        <DkTableColumn field="displayNo"></DkTableColumn>
         <DkTableColumn field="flgValid" type="switch"
                        @on-switch-change="onSwitchChange" :switch-disabled="false"></DkTableColumn>
         <DkTableColumn field="remarks" width="auto"></DkTableColumn>
@@ -56,10 +57,6 @@
       :title="modalTitle"
     >
       <DkForm ref="formInline" v-model="formData" :col-count="1">
-        <!--部门编码-->
-        <DkFormItem prop="orgCode" :required="true">
-          <InputPop v-model="formData.orgCode" ref="orgCode"/>
-        </DkFormItem>
         <!--部门名称-->
         <DkFormItem prop="orgName" :required="true">
           <InputPop v-model="formData.orgName" ref="orgName"/>
@@ -75,6 +72,10 @@
         <DkFormItem prop="displayNo" :data-type="$config.dataType.number" :required="true">
           <InputNumberPop v-model="formData.displayNo" ref="displayNo"/>
         </DkFormItem>
+        <!--部门编码-->
+        <DkFormItem prop="orgCode" :title="$t('externalNo')">
+          <InputPop v-model="formData.orgCode" ref="orgCode"/>
+        </DkFormItem>
         <!--备注-->
         <DkFormItem prop="remarks">
           <InputPop v-model="formData.remarks" textareaFlag/>
@@ -108,7 +109,6 @@ export default {
         remarks: ''
       },
       searchContent: [
-        {itemCode: 'orgCode'},
         {itemCode: 'orgName'},
         self.$config.flgValidSearch // 有效标识
       ],

+ 39 - 12
src/view/core/staff/index.vue

@@ -92,16 +92,25 @@
           </SelectPop>
         </DkFormItem>
         <!--    组织机构    -->
-        <DkFormItem prop="orgId" :required="true" :data-type="this.$config.dataType.number">
-          <SelectPop v-model="formData.orgId" ref="orgId" :multiple="false"
-                     :tree-flag="true"
-                     :show-toolbar="true"
-                     :tree-strict="false"
-                     :options="orgList"
-                     labelKey="orgName"
-                     valueKey="orgId">
-          </SelectPop>
+<!--        <DkFormItem prop="orgId" :required="true" :data-type="this.$config.dataType.number">-->
+<!--          <SelectPop v-model="formData.orgId" ref="orgId" :multiple="false"-->
+<!--                     :tree-flag="true"-->
+<!--                     :show-toolbar="true"-->
+<!--                     :tree-strict="false"-->
+<!--                     :options="orgList"-->
+<!--                     labelKey="orgName"-->
+<!--                     valueKey="orgId">-->
+<!--          </SelectPop>-->
+<!--        </DkFormItem>-->
+
+        <DkFormItem :required="true" prop="orgId" :data-type="$config.dataType.number" :label="$t('organizationLevel')">
+          <SelectMagnifier v-model="formData.orgId" :display-text="formData.levelName"
+                           :type="this.$config.MagnifierType.organization"
+                           :multiple="false"
+                           title="业务部门"
+                           @ok="chooseOrg"></SelectMagnifier>
         </DkFormItem>
+
         <!--    员工状态    -->
         <DkFormItem prop="staffStatus" :required="true">
           <SelectPop v-model="formData.staffStatus" ref="staffStatus" :multiple="false"
@@ -152,6 +161,7 @@ export default {
         postId: null,
         orgId: null,
         staffStatus: null,
+        levelName:'',
       },
       jobList: [],
       postList: [],
@@ -165,9 +175,11 @@ export default {
           itemCode: 'staffName',
         },
         {
-          itemCode: 'orgId',
-          valueFormat: {code: 'orgIds', data: [], valueKey: 'orgId', labelKey: 'orgName',},
-          valueKind: self.$config.docUserInput.mChoice
+          itemCode: 'orgIds',
+          itemName:self.$t('organizationLevel'),
+          valueFormat: {code: 'orgIds'},
+          valueKind: self.$config.docUserInput.mSearch,
+          magnifierType: self.$config.MagnifierType.organization
         },
         {
           itemCode: 'staffStatus',
@@ -460,6 +472,21 @@ export default {
       })
     },
     /**
+     * @desc   : 放大镜控件绑定值--业务部门
+     * @author : 姜宁
+     * @date   : 2023/12/27 13:05
+     */
+    chooseOrg(rows) {
+      if (rows){
+        this.formData.orgId = rows[0].orgId;
+        this.formData.levelName = rows[0].levelName
+      }
+      else{
+        this.formData.orgId = null;
+        this.formData.orgName ='';
+      }
+    },
+    /**
      * @desc   : 给参数赋值
      * @author : 沈博
      * @date   : 2022年12月13日10:56:56

+ 1 - 1
src/view/core/system-setting/index.vue

@@ -47,7 +47,7 @@
             :show-setting-flag="false"
             :freeze="false"
             :choose-flag="false">
-            <DkTableColumn field="classCode" :title="$t('settingStyle')" width="100"></DkTableColumn>
+            <DkTableColumn field="classCode" :title="$t('settingStyle')" width="100" :center-flag="true"></DkTableColumn>
             <DkTableColumn field="settingName" width="220"></DkTableColumn>
             <vxe-column show-overflow="ellipsis" field="settingValue" width="100" height="100" min-width="80"
                         class-name="setting-value-class"

+ 7 - 9
src/view/core/user/form.vue

@@ -20,14 +20,14 @@
             <InputPop ref="userName" v-model="formData.userName" :readonly="type === 'edit-staff'"/>
           </DkFormItem>
           <!--所属角色-->
-          <DkFormItem prop="roleIds" :required="true"  :data-type="this.$config.dataType.array">
+          <DkFormItem prop="roleIds" :required="true"  :data-type="this.$config.dataType.array" :label="$t('roleName')">
             <SelectPop v-model="formData.roleIds" :multiple="true" :options="roleList" ref="roleIds" :disabled="type === 'edit-staff'"
                        labelKey="roleName"
                        valueKey=roleId>
             </SelectPop>
           </DkFormItem>
           <!--业务部门-->
-          <DkFormItem :required="true" prop="orgId" :data-type="$config.dataType.number" :label="$t('orgId')">
+          <DkFormItem :required="true" prop="orgId" :data-type="$config.dataType.number" :label="$t('organizationLevel')">
             <SelectMagnifier v-model="formData.orgId" :display-text="formData.levelName" :disabled="type === 'edit-staff'"
                              :type="this.$config.MagnifierType.organization"
                              :multiple="false"
@@ -35,17 +35,15 @@
                              @ok="chooseOrg"></SelectMagnifier>
           </DkFormItem>
 
-          <!--业务员-->
-          <DkFormItem prop="staffId" :data-type="$config.dataType.number" :label="$t('staffId')">
-            <SelectMagnifier @ok="chooseStaff" v-model="formData.staffId" :display-text="formData.staffName" :disabled="type === 'edit-staff'"
-                             :type="this.$config.MagnifierType.staff" :multiple="false"></SelectMagnifier>
-          </DkFormItem>
-
           <!--生产工号【开关模式】-->
           <DkFormItem :label="$t('makeUserId')">
             <dk-switch v-model="prodUserFlag" :disabled="type === 'edit-staff'" @on-change="handleChangeProdUser"/>
           </DkFormItem>
-
+          <!--业务员-->
+          <DkFormItem prop="staffId" :data-type="$config.dataType.number" :label="prodUserFlag ? $t('staffId'):$t('staffNames')">
+            <SelectMagnifier @ok="chooseStaff" v-model="formData.staffId" :display-text="formData.staffName" :disabled="type === 'edit-staff'"
+                             :type="this.$config.MagnifierType.staff" :multiple="false"></SelectMagnifier>
+          </DkFormItem>
           <!--备注-->
           <DkFormItem prop="remarks" :span="24">
             <InputPop ref="remarks" v-model="formData.remarks" textareaFlag :readonly="type === 'edit-staff'"/>

+ 8 - 6
src/view/core/user/index.vue

@@ -48,7 +48,7 @@
         <DkTableColumn field="userCode" type="link" @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
         <DkTableColumn field="userName"></DkTableColumn>
         <DkTableColumn field="roleName" type="link" @on-link="moduleRights()"></DkTableColumn>
-        <DkTableColumn field="orgLevelName" width="300px"></DkTableColumn>
+        <DkTableColumn field="orgLevelName" width="300px" :title="$t('organizationLevel')"></DkTableColumn>
         <!--        <DkTableColumn field="userTypeName" :title="$t('userType')"></DkTableColumn>-->
         <DkTableColumn field="staffName" :title="$t('staffId')"></DkTableColumn>
         <DkTableColumn field="flgValid" type="switch" @on-switch-change="onSwitchChange"
@@ -68,8 +68,8 @@
                  :choose-flag="false"
                  :data="workTeam">
           <DkTableColumn field="jobName" width="200px"></DkTableColumn>
-          <DkTableColumn field="staffNames" width="400px"></DkTableColumn>
-          <DkTableColumn field="staffName" :title="$t('flgDefaultStaff')" width="200px"></DkTableColumn>
+          <DkTableColumn field="staffNames" width="400px" :title="$t('staffRelation')"></DkTableColumn>
+<!--          <DkTableColumn field="staffName" :title="$t('flgDefaultStaff')" width="200px"></DkTableColumn>-->
         </DkTable>
       </div>
     </DkSplit>
@@ -100,9 +100,11 @@ export default {
             valueKind: self.$config.docUserInput.mChoice
           },
           {
-            itemCode: 'orgId',
-            valueFormat: {code: 'orgIds', data: [], valueKey: 'orgId', labelKey: 'orgName',},
-            valueKind: self.$config.docUserInput.mChoice
+            itemCode: 'orgIds',
+            itemName:self.$t('organizationLevel'),
+            valueFormat: {code: 'orgIds'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.organization
           },
           self.$config.flgValidSearch
         ],

+ 21 - 12
src/view/mst/barcode-set/index.vue

@@ -38,12 +38,18 @@
         </div>
         <!-- 列表部分中间   -->
         <div style="margin-left: 5px;width: calc(100% - 470px);">
-          <div>{{ $t('status') }}
-            <DkSwitch v-model="flgValid" :clearable="false"></DkSwitch>
-          </div>
+          <DkForm ref="dkFormInline" :col-count="6" style="margin-left: 5px;">
+            <div style="cursor: pointer;font-size: 12px; margin-left: 25px;">{{ $t('status') }}
+              <DkSwitch v-model="flgValid" :clearable="false"></DkSwitch>
+            </div>
+            <DkFormItem prop="barCodePreview">
+              <InputPop v-model="barCodePreview" :readonly="true" style="width:200px"/>
+            </DkFormItem>
+          </DkForm>
+
           <div style="display: flex;">
-            <div style="line-height: 28px;min-width: 60px">{{ $t('barCodeFormat') }}</div>
-            <Poptip trigger="hover" transfer placement="top-start" :content="$t('W_184')">
+            <div style="line-height: 28px;min-width: 60px;font-size: 12px;margin-left: 5px;">{{ $t('barCodeFormat') }}</div>
+            <Poptip trigger="hover" transfer placement="top-start" :content="$t('W_184')" style="margin-left: -5px;">
               <Icon type="iconfont iconfont icon-question" style="cursor: pointer;font-size: 12px;" color="#909399"
                     ref="info-icon"/>
             </Poptip>
@@ -63,9 +69,9 @@
             :choose-flag="false"
             :auto-width-flag="false"
             @current-change="currentChangeCenterEvent($event)">
-            <DkTableColumn field="itemName" :title="$t('barCodeProject')" width="100" minWidth="null"></DkTableColumn>
-            <DkTableColumn field="itemCode" :title="$t('barCodeCode')" width="100" minWidth="null"></DkTableColumn>
-            <DkTableColumn field="formatKindName" :title="$t('barCodeType')" width="100"
+            <DkTableColumn field="itemName" :title="$t('barCodeProject')" width="100" minWidth="null" :center-flag="true"></DkTableColumn>
+            <DkTableColumn field="itemCode" :title="$t('barCodeCode')" width="160" minWidth="null" :center-flag="true"></DkTableColumn>
+            <DkTableColumn field="formatKindName" :title="$t('barCodeType')" width="100" :center-flag="true"
                            minWidth="null"></DkTableColumn>
             <vxe-column show-overflow="ellipsis" field="sampleText" width="200" height="100" minWidth="null"
                         class-name="setting-value-class"
@@ -88,22 +94,23 @@
                 <DatePickerPop v-if="row.formatKind ==  $config.barCodeTypes.date"
                                @blur="blurSettingValue(row)"
                                :clearableFlag="false"
+                               format="yyyy-MM-dd"
                                :placeholder="$t('inputWords', {'search-name': row['itemName']})"
                                :type=row.dateType?row.dateType:dateType v-model="row.sampleText"/>
               </template>
             </vxe-column>
             <DkTableColumn field="flgValid" type="switch" :title="$t('barCodeStatus')"
                            :switch-disabled="false" @on-switch-change="onSwitchChange" minWidth="null"></DkTableColumn>
-            <DkTableColumn field="setFormat" :title="$t('barCodeFormat2')" width="220" minWidth="null"></DkTableColumn>
+            <DkTableColumn field="setFormat" :title="$t('barCodeFormat2')" width="100" minWidth="null"></DkTableColumn>
           </DkTable>
           <div style="color: red">{{ $t('barcodeSetTip') }}</div>
         </div>
         <!--右侧表单-->
         <div style="margin-left: 10px; width: 250px;min-width: 250px; margin-top: 60px">
           <DkForm ref="formInline" v-model="formData" :col-count="1">
-            <DkFormItem prop="barCodePreview">
-              <InputPop v-model="barCodePreview" :readonly="true "/>
-            </DkFormItem>
+<!--            <DkFormItem prop="barCodePreview">-->
+<!--              <InputPop v-model="barCodePreview" :readonly="true "/>-->
+<!--            </DkFormItem>-->
             <!--文本固定长度-->
             <DkFormItem prop="textFixedLength" v-if="textFlag">
               <InputNumberPop :min="min-1" :max="max+1" :digits=0
@@ -543,6 +550,8 @@ export default {
       //日期
       else {
         row.setFormat = row.defFormat.DATE_FORMAT
+        //日期默认当天
+        row.sampleText = new Date();
       }
     },
     /**

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

@@ -42,7 +42,7 @@
                  :freeze="false"
                  :choose-flag="false"
                  @current-change="currentChangeEvent($event)">
-          <DkTableColumn :title="$t('dictCode')" field="dictName"
+          <DkTableColumn :title="$t('dictCode')" field="dictName" :center-flag="true"
                          width="auto" :filter=false :sortable="false"></DkTableColumn>
         </DkTable>
         <DkTable slot="right" :id="'table-'+$options.name" ref="table-select" :data="tableData"

+ 3 - 0
src/view/mst/equip-kiln/index.vue

@@ -394,6 +394,9 @@ export default {
       this.excute(this.$service.commonService, this.$service.commonService.getFactorySpace, params, false).then(res => {//调用api查询方法
         if (res.code === this.$config.SUCCESS_CODE) {
           this.spaceList = res.data
+          if (this.spaceList.length === 1){
+            this.formData.spaceId = this.spaceList[0].spaceId
+          }
         }
       })
     },

+ 1 - 3
src/view/mst/factory-space/index.vue

@@ -39,6 +39,7 @@
         <DkTableColumn field="spaceName" :tree-node="true" type="link"  @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
         <DkTableColumn :title="$t('spaceKind')" field="spaceKindName" ></DkTableColumn>
         <DkTableColumn field="displayNo" :data-type="$config.dataType.number" ></DkTableColumn>
+        <DkTableColumn field="levelName" :title="$t('spaceLevelName')"></DkTableColumn>
         <DkTableColumn field="spaceCode" :title="$t('externalNo')"></DkTableColumn>
         <DkTableColumn field="flgValid" type="switch" @on-switch-change="onSwitchChange"
                        :switch-disabled="false"></DkTableColumn>
@@ -123,9 +124,6 @@ export default {
       spaceKindList:[],
       searchContent: [
         {
-          itemCode: 'spaceCode',
-        },
-        {
           itemCode: 'spaceName',
         },
         self.$config.flgValidSearch,// 有效标识

+ 277 - 19
src/view/mst/label-print-layout/layout-setting.vue

@@ -40,6 +40,15 @@
                 <span class="label">文本</span>
               </div>
             </DkCol>
+            <DkCol span="12">
+              <!--    图片     -->
+              <div class="ep-draggable-item" tid="DKModule.image">
+                <div class="label">
+                  <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
+                </div>
+                <span class="label">图片</span>
+              </div>
+            </DkCol>
 <!--            <DkCol span="12">-->
 <!--              &lt;!&ndash;    表格     &ndash;&gt;-->
 <!--              <div class="ep-draggable-item" tid="DKModule.table">-->
@@ -50,17 +59,6 @@
 <!--              </div>-->
 <!--            </DkCol>-->
           </DkRow>
-<!--          <DkRow>-->
-<!--            <DkCol span="12">-->
-<!--              &lt;!&ndash;    图片     &ndash;&gt;-->
-<!--              <div class="ep-draggable-item" tid="DKModule.image">-->
-<!--                <div class="label">-->
-<!--                  <span class="glyphicon glyphicon-picture" aria-hidden="true"></span>-->
-<!--                </div>-->
-<!--                <span class="label">图片</span>-->
-<!--              </div>-->
-<!--            </DkCol>-->
-<!--          </DkRow>-->
           <div class="title">
             <Icon type="ios-apps" :size="20" class="icon"/>
             辅助元素
@@ -108,7 +106,7 @@
         </Sider>
         <!--   中间设计器     -->
         <Content style="padding: 14px;overflow: hidden;overflow-x: auto;overflow-y: auto;">
-          <div id="hiprint-printTemplate" class="hiprint-printTemplate" style="height: 100%"></div>
+          <div ref="design" id="hiprint-printTemplate" class="hiprint-printTemplate design" style="height: 100%"></div>
         </Content>
         <!--    右侧高级设置    -->
         <Sider class="side" :width="350">
@@ -332,6 +330,7 @@ import {formMixin} from '@/mixins/form'
 import PrintPreview from '_c/business/print/print-preview'
 import { mapState, mapMutations } from 'vuex'
 
+
 export default {
   name:'layout-setting',
   mixins: [formMixin],
@@ -413,7 +412,7 @@ export default {
      * @date   : 2022-5-13 12:58
      */
     resizeTable() {
-      console.log('重写resizeTable')
+      // console.log('重写resizeTable')
     },
 
     /**
@@ -491,6 +490,7 @@ export default {
      * @date   : 2023/6/21 14:10
      */
     init() {
+      let self = this
       // 初始化 provider
       this.$dkprint.init({
         providers: [providers],
@@ -503,6 +503,10 @@ export default {
         optionItems: [
           //重写数据源
           this.fieldSetting(),
+          //重写预览数据
+          this.testDataSetting(),
+          //重写上传图片空间
+          this.uploadSetting(),
           //自定义元素位置坐标(mm)
           this.coordinateMM(),
           //自定义元素宽高大小(mm)
@@ -532,6 +536,9 @@ export default {
             {
               name:'基础',
               options:[
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
                 {
                   name:'coordinateMM',
                   after:'coordinate',
@@ -543,6 +550,62 @@ export default {
                   hidden:false,
                 }
               ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'边框',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+                {name:'showInPage',hidden:true},
+                {name:'unShowInPage',hidden:true},
+                {name:'upperCase',hidden:true},
+                {name:'formatter',hidden:true},
+                {name:'styler',hidden:true},
+              ]
+            }
+          ],
+        },
+        image:{
+          tabs:[
+            {
+              name:'基础',
+              options:[
+                {name:'field',hidden: true},
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
+                {name:'showInPage',hidden:true},
+                {name:'unShowInPage',hidden:true},
+                {
+                  name:'coordinateMM',
+                  after:'coordinate',
+                  hidden:false,
+                },
+                {
+                  name:'widthHeightMM',
+                  after:'widthHeight',
+                  hidden:false,
+                }
+              ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+                {name:'formatter',hidden:true},
+                {name:'styler',hidden:true},
+              ]
             }
           ],
         },
@@ -551,6 +614,9 @@ export default {
             {
               name:'基础',
               options:[
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
                 {
                   name:'coordinateMM',
                   after:'coordinate',
@@ -562,6 +628,16 @@ export default {
                   hidden:false,
                 }
               ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+              ]
             }
           ],
         },
@@ -570,6 +646,9 @@ export default {
             {
               name:'基础',
               options:[
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
                 {
                   name:'coordinateMM',
                   after:'coordinate',
@@ -582,6 +661,16 @@ export default {
                 }
 
               ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+              ]
             }
           ],
         },
@@ -590,6 +679,9 @@ export default {
             {
               name:'基础',
               options:[
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
                 {
                   name:'coordinateMM',
                   after:'coordinate',
@@ -602,6 +694,16 @@ export default {
                 }
 
               ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+              ]
             }
           ],
         },
@@ -610,6 +712,9 @@ export default {
             {
               name:'基础',
               options:[
+                {name:'coordinate',hidden: true},
+                {name:'widthHeight',hidden: true},
+                {name:'fixed',hidden: true},
                 {
                   name:'coordinateMM',
                   after:'coordinate',
@@ -621,6 +726,16 @@ export default {
                   hidden:false,
                 }
               ]
+            },
+            {
+              name:'样式',
+              options:[]
+            },
+            {
+              name:'高级',
+              options:[
+                {name:'pageBreak',hidden:true},
+              ]
             }
           ],
         },
@@ -638,6 +753,38 @@ export default {
       // 先清空, 避免重复构建
       $('#hiprint-printTemplate').empty()
       this.hiprintTemplate = new hiprint.PrintTemplate({
+        // 图片选择功能
+        onImageChooseClick: (target) => {
+          // 创建input,模拟点击,然后 target.refresh 更新
+          let input = document.createElement("input");
+          input.setAttribute("type", "file");
+          input.click();
+          input.onchange = function () {
+            let file = this.files[0];
+            console.log('file',file)
+            if (!file) {
+              return;
+            }
+            if (!(self.$config.uploadFileConfig.acceptPicType).split(',').includes(file.type)) {
+              self.$Message.warning('文件格式不在允许的范围内')
+              return;
+            }
+            if (file.size / 1024  > self.$config.uploadFileConfig.maxSize) {
+              self.$Message.warning(`上传图片大小不能超过${self.$config.uploadFileConfig.maxSize / 1024}M,当前大小:${(file.size / 1024 / 1024).toFixed(2)}M`)
+              return;
+            }
+
+            let reader = new FileReader();
+            //通过文件流行文件转换成Base64字行串
+            reader.readAsDataURL(file);
+            //转换成功后
+            reader.onloadend = function () {
+              // 通过 target.refresh 更新图片元素
+              target.refresh(reader.result);
+            }
+          }
+          input.remove();
+        },
         //导入模板
         template:template,
         //设置字体
@@ -667,6 +814,8 @@ export default {
         this.setPaper('other')
       }
 
+      //添加class 点击时取消选择
+      self.$refs['design'].children[0].classList.add('design')
 
       //模板参数
       console.log('HIPRINT_CONFIG',window.HIPRINT_CONFIG )
@@ -742,6 +891,112 @@ export default {
     },
 
     /**
+     * @desc   : 重写预览数据设置(只改名'测试数据'->'预览数据')
+     * @author : 张潇木
+     * @date   : 2023/6/21 13:44
+     */
+    testDataSetting() {
+      function t() {
+        this.name = "testData";
+      }
+
+      return t.prototype.createTarget = function () {
+        return this.target = $(`<div class="hiprint-option-item hiprint-option-item-row">\n        <div class="hiprint-option-item-label">\n        预览数据\n        </div>\n        <div class="hiprint-option-item-field">\n        <input type="text" placeholder="仅设置数据源时有效" class="auto-submit" >\n        </div>\n    </div>`), this.target;
+      }, t.prototype.getValue = function () {
+        let t = this.target.find("input").val();
+        if (t) return t.toString();
+      }, t.prototype.setValue = function (t) {
+        this.target.find("input").val(t);
+      }, t.prototype.destroy = function () {
+        this.target.remove();
+      }, t;
+    },
+
+    /**
+     * @desc   : 重写上传图片控件
+     * @author : 张潇木
+     * @date   : 2023/6/21 13:44
+     */
+    uploadSetting() {
+
+      function t() {
+        this.name = "src";
+      }
+
+
+      return t.prototype.createTarget = function (t) {
+        this.el = t;
+        let e = void 0, i = this;
+        // this.target = $(`<div class="hiprint-option-item hiprint-option-item-row">\n        <div class="hiprint-option-item-label">\n        图片地址\n        </div>\n        <div class="hiprint-option-item-field" style="display: flex;align-items: baseline;">\n        <input type="text" placeholder="请输入图片地址" class="auto-submit" style="width:70%">\n    <button class="hiprint-option-item-settingBtn" style="padding:0 10px;margin:0 0 0 5px" type="button">选择</button>        </div>\n    </div>`);
+        this.target = $(`<div class="hiprint-option-item hiprint-option-item-row">\n
+                          <input type="text" style="display: none" placeholder="请输入图片地址" class="auto-submit" style="width:70%">
+                          <button class="hiprint-option-item-settingBtn" style="padding:0 10px;margin:10px 0 0 0" type="button">选择图片</button>
+                          </div>`);
+        if (t && (e = t.getOnImageChooseClick()), e) {
+          this.target.find('button').click(function () {
+            e && e(i);
+          })
+        }
+        return this.target;
+      }, t.prototype.getValue = function () {
+        let t = this.target.find("input").val();
+        if (t) return t.toString();
+      }, t.prototype.setValue = function (t) {
+        this.target.find("input").val(t);
+      }, t.prototype.refresh = function (t, opt, cb) {
+        let that = this;
+        this.setValue(t), this.target.find("input").change();
+        if (this.el && opt) {
+          let img = new Image();
+          img.src = t;
+          if (img.complete) {
+            that.updateEl(img.width, img.height, opt, cb)
+          } else {
+            img.onload = function () {
+              that.updateEl(img.width, img.height, opt, cb)
+            }
+          }
+        }
+      }, t.prototype.updateEl = function (width, height, opt, cb) {
+        if (opt) {
+          let ratio, w, h;
+          if (opt || opt.auto) {
+            if (width >= height) {
+              opt.width = true;
+            } else {
+              opt.height = true;
+            }
+          }
+          if (opt.width) {
+            ratio = height / width;
+            w = this.el.options.width;
+            h = Math.floor(w * ratio * 10) / 10;
+            this.el.options.height = h;
+            this.el.designTarget.css('height', h + "pt");
+          } else if (opt.height) {
+            ratio = width / height;
+            h = this.el.options.height;
+            w = Math.floor(h * ratio * 10) / 10;
+            this.el.options.width = w;
+            this.el.designTarget.css('width', w + "pt");
+          } else if (opt.real) {
+            w = hinnn.px.toPt(width);
+            h = hinnn.px.toPt(height);
+            this.el.options.width = w;
+            this.el.options.height = h;
+            this.el.designTarget.css('width', w + "pt");
+            this.el.designTarget.css('height', h + "pt");
+          }
+          this.el.designTarget.children('.resize-panel').trigger($.Event('click'));
+        } else {
+          cb && cb(this.el, width, height);
+        }
+      }, t.prototype.destroy = function () {
+        this.target.remove();
+      }, t;
+    },
+
+    /**
      * @desc   : 自定义参数 - 元素位置坐标(mm)
      * @author : 张潇木
      * @date   : 2023/7/24 10:28
@@ -754,7 +1009,7 @@ export default {
       }
 
       return t.prototype.createTarget = function (t, o) {
-        var n = this;
+        let n = this;
         n.target = $('<div class="hiprint-option-item hiprint-option-item-row">' +
           '<div class="hiprint-option-item-label">\n        位置坐标(mm)\n        </div>' +
           '<div class="hiprint-option-item-field" style="display: flex;align-items: baseline;justify-content: space-between">\n        ' +
@@ -769,7 +1024,7 @@ export default {
         if (t && t.length && this.target) {
           // 仅当前元素被选中才更新坐标位置, 以避免冲突
           if (('block' == t.find('.resize-panel').css('display') || t[0].className.includes('table')) ) {
-            var v = this.getValue();
+            let v = this.getValue();
             // 设置option值,避免再次点击的时值错乱
             self.hiprintTemplate.getSelectEls()[0].options.left=hinnn.mm.toPt(v.left)
             self.hiprintTemplate.getSelectEls()[0].options.top=hinnn.mm.toPt(v.top)
@@ -782,7 +1037,7 @@ export default {
       },
 
       t.prototype.getValue = function () {
-        var v = {
+        let v = {
           left: 0,
           top: 0,
         }
@@ -818,7 +1073,7 @@ export default {
       }
 
       return t.prototype.createTarget = function (t, o) {
-        var n = this;
+        let n = this;
         n.target = $('<div class="hiprint-option-item hiprint-option-item-row">' +
           '<div class="hiprint-option-item-label">\n        宽高大小(mm)\n        </div>' +
           '<div class="hiprint-option-item-field" style="display: flex;align-items: baseline;justify-content: space-between">\n        ' +
@@ -833,7 +1088,7 @@ export default {
           if (t && t.length && this.target) {
             // 仅当前元素被选中才更新宽高大小, 以避免冲突
             if (('block' == t.find('.resize-panel').css('display') || t[0].className.includes('table')) ) {
-              var v = this.getValue();
+              let v = this.getValue();
               // 设置option值,避免再次点击的时值错乱
               self.hiprintTemplate.getSelectEls()[0].options.width=hinnn.mm.toPt(v.width)
               self.hiprintTemplate.getSelectEls()[0].options.height=hinnn.mm.toPt(v.height)
@@ -845,7 +1100,7 @@ export default {
         },
 
         t.prototype.getValue = function () {
-          var v = {
+          let v = {
             width: 0,
             height: 0,
           }
@@ -1168,5 +1423,8 @@ export default {
 /deep/ .hide{
   display: none!important;
 }
+/deep/ .del-btn{
+  display: none;
+}
 
 </style>

+ 6 - 0
src/view/mst/label-printer/index.vue

@@ -38,6 +38,7 @@
         <DkTableColumn field="printerCode" type="link" @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
         <DkTableColumn field="printerName" ></DkTableColumn>
         <DkTableColumn field="displayNo" ></DkTableColumn>
+        <DkTableColumn field="printerIp" ></DkTableColumn>
         <DkTableColumn field="flgValid" type="switch"  @on-switch-change="onSwitchChange"
                        :switch-disabled="false"></DkTableColumn>
         <DkTableColumn field="remarks" width="auto" ></DkTableColumn>
@@ -66,6 +67,10 @@
         <DkFormItem prop="displayNo"  :required="true" :data-type="this.$config.dataType.number">
           <InputNumberPop v-model="formData.displayNo" ref="displayNo" :min="1" :digits="0"/>
         </DkFormItem>
+        <!--    打印机Ip    -->
+        <DkFormItem prop="printerIp" >
+          <InputPop v-model="formData.printerIp" ref="printerIp"/>
+        </DkFormItem>
         <!--    备注    -->
         <DkFormItem prop="remarks" >
           <InputPop v-model="formData.remarks" textareaFlag/>
@@ -92,6 +97,7 @@ export default {
         printerCode: '',
         ftyId: null,
         displayNo: 1,
+        printerIp:'',
         remarks: ''
       },
       searchContent: [

+ 2 - 1
src/view/mst/model-category/index.vue

@@ -62,6 +62,7 @@
                  :page-total-flag="false">
           <DkTableColumn field="categoryName" :tree-node="true" type="link"
                          @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
+          <DkTableColumn field="levelName" :title="$t('modelCategoryLevelName')"></DkTableColumn>
           <DkTableColumn field="modelKindName"></DkTableColumn>
           <DkTableColumn field="flgValid" type="switch"
                          @on-switch-change="onSwitchChange" :switch-disabled="false"></DkTableColumn>
@@ -239,7 +240,7 @@ export default {
       // 查询数据
       let params = {
         kindType: this.$config.kindType.modelKind, //  型号种类-产品、装具
-        usedFlag:'true',
+        kindTag:'分类',
         ftyId: this.$store.state.user.ftyId,
       }
       this.excute(this.$service.commonService, this.$service.commonService.getDataKind, params).then(res => {

+ 6 - 6
src/view/mst/model-units/index.vue

@@ -35,11 +35,11 @@
                primaryKey="unitId"
                :height="tableHeight"
                @pageChange="pageSizeChange">
-        <DkTableColumn field="unitCode" type="link"
+        <DkTableColumn field="unitName" type="link"
                        @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
-        <DkTableColumn field="unitName"></DkTableColumn>
         <DkTableColumn field="unitScale"></DkTableColumn>
         <DkTableColumn field="displayNo" sum></DkTableColumn>
+        <DkTableColumn field="unitCode" :title="$t('externalCode')"></DkTableColumn>
         <DkTableColumn field="flgValid" type="switch" @on-switch-change="onSwitchChange"
                        :switch-disabled="false"></DkTableColumn>
         <DkTableColumn field="remarks" width="auto"></DkTableColumn>
@@ -56,10 +56,6 @@
       :title=modalTitle
     >
       <DkForm ref="formInline" v-model="formData" :col-count="1">
-        <!--单位代码-->
-        <DkFormItem prop="unitCode" :required="true">
-          <InputPop v-model="formData.unitCode" ref="unitCode"/>
-        </DkFormItem>
         <!--单位名称-->
         <DkFormItem prop="unitName" :required="true">
           <InputPop v-model="formData.unitName" ref="unitName"/>
@@ -72,6 +68,10 @@
         <DkFormItem prop="displayNo" :required="true" :data-type="$config.dataType.number">
           <InputNumberPop v-model="formData.displayNo" :digits=0 :min="0"/>
         </DkFormItem>
+        <!--单位代码-->
+        <DkFormItem prop="unitCode" :label="$t('externalCode')">
+          <InputPop v-model="formData.unitCode" ref="unitCode"/>
+        </DkFormItem>
         <!--    备注    -->
         <DkFormItem prop="remarks">
           <InputPop v-model="formData.remarks" textareaFlag/>

+ 17 - 4
src/view/mst/model/index.vue

@@ -14,7 +14,8 @@
         <BaseIndexButton right-button="model-mould-edit" ref="edit" name="edit"></BaseIndexButton>
         <!--    打印(成型线、窑炉、窑车不需要设置打印模板)    -->
         <BaseIndexButton ref="print" name="print" v-if="formType!=$config.formCode.modelTypeKiln&&formType!=$config.formCode.modelTypeMoldline
-                                                      &&formType!=$config.formCode.modelTypeCar &&formType!=$config.formCode.modelCarrier"></BaseIndexButton>
+                                                      &&formType!=$config.formCode.modelTypeCar &&formType!=$config.formCode.modelCarrier
+                                                      &&formType!=$config.formCode.modelMould &&formType!=$config.formCode.modelMaterial"></BaseIndexButton>
         <!--    装载数量限制    -->
         <BaseIndexButton ref="loadLimit" name="loadLimit" v-if="formType==$config.formCode.modelCarrier"></BaseIndexButton>
         <!--    操作日志    -->
@@ -67,7 +68,7 @@
         <DkTableColumn field="flgBarcode" type="switch" v-if="this.formType==$config.formCode.modelCarrier"
                        :switch-disabled="true"></DkTableColumn>
         <DkTableColumn field="limitKindNames" :title="$t('limitKinds')" v-if="this.formType==$config.formCode.modelCarrier"></DkTableColumn>
-        <DkTableColumn field="unitName" :title="$t('unitName')" v-if="formType==$config.formCode.modelMaterial"></DkTableColumn>
+        <DkTableColumn field="unitName" :title="$t('modelUnits')" v-if="formType==$config.formCode.modelMaterial"></DkTableColumn>
         <DkTableColumn field="modelSpecs" :title="$t('modelSpecs')" v-if="formType==$config.formCode.modelMaterial"></DkTableColumn>
         <DkTableColumn field="modelPlace" :title="$t('modelPlace')" v-if="formType==$config.formCode.modelMaterial"></DkTableColumn>
 
@@ -192,7 +193,8 @@
         <!--  产品型号 -->
         <DkFormItem prop="outputList" :span="24" v-if="formType==$config.formCode.modelMould && formData.outputQty == 1"
                     :required="formType==$config.formCode.modelMould && formData.outputQty == 1"
-                    :data-type="$config.dataType.array" :label="$t('pdtModelId')">
+                    :data-type="$config.dataType.array" :label="$t('pdtModelId')"
+                    :info="formType==$config.formCode.modelMould && formData.outputQty == 1 ?$t('W_153'):null">
           <MultiSelect v-model="formData.outputList"
                        main-field="ownerFlag"
                        :page-flag="false"
@@ -221,7 +223,7 @@
           <InputPop v-model="formData.modelPlace" ref="modelPlace"/>
         </DkFormItem>
 
-        <DkFormItem prop="unitId" :span="24" :label="$t('unitName')"
+        <DkFormItem prop="unitId" :span="24" :label="$t('modelUnits')"
                     v-if="formType==$config.formCode.modelMaterial">
           <SelectPop v-model="formData.unitId" ref="unitId" :multiple="false"
                      :options="unitList"
@@ -230,6 +232,16 @@
           </SelectPop>
         </DkFormItem>
 
+        <!--物料型号分类-->
+        <DkFormItem prop="modelCategory" :span="24" :data-type="$config.dataType.number" :label="$t('materialModelCategoryCode')"
+                    v-if="formType==$config.formCode.modelMaterial">
+          <SelectMagnifier v-model="formData.modelCategory" :display-text="formData.modelCategoryName"
+                           :type="this.$config.MagnifierType.modelCategory"
+                           :other-condition="{modelKind:$config.kindCode.matter}"
+                           :multiple="false"
+                           @ok="chooseModelCategory"></SelectMagnifier>
+        </DkFormItem>
+
         <!--   备注     -->
         <DkFormItem :span="24" prop="remarks">
           <InputPop v-model="formData.remarks" textareaFlag/>
@@ -898,6 +910,7 @@ export default {
       this.formData.outputListName = null
       this.$refs.formInline.resetFields();
       this.modelMouldIndex = -1
+      this.moreOutputList = []
     },
     /**
      *   @desc   : 表单取消事件

+ 1 - 1
src/view/mst/product-grade/index.vue

@@ -270,7 +270,7 @@ export default {
         if (res.code === this.$config.SUCCESS_CODE) {
           if(res.data && res.data.length >0){
             for(let i  of  res.data){
-              i.kindName= i.kindName+ '-'+i.gradeKindDesc
+              i.kindName= '【' + i.kindName+ '】'+i.gradeKindDesc
             }
           }
           this.gradeKindList = res.data

+ 18 - 0
src/view/sheet/dispatch/add.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="add"></CommonForm>
+</template>
+
+<script>
+import CommonForm from './form'
+
+export default {
+  name: 'sheet_dispatch_add',
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 0
src/view/sheet/dispatch/edit.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="edit"></CommonForm>
+</template>
+
+<script>
+import CommonForm from './form'
+
+export default {
+  name: 'sheet_dispatch_edit',
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 363 - 0
src/view/sheet/dispatch/form.vue

@@ -0,0 +1,363 @@
+<!-- @desc:生产派工单  @auth:洪旭东  @time:2023-12-25 10:37 -->
+<template>
+  <div class="main-div" ref="mainDiv">
+    <!--加载中-->
+    <loading :loading="loading" v-if="!modalVisible"></loading>
+    <DkCollapse ref="collapse" @on-change="changeCollapse">
+      <DkPanel prop="essentialInformation">
+        <DkForm slot="content" ref="formInline" v-model="formData" :label-max-words="6">
+          <!--工单单号-->
+          <DkFormItem prop="produceId" required data-type="number" :label="$t('produceNo')">
+            <SelectMagnifier v-model="formData.produceId" @on-ok="chooseProduce"
+                             :disabled="type==='edit'"
+                             :display-text="formData.produceNo"
+                             :type="$config.MagnifierType.sheetProduce"
+                             :multiple="false"></SelectMagnifier>
+          </DkFormItem>
+          <DkFormItem prop="sheetTypeName">
+            <InputPop ref="sheetTypeName" v-model="formData.sheetTypeName" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="pdtModelCode" :label="$t('pdtModelCode2')">
+            <InputPop ref="pdtModelCode" v-model="formData.pdtModelCode" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="pdtModelName" :label="$t('pdtModelName2')">
+            <InputPop ref="pdtModelName" v-model="formData.pdtModelName" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="dispatchNum">
+            <InputNumberPop ref="dispatchNum" v-model="formData.dispatchNum" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="priority">
+            <InputNumberPop ref="priority" v-model="formData.priority" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="planStartTime">
+            <DatePickerPop ref="planStartTime" v-model="formData.planStartTime" type="datetime" readonly/>
+          </DkFormItem>
+          <DkFormItem prop="planFinishTime">
+            <DatePickerPop ref="planFinishTime" v-model="formData.planFinishTime" type="datetime" readonly/>
+          </DkFormItem>
+          <!--备注-->
+          <DkFormItem prop="remarks" :span="24">
+            <InputPop ref="remarks" v-model="formData.remarks" textareaFlag readonly/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+
+      <!--列表数据-->
+      <DkPanel prop="sheetDispatch">
+        <EditTable slot="content" ref="table"
+                   :columns="detailColumns"
+                   :height="tableHeight + 10"
+                   :freeze="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"
+                   @chooseData="chooseData"
+                   @changeValue="changeValue"
+                   :data="tableData"
+                   control-id="nodeId"
+                   :can-delete="(row) => {return !row.dispatchId}"
+                   @delRow="delRow"
+                   @addRow="addRow"
+        ></EditTable>
+      </DkPanel>
+    </DkCollapse>
+    <!--      下部分按钮区域-->
+    <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
+  </div>
+</template>
+
+<script>
+import { formMixin } from '@/mixins/form'
+
+export default {
+  mixins: [formMixin],
+  data(){
+    let self = this
+    return{
+      formData: {
+        produceId: null,
+        sheetTypeName: null,
+        pdtModelCode: null,
+        pdtModelName: null,
+        priority: 0,
+        planStartTime: null,
+        planFinishTime: null,
+        remarks: null,
+        dispatchNum: 0,
+      },
+      detailColumns:[
+        { field: 'dispatchNo', type: 'disabled', width: 'auto'},
+        {
+          field: 'nodeName',
+          width: 'auto',
+          type: 'tableSelect',
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.processNode,
+          fieldUpdate: self.$updateColumns.outKilnStrategyStatsNodes,
+          multiple: false,
+          controlId:'nodeId',
+        },
+        {
+          field: 'stationName',
+          width: 'auto',
+          type: 'tableSelect',
+          param: () => {
+            return self.getCurrentNode()
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.workStation,
+          fieldUpdate: self.$updateColumns.sheetProduceWorkStation,
+          multiple: false,
+          // controlId:'nodeId',
+        },
+        {
+          field: 'prodUserCodeName',
+          title: self.$t('prodUserCode'),
+          width: 'auto',
+          type: 'tableSelect',
+          param: () => {
+            return self.getCurrentNode()
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.user,
+          fieldUpdate: self.$updateColumns.sheetDispatchUser,
+          multiple: false,
+          // controlId:'nodeId',
+        },
+        { field: 'dispatchNum', title: self.$t('dispatchNum'), type: 'number'},
+        { field: 'reportNum', title: self.$t('reportNum'), type: 'disabled'},
+        //计划开始时间默认值为当前时间
+        { field: 'planStartTime', title: self.$t('planStartTime'), type: 'datetime', value: new Date()},
+        //计划完成时间默认值为当前时间日期+1d
+        { field: 'planFinishTime', title: self.$t('planFinishTime'), type: 'datetime', value: new Date(new Date().getTime()+24*60*60*1000)},
+        { field: 'remarks', type: 'text', width: 'auto'},
+      ],
+      tableData: [],
+      //已选择的节点
+      nodeList: []
+    }
+  },
+
+  methods: {
+    /**
+     * @desc   : 查询工位的节点条件
+     * @author : 洪旭东
+     * @date   : 2023-12-26 09:27
+     */
+    getCurrentNode () {
+      // console.log(this.nodeList,this.$refs.table.getCurrentRowIndex())
+      return {flowNodeId: this.nodeList[this.$refs.table.getCurrentRowIndex()]}
+    },
+    /**
+     * @desc   : 选择生产工单
+     * @author : 洪旭东
+     * @date   : 2023-12-25 11:04
+     */
+    chooseProduce (val) {
+      if (val) {
+        this.excuteNoParam(this.$service.sheetProduceService, this.$service.sheetProduceService.selectById,
+          [val.produceId]).then(res=>{
+            if (res.code === this.$config.SUCCESS_CODE) {
+              this.formData = Object.assign(this.formData, res.data)
+
+              //查询派工单
+              this.excute(this.$service.sheetDispatchService, this.$service.sheetDispatchService.selectByCond,
+                {ftyId: this.$store.state.user.ftyId, produceId: val.produceId, dispatchStatusList: ['工单状态-执行', '工单状态-暂停', '工单状态-完成']}).then(res=>{
+                if (res.code === this.$config.SUCCESS_CODE) {
+                  if (res.data.total) {
+                    for (let it of res.data.list) {
+                      it.planStartTime = new Date(it.planStartTime)
+                      it.planFinishTime = new Date(it.planFinishTime)
+                      if (it.reportNum) {
+                        it.readOnly = ['nodeName', 'stationName', 'prodUserCodeName']
+                      }
+                    }
+                    this.tableData = res.data.list
+                    this.nodeList = res.data.list.map(m => m.nodeId)
+                  } else {
+                    this.$refs.table.add(-1)
+                  }
+                } else {
+                  this.$Message.warning(res.message)
+                }
+              })
+            } else {
+              this.$Message.warning(res.message)
+            }
+          })
+      } else {
+        this.formData.produceId = null
+        this.formData.sheetTypeName = null
+        this.formData.pdtModelCode = null
+        this.formData.pdtModelName = null
+        this.formData.priority = null
+        this.formData.produceNum = null
+        this.formData.planStartTime = null
+        this.formData.planFinishTime = null
+        this.formData.remarks = null
+      }
+    },
+    /**
+     * @desc   : 选择数据
+     * @author : 洪旭东
+     * @date   : 2023-12-21 13:07
+     */
+    chooseData (row, rowIndex, colItem) {
+      console.log(row, rowIndex, colItem)
+      if (colItem.field === 'nodeName') {
+        this.$refs.table.tableData[rowIndex].stationId = null
+        this.$refs.table.tableData[rowIndex].stationName = null
+        this.$refs.table.tableData[rowIndex].prodUserId = null
+        this.$refs.table.tableData[rowIndex].prodUserName = null
+        let _this = this
+        setTimeout(() => {
+          _this.nodeList[rowIndex] = row.nodeId
+        }, 500)
+      }
+    },
+    /**
+     * @desc   : 改变值
+     * @author : 洪旭东
+     * @date   : 2023-12-21 13:21
+     */
+    changeValue (field, row, rowIndex) {
+      console.log(field, JSON.parse(JSON.stringify(row)), rowIndex)
+      if (field === 'dispatchNum') {
+        //计算总的派工数量
+        this.formData.dispatchNum = this.$refs.table.tableData.reduce((pre, cur) => {
+          return pre + parseInt(cur.dispatchNum)
+        }, 0)
+      } else if (field === 'nodeName') {
+        this.$refs.table.tableData[rowIndex].stationId = null
+        this.$refs.table.tableData[rowIndex].stationName = null
+        this.$refs.table.tableData[rowIndex].prodUserId = null
+        this.$refs.table.tableData[rowIndex].prodUserName = null
+        let _this = this
+        setTimeout(() => {
+          _this.nodeList[rowIndex] = row.nodeId
+          console.log(_this.nodeList)
+        }, 500)
+      }
+    },
+    /**
+     * @desc   : 删除行
+     * @author : 洪旭东
+     * @date   : 2023-12-27 09:28
+     */
+    delRow () {
+      //计算总的派工数量
+      this.formData.dispatchNum = this.$refs.table.tableData.reduce((pre, cur) => {
+        return pre + parseInt(cur.dispatchNum)
+      }, 0)
+    },
+    /**
+     * @desc   : 添加行
+     * 写入默认工序
+     * @author : 洪旭东
+     * @date   : 2023-12-27 16:01
+     */
+    addRow (index) {
+      if (this.$refs.table) {
+        this.$refs.table.tableData[index + 1].nodeId = this.formData.defaultNodeId
+        this.$refs.table.tableData[index + 1].nodeName = this.formData.defaultNodeName
+        this.nodeList[index + 1] = this.formData.defaultNodeId
+      }
+    },
+    /**
+     * @desc   : 设置传参
+     * @author : 洪旭东
+     * @date   : 2023-08-11 11:27
+     */
+    setParams() {
+      this.params = this.$refs.table.tableData.copy()
+      for (let it of this.params) {
+        it.planStartTime = new Date(it.planStartTime).format()
+        it.planFinishTime = new Date(it.planFinishTime).format()
+      }
+    },
+    /**
+     * @desc   : 验证数据
+     * @author : 洪旭东
+     * @date   : 2023-12-21 14:33
+     */
+    validData() {
+      if (this.$refs.table.tableData.some(s => !s.dispatchNum)) {
+        this.$Message.warning(this.$t('W_001', {param: this.$t('dispatchNum')}))
+        return false
+      }
+      if (this.$refs.table.tableData.some(s => !s.nodeId)) {
+        this.$Message.warning(this.$t('W_001', {param: this.$t('nodeId')}))
+        return false
+      }
+      if (this.$refs.table.tableData.some(s => !s.planStartTime)) {
+        this.$Message.warning(this.$t('W_001', {param: this.$t('planStartTime')}))
+        return false
+      }
+      if (this.$refs.table.tableData.some(s => !s.planFinishTime)) {
+        this.$Message.warning(this.$t('W_001', {param: this.$t('planFinishTime')}))
+        return false
+      }
+      if (this.formData.produceNum < this.formData.dispatchNum) {
+        this.$Message.warning(this.$t('W_008', {param1: this.$t('dispatchNum'), param2: this.$t('produceNum')}))
+        return false
+      }
+      if (this.$refs.table.tableData.some(s => s.dispatchNum < s.reportNum)) {
+        this.$Message.warning(this.$t('W_009', {param1: this.$t('dispatchNum'), param2: this.$t('reportNum')}))
+        return false
+      }
+      return true
+    },
+    /**
+     * @desc   : 保存数据
+     * @author : 洪旭东
+     * @date   : 2023-08-11 11:27
+     */
+    saveData() {
+      return this.excute(this.$service.sheetDispatchService,
+        this.$service.sheetDispatchService.insertUpdate + '/' + this.formData.produceId,
+        this.params)
+    },
+    /**
+     * @desc   : 清空
+     * @author : 洪旭东
+     * @date   : 2023-08-11 11:28
+     */
+    clear() {
+      this.$refs.table.tableData = []
+      this.$refs.table.add(0)
+      this.$refs.formInline.resetFields()
+    },
+    /**
+     * @desc   : 通过id查询
+     * @author : 洪旭东
+     * @date   : 2023-12-22 14:39
+     */
+    detail(id) {
+      this.$nextTick(() => {
+        this.chooseProduce({produceId: id})
+      })
+      return new Promise((resolve, reject) => {
+        resolve({
+          code: this.$config.SUCCESS_CODE, data: {}
+        })
+      })
+    },
+    /**
+     * @desc   : 编辑时给页面赋值
+     * @author : 洪旭东
+     * @date   : 2023-12-22 14:40
+     */
+    setValuesByEdit(data) {
+    },
+  },
+  created() {
+    this.resizeTableFlag = true  // 计算表格高度
+    this.$nextTick(() => {
+      this.$refs.table.tableData = []
+    })
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 267 - 0
src/view/sheet/dispatch/index.vue

@@ -0,0 +1,267 @@
+<!-- @desc:生产派工单一览  @auth:洪旭东  @time:2023-12-25 10:38 -->
+<template>
+  <div class="main-div" ref="mainDiv">
+    <!--加载中-->
+    <loading :loading="loading" v-if="!modalVisible"></loading>
+    <!--按钮区-->
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <!--    查询    -->
+        <BaseIndexButton right-button="sheetDispatch-select" ref="search" name="search"></BaseIndexButton>
+        <!--    清空条件    -->
+        <BaseIndexButton right-button="sheetDispatch-clear" ref="clear" name="clear"></BaseIndexButton>
+        <!--    操作日志    -->
+        <BaseIndexButton right-button="sheetDispatch-log" ref="log" name="log"></BaseIndexButton>
+        <!--    编辑    -->
+        <BaseIndexButton right-button="sheetDispatch-edit" ref="edit" name="edit"></BaseIndexButton>
+        <!--    暂停    -->
+        <BaseIndexButton right-button="sheetDispatch-pause" ref="pause" name="pause"></BaseIndexButton>
+        <!--    重启    -->
+        <BaseIndexButton right-button="sheetDispatch-restart" ref="restart" name="restart"></BaseIndexButton>
+        <!--    取消    -->
+        <BaseIndexButton right-button="sheetDispatch-cancel" ref="cancel" name="cancel"></BaseIndexButton>
+        <!--    删除    -->
+        <BaseIndexButton right-button="sheetDispatch-delete" ref="delete" name="delete"></BaseIndexButton>
+      </template>
+      <template #right>
+        <!--   新建     -->
+        <BaseIndexButton right-button="sheetDispatch-add" ref="dispatch2" name="dispatch2"></BaseIndexButton>
+      </template>
+    </BaseIndexButtonGroup>
+
+    <!--  查询条件区域  -->
+    <div id="search-cond-div" ref="search-cond-div" class="search-cond-class">
+      <SearchCond ref="searchCond" v-model="searchCond"
+                  @collapse-change="collapseChange" :set-flag="false"
+                  :search-content="searchContent"></SearchCond>
+    </div>
+
+    <!--  表格部分  -->
+    <DkSplit mode="horizontal" v-model="split" :height="tableHeight">
+      <!--   总单   -->
+      <DkTable slot="left" :id="'table-'+$options.name" ref="table-select" :data="tableData"
+               :page-total="pageInfo.total"
+               :current-page="pageInfo.currentPage"
+               :height="tableHeight" primaryKey="dispatchId"
+               :choose-flag="false"
+               @pageChange="pageSizeChange">
+        <DkTableColumn field="dispatchNo" :title="$t('dispatchNo')"></DkTableColumn>
+        <DkTableColumn field="produceNo" :title="$t('produceNo')"></DkTableColumn>
+        <DkTableColumn field="pdtModelCode" :title="$t('pdtModelCode2')"></DkTableColumn>
+        <DkTableColumn field="pdtModelName" :title="$t('pdtModelName2')"></DkTableColumn>
+        <DkTableColumn field="nodeName"></DkTableColumn>
+        <DkTableColumn field="stationName"></DkTableColumn>
+        <DkTableColumn field="prodUserCodeName" :title="$t('prodUserCode')"></DkTableColumn>
+        <DkTableColumn field="dispatchNum" type="number"></DkTableColumn>
+        <DkTableColumn field="reportNum" type="link"></DkTableColumn>
+        <DkTableColumn field="priority" type="number"></DkTableColumn>
+        <DkTableColumn field="dispatchStatusName" ></DkTableColumn>
+        <DkTableColumn field="reportStatusName" :title="$t('reportStatusName2')"></DkTableColumn>
+        <DkTableColumn field="planStartTime" type="date"></DkTableColumn>
+        <DkTableColumn field="planFinishTime" type="date"></DkTableColumn>
+        <DkTableColumn field="actualStartTime" type="date"></DkTableColumn>
+        <DkTableColumn field="actualFinishTime" type="date"></DkTableColumn>
+        <DkTableColumn field="remarks" width="auto"></DkTableColumn>
+      </DkTable>
+      <Gantt slot="right"
+             :show-grid="false"
+             :height="tableHeight"
+             :data="{data:tableData}"
+             ref="gantt"
+      />
+    </DkSplit>
+  </div>
+</template>
+
+<script>
+import { indexMixin } from '@/mixins'
+import Gantt from '_c/business/gantt'
+
+export default {
+  name: "sheet_dispatch",
+  components:{Gantt},
+  mixins: [indexMixin],
+  data(){
+    let self = this
+    return{
+      split: 0.75,
+      searchContent: [
+        {
+          itemCode: 'dispatchNo',
+        },
+        {
+          itemCode: 'pdtModelIdList',
+          itemName: 'pdtModel',
+          valueFormat: {code: 'pdtModelIdList', field: 'modelId'},
+          valueKind: 'M-SEARCH',
+          magnifierType: self.$config.MagnifierType.product
+        },
+        {
+          itemCode: 'sheetTypeList',
+          itemName: 'sheetType',
+          valueFormat: {
+            code: 'sheetTypeList', data: [], valueKey: 'sheetType', labelKey: 'sheetTypeName',
+          },
+          valueKind: 'M-CHOICE',
+        },
+        {
+          itemCode: 'dispatchStatusList',
+          itemName: 'produceStatusName',
+          valueFormat: {
+            code: 'dispatchStatusList', data: [
+              {value: '工单状态-执行', label: '执行'},
+              {value: '工单状态-暂停', label: '暂停'},
+              {value: '工单状态-完成', label: '完成'},
+              {value: '工单状态-取消', label: '取消'},
+            ], valueKey: 'value', labelKey: 'label',
+          },
+          valueKind: 'M-CHOICE',
+        },
+        {
+          itemCode: 'reportStatusList',
+          itemName: 'reportStatusName2',
+          valueFormat: {
+            code: 'reportStatusList', data: [
+              {value: '报工状态-未报工', label: '未报工'},
+              {value: '报工状态-部分报工', label: '部分报工'},
+              {value: '报工状态-报工完成', label: '报工完成'},
+            ], valueKey: 'value', labelKey: 'label',
+          },
+          valueKind: 'M-CHOICE',
+        },
+      ],
+      detailList:[],
+      tableData:[],
+    }
+  },
+  methods:{
+    /**
+     * @desc   : 派工
+     * @author : 洪旭东
+     * @date   : 2023-12-27 11:38
+     */
+    dispatch2 () {
+      this.$router.push('/sheet/dispatch/add')
+    },
+    /**
+     * @desc   : 编辑
+     * @author : 洪旭东
+     * @date   : 2023-12-28 11:10
+     */
+    edit (row) {
+      this.$router.push('/sheet/dispatch/edit/' + row[0].produceId)
+    },
+    /**
+     * @desc   : 获取数据
+     * @author : 洪旭东
+     * @date   : 2023-12-22 14:38
+     */
+    getData(params) {
+      this.detailList = []
+      // 查询数据
+      this.excute(this.$service.sheetDispatchService, this.$service.sheetDispatchService.selectByCond, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.searchInfo = res.data
+          for (let it of res.data.list) {
+            it.progress = it.reportNum / it.dispatchNum
+            it.id = it.dispatchId
+            it.text = it.reportNum + ' / ' + it.dispatchNum
+            it.start_date = new Date(it.planStartTime).format('dd-MM-yyyy hh:mm:ss')
+            it.end_date = new Date(it.planFinishTime).format('dd-MM-yyyy hh:mm:ss')
+          }
+          this.tableData = res.data.list
+          if (params.currentPage == 1) {
+            this.pageInfo.total = res.data.total
+            this.pageInfo.currentPage = 1;
+          }
+          this.loading = false
+        }
+      })
+      return {}
+    },
+    /**
+     * @desc   : 重启
+     * @author : 洪旭东
+     * @date   : 2023-12-22 14:22
+     */
+    restart (row) {
+      if (row && row.length) {
+        this.excuteNoParam(this.$service.sheetDispatchService, this.$service.sheetDispatchService.restart, [row[0].dispatchId]).then(res=>{
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.searchData()
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 暂停
+     * @author : 洪旭东
+     * @date   : 2023-12-22 10:37
+     */
+    pause (row) {
+      if (row && row.length) {
+        this.excuteNoParam(this.$service.sheetDispatchService, this.$service.sheetDispatchService.pause, [row[0].dispatchId]).then(res=>{
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.searchData()
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 取消
+     * @author : 洪旭东
+     * @date   : 2023-12-22 11:02
+     */
+    cancel (row) {
+      if (row && row.length) {
+        this.excuteNoParam(this.$service.sheetDispatchService, this.$service.sheetDispatchService.cancel, [row[0].dispatchId]).then(res=>{
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.searchData()
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 删除
+     * @author : 洪旭东
+     * @date   : 2023-12-22 11:02
+     */
+    delete (row) {
+      if (row && row.length) {
+        this.excuteNoParam(this.$service.sheetDispatchService, this.$service.sheetDispatchService.delete, [row[0].dispatchId]).then(res=>{
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.searchData()
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 获取生产工单类型配置
+     * @author : 洪旭东
+     * @date   : 2023-12-21 10:40
+     */
+    getSheetType() {
+      this.excute(this.$service.sheetTypeSettingService, this.$service.sheetTypeSettingService.selectByCond, {
+        ftyId: this.$store.state.user.ftyId
+      }).then(res=>{
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.searchContent[2].valueFormat.data = res.data.list.filter(f => f.flgValid)
+        } else {
+          this.$Message.warning(res.message)
+        }
+      })
+    },
+  },
+  created() {
+    this.routeObjName = 'sheetDispatch'  // 设置路由名称
+    this.getSheetType()
+  },
+  activated() {
+    this.$refs.gantt.init()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 66 - 2
src/view/sheet/produce/form.vue

@@ -16,6 +16,7 @@
                    @changeValue="changeValue"
                    :data="tableData"
                    :operate-flag="type === 'add'"
+                   v-if="showTable"
         ></EditTable>
       </DkPanel>
     </DkCollapse>
@@ -36,11 +37,11 @@
 import { formMixin } from '@/mixins/form'
 
 export default {
-  name: "material-enter-add",
   mixins: [formMixin],
   data(){
     let self = this
     return{
+      showTable: self.type === 'add',
       sheetTypeList: [],
       //草稿标识
       draftFlag: false,
@@ -170,6 +171,20 @@ export default {
         this.$Message.warning(this.$t('W_001', {param: this.$t('planFinishTime')}))
         return false
       }
+      if (this.$refs.table.tableData.some(s => s.produceNum < 1)) {
+        this.$Message.warning(this.$t('W_009', {param1: this.$t('produceNum'), param2: '1'}))
+        return false
+      }
+      //如果是手动派工,编辑时,生产数量需>=已派工数量
+      if (this.$refs.table.tableData.some(s => !s.flgAutoDispatch && s.produceNum < (s.dispatchNum || 0))) {
+        this.$Message.warning(this.$t('W_009', {param1: this.$t('produceNum'), param2: this.$t('dispatchNum')}))
+        return false
+      }
+      //如果是自动派工,编辑时,生产数量需>=已报工数量
+      if (this.$refs.table.tableData.some(s => s.flgAutoDispatch && s.produceNum < (s.reportNum || 0))) {
+        this.$Message.warning(this.$t('W_009', {param1: this.$t('produceNum'), param2: this.$t('dispatchNum')}))
+        return false
+      }
       return true
     },
     /**
@@ -187,8 +202,23 @@ export default {
      * @date   : 2023-08-11 11:27
      */
     saveData() {
-      return this.excute(this.$service.sheetProduceService, this.$service.sheetProduceService[this.type==='add'?'insert':'update'],
+      let res = this.excute(this.$service.sheetProduceService, this.$service.sheetProduceService[this.type==='add'?'insert':'update'],
         this.type==='add'?this.params:this.params[0])
+      res.then(res=>{
+        if (res.code === this.$config.SUCCESS_CODE && res.data) {
+          this.$IBMessage({
+              content: this.$t('Q_025'),
+              title: this.$t('systemQuestion')
+            },
+            {
+              ok: () => {
+                this.$router.push('/sheet/dispatch/edit/' + res.data)
+              },
+            }
+          )
+        }
+      })
+      return res
     },
     /**
      * @desc   : 清空
@@ -226,17 +256,51 @@ export default {
           },
           {
             ok: () => {
+              this.loading = true
               this.excuteNoParam(this.$service.sheetProduceService, this.$service.sheetProduceService.pause, [data.produceId]).then(res=>{
                 if (res.code === this.$config.SUCCESS_CODE) {
                   this.$Message.success(this.$t('I_001', {'param': this.$v('pause')}))
+                  this.tableData[0].produceStatus = '工单状态-暂停'
                 } else {
                   this.$Message.warning(res.message)
                 }
+                //修改表格状态
+                this.updateTableColumn()
+                this.loading = false
               })
             },
+            cancel: () => {
+              //修改表格状态
+              this.updateTableColumn()
+            }
           })
+      } else {
+        //修改表格状态
+        this.updateTableColumn()
       }
     },
+    /**
+     * @desc   : 修改表格状态
+     * @author : 洪旭东
+     * @date   : 2023-12-28 17:25
+     */
+    updateTableColumn(){
+      this.detailColumns[0].type = 'disabled'
+      this.detailColumns[0].field = 'sheetTypeName'
+      this.detailColumns[1].type = 'disabled'
+      this.detailColumns[1].switch = true
+      //工单状态==草稿||(工单状态==暂停&&未报工),允许修改产品型号,其他情况不允许改型号。允许修改工单数量,数量需>=1
+      let flg = this.type === 'edit' && this.tableData && this.tableData.length > 0 &&
+        (this.tableData[0].produceStatus === '工单状态-草稿' ||
+          (this.tableData[0].produceStatus === '工单状态-暂停' && this.tableData[0].reportStatus === '报工状态-未报工')
+        )
+      if (!flg) {
+        this.detailColumns[2].type = 'disabled'
+        this.detailColumns[4].type = 'disabled'
+      }
+      //显示表格
+      this.showTable = true
+    }
   },
   created() {
     this.resizeTableFlag = true  // 计算表格高度

+ 58 - 34
src/view/sheet/produce/index.vue

@@ -7,27 +7,27 @@
     <BaseIndexButtonGroup id="BaseIndexButtonGroup">
       <template #left>
         <!--    查询    -->
-        <BaseIndexButton right-button="materialRds-select" ref="search" name="search"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-select" ref="search" name="search"></BaseIndexButton>
         <!--    清空条件    -->
-        <BaseIndexButton right-button="materialRds-clear" ref="clear" name="clear"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-clear" ref="clear" name="clear"></BaseIndexButton>
         <!--    操作日志    -->
-        <BaseIndexButton right-button="materialRds-log" ref="log" name="log"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-log" ref="log" name="log"></BaseIndexButton>
         <!--    发布    -->
-        <BaseIndexButton right-button="materialRds-release" ref="release" name="release"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-release" ref="release" name="release"></BaseIndexButton>
         <!--    编辑    -->
-        <BaseIndexButton right-button="materialRds-edit" ref="edit" name="edit"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-edit" ref="edit" name="edit"></BaseIndexButton>
         <!--    暂停    -->
-        <BaseIndexButton right-button="materialRds-pause" ref="pause" name="pause"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-pause" ref="pause" name="pause"></BaseIndexButton>
         <!--    重启    -->
-        <BaseIndexButton right-button="materialRds-restart" ref="restart" name="restart"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-restart" ref="restart" name="restart"></BaseIndexButton>
         <!--    取消    -->
-        <BaseIndexButton right-button="materialRds-cancel" ref="cancel" name="cancel"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-cancel" ref="cancel" name="cancel"></BaseIndexButton>
         <!--    删除    -->
-        <BaseIndexButton right-button="materialRds-delete" ref="delete" name="delete"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-delete" ref="delete" name="delete"></BaseIndexButton>
       </template>
       <template #right>
         <!--   新建     -->
-        <BaseIndexButton right-button="materialRds-add" ref="add" name="add"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetProduce-add" ref="add" name="add"></BaseIndexButton>
       </template>
     </BaseIndexButtonGroup>
 
@@ -48,7 +48,7 @@
                  :choose-flag="false"
                  @current-change="currentChangeEvent"
                  @pageChange="pageSizeChange">
-          <DkTableColumn field="produceNo" :title="$t('produceNo')" type="link"></DkTableColumn>
+          <DkTableColumn field="produceNo" :title="$t('produceNo')"></DkTableColumn>
           <DkTableColumn field="sheetTypeName" ></DkTableColumn>
           <DkTableColumn field="erpNo"></DkTableColumn>
           <DkTableColumn field="pdtModelCode" :title="$t('pdtModelCode2')"></DkTableColumn>
@@ -67,26 +67,9 @@
           <DkTableColumn field="remarks" width="auto"></DkTableColumn>
         </DkTable>
 
-      <!--   明细   -->
-<!--          <DkTable slot="bottom"-->
-<!--                   :data="detailList"-->
-<!--                   :height="tableHeight * (1-split) "-->
-<!--                   primaryKey="nodeId"-->
-<!--                   :choose-flag="false"-->
-<!--                   :page-flag="false">-->
-<!--            <DkTableColumn field="modelCode" :title="$t('materialModelCode')"></DkTableColumn>-->
-<!--            <DkTableColumn field="modelName" :title="$t('materialModelName')"></DkTableColumn>-->
-<!--            <DkTableColumn field="modelCategoryName" :title="$t('materialModelCategoryCode')"></DkTableColumn>-->
-<!--            <DkTableColumn field="modelSpecs"></DkTableColumn>-->
-<!--            <DkTableColumn field="modelPlace"></DkTableColumn>-->
-<!--            <DkTableColumn field="pdtQty" :title="$t('pdtQtyIn')"></DkTableColumn>-->
-<!--            <DkTableColumn field="unitName" ></DkTableColumn>-->
-<!--            <DkTableColumn field="whName" ></DkTableColumn>-->
-<!--            <DkTableColumn field="placeName" ></DkTableColumn>-->
-<!--            <DkTableColumn field="remarks" width="auto"></DkTableColumn>-->
-<!--      </DkTable>-->
-
-      <Gantt slot="bottom" :height="tableHeight * (1-split) "/>
+      <Gantt slot="bottom" :height="tableHeight * (1-split)" ref="gantt"
+             :columns="columns" :data="{data: detailList}"
+      />
 
     </DkSplit>
 
@@ -97,6 +80,7 @@
 <script>
 import { indexMixin } from '@/mixins'
 import Gantt from '_c/business/gantt'
+import { gantt } from 'dhtmlx-gantt'
 
 export default {
   name: "sheet_produce",
@@ -152,7 +136,7 @@ export default {
         },
         {
           itemCode: 'reportStatusList',
-          itemName: 'reportStatusName',
+          itemName: 'reportStatusName2',
           valueFormat: {
             code: 'reportStatusList', data: [
               {value: '报工状态-未报工', label: '未报工'},
@@ -165,6 +149,20 @@ export default {
       ],
       detailList:[],
       tableData:[],
+      columns: [
+        {name: "wbs", label: "序号", width: 40, template: gantt.getWBSCode},
+        {name: "produceNo", label: "工单单号", tree: true, width: 220,resize: true},
+        {name: "dispatchNo", label: "派工单号",align: "center", width: 150,resize: true},
+        {name: "nodeName", label: "工序", align: "center",width: 50,resize: true},
+        {name: "stationName", label: "工位", align: "center",width: 80,resize: true},
+        {name: "prodUserCodeName", label: "工号", align: "center",width: 50},
+        {name: "dispatchNum", label: "派工数量",align: "center", width: 60},
+        {name: "reportNum", label: "报工数量", align: "center",width: 60},
+        {name: "dispatchStatusName", label: "工单状态", align: "center",width: 60},
+        {name: "reportStatusName", label: "报工状态", align: "center",width: 60},
+        {name: "start_date", label: "计划开始时间",align: "center", width: 90},
+        {name: "end_date", label: "计划完成时间",align: "center", width: 90},
+      ]
     }
   },
   methods:{
@@ -184,7 +182,32 @@ export default {
      * @date   : 2023-12-22 14:38
      */
     currentChangeEvent({row}) {
-      // this.detailList = row.materialRdsItemList
+      this.excute(this.$service.sheetDispatchService, this.$service.sheetDispatchService.selectByCond,
+        {ftyId: this.$store.state.user.ftyId, produceId: row.produceId, dispatchStatusList: ['工单状态-执行', '工单状态-暂停', '工单状态-完成']}).then(res=>{
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data.total) {
+            for (let it of res.data.list) {
+              it.progress = it.reportNum / it.dispatchNum
+              it.parent = -1
+              it.id = it.dispatchId
+              it.open = true
+              it.text = it.reportNum + ' / ' + it.dispatchNum
+              it.start_date = new Date(it.planStartTime).format('dd-MM-yyyy hh:mm:ss')
+              it.end_date = new Date(it.planFinishTime).format('dd-MM-yyyy hh:mm:ss')
+            }
+          }
+          let data = JSON.parse(JSON.stringify(row))
+          data.progress = data.reportNum / data.produceNum
+          data.id = -1
+          data.open = true
+          data.text = data.reportNum + ' / ' + data.produceNum
+          data.start_date = new Date(data.planStartTime).format('dd-MM-yyyy hh:mm:ss')
+          data.end_date = new Date(data.planFinishTime).format('dd-MM-yyyy hh:mm:ss')
+          this.detailList = [data].concat(res.data.list)
+        } else {
+          this.$Message.warning(res.message)
+        }
+      })
     },
     /**
      * @desc   : 发布
@@ -277,7 +300,8 @@ export default {
     this.routeObjName = 'sheetProduce'  // 设置路由名称
     this.getSheetType()
   },
-  mounted() {
+  activated() {
+    this.$refs.gantt.init()
   }
 }
 </script>

+ 1 - 2
src/view/sheet/setting/index.vue

@@ -7,8 +7,7 @@
     <BaseIndexButtonGroup id="BaseIndexButtonGroup">
       <template #left>
         <!--    刷新    -->
-        <BaseIndexButton right-button="sheetSetting-search" ref="search" name="search"
-                         @click="open($config.routeUrl.search,'table-select')"></BaseIndexButton>
+        <BaseIndexButton right-button="sheetSetting-search" ref="search" name="search"></BaseIndexButton>
         <!--    清空条件    -->
         <BaseIndexButton right-button="sheetSetting-clear" ref="clear" name="clear"></BaseIndexButton>
         <!--    编辑    -->