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

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

于继渤 3 лет назад
Родитель
Сommit
315e245309

+ 55 - 46
src/api/pages/common/common.js

@@ -4,46 +4,55 @@
  * @date   : 2022/12/13 14:59
  */
 export default {
-    commonService: {
-        prefix: 'mdm-server/mst/common/',
-        getBasicData: 'get_basic_data',
-        getCustomTag: 'get_customtag',
-        getCustomTagByPage: 'get_customtag_by_page',
-        getWebInitData: 'get_web_init_data',
-        getUser: 'get_user',
-        getUserByPage: 'get_user_by_page',
-        selectById: '',
-        // 获取最大显示顺序
-        getMaxDisplayNo: 'get_max_display_no',
-        // 获取系统表数据种类
-        getDataKind: 'get_data_kind',
-        // 获取型号分类
-        getModelCategory: 'get_model_category',
-        //获取工种
-        getJob: 'get_job',
-        //获取职务
-        getPost: 'get_post',
-        //获取组织部门
-        getOrg: 'get_org',
-        //获取品牌
-        getBrand: 'get_brand',
-        // 获取缺陷类别
-        getDefectType: 'get_defectType',
-        // 获取角色
-        getRole: 'get_role',
-        // 分页获取员工
-        getStaffByPage: 'get_staff_by_page',
-        // 获取系统参数
-        getSettingValue: 'get_setting_value',
-        // 获取工厂区域
-        getFactorySpace: 'get_factory_space',
-        // 获取系统参数种类
-        getSettingKind: 'get_setting_kind',
-        // 分页获取组织部门
-        getOrganizationByPage: 'get_organization_by_page',
-        // 获取窑炉
-        getKiln:'get_kiln',
-    }
+  commonService: {
+    prefix: 'mdm-server/mst/common/',
+    getBasicData: 'get_basic_data',
+    getCustomTag: 'get_customtag',
+    getCustomTagByPage: 'get_customtag_by_page',
+    getWebInitData: 'get_web_init_data',
+    getUser: 'get_user',
+    getUserByPage: 'get_user_by_page',
+    selectById: '',
+    // 获取最大显示顺序
+    getMaxDisplayNo: 'get_max_display_no',
+    // 获取系统表数据种类
+    getDataKind: 'get_data_kind',
+    // 获取型号分类
+    getModelCategory: 'get_model_category',
+    //获取工种
+    getJob: 'get_job',
+    //获取职务
+    getPost: 'get_post',
+    //获取组织部门
+    getOrg: 'get_org',
+    //获取品牌
+    getBrand: 'get_brand',
+    // 获取缺陷类别
+    getDefectType: 'get_defectType',
+    // 获取角色
+    getRole: 'get_role',
+    // 获取员工
+    getStaff: 'get_staff',
+    // 分页获取员工
+    getStaffByPage: 'get_staff_by_page',
+    // 获取系统参数
+    getSettingValue: 'get_setting_value',
+    // 获取工厂区域
+    getFactorySpace: 'get_factory_space',
+    // 获取系统参数种类
+    getSettingKind: 'get_setting_kind',
+    // 分页获取组织部门
+    getOrganizationByPage: 'get_organization_by_page',
+    // 获取窑炉
+    getKiln: 'get_kiln',
+    // 获取窑车位置
+    getKilnCarPlace: 'get_kiln_car_place',
+  },
+  appCommonService: {
+    prefix: 'mdm-server/app/mst/common/',
+    getMaterialType: 'get_material_type',
+    getDataKind: 'get_data_kind', // 获取系统表数据种类
+  }
 }
 
 /**
@@ -52,10 +61,10 @@ export default {
  * @date   : 2022/12/13 15:44
  */
 export const routeUrl = {
-    // 清空条件
-    clear: {key: 'clear'},
-    // 编辑 initFlag(是否进入加载基础数据的方法)
-    edit: {key: 'edit', method: 'edit', initFlag: true},
-    // 新建 initFlag(是否进入加载基础数据的方法)
-    add: {key: 'add', method: 'add', initFlag: true},
+  // 清空条件
+  clear: {key: 'clear'},
+  // 编辑 initFlag(是否进入加载基础数据的方法)
+  edit: {key: 'edit', method: 'edit', initFlag: true},
+  // 新建 initFlag(是否进入加载基础数据的方法)
+  add: {key: 'add', method: 'add', initFlag: true},
 }

+ 4 - 0
src/api/pages/core/user.js

@@ -7,6 +7,10 @@ export default {
   userService: {
     prefix: '/mdm-server/core/user/',
     updatePassWord:'update_password',
+    // 重置密码
+    resetPassword:'reset_password',
+    unLock:'un_lock',
+    getUserRight:'get_user_right',
   }
 }
 

+ 24 - 0
src/api/pages/mst/model-product.js

@@ -0,0 +1,24 @@
+/**
+ * @desc   : 产品型号视图服务
+ * @author : 夏常明
+ * @date   : 2023/2/1 9:10
+ */
+export default {
+  modelProductService:{
+    prefix:'/mdm-server/mst/modelProduct/',
+  }
+}
+
+/**
+ * @desc   : 路由
+ * @author : 夏常明
+ * @date   : 2023/2/1 9:16
+ */
+export const routeUrl = {
+  modelProduct: {
+    // 新建
+    add: {key: 'add', url: '/mst/model-product/add'},
+    // 编辑
+    edit: {key: 'edit', url: '/mst/model-product/edit/'},
+  },
+}

+ 2 - 2
src/components-app/base/dk-app-field/dk-app-field.vue

@@ -1,7 +1,7 @@
 <!-- @desc:field组件  @auth:admin  @time:2022/12/29 10:47 -->
 <template>
   <van-field ref="input" :name="name" v-model="model" :center="center" :label="label" :size="size"
-             :type="typeInput" :focus="focus" :colon="colon" :border="border"
+             :type="typeDefault" :focus="focus" :colon="colon" :border="border"
              :password="password"  :readonly="readonly":clickable="clickable"
              :maxlength="maxlength" :title-width="titleWidth" :placeholder="placeholder"
              :auto-focus="autoFocus" :is-link="isLink" :show-word-limit="showWordLimit"
@@ -51,7 +51,7 @@ export default {
     label: String,//输入框左侧文本
     size: String,//单元格大小,可选值为 large
     icon: String,
-    typeInput: {
+    typeDefault: {
       type: String,
       default: 'text'
     },//可设置为任意原生类型, 如 number idcard textarea digit

+ 15 - 6
src/components/base/edit-table/edit-table.vue

@@ -834,6 +834,7 @@ export default {
         return;
       }
       if (this.operateFlag) {
+        console.log('eee4',e.rowIndex,this.rowIndex)
         // 如果行不变,不用执行
         if (e && (e.rowIndex != this.rowIndex)) {
           if (this.tableData && this.tableData.length > 0) {
@@ -841,19 +842,23 @@ export default {
               this.$set(it, '_hover', false)
             })
           }
-          setTimeout(() => {
-            if (e.rowIndex >= 0 && this.tableData[e.rowIndex]) {
-              this.$set(this.tableData[e.rowIndex], '_hover', true)
-            }
-          }, 300)
         }
+        setTimeout(() => {
+          if (e.rowIndex >= 0 && this.tableData[e.rowIndex]) {
+            this.$set(this.tableData[e.rowIndex], '_hover', true)
+          }
+        }, 300)
       }
       // 鼠标移入后,当前行变为编辑状态
       if (e && e.row) {
-        this.rowIndex = e.rowIndex;
         this.colIndex = e.columnIndex;
         this.$refs[this.name].setActiveRow(e.row)
+        // console.log('ttt',e.row,e.rowIndex,this.currentRowIndex)
         this.$refs[this.name].setCurrentRow(e.row)
+        if(this.rowIndex !== e.rowIndex){
+          this.currentChangeGetData({ oldRowIndex:this.rowIndex,rowIndex:e.rowIndex })
+        }
+        this.rowIndex = e.rowIndex;
       }
     },
     /**
@@ -1771,11 +1776,14 @@ export default {
       if (batchRows && batchRows.length > 0) {
         let deleteCurrentFlag = false;
         let index = 0;
+
         for (let i = 0; i < batchRows.length; i++) {
+          console.log('ttt1',colItem.controlId)
           // 只有控制主键的列才会这么操作
           if (colItem.controlId) {
             // 判断是否重复
             this.checkRepeat(batchRows[i], batchRows[i], rowIndex, colItem, false).then(isRepeat => {
+
               // 如果重复就不进行后续
               if (isRepeat) {
                 //只要重复就不允许删除当前行了
@@ -1800,6 +1808,7 @@ export default {
                 }
                 //新增行(判断行是否是新行,新行要新增
                 this.addNewRow(rowIndex + index);
+                console.log('t3',this.tableData,batchRows[i])
                 // 设置需要更新的数据
                 this.setTableData(batchRows[i], batchRows[i], rowIndex + index, colItem, fieldUpdate);
                 index = index + 1;

+ 22 - 272
src/components/business/table-select/table-select.vue

@@ -326,8 +326,6 @@ export default {
       selectSearchKey: '',
       // 商品类型
       skuType: '',
-      //系统Id
-      sysId: null,
       //pop的宽度
       popWidth: 600,
       //查询条件
@@ -374,6 +372,10 @@ export default {
     options(n, o) {
       this.selectList = n
       this.optionsData = n ? JSON.parse(JSON.stringify(n)) : []
+      // 设置列表
+      if(n && n.length > 0){
+        this.setOptionsColumn();
+      }
     },
     selectedTable(n, o) {
       //监听选择的数据,改变页签的数量
@@ -759,13 +761,12 @@ export default {
         if (this.searchParam) {
           param = {...this.searchParam};
         }
-        param.cpId = this.$store.state.user.cpId
+        param.ftyId = this.$store.state.user.ftyId
         param.flgValid = true
         // 根据传入的数据进行检索
         param[this.field] = key
         param.leafFlag = true
         param.skuType = this.skuType
-        param.sysId = this.$store.state.user.sysId
         param.flgBusiness = true
         // 下拉的不做分页
         param.pageSize = null
@@ -864,7 +865,6 @@ export default {
         if (this.searchCond && this.searchCond._value) {
           Object.assign(param, this.searchCond._value)
         }
-        param.skuType = this.skuType
       } else if (this.dataType === this.$config.tableSelectType.promotionType ||
         this.dataType === this.$config.tableSelectType.skuForCombined ||
         this.dataType === this.$config.tableSelectType.skuForPromotion ||
@@ -887,9 +887,9 @@ export default {
           param['promQuerys'] = skuQueryStr;
         }
       }
-      param.cpId = this.$store.state.user.cpId
       // 只查询最末级节点数据
       param.leafFlag = true
+      param.ftyId = this.$store.state.user.ftyId // 工厂Id
       // 部门
       if (this.otherSearchParam) {
         // 拼接参数条件实体
@@ -1368,21 +1368,18 @@ export default {
           {field: 'promotionTypeName'},
           {field: 'promotionName'},
         )
-      }//员工
+      }//用户
       else if (this.dataType === this.$config.tableSelectType.user) {
         this.service = this.$service.userService
         this.methodsName = 'selectByCond'
         this.methodsNameDetail = 'selectByCond'
-        this.searchCond = ['userCode', 'userName']
         // 查询条件
         this.searchContent = [
           {
             valueFormat: {code: 'userCode'},
-            valueKind: 'STR'
           },
           {
             valueFormat: {code: 'userName'},
-            valueKind: 'STR'
           },
         ]
         this.selectKey = 'userId'
@@ -1395,278 +1392,32 @@ export default {
           {field: 'userCode', minWidth: '40'},
           {field: 'userName', minWidth: '40'},
         ]
-      }//仓库
-      else if (this.dataType === this.$config.tableSelectType.warehouse) {
-        this.service = this.$service.commonService
-        this.methodsName = 'getWarehouse'
-        this.methodsNameDetail = 'getWarehouseByPage'
-        // 查询条件
-        this.searchContent = [
-          {
-            itemCode: '仓库名称-文本',
-            itemName: 'warehouseName',
-            valueFormat: {code: 'warehouseName'},
-            valueKind: 'STR'
-          },
-
-        ]
-        this.selectKey = 'whId'
-        this.selectLabel = 'warehouseName'
-        this.columns = [
-          {field: 'warehouseName', minWidth: '40'},
-        ]
-        this.columnsDetail = [
-          {field: 'warehouseName', minWidth: '40'},
-        ]
-      }//客户
-      else if (this.dataType === this.$config.tableSelectType.customer) {
+      }//员工
+      else if (this.dataType === this.$config.tableSelectType.staff) {
         this.service = this.$service.commonService
-        this.methodsName = 'getCustomer'
-        this.methodsNameDetail = 'getCustomerByPage'
-        this.searchCond = ['customerName', 'customerCode']
-        this.selectKey = 'customerId'
-        this.selectLabel = 'customerName'
-        this.columns = [
-          {field: 'customerCode', width: '120'},
-          {field: 'customerName', width: '150'},
-          {field: 'customerPhone', width: '120'},
-          {field: 'contactName', width: '120'},
-          // {field: 'contactPhones', minWidth: '40'},
-          // {field: 'addressArea', minWidth: '40'},
-          {field: 'addressName', width: '220'},
-          {field: 'addressNo', width: '80'},
-          // {field: 'addressGcj02', minWidth: '40'},
-          {field: 'addressFull', width: '220'},
-        ]
-        this.columnsDetail = [
-          {field: 'customerCode', minWidth: '40'},
-          {field: 'customerName', minWidth: '40'},
-        ]
-      } else if (this.dataType === this.$config.tableSelectType.promotionType) {
-        this.service = this.$service.promotionPriceTypeService
-        this.methodsName = 'selectByCond' // 跟明细界面一致,只是显示的数据条数有限制
-        this.methodsNameDetail = 'selectByCond'
-        this.methodsNameLeft = 'selectByCond'
-        this.leftColumnId = 'typeId'
-        this.leftColumnName = 'typeName'
-        this.selectSearchKey = 'typeId'
-        this.selectLabel = 'typeName'
-        this.selectKey = 'typeId'
-        this.leftSearchParam = {
-          parentId: 0, //商品品种
-          flgValid: true,
-          cpId: vm.$store.state.user.cpId //查询集团和经销商子级
-        }
-        // this.searchParam = {
-        //   cpId: vm.$store.state.user.cpId,
-        //   flgValid: true
-        // }
-        this.leftList = []
-        this.columns.push({field: 'typeName', minWidth: '40', title: '价格类型'})
-        //明细列表
-        this.columnsDetail.push(
-          {field: 'typeName', type: 'disabled', minWidth: '40', title: '促销价格小类'},
-        )
-        // 查询条件
-        this.searchContent = [
-          {
-            itemCode: '分类名称',
-            itemName: 'typeName',
-            valueFormat: {code: 'typeName'},
-            valueKind: 'STR'
-          }
-        ]
-      }//非标参数
-      else if (this.dataType === this.$config.tableSelectType.nonStandList) {
-        this.service = this.$service.nonStandListService
-        this.methodsName = 'selectByCond'
-        this.methodsNameDetail = 'selectByCond'
-        // 查询条件
-        this.searchContent = [
-          {
-            itemName: 'fieldName',
-            valueFormat: {code: 'fieldName'},
-            valueKind: 'STR'
-          },
-        ]
-        this.selectKey = 'fieldId'
-        this.selectLabel = 'fieldName'
-        this.columns = [
-          {field: 'fieldCode', minWidth: '40'},
-          {field: 'fieldName', minWidth: '40'},
-        ]
-        this.columnsDetail = [
-          {field: 'fieldCode', minWidth: '40'},
-          {field: 'fieldName', minWidth: '40'},
-        ]
-      }
-      // 标价查sku
-      else if (this.dataType === this.$config.tableSelectType.skuForStand) {
-        this.service = this.$service.goodsSkuService
-        this.methodsName = 'getByStand'
-        this.methodsNameDetail = 'getByStand'
-        // 查询条件
-        this.searchContent = [
-          {
-            valueFormat: {code: 'skuCode'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'skuName'},
-            valueKind: 'STR'
-          },
-        ]
-        this.selectKey = 'skuId'
-        this.selectLabel = 'skuName'
-        this.columns = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
-        ]
-        this.columnsDetail = [
-          {field: 'skuCode', width: '300px'},
-          {field: 'skuName', width: 'auto'},
-          {field: 'dataFromName', width: '150px'},
-          {field: 'skuTypeName', width: '150px'},
-        ]
-      }
-      // 单品查sku
-      else if (this.dataType === this.$config.tableSelectType.skuForPromotion) {
-        this.service = this.$service.goodsSkuService
-        this.methodsName = 'getByPromotion'
-        this.methodsNameDetail = 'getByPromotion'
+        this.methodsName = 'getStaff'
+        this.methodsNameDetail = 'getStaffByPage'
         // 查询条件
         this.searchContent = [
           {
-            valueFormat: {code: 'skuCode'},
-            valueKind: 'STR'
+            valueFormat: {code: 'staffCode'},
           },
           {
-            valueFormat: {code: 'skuName'},
-            valueKind: 'STR'
+            valueFormat: {code: 'staffName'},
           },
         ]
-        this.selectKey = 'skuId'
-        this.selectLabel = 'skuName'
+        this.selectKey = 'staffId'
+        this.selectLabel = 'staffName'
         this.columns = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
+          {field: 'staffCode', width: '120'},
+          {field: 'staffName', width: 'auto'},
         ]
         this.columnsDetail = [
-          {field: 'skuCode', width: '300'},
-          {field: 'skuName', width: 'auto'},
-          {field: 'dataFromName', width: '100'},
-          {field: 'skuTypeName', minWidth: '100'},
-        ]
-      }
-      // 组合查sku
-      else if (this.dataType === this.$config.tableSelectType.skuForCombined) {
-        this.service = this.$service.goodsSkuService
-        this.methodsName = 'getByCombined'
-        this.methodsNameDetail = 'getByCombined'
-        // 查询条件
-        this.searchContent = [
-          {
-            valueFormat: {code: 'skuCode'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'skuName'},
-            valueKind: 'STR'
-          },
-        ]
-        this.selectKey = 'skuId'
-        this.selectLabel = 'skuName'
-        this.columns = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
-        ]
-        this.columnsDetail = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
-        ]
-      }
-      // 非标查sku
-      else if (this.dataType === this.$config.tableSelectType.skuForNon) {
-        this.service = this.$service.goodsSkuService
-        this.methodsName = 'getByNon'
-        this.methodsNameDetail = 'getByNon'
-        // 查询条件
-        this.searchContent = [
-          {
-            valueFormat: {code: 'skuCode'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'skuName'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'spuCode'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'spuName'},
-            valueKind: 'STR'
-          },
-        ]
-        this.selectKey = 'skuId'
-        this.selectLabel = 'skuName'
-        this.columns = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'spuCode', minWidth: '60'},
-          {field: 'spuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
-        ]
-        this.columnsDetail = [
-          {field: 'skuCode', minWidth: '60'},
-          {field: 'skuName', minWidth: '100'},
-          {field: 'spuCode', minWidth: '60'},
-          {field: 'spuName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '60'},
-          {field: 'skuTypeName', minWidth: '60'},
-        ]
-      }
-      // spu
-      else if (this.dataType === this.$config.tableSelectType.spu) {
-        this.service = this.$service.goodsService
-        this.methodsName = 'selectByCond'
-        this.methodsNameDetail = 'selectByCond'
-        // 查询条件
-        this.searchContent = [
-          {
-            valueFormat: {code: 'spuCode'},
-            valueKind: 'STR'
-          },
-          {
-            valueFormat: {code: 'spuName'},
-            valueKind: 'STR'
-          },
-        ]
-        this.selectKey = 'spuId'
-        this.selectLabel = 'spuName'
-        this.columns = [
-          {field: 'spuCode', minWidth: '60'},
-          {field: 'spuName', minWidth: '100'},
-          {field: 'spuCategoryLevelName', minWidth: '100', title: this.$t('specsName')},
-          {field: 'spuAttributeName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '100'},
-        ]
-        this.columnsDetail = [
-          {field: 'spuCode', minWidth: '60'},
-          {field: 'spuName', minWidth: '100'},
-          {field: 'spuCategoryLevelName', minWidth: '100', title: this.$t('specsName')},
-          {field: 'spuAttributeName', minWidth: '100'},
-          {field: 'dataFromName', minWidth: '100'},
+          {field: 'staffCode', width: '150'},
+          {field: 'staffName', width: '150'},
+          {field: 'jobName', width: '150'},
+          {field: 'orgName', width: '150'},
+          {field: 'remarks', width: 'auto'},
         ]
       }
     },
@@ -1694,7 +1445,6 @@ export default {
     },
   },
   mounted() {
-
   },
   created() {
     //如果传递了下拉就直接用

+ 23 - 17
src/config/index.js

@@ -195,7 +195,7 @@ export default {
     taxNature: '公司纳税性质',
     approvalType: '审批拒绝再送审处理方式',
     kilnCarPlace: '窑车位置',
-    passwordSecurity:'密码安全',
+    passwordSecurity: '密码安全',
   },
 
   /**
@@ -254,11 +254,20 @@ export default {
   kindType: {
     defectType: '缺陷类别',
     productGrade: '产品等级',
+    //型号种类
+    modelKind:'型号种类',
+  },
+  /**
+   * @desc   : 产品erp型号-产品bom/产品型号验证标签
+   * @author : 夏常明
+   * @date   : 2023/2/1 13:04
+   */
+  modelProductTab: {
+    modelPdtErp:'modelPdtErp',
+    modelPdtLabel:'modelPdtLabel',
     modelCategory: '型号种类',
     staffStatus: '员工状态',
   },
-
-
   /**
    * @desc   : 有显示顺序的表
    * @author : 周兴
@@ -300,9 +309,9 @@ export default {
     // 产品型号验证标签
     modelPdtLabel: {model: 'mst', table: 't_model_pdt_label'},
     // 窑车位置
-    kilnCarPlace:{model: 'mst',table: 't_kiln_car_place'},
+    kilnCarPlace: {model: 'mst', table: 't_kiln_car_place'},
     // 产品视图
-    productView:{model: 'mst',table: 't_product_view'},
+    productView: {model: 'mst', table: 't_product_view'},
     // 缺陷扣罚
     productDefectFine: {model: 'mst', table: 't_product_defect_fine'},
   },
@@ -508,17 +517,7 @@ export default {
     goods: 'goods',
     job: 'job',
     post: 'post',
-    warehouse: 'warehouse',
-    customer: 'customer',
-    goodsSpecs: 'goodsSpecs',
-    combinedType: 'combinedType',
-    promotionType: 'promotion',
-    nonStandList: 'nonStandList',
-    skuForStand: 'skuForStand',
-    skuForPromotion: 'skuForPromotion',
-    skuForCombined: 'skuForCombined',
-    skuForNon: 'skuForNon',
-    spu: 'spu',
+    staff: 'staff',
   },
   /**
    * @desc   : 选择类型
@@ -1321,8 +1320,15 @@ export default {
 
   psiSystemBasic: {
     estate: 'estate'
+  },
+
+  modelKind:{
+    modelMould: '型号种类-模具',
+    modelMaterial: '型号种类-物料',
+    modelCarrier: '型号种类-载具',
+    modelEquipment: '型号种类-设备',
+  }
   }
-}
 
 
 

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

@@ -88,5 +88,17 @@ export default {
     {updateField: 'flgNonStandardGlass', valueFiled: 'flgNonStandardGlass'},
     {updateField: 'negative', valueFiled: 'negative'},
     {updateField: 'dataFromName', valueFiled: 'dataFromName'},
+  ],
+
+  /**
+   * @desc   : 用户选择员工时使用
+   * @author : 周兴
+   * @date   : 2023/2/2 10:42
+   */
+  userChooseStaff:[
+    {updateField: 'staffId', valueFiled: 'staffId'},
+    {updateField: 'staffName', valueFiled: 'staffName'},
+    {updateField: 'orgId', valueFiled: 'orgId'},
+    {updateField: 'orgName', valueFiled: 'orgName'},
   ]
 }

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

@@ -169,6 +169,7 @@ export const formTitle = {
   'productDefect': '产品缺陷',
   'modelPdtLabel': '验证标签',
   'productDamage': '损坯原因',
+  'modelPdtErp': '产品erp型号',
   'role-add': '新建角色',
   'role-edit': '编辑角色',
   'job-add': '新建工种',
@@ -189,6 +190,9 @@ export const formTitle = {
   'org-edit': '编辑组织',
   'order-message': '单据信息',
   'file': '附件',
+  'model-product': '产品型号',
+  'model_pdt_erp':'产品erp型号',
+  'product_bom':'产品型号BOM',
   'model-category':'型号类别'
 }
 
@@ -387,6 +391,19 @@ export const columns = {
   fineName: '扣罚名称',
   deductNum: '扣除数',
 
+  //产品型号相关
+  productModelName:'型号名称',
+  productCategoryName:'产品分类',
+  pdtView:'产品视图',
+  pdtModel:'产品型号',
+  pdtSpecs:'产品规格',
+  defLogo:'默认商标',
+  defColour:'默认釉色',
+  logoPath:'商标',
+  colour:'釉色',
+  erpModelCode:'erp物料编码',
+  modelProduct:'产品型号',
+
 //   *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 
   //工艺流程相关

+ 1 - 0
src/mixins/index.js

@@ -81,6 +81,7 @@ export const indexMixin = {
       let url = routeUrl.url
       let chooseKeys = tableRef ? this.$refs[tableRef].batchKeys : []
       // 校验
+
       if (isMustChooseFlag && name !== 'add' && name !== 'search' && name !== 'clear') {
         // 新建不用校验
         if (!chooseKeys || chooseKeys.length === 0) {

+ 24 - 37
src/view-app/login/app-login.vue

@@ -6,30 +6,30 @@
 
       <div style="width: 332px;height: 280px;margin-top:50px;  display: flex;border-radius: 10px;
         flex-direction: column;align-items: center;justify-content: center;background: #8c939d">
-        <div style="width: 80%;border-radius: 5px;margin: 20px">
+        <div style="width: 80%;border-radius: 3px;margin: 20px">
           <dk-app-field
             v-model="username1"
             label="用户名"
-            maxlength="5"
             @input="onInput"
           />
         </div>
-        <div style="width: 80%;border-radius: 5px;margin: 20px">
+        <div style="width: 80%;border-radius: 3px;margin: 20px">
+          <!-- 输入密码 -->
           <dk-app-field
-            v-model="password"
-            type="password"
+            v-model="password1"
+            type-default="password"
             label="密码"
-          />
+          ></dk-app-field>
         </div>
         <div
-          style="width: 100%;padding-left: 33px; display: flex;flex-direction:row; justify-content: left;align-items:center; ">
-          <van-checkbox shape="square" v-model="checked">记住用户名和密码</van-checkbox>
+          style="width: 100%;padding-left: 33px; display: flex;flex-direction:row; justify-content: left;align-items:center;font-size: 12px ">
+          <van-checkbox  checked-color="#1e83e9" shape="square" v-model="checked">记住用户名和密码</van-checkbox>
         </div>
       </div>
 
     </div>
     <div style="margin: 16px;position: relative;left:0;bottom: 80px">
-      <dk-app-button block type="info">登录</dk-app-button>
+      <dk-app-button block type="info" @click="login">登录</dk-app-button>
     </div>
   </div>
 </template>
@@ -45,7 +45,7 @@ export default {
       checked: true,
       username1: '',
       username: '',
-      password: '',
+      password1: '',
       checkbox: true,
       active: 1,
       searchText: '',
@@ -94,9 +94,20 @@ export default {
   created() {
   },
   methods: {
+    /**
+     * 登录函数
+     * @param e
+     */
+    login(e){
+      console.log("login",e)
+      this.$router.push({name: 'main'})
+    },
     onInput(event) {
       console.log("onInput-login", this.username, event)
     },
+    onPassInput(event) {
+      console.log("onPassInput-login", this.password, event)
+    },
     onSubmit(e) {
 
     },
@@ -133,31 +144,7 @@ export default {
       // 增加商品
       //this.loadGoods("new", this.new_page, 10, "add");
     },
-    // 添加或者刷新商品(刷新商品和第一次加载商品是一样的)
-    // loadGoods(类型(这个不用管),页数,每页个数,状态(刷新还是增加))
-    // async loadGoods(type, page, page_num, status) {
-    //   // 异步获取数据
-    //   let result = await index_goods_list(type, page, page_num);
-    //   // 刷新商品(首次加载商品)
-    //   if (status == "refresh") {
-    //     this.new_goods = result.new_goods;
-    //   } else if (status == "add") {
-    //     // 这里是增加数据
-    //     if (result.new_goods.length == 0) {
-    //       // 没有数据的话,加载完成
-    //       this.new_finished = true;
-    //     } else {
-    //       // 这里一定要用 setTimeout(() => {} 来增加数据
-    //       setTimeout(() => {
-    //         result.new_goods.forEach((element) => {
-    //           this.new_goods.push(element);
-    //         });
-    //         // 注意,for循环完成后,一定要立马 this.new_loading = false;
-    //         this.new_loading = false;
-    //       }, 1000);
-    //     }
-    //   }
-    // },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
@@ -224,9 +211,9 @@ export default {
 </script>
 
 <style scoped>
-/**查询框的演示*/
+/**查询框的演示#F8F9FD*/
 .van-field {
-  background: #F8F9FD;
+  background:#F8F9FD;
   border: 1px solid #D6E4FF;
   border-radius: 10px !important;
 }

+ 95 - 73
src/view-app/mold-management/mold-management-add/index.vue

@@ -11,60 +11,45 @@
       label="唯一码"
       placeholderType="scan"
     />
-
     <!-- 生产工号 -->
     <dk-app-field
-      v-model="formData.productionjobNumber"
+      v-model="formData.makeUser"
       name="生产工号"
       label="生产工号"
       placeholderType="scan"
     />
-    <!-- 模具类型 -->
+    <!-- 型号种类 -->
     <dk-app-field
       v-model="formData.modelKind"
-      name="模具类型"
-      label="模具类型"
+      name="型号种类"
+      label="型号种类"
       :readonly="true"
       @click="showMoldType = true"
       placeholderType="choose" is-link arrow-direction="down"
     />
-    <!-- 材料供应商 -->
+    <!-- 原料类型 -->
     <dk-app-field
-      v-model="formData.materialSupplier"
-      name="材料供应商"
-      label="材料供应商"
+      v-model="formData.materialType"
+      name="原料类型"
+      label="原料类型"
       :readonly="true"
-      @click="showMaterialSupplier = true"
+      @click="showMaterialType = true"
       placeholderType="choose" is-link arrow-direction="down"
     />
     <!-- 生产日期 -->
     <dk-app-field
-      v-model="formData.producedate"
+      v-model="formData.makeDate"
       name="生产日期"
       label="生产日期"
       :readonly="true"
-      @click="showProducedate = true"
+      @click="showMakeDate = true"
       placeholderType="choose" is-link arrow-direction="down"
     />
-    <!-- 重量(kg) -->
-    <dk-app-field
-      v-model="formData.weight"
-      name="重量(kg)"
-      label="重量(kg)"
-      typeInput="number"
 
-    />
-    <!-- 成本(元) -->
-    <dk-app-field
-      v-model="formData.cost"
-      name="成本(元)"
-      label="成本(元)"
-      typeInput="number"
-    />
 
     <!-- 产出数量 -->
     <dk-app-field
-      v-model="formData.outputQuantity"
+      v-model="formData.outputQty"
       name="产出数量"
       label="产出数量"
       typeInput="digit"
@@ -72,15 +57,15 @@
     />
     <!-- 标准次数 -->
     <dk-app-field
-      v-model="formData.standardTimes"
+      v-model="formData.stdNum"
       name="标准次数"
       label="标准次数"
       typeInput="digit"
       @onBlur="onInputOutputQuantity"
     />
-    <!-- 标准总数 -->
+    <!-- 产出标准合计次数 -->
     <dk-app-field
-      v-model="formData.standardsTotalNumber"
+      v-model="formData.outputStdSum"
       name="标准总数"
       label="标准总数"
       :readonly="true"
@@ -92,38 +77,32 @@
       label="备注"
       placeholder="备注"
     />
-    <!-- 模具个数 -->
-    <dk-app-field
-      v-model="formData.mouldsNumber"
-      name="模具个数"
-      label="模具个数"
-      typeInput="digit"
-    />
+
 
     <div class="bottom-class-1" style="padding: 15px 10px 10px 10px">
       <dk-app-button color="#1B365D" :block="true" @click="save">保存
       </dk-app-button>
     </div>
-    <!--    模具类型弹出框-->
+    <!--    型号种类弹出框-->
     <van-popup v-model="showMoldType" position="bottom">
       <van-picker
         show-toolbar
-        :columns="MoldTypeData"
+        :columns="ModelCategoryData"
         @confirm="onConfirmMoldType"
         @cancel="onCancelMoldType"
       />
     </van-popup>
-    <!--    材料供应商弹出框-->
-    <van-popup v-model="showMaterialSupplier" position="bottom">
+    <!--    原料类型弹出框-->
+    <van-popup v-model="showMaterialType" position="bottom">
       <van-picker
         show-toolbar
-        :columns="MaterialSupplierData"
-        @confirm="onConfirmMaterialSupplier"
-        @cancel="onCancelMaterialSupplier"
+        :columns="MaterialTypeData"
+        @confirm="onConfirmMaterialType"
+        @cancel="onCancelMaterialType"
       />
     </van-popup>
     <!--      日期控件-->
-    <van-calendar v-model="showProducedate" @confirm="onConfirmProduceDate"/>
+    <van-calendar v-model="showMakeDate" @confirm="onConfirmProduceDate"/>
   </div>
 </template>
 
@@ -138,30 +117,73 @@ export default {
     return {
       moldingMoldManagementActiveTitle: '',
       showMoldType: false,
-      showMaterialSupplier: false,
-      showProducedate: false,
-      MoldTypeData: ['石膏', '高压'],//模具类型数据源
-      MaterialSupplierData: ['华雄石膏粉', '宝峰石膏粉'],//材料供应商数据源
+      showMaterialType: false,
+      showMakeDate: false,
+      //型号种类数据源
+      ModelCategoryData: ['石膏', '高压'],
+      //原料类型数据源
+      MaterialTypeData: ['华雄石膏粉', '宝峰石膏粉'],
       checked: false,
       formData: {
         uniqueCode: '',//唯一码
-
-        modelKind: '',//模具类型
-        weight: '',//重量
-        materialSupplier: '',//材料供应商
-        producedate: '',//生产日期
-        outputQuantity: '',//产出数量
-        productionjobNumber: '',//生产工号
-        standardTimes: '',//标准次数
-        standardsTotalNumber: '',//标准总数
+        modelKind: '',//型号种类
+        modelId:'',//型号种类id
+        stdNum: '',//标准次数
+        outputQty: '',//产出数量
+        outputStdSum: '',//产出标准合计次数
+        makeDate: '',//生产日期
+        makeUser: '',//生产工号
+        materialType: '',//原料类型
         remarks: '',//备注
-        mouldsNumber: '',//模具个数
-        cost: '',//成本
+        flgValid:'',//有效标识
+        ftyId : 1,//工厂ID
+
+
       },
     }
   },
   methods: {
+    /**
+     * @desc   : 加载数据
+     * @author : 王英杰
+     * @date   : 2023/1/9 13:09
+     */
+    initData(type) {
 
+        this.getMoldTypeDataList();// 查询基础数据 模具原料
+        this.getModelCategory();//获取型号种类
+    },
+    /**
+     * @desc   : 获取型号种类
+     * @author : 王英杰
+     * @date   : 2023/1/9 13:10
+     */
+    getModelCategory() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        kindType: this.$config.kindType.modelCategory,
+      }
+      this.excute(this.$service.appCommonService, this.$service.appCommonService.getDataKind, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          //this. ModelCategoryData = res.data;
+          console.log("获取型号种类",res.data)
+        }
+      })
+    },
+    /**
+     * @desc   : 查询基础数据 模具原料
+     * @author : 王英杰
+     * @date   : 2023/1/9 11:45
+     */
+    getMoldTypeDataList(){
+      let params = {  }
+      this.excute(this.$service.appCommonService, this.$service.appCommonService.getMaterialType,params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          //this.MaterialTypeData = res.data
+          console.log("模具原料",res.data)
+        }
+      })
+    },
     /**
      * 给参数赋值
      */
@@ -204,11 +226,11 @@ export default {
      * @param date
      */
     onConfirmProduceDate(date) {
-      this.showProducedate = false;
-      this.producedate = this.formatDate(date);
+      this.showMakeDate = false;
+      this.makeDate = this.formatDate(date);
     },
     /**
-     * 模具类型popup确定事件
+     * 型号种类popup确定事件
      * @param value
      * @param index
      */
@@ -219,34 +241,34 @@ export default {
     },
 
     /**
-     * 模具类型popup取消监听
+     * 型号种类popup取消监听
      */
     onCancelMoldType() {
       this.showMoldType = false;
     },
     /**
-     * 材料供应商popup确定事件
+     * 原料类型popup确定事件
      * @param value
      * @param index
      */
-    onConfirmMaterialSupplier(value, index) {
+    onConfirmMaterialType(value, index) {
       this.$appToast((`当前值:${value}, 当前索引:${index}`));
-      this.materialSupplier = value;
-      this.onCancelMaterialSupplier()
+      this.materialType = value;
+      this.onCancelMaterialType()
     },
 
     /**
-     * 材料供应商popup取消监听
+     * 原料类型popup取消监听
      */
-    onCancelMaterialSupplier() {
-      this.showMaterialSupplier = false;
+    onCancelMaterialType() {
+      this.showMaterialType = false;
     },
     /**
-     * 产出数量和标准次数的焦点离开事件 都是计算一下  标准总数 = 产出数量 * 标准次数
+     * 产出数量和标准次数的焦点离开事件 都是计算一下  产出标准合计次数 = 产出数量 * 标准次数
      * @param e
      */
     onInputOutputQuantity(e) {
-      this.standardsTotalNumber = this.standardTimes * this.outputQuantity
+      this.outputStdSum = this.stdNum * this.outputQty
     }
   },
 

+ 1 - 4
src/view/core/role/index.vue

@@ -45,9 +45,8 @@
                          @on-switch-change="switchChange"></DkTableColumn>
           <DkTableColumn field="remarks" width="auto"></DkTableColumn>
         </DkTable>
-
         <!--     用户列表     -->
-        <EditTable slot="right" ref="editTable" :data="userList" :height="tableHeight"
+        <EditTable slot="right" ref="editTable" :data="userList" :height="tableHeight" name="table"
                    :newRowFlag="checkEditNewRow()"
                    :enabledRepeat=true :enabled-repeat-id="'userId'"
                    :columns="userTableColumn" @chooseData="selectUser" @delRow="deleteUser"></EditTable>
@@ -126,7 +125,6 @@ export default {
           options: () => self.users,
         },
         {field: 'userName', type: 'disabled', width: 200},
-        //{field: 'contactPhone', type: 'disabled', width: 150},
         {field: 'remarks', type: 'disabled'},
       ],
       users: []
@@ -160,7 +158,6 @@ export default {
       this.userList = this.userList.filter(f => f.userId != row.userId)
       if (row.userId) {
         // 更新用户角色
-
         let params = {
           userRoleId: this.$refs['table-select'].batchKeys[0],
           userId: row.userId,

+ 322 - 58
src/view/core/user/form.vue

@@ -15,27 +15,27 @@
           </DkFormItem>
           <!--所属角色-->
           <DkFormItem prop="roleName">
-            <SelectPop v-model="formData.roleIds" :multiple="true" :options="roleNameList" ref="roleName"
+            <SelectPop v-model="formData.roleIds" :multiple="true" :options="roleList" ref="roleName"
                        labelKey="roleName"
                        valueKey=roleId>
             </SelectPop>
           </DkFormItem>
           <!--显示顺序-->
-<!--          <DkFormItem prop="displayNo" :required="true" :data-type="$config.dataType.number">-->
-<!--            <InputNumberPop v-model="formData.displayNo" :digits=0 :min="0"/>-->
-<!--          </DkFormItem>DkFormItem-->
+          <!--          <DkFormItem prop="displayNo" :required="true" :data-type="$config.dataType.number">-->
+          <!--            <InputNumberPop v-model="formData.displayNo" :digits=0 :min="0"/>-->
+          <!--          </DkFormItem>DkFormItem-->
           <!--业务部门-->
           <DkFormItem :required="true" prop="orgId" :data-type="$config.dataType.number" :label="$t('orgId')">
             <SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"
                              :type="this.$config.MagnifierType.organization"
                              :multiple="false"
-            @ok="chooseOrg"></SelectMagnifier>
+                             @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"
-                               :type="this.$config.MagnifierType.staff" :multiple="false"></SelectMagnifier>
-            </DkFormItem>
+          <DkFormItem prop="staffId" :data-type="$config.dataType.number" :label="$t('staffId')">
+            <SelectMagnifier @ok="chooseStaff" v-model="formData.staffId" :display-text="formData.staffName"
+                             :type="this.$config.MagnifierType.staff" :multiple="false"></SelectMagnifier>
+          </DkFormItem>
           <!--备注-->
           <DkFormItem prop="remarks" :span="24">
             <InputPop ref="remarks" v-model="formData.remarks" textareaFlag/>
@@ -44,26 +44,60 @@
       </DkPanel>
 
       <DkPanel prop="staffRelation">
-        <div slot="content">
-          <DkForm slot="content" ref="formStaff" v-model="formDataStaff" style="width: 95%;padding-bottom: 8px">
-            <DkFormItem prop="staffIds" :span="12">
-              <SelectMagnifier @ok="chooseStaffs" v-model="formDataStaff.staffIds" :display-text="formDataStaff.staffNames"
-                               :type="this.$config.MagnifierType.staff" :multiple="true"></SelectMagnifier>
-            </DkFormItem>
-          </DkForm>
-          <!--显示绑定的业务员-->
-          <DkTable :data="staffList"
-                   :multiple="false"
-                   :height="tableHeight-20"
-                   :showSettingFlag="false"
-                   :chooseFlag="false"
-                   :freeze="false"
-                   ref="table-select">
-            <DkTableColumn field="staffCode"></DkTableColumn>
-            <DkTableColumn field="staffName"></DkTableColumn>
-            <DkTableColumn field="jobName"></DkTableColumn>
-            <DkTableColumn field="remarks" width="auto"></DkTableColumn>
-          </DkTable>
+        <div slot="content" :style="'height: ' + tableHeight + 'px'">
+          <DkSplit v-model="split">
+            <!--左侧工种信息-->
+            <EditTable slot="left" ref="jobTable" :data="formData.workTeamList"
+                       :columns="jobColumns"
+                       :height="tableHeight"
+                       :show-setting-flag="false"
+                       :freeze="false"
+                       :enabled-repeat-id="jobId"
+                       :enabledRepeat="false"
+                       @current-change="changeCurrentJob"
+                       @changeValue="changeJob"
+                       @chooseData="chooseData"
+                       @addRow="addJobRow"
+                       @delRow="delJobRow"></EditTable>
+            <!--右侧员工信息-->
+
+            <EditTable slot="right" ref="staffTable"
+                       :columns="staffColumns"
+                       :height="tableHeight"
+                       :show-setting-flag="false"
+                       enabledRepeatId="staffId"
+                       :enabledRepeat="true"
+                       :freeze="false"
+                       controlId="staffId"
+                       :newRowFlag="showStaffList"
+                       :data="formData.workTeamList
+                                  &&formData.workTeamList.length>0
+                                  &&formData.workTeamList[jobIndex]
+                                  ?formData.workTeamList[jobIndex].staffList:[]"
+                       @chooseData="chooseWorkTeamStaff"
+                       @onBatchChoose="chooseWorkTeamStaff"
+                       @delRow="delStaffRow"></EditTable>
+          </DkSplit>
+
+          <!--          <DkForm slot="content" ref="formStaff" v-model="formDataStaff" style="width: 95%;padding-bottom: 8px">-->
+          <!--            <DkFormItem prop="staffIds" :span="12">-->
+          <!--              <SelectMagnifier @ok="chooseStaffs" v-model="formDataStaff.staffIds" :display-text="formDataStaff.staffNames"-->
+          <!--                               :type="this.$config.MagnifierType.staff" :multiple="true"></SelectMagnifier>-->
+          <!--            </DkFormItem>-->
+          <!--          </DkForm>-->
+          <!--          &lt;!&ndash;显示绑定的业务员&ndash;&gt;-->
+          <!--          <DkTable :data="staffList"-->
+          <!--                   :multiple="false"-->
+          <!--                   :height="tableHeight-20"-->
+          <!--                   :showSettingFlag="false"-->
+          <!--                   :chooseFlag="false"-->
+          <!--                   :freeze="false"-->
+          <!--                   ref="table-select">-->
+          <!--            <DkTableColumn field="staffCode"></DkTableColumn>-->
+          <!--            <DkTableColumn field="staffName"></DkTableColumn>-->
+          <!--            <DkTableColumn field="jobName"></DkTableColumn>-->
+          <!--            <DkTableColumn field="remarks" width="auto"></DkTableColumn>-->
+          <!--          </DkTable>-->
         </div>
       </DkPanel>
     </DkCollapse>
@@ -82,27 +116,215 @@ export default {
   data() {
     let self = this
     return {
-      staffList:[],
+      staffList: [],
+      jobList: [], // 工种
+      jobId: null,// 当前工种
+      roleList: [],// 角色
+      tableHeight: 600,
+      split: 0.3,
+      jobIndex: -1, // 工种当前行号
+      showStaffList:false,// 是否显示员工新行
       // 画面表单数据
       formData: {
         userCode: '',
         userName: '',
         orgId: null,
         roleIds: [],
-        staffId:null,
+        staffId: null,
         remarks: null,
         userType: self.$config.userType.staffUser,
         ftyId: this.$store.state.user.ftyId,
-        staffLists:[],
+        workTeamList: [],// 班组信息
       },
-      formDataStaff:{
-        staffIds:[],
-        staffNames:'',
+      formDataStaff: {
+        staffIds: [],
+        staffNames: '',
       },
+      // 工种列表
+      jobColumns: [
+        // 工种
+        {
+          field: 'jobId',
+          type: 'select',
+          options: () => self.jobList,
+          labelKey: 'jobName',
+          valueKey: 'jobId',
+          width: 'auto'
+        },
+      ],
+      // 业务员列表
+      staffColumns: [
+        // 业务员
+        {
+          field: 'staffName',
+          width: 255,
+          sortBoolean: false,
+          controlId: 'staffId',
+          type: 'tableSelect',
+          param: () => {
+            return {
+              jobId: (self.formData.workTeamList && self.formData.workTeamList[self.jobIndex])
+                ? parseInt(self.formData.workTeamList[self.jobIndex].jobId) : null
+            }
+          },
+          dataType: self.$config.tableSelectType.staff,
+          fieldUpdate: self.$updateColumns.userChooseStaff,
+          searchDetailFlag: false
+        },
+      ]
     }
   },
 
   methods: {
+    // region 列表
+    /**
+     * @desc   : 切换工种当前行
+     * @author : 周兴
+     * @date   : 2023/2/2 11:46
+     */
+    changeCurrentJob(e) {
+      let staffTable = this.$refs.staffTable.getTableDataFilter()
+      let oldRowIndex = e.oldRowIndex ? e.oldRowIndex : 0;
+      // 记录之前行的数据
+      if (this.formData.workTeamList[oldRowIndex]) {
+        this.$set(this.formData.workTeamList[oldRowIndex], 'staffList', staffTable)
+      }
+      // 取当前行的数据
+      if (!this.formData.workTeamList[e.rowIndex].staffList) {
+        this.formData.workTeamList[e.rowIndex].staffList = []
+      }
+      this.jobIndex = 0
+      this.jobIndex = e.rowIndex
+      // 显示员工新行
+      this.checkIsShowStaffList();
+    },
+    /**
+     * @desc   : 是否显示员工新行
+     * @author : 周兴
+     * @date   : 2023/2/2 16:58
+     */
+    checkIsShowStaffList(){
+      if( this.formData.workTeamList[this.jobIndex] && this.formData.workTeamList[this.jobIndex].jobId){
+        this.showStaffList = true;
+      }else{
+        this.showStaffList = false;
+      }
+    },
+    /**
+     * @desc   : 改变工种
+     * @author : 周兴
+     * @date   : 2023/2/2 12:47
+     */
+    changeJob(field, row, rowIndex) {
+      this.$nextTick(() => {
+        let jobTable = this.$refs.jobTable.getTableData()
+        this.$set(this.formData, 'workTeamList', jobTable)
+      })
+    },
+    /**
+     * @desc   : 选择工种
+     * @author : 周兴
+     * @date   : 2023/2/2 11:46
+     */
+    chooseData(e) {
+      if (!this.formData.workTeamList || this.formData.workTeamList.length == 0) {
+        let item = {}
+        item.staffList = [];
+        this.formData.workTeamList.push(item)
+      }
+      if (!this.jobIndex || this.jobIndex === -1) {
+        this.jobIndex = 0;
+      }
+      this.formData.workTeamList[this.jobIndex].staffList = []
+      // 显示员工新行
+      this.checkIsShowStaffList();
+    },
+    /**
+     * @desc   : 增加工种行数据
+     * @author : 周兴
+     * @date   : 2023/2/2 15:16
+     */
+    addJobRow(rowIndex) {
+      // 先记录下已经存在的数据
+      let staffTable = this.$refs.staffTable ? this.$refs.staffTable.getTableDataFilter() : []
+      // 记录之前行的数据
+      if (rowIndex < this.jobIndex) {
+        // 说明加在前面
+        this.jobIndex = this.jobIndex + 1
+      }
+      // 如果为空,赋值新行
+      if (!this.formData.workTeamList || this.formData.workTeamList.length == 0) {
+        let item = {}
+        item.staffList = [];
+        this.formData.workTeamList.push(item)
+      }
+      // 给原始行赋值
+      if (this.formData.workTeamList[this.jobIndex]) {
+        this.$set(this.formData.workTeamList[this.jobIndex], 'staffList', staffTable)
+      }
+      // 设置空行的初始值
+      if (this.formData.workTeamList) {
+        this.formData.workTeamList.forEach(it => {
+          if (!it.jobId || this.jobId == 0) {
+            it.staffList = []
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 删除工种行数据
+     * @author : 周兴
+     * @date   : 2023/2/2 15:17
+     */
+    delJobRow(row) {
+      // 先记录下已经存在的数据
+      let staffTable = this.$refs.staffTable.getTableDataFilter()
+      // 记录之前行的数据
+      if (this.formData.workTeamList[this.jobIndex]) {
+        this.$set(this.formData.workTeamList[this.jobIndex], 'staffList', staffTable)
+      }
+      if (this.formData.workTeamList && this.formData.workTeamList.length > 1) {
+        let delIndex = this.formData.workTeamList.findIndex(item => item._X_ID === row._X_ID)
+        this.formData.workTeamList[delIndex].staffList = []
+        this.formData.workTeamList.splice(delIndex, 1)
+      } else {
+        this.formData.workTeamList = [
+          {
+            jobId: null,
+            jobName: null,
+            staffList: [],
+          }
+        ]
+      }
+    },
+    /**
+     * @desc   : 选择员工
+     * @author : 周兴
+     * @date   : 2023/2/2 13:23
+     */
+    chooseWorkTeamStaff() {
+      this.$nextTick(() => {
+        // 记录当前数据
+        let staffTable = this.$refs.staffTable.getTableDataFilter()
+        console.log('ttt', staffTable, this.jobIndex)
+        // 记录之前行的数据
+        if (this.formData.workTeamList[this.jobIndex]) {
+          this.$set(this.formData.workTeamList[this.jobIndex], 'staffList', staffTable)
+        }
+      })
+    },
+    /**
+     * @desc   : 删除员工
+     * @author : 周兴
+     * @date   : 2023/2/2 15:14
+     */
+    delStaffRow(row) {
+      if (this.formData.workTeamList[this.jobIndex] && this.formData.workTeamList[this.jobIndex].staffList) {
+        this.formData.workTeamList[this.jobIndex].staffList.splice(
+          this.formData.workTeamList[this.jobIndex].staffList.findIndex(item => item._X_ID === row._X_ID), 1)
+      }
+    },
+    // endregion
 
     // region 查询基础数据
     /**
@@ -115,19 +337,36 @@ export default {
       this.getRole();
       // 加载组织部门数据源
       //this.getOrg();
+      // 加载工种信息
+      this.getJob();
     },
-   /**
-    * @desc   : 获取角色数据
-    * @author : 姜宁
-    * @date   : 2023/1/29 16:33
-    */
+    /**
+     * @desc   : 获取角色数据
+     * @author : 姜宁
+     * @date   : 2023/1/29 16:33
+     */
     getRole() {
       let params = {
         ftyId: this.$store.state.user.ftyId
       }
       this.excute(this.$service.commonService, this.$service.commonService.getRole, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          this.roleNameList = res.data;
+          this.roleList = res.data;
+        }
+      })
+    },
+    /**
+     * @desc   : 获取工种信息
+     * @author : 姜宁
+     * @date   : 2023/2/2 11:07
+     */
+    getJob() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getJob, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.jobList = res.data;
         }
       })
     },
@@ -136,15 +375,15 @@ export default {
      * @author : 姜宁
      * @date   : 2023/2/1 15:13
      */
-    chooseOrg(rows){
+    chooseOrg(rows) {
       this.formData.orgId = rows[0].orgId;
     },
-   /**
-    * @desc   : 放大镜控件绑定值--业务员
-    * @author : 姜宁
-    * @date   : 2023/2/2 8:49
-    */
-   chooseStaff(rows){
+    /**
+     * @desc   : 放大镜控件绑定值--业务员
+     * @author : 姜宁
+     * @date   : 2023/2/2 8:49
+     */
+    chooseStaff(rows) {
       this.formData.staffId = rows[0].staffId;
     },
     /**
@@ -152,7 +391,7 @@ export default {
      * @author : 姜宁
      * @date   : 2023/2/1 16:49
      */
-    chooseStaffs(rows){
+    chooseStaffs(rows) {
       this.staffList = rows;
       this.formData.staffLists = this.staffList;
     },
@@ -160,25 +399,50 @@ export default {
 
     // region 保存方法
     /**
+     * @desc   : 校验数据是否全
+     * @author : 周兴
+     * @date   : 2023/2/2 15:57
+     */
+    validData() {
+      // 判断是否有工种信息
+      if (!this.formData.workTeamList || this.formData.workTeamList.length === 0) {
+        this.$message.error(this.$t('W_012'))
+       return false;
+      }
+      // 判断工种对应的员工信息是否为空
+      this.formData.workTeamList.forEach((it,index)=>{
+        if(!it.staffList || it.staffList.length === 0){
+          let msg = '未选择员工信息'
+          this.$message.error('第' + (index + 1) + '条工种数据未选择员工信息')
+          this.setErrToRow(it, msg);// 给行增加错误提示信息
+          return false;
+        }
+      })
+      return true;
+    },
+    /**
      * @desc   : 保存数据
      * @author : 姜宁
      * @date   : 2023/2/1 15:21
      */
     saveData() {
-      return this.type === this.$config.formMode.add
-        ? this.excute(this.$service.userService, this.$service.userService.insert, this.params)
-        : this.excute(this.$service.userService, this.$service.userService.update, this.params)
+      //   return this.type === this.$config.formMode.add
+      //     ? this.excute(this.$service.userService, this.$service.userService.insert, this.params)
+      //     : this.excute(this.$service.userService, this.$service.userService.update, this.params)
     },
-
     /**
      * @desc   : 给参数赋值
      * @author : 姜宁
      * @date   : 2023/2/1 15:28
      */
-    setParams(){
-      this.params = this.formData
+    setParams() {
+      this.params = {...this.formData}
+      // 处理班组中的员工Id串
+      this.params.workTeamList.forEach(it => {
+        it.staffIds = it.staffList.map(item => item.staffId)
+      })
+      console.log('tttt', this.params)
     },
-
     /**
      * @desc   : 清空表单
      * @author : 姜宁
@@ -191,11 +455,11 @@ export default {
         userName: '',
         orgId: null,
         roleIds: [],
-        staffId:null,
+        staffId: null,
         remarks: null,
         userType: self.$config.userType.staffUser,
         ftyId: this.$store.state.user.ftyId,
-        staffLists:[],
+        staffLists: [],
       };
       this.staffList = [];
     },

+ 44 - 208
src/view/core/user/index.vue

@@ -29,7 +29,7 @@
       ></SearchCond>
     </div>
     <!--  表格部分  -->
-    <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
+    <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData" :multiple = false
              :height="this.tableHeight" primaryKey="userId" @pageChange="pageSizeChange"
              name="table">
       <DkTableColumn field="userCode"></DkTableColumn>
@@ -103,189 +103,9 @@ export default {
         remarks: ''
       },
       featuresList3: [],
-      featuresList2: [
-        {
-          funcId: 999, funcName: '系统管理', leafFlag: false, children: [
-            {
-              funcId: 1, funcName: '基础资料', funcCode: 'user-manage', checked: false, leafFlag: false,
-              children: [
-                {
-                  funcId: 1, funcName: '员工管理', funcCode: 'user-manage', checked: false, leafFlag: true,
-                  children: [
-                    {funcId: 2, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                    {funcId: 3, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                    {funcId: 4, funcName: '删除', funcCode: 'user-manage-edit', checked: false}
-                  ]
-                },
-              ]
-            },
-            {
-              funcId: 5, funcName: '客户信息', funcCode: 'user-manage', checked: false, leafFlag: true,
-              children: [
-                {funcId: 6, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 7, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                {funcId: 8, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 9, funcName: '其他权限', funcCode: 'user-manage-edit', checked: false}
-              ]
-            },
-            {
-              funcId: 10, funcName: '订单管理', funcCode: 'user-manage', checked: false, leafFlag: true,
-              children: [
-                {funcId: 11, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 12, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                {funcId: 13, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 14, funcName: '转销售', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 15, funcName: '退款', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 16, funcName: '订单转发货', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 17, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 18, funcName: '订单同步', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 19, funcName: '分销商订单', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 20, funcName: '订单拦截', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 21, funcName: '订单评价', funcCode: 'user-manage-edit', checked: false},
-              ]
-            },
-          ]
-        },
-        {
-          funcId: 9996, funcName: '服务管理', leafFlag: false, children: [
-            {
-              funcId: 1, funcName: '员工管理', funcCode: 'user-manage', checked: false, leafFlag: true,
-              children: [
-                {funcId: 2, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 3, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                {funcId: 4, funcName: '删除', funcCode: 'user-manage-edit', checked: false}
-              ]
-            },
-            {
-              funcId: 5, funcName: '客户信息', funcCode: 'user-manage', checked: false, leafFlag: true,
-              children: [
-                {funcId: 6, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 7, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                {funcId: 8, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 9, funcName: '其他权限', funcCode: 'user-manage-edit', checked: false}
-              ]
-            },
-            {
-              funcId: 10, funcName: '订单管理', funcCode: 'user-manage', checked: false, leafFlag: true,
-              children: [
-                {funcId: 11, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 12, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-                {funcId: 13, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 14, funcName: '转销售', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 15, funcName: '退款', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 16, funcName: '订单转发货', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 17, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 18, funcName: '订单同步', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 19, funcName: '分销商订单', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 20, funcName: '订单拦截', funcCode: 'user-manage-edit', checked: false},
-                {funcId: 21, funcName: '订单评价', funcCode: 'user-manage-edit', checked: false},
-              ]
-            },
-          ]
-        }
-      ],
+      featuresList2: [],
       // 功能列表
-      featuresList: [
-        {
-          funcId: 1, funcName: '员工管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 2, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 3, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 4, funcName: '删除', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 5, funcName: '客户信息', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 6, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 7, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 8, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 9, funcName: '其他权限', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 10, funcName: '订单管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 11, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 12, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 13, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 14, funcName: '转销售', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 15, funcName: '退款', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 16, funcName: '订单转发货', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 17, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 18, funcName: '订单同步', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 19, funcName: '分销商订单', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 20, funcName: '订单拦截', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 21, funcName: '订单评价', funcCode: 'user-manage-edit', checked: false},
-          ]
-        },
-        {
-          funcId: 22, funcName: '员工管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 23, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 24, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 25, funcName: '删除', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 26, funcName: '客户信息', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 27, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 28, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 29, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 30, funcName: '其他权限', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 31, funcName: '订单管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 32, funcName: '新建新建新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 33, funcName: '新建新建新建', funcCode: 'user-manage-add', checked: false},
-            {funcId: 34, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 35, funcName: '转销售', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 36, funcName: '退款', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 37, funcName: '订单转发货', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 38, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 39, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 40, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 41, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 42, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-          ]
-        },
-        {
-          funcId: 43, funcName: '员工管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 44, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 45, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 46, funcName: '删除', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 47, funcName: '客户信息', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 48, funcName: '新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 49, funcName: '编辑', funcCode: 'user-manage-add', checked: false},
-            {funcId: 50, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 51, funcName: '其他权限', funcCode: 'user-manage-edit', checked: false}
-          ]
-        },
-        {
-          funcId: 52, funcName: '订单管理', funcCode: 'user-manage', checked: false,
-          children: [
-            {funcId: 53, funcName: '新建新建新建', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 54, funcName: '新建新建新建', funcCode: 'user-manage-add', checked: false},
-            {funcId: 55, funcName: '删除', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 56, funcName: '转销售', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 57, funcName: '退款', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 58, funcName: '订单转发货', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 59, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 60, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 61, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 62, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-            {funcId: 63, funcName: '订单推送至其他系统', funcCode: 'user-manage-edit', checked: false},
-          ]
-        }
-      ],
+      featuresList: [],
       errMessage: {},
       //功能权限树结构
       treeData: [],
@@ -324,7 +144,11 @@ export default {
           },
           {
             ok: () => {
-              userService.resetPassword(this.$refs['table-select'].batchRows).then(res => {//调用api接口
+              let params = {
+                ftyId: this.$store.state.user.ftyId,
+                userId: this.$refs['table-select'].batchRows[0].userId
+              }
+              this.excute(this.$service.userService, this.$service.userService.resetPassword, params).then(res => {//调用api接口
                 if (res.code === 200) {
                   this.$Message.success(this.$t('I_001', {'param': this.$v('resetPassword')}))
                   this.batchRows = []
@@ -354,7 +178,7 @@ export default {
           {
             ok: () => {
               //调用api接口
-              userService.unLock(this.$refs['table-select'].batchKeys).then(res => {
+              this.excuteNoParam(this.$service.userService, this.$service.userService.unLock, [this.$refs['table-select'].batchRows[0].userId], false).then(res => {//调用api接口
                 if (res.code === 200) {
                   this.$Message.success(this.$t('I_001', {'param': this.$v('unLock')}))
                   this.batchRows = []
@@ -370,19 +194,27 @@ export default {
         this.$Message.error(this.$t('W_013'))
       }
     },
-    /**
-     * @desc   : 打开功能权限弹窗
-     * @author : 洪旭东
-     * @date   : 2022-04-26 09:12
-     */
-    moduleRights() {
-      this.$Function({title: this.$t('featuresList'), data: this.featuresList3},
-        {
-          ok: (data) => {
-            console.log('bbb', data)
-            this.updateFunction(data);
-          },
-        })
+   /**
+    * @desc   : 打开功能权限弹窗
+    * @author : 姜宁
+    * @date   : 2023/2/2 15:28
+    */
+    moduleRights(rows) {
+      let userId = 0;
+      if (rows && rows.length > 0) {
+        userId = rows[0].userId
+      }
+      this.getRoleRightList(userId).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.menuList = res.data;
+          this.$Function({title: this.$t('featuresList'), data: this.menuList},
+            {
+              ok: (data) => {
+                this.updateFunction(data, userId);
+              },
+            })
+        }
+      })
     },
     /**
      * @desc   : 保存功能权限
@@ -438,14 +270,6 @@ export default {
       })
     },
     /**
-     *   @desc   : 进入编辑页面
-     *   @date   : 2022/8/15 8:49
-     *   @author : 寇珊珊
-     */
-    openEdit(row) {
-      this.$router.push('/core/user/edit/' + row.userId)
-    },
-    /**
      * @desc   : 分页变化
      * @author : 姜宁
      * @date   : 2023/1/29 11:06
@@ -455,8 +279,8 @@ export default {
     },
     /**
      * @desc   : switch停用启用
-     * @author : 沈博
-     * @date   : 2022年12月13日15:38:58
+     * @author : 姜宁
+     * @date   : 2023/2/2 13:29
      */
     onSwitchChange(param) {
       if (param.flgValid) {
@@ -465,6 +289,18 @@ export default {
         this.excuteNoParam(this.$service.userService, this.$service.userService.disable, [param.userId])
       }
     },
+   /**
+    * @desc   : 获取用户权限
+    * @author : 姜宁
+    * @date   : 2023/2/2 16:24
+    */
+    getRoleRightList(userId) {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        userId: userId,
+      }
+      return this.excute(this.$service.userService, this.$service.userService.getUserRight, params)
+    },
     /**
      * @desc   : 获取数据
      * @author : 姜宁

+ 34 - 8
src/view/mst/carr-kiln-car/index.vue

@@ -58,17 +58,25 @@
           <InputPop v-model="formData.uniqueCode" ref="uniqueCode" />
         </DkFormItem>
         <!--    窑车序号    -->
-        <DkFormItem prop="carNo" :required="true">
-          <InputPop v-model="formData.carNo" ref="carNo"/>
+        <DkFormItem prop="carNo" :required="true" :data-type="this.$config.dataType.number">
+          <InputNumberPop v-model="formData.carNo" ref="carNo" :digits=0 :min="0" :text-right="false"/>
         </DkFormItem>
         <!--    窑炉    -->
-        <DkFormItem prop="kilnId" :required="true" :label="$t('equipKiln')" :data-type="this.$config.dataType.number">
-          <SelectPop v-model="formData.kilnId" ref="ftyId" :multiple="false"
+        <DkFormItem prop="kilnId" :required="true" :label="$t('equipKiln')" data-type="number">
+          <SelectPop v-model="formData.kilnId" ref="kilnName" :multiple="false"
                      :options="kilnList"
                      labelKey="kilnName"
                      valueKey="kilnId">
           </SelectPop>
         </DkFormItem>
+        <!--    窑车位置    -->
+        <DkFormItem prop="kilnCarPlace">
+          <SelectPop v-model="formData.kilnCarPlace" ref="placeCode" :multiple="true"
+                     :options="kilnCarPlaceList"
+                     labelKey="placeCode"
+                     valueKey="kilnCarPlace">
+          </SelectPop>
+        </DkFormItem>
         <!--    备注    -->
         <DkFormItem prop="remarks">
           <InputPop v-model="formData.remarks" textareaFlag/>
@@ -94,9 +102,12 @@ export default {
         uniqueCode: '',
         carNo: '',
         kilnId:null,
+        kilnCarPlace:null,
         displayNo: 0,
         remarks: ''
       },
+      kilnList:[],
+      kilnCarPlaceList:[],
       searchContent: [
         {
           itemName: 'carCode',
@@ -135,6 +146,7 @@ export default {
     initData(type) {
       if (type === this.$config.formMode.add || type === this.$config.formMode.edit) {
         this.getKiln();    // 加载窑炉
+        this.getKilnCarPlace();   // 加载窑车位置
       }
     },
     /**
@@ -159,6 +171,7 @@ export default {
           uniqueCode: '',
           carNo: '',
           kilnId:null,
+          kilnCarPlace:null,
           displayNo: 0,
           remarks: ''
       }
@@ -168,10 +181,8 @@ export default {
      *   @date   : 2023/2/1 15:09
      *   @author : 常皓宁
      */
-    setParams(arg) {
+    setParams() {
       this.params = this.formData
-      this.params.cpId = this.$store.state.user.cpId
-      this.params.sysId = this.$store.state.user.sysId
     },
     /**
      *   @desc   : 保存数据
@@ -235,7 +246,22 @@ export default {
       }
       this.excute(this.$service.commonService, this.$service.commonService.getKiln, params, false).then(res => {//调用api查询方法
         if (res.code === this.$config.SUCCESS_CODE) {
-          this.spaceList = res.data
+          this.kilnList = res.data
+        }
+      })
+    },
+    /**
+     * @desc   : 获取窑车位置
+     * @author : 常皓宁
+     * @date   : 2023/2/1 15:09
+     */
+    getKilnCarPlace() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getKilnCarPlace, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.kilnCarPlaceList = res.data
         }
       })
     },

+ 18 - 0
src/view/mst/model-product/add.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm :type="$config.formMode.add" ></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "model-product-add",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 0
src/view/mst/model-product/edit.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm :type="$config.formMode.edit"  ></CommonForm>
+</template>
+
+<script>
+import CommonForm from "./form";
+
+export default {
+  name: "model-product-edit",
+  components: {
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 355 - 0
src/view/mst/model-product/form.vue

@@ -0,0 +1,355 @@
+<template>
+  <div class="main-div">
+    <div class="tab-class">
+      <!--  选择tab区域  -->
+      <DkTabs :options="tabsOptions" @on-click="changeElTabs"></DkTabs>
+    </div>
+    <DkCollapse>
+      <!--为了补缺tab区域fixed-->
+      <div id="name1" style="height: 30px;"></div>
+      <!-- 产品型号 -->
+      <DkPanel prop="modelProduct">
+        <DkForm slot="content" ref="formInline" v-model="formData">
+          <div id="search-cond-div" ref="search-cond-div">
+            <!-- 型号名称-->
+            <DkFormItem prop="productModelName" :required="true">
+              <InputPop v-model="formData.productModelName" ref="modelName"/>
+            </DkFormItem>
+            <!-- 型号编码 -->
+            <DkFormItem prop="modelCode" :required="true">
+              <InputPop v-model="formData.modelCode" ref="modelCode"/>
+            </DkFormItem>
+            <!-- 型号种类 -->
+            <DkFormItem prop="modelKind" :required="true"
+                        :data-type="this.$config.dataType.array">
+              <SelectPop v-model="formData.modelKind" ref="modelKind" :multiple="false"
+                         :options="modelKindList"
+                         :show-toolbar="true"
+                         labelKey="kindName"
+                         valueKey="kindCode">
+              </SelectPop>
+            </DkFormItem>
+            <!-- 产品型号 -->
+            <DkFormItem prop="pdtModel" :required="true">
+              <InputPop v-model="formData.pdtModel" ref="pdtModel"/>
+            </DkFormItem>
+            <!-- 产品规格 -->
+            <DkFormItem prop="pdtSpecs" :required="true">
+              <InputPop v-model="formData.pdtSpecs" ref="pdtSpecs"/>
+            </DkFormItem>
+            <!-- 产品分类 -->
+            <DkFormItem prop="modelCategory" :required="true"
+                        :data-type="this.$config.dataType.array">
+              <SelectPop v-model="formData.modelCategory" ref="modelCategory" multiple
+                         :options="modelCategoryList"
+                         :show-toolbar="true"
+                         labelKey="modelKindName"
+                         valueKey="categoryId">
+              </SelectPop>
+            </DkFormItem>
+            <!-- 默认商标 -->
+            <DkFormItem prop="defLogo" :required="true"
+                        :data-type="this.$config.dataType.array">
+              <SelectPop v-model="formData.defLogo" ref="defLogo" multiple
+                         :options="defLogoList"
+                         :show-toolbar="true"
+                         labelKey="typeName"
+                         valueKey="typeId">
+              </SelectPop>
+            </DkFormItem>
+            <!-- 默认釉色 -->
+            <DkFormItem prop="defColour" :required="true"
+                        :data-type="this.$config.dataType.array">
+              <SelectPop v-model="formData.defColour" ref="defColour" multiple
+                         :options="defColourList"
+                         :show-toolbar="true"
+                         labelKey="typeName"
+                         valueKey="typeId">
+              </SelectPop>
+            </DkFormItem>
+            <!--备注-->
+            <DkFormItem prop="remarks" span="24">
+              <InputPop ref="remarks" v-model="formData.remarks"
+                        maxlength=500 textareaFlag/>
+            </DkFormItem>
+          </div>
+        </DkForm>
+      </DkPanel>
+      <!-- 产品erp型号 -->
+      <DkPanel id="name2" prop="model_pdt_erp">
+        <EditTable slot="content" ref="editTableErp" name="table"
+                   :enabledRepeat=true
+                   :enabled-repeat-id="'userId'"
+                   :columns="editTableErpColumn"
+                   @delRow="deleteModelPdtErp"></EditTable>
+      </DkPanel>
+      <!-- 产品erp型号 -->
+      <DkPanel id="name3" prop="product_bom">
+        <DkSplit slot="content" style="height: 300px">
+          <EditTable slot="left" ref="editTable" name="table"
+                     :enabledRepeat=true
+                     :enabled-repeat-id="'userId'"
+                     :columns="editTableBomColumn"
+                     @delRow="deleteModelPdtErp"></EditTable>
+          <EditTable slot="right" ref="editTable" name="table"
+                     :enabledRepeat=true
+                     :enabled-repeat-id="'userId'"
+                     :columns="editTableLabelColumn"
+                     @delRow="deleteModelPdtErp"></EditTable>
+        </DkSplit>
+
+      </DkPanel>
+    </DkCollapse>
+    <!--为了补缺tab区域fixed-->
+    <div style="height: 90px;"></div>
+
+    <!--      下部分按钮区域-->
+    <DkSaveButton v-if="this.type != this.$config.formMode.approval" ref="saveButton"
+                  :loading="loading"
+                  @save="save(true)"
+                  @close="close('/sale/order/index')">
+      <DkButton ref="saveQuotation" type="primary"
+                v-if="type == $config.formMode.edit && formData.orderStatus === this.$config.orderStatus.quote "
+                @click="save(false)" style="margin-right: 10px;" :loading="loading">{{ $t('saveQuotation') }}
+      </DkButton>
+    </DkSaveButton>
+
+  </div>
+</template>
+
+<script>
+import {indexMixin} from "@/mixins";
+
+export default {
+  name: "add",
+  mixins: [indexMixin],
+  components: {},
+  data() {
+    let self = this
+    return {
+      //画面模式选项
+      tabsOptions: [
+        {label: self.$t('model-product'), name: 'name1'},
+        {label: self.$t('model_pdt_erp'), name: 'name2'},
+        {label: self.$t('product_bom'), name: 'name3'},
+      ],
+      formData: {
+        productModelName: '',               //型号名称
+        modelCode: '',               //型号编码
+        modelKind: '',               //型号种类
+        pdtModel: '',                //产品型号
+        pdtSpecs: '',                //产品规格
+        modelCategory: '',           //产品分类
+        defLogo: '',                 //默认商标
+        defColour: '',               //默认釉色
+      },
+      modelKindList: [],   //型号种类list
+      modelCategoryList: [], //产品分类list
+      defLogoList: [],       //默认商标
+      defColourList: [],     //默认釉色
+      tableColumn: [],
+      //产品erp型号
+      editTableErpColumn: [
+        //erp物料编码
+        {field: 'erpModelCode', type: 'text', width: 255},
+        //商标
+        {
+          field: 'logoName',
+          controlId: 'logoId',
+          width: 255,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        //釉色
+        {
+          field: 'colour',
+          controlId: 'logoId',
+          width: 255,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        {field: 'remarks', type: 'text', width: 255},
+      ],
+      //产品型号BOM
+      editTableBomColumn: [
+        //子件类型
+        {field: 'bomModelKind', type: 'text', width: 125},
+        {
+          field: 'logoName',
+          controlId: 'logoId',
+          width: 125,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        {field: 'bomModelQty', type: 'number', copyVisible: true}, //子件数量
+        //子件型号
+        {
+          field: 'bomModel',
+          controlId: 'bomModelId',
+          width: 125,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        //扫码标识
+        {field: 'flgScanCode', type: 'switch', width: 125},
+        //组装工序
+        {
+          field: 'packNodeIds', controlId: 'packNodeId',
+          width: 125,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        {field: 'remarks', type: 'text', width: 125},
+      ],
+      //产品型号验证标签
+      editTableLabelColumn: [
+        //标签类型
+        {
+          field: 'labelKind',
+          controlId: 'labelKind',
+          width: 255,
+          type: 'tableSelect',
+          param: () => {
+            return {flgNonStandardTypeList: [0, 2], standardPriceId: self.$route.params.id}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.skuForStand,
+          fieldUpdate: self.$updateColumns.standardPriceChooseGoods,
+          searchDetailFlag: false
+        },
+        //标签代码
+        {field: 'labelCode', type: 'text', width: 255},
+        //有效标识
+        {field: 'flgValid', type: 'switch', width: 255},
+        {field: 'remarks', type: 'text', width: 255},
+      ],
+    }
+  },
+  methods: {
+
+    //  region 一览界面操作
+    /**
+     * @desc   : 删除产品erp型号
+     * @author : 夏常明
+     * @date   : 2023/2/1 16:23
+     */
+    deleteModelPdtErp() {
+
+    },
+    /**
+     * @desc   : tabs切换事件
+     * @author : 寇珊珊
+     * @date   : 2022/3/14 16:55
+     */
+    changeElTabs(e) {
+      let name = e
+      this.bottomList = ['1', '2', '3', '4', '5']
+      window.location.href = '#' + name
+    },
+    /**
+     * @desc   : 获取商品型号种类下拉框数据源
+     * @author : 夏常明
+     * @date   : 2023/2/2 11:26
+     */
+    getModelKind() {
+      let params = {
+        kindType: this.$config.kindType.modelKind,
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getDataKind, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.modelKindList = res.data;
+        }
+      })
+    },
+    /**
+     * @desc   : 获取产品型号分类
+     * @author : 夏常明
+     * @date   : 2023/2/2 12:54
+     */
+    getModelCategory(){
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getModelCategory, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.modelCategoryList = res.data;
+        }
+      })
+    },
+    /**
+     * @desc   : 加载基础数据
+     * @author : 夏常明
+     * @date   : 2023/1/9 11:44
+     */
+    initData() {
+      if (this.type === this.$config.formMode.add || this.type === this.$config.formMode.edit) {
+        this.getModelKind()   // 获取商品型号种类下拉框数据源
+        this.getModelCategory() //
+      }
+    },
+    //endregion
+  },
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 夏常明
+   * @date   : 2023/2/2 11:38
+   */
+  created() {
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.imageWrap {
+  width: 100%;
+  height: 90px;
+  border: 1px solid #ff0000;
+}
+
+.tab-class {
+  width: 100%;
+  height: 32px;
+  position: fixed;
+  z-index: 999;
+  background: #fff;
+}
+
+
+//.form-content-class {
+//  padding-left: 8px;
+//  width: 98%;
+//  margin-top: 3px;
+//  margin-bottom: 3px;
+//}
+
+</style>

+ 235 - 0
src/view/mst/model-product/index.vue

@@ -0,0 +1,235 @@
+<template>
+  <div class="main-div">
+    <!--  操作按钮-->
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <BaseIndexButton right-button="model-product-select" ref="search" name="search"
+                         @click="open($config.routeUrl.search)"></BaseIndexButton>
+        <!--清空查询条件-->
+        <BaseIndexButton ref="clear" name="clear" @click="open($config.routeUrl.modelProduct.clear)"></BaseIndexButton>
+        <!--编辑-->
+        <BaseIndexButton right-button="model-product-edit" ref="edit" name="edit"
+                         @click="open($config.routeUrl.modelProduct.edit)"></BaseIndexButton>
+
+      </template>
+      <!-- 新建 -->
+      <template #right>
+        <BaseIndexButton right-button="model-product-add" ref="create" name="create"
+                         @click="open($config.routeUrl.modelProduct.add)"></BaseIndexButton>
+      </template>
+    </BaseIndexButtonGroup>
+    <!--  查询条件区域  -->
+    <div id="search-cond-div" ref="search-cond-div" style="margin-top: 1px;padding: 0">
+      <SearchCond ref="searchCond" v-model="searchCond"
+                  @collapse-change="collapseChange" :set-flag="false"
+                  :search-content="searchContent"></SearchCond>
+    </div>
+    <!--   列表区域-->
+    <card :padding=0 style="margin-top: 1px;padding: 0">
+      <div style="margin-left: 5px;">
+        <!-- 产品型号列表 -->
+        <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
+                 :pageFlag="true"
+                 :page-total="pageInfo.total"
+                 :current-page="pageInfo.currentPage"
+                 :multiple="false"
+                 primaryKey="modelId"
+                 @pageChange="pageSizeChange">
+          <!--型号编码-->
+          <DkTableColumn field="modelCode"></DkTableColumn>
+          <!--型号名称-->
+          <DkTableColumn field="modelName"></DkTableColumn>
+          <!--有效标识-->
+          <DkTableColumn field="flgValid" type="switch" @on-switch-change="onSwitchChange"
+                         :switch-disabled="false"></DkTableColumn>
+          <!--产品分类-->
+          <DkTableColumn field="modelCategoryName"></DkTableColumn>
+          <!--产品视图-->
+          <DkTableColumn field="pdtView"></DkTableColumn>
+          <!--产品型号-->
+          <DkTableColumn field="pdtModel"></DkTableColumn>
+          <!--产品规格-->
+          <DkTableColumn field="pdtSpecs"></DkTableColumn>
+          <!--默认商标-->
+          <DkTableColumn field="defLogo"></DkTableColumn>
+          <!--默认釉色-->
+          <DkTableColumn field="defColour"></DkTableColumn>
+          <!--备注-->
+          <DkTableColumn field="remarks" width="auto"></DkTableColumn>
+        </DkTable>
+      </div>
+    </card>
+    <card ref="buttonCard" class="function-button-card" :padding=0 style="margin-top: 1px;overflow-y: auto;padding: 0">
+      <DkTabs v-model="productModel" :options="detailOptions"></DkTabs>
+      <!-- erp型号/bom型号 树形表格 -->
+      <div v-if="productModel === this.$config.modelProductTab.modelPdtErp">
+        <DkTable :pageFlag="false"
+                 :pageTotalFlag="false"
+                 :treeFlag="true"
+                 primaryKey="itemId"
+                 :expand-flag="true"
+                 :id="'table-'+$options.name"
+                 name="table"
+                 ref="detail-select"
+                 :data="modelPdtErp">
+          <DkTableColumn
+            v-for="(item, index) in modelPdtErpList"
+            :key="productModel+index"
+            align="center"
+            :type="item.type"
+            :field="item.field"
+            :title="item.title"
+            :sum="item.sum"
+            :digits="item.digits"
+            :width="item.width"
+            :dataType="item.dataType"
+            :tree-node="item.treeNode"
+          >
+          </DkTableColumn>
+        </DkTable>
+      </div>
+      <!--收款明细-->
+      <div v-if="productModel === this.$config.modelProductTab.modelPdtLabel">
+        <DkTable :pageFlag="false"
+                 :pageTotalFlag="false"
+                 primaryKey="receiptId"
+                 :id="'table-'+$options.name"
+
+                 name="table"
+                 ref="receipt-select"
+                 :data="modelPdtLabel">
+          <DkTableColumn
+            v-for="(item, index) in modelPdtLabelList"
+            :key="productModel+index"
+            align="center"
+            :type="item.type"
+            :field="item.field"
+            :title="item.title"
+            :sum="item.sum"
+            :digits="item.digits"
+            :width="item.width"
+          >
+          </DkTableColumn>
+        </DkTable>
+      </div>
+    </card>
+  </div>
+</template>
+
+<script>
+import {indexMixin} from "@/mixins";
+
+export default {
+  name: "model-product-index",
+  mixins: [indexMixin],
+
+  data() {
+    let self = this
+    return {
+      tableData: [{
+        modelId: 1,
+        modelCode: '型号编码',
+        modelName: '型号名称',
+        flgValid: true,
+        modelCategoryName: '产品分类',
+        pdtView: '产品视图',
+        pdtModel: '产品型号',
+        pdtSpecs: '产品规格',
+        defLogo: '默认商标',
+        defColour: '默认釉色',
+      },{
+        modelId: 2,
+        modelCode: '型号编码',
+        modelName: '型号名称',
+        flgValid: true,
+        modelCategoryName: '产品分类',
+        pdtView: '产品视图',
+        pdtModel: '产品型号',
+        pdtSpecs: '产品规格',
+        defLogo: '默认商标',
+        defColour: '默认釉色',
+      }],
+      tableHeight: 600,
+      modelPdtErp: [],  // 用于存放产品erp型号数据
+      modelPdtErpList: [
+        {field: 'itemId', width: '130px',  type: 'text', treeNode: true},
+        {field: 'modelName', width: '200px', type: 'text'},
+        {field: 'logoPath', width: '100px', type: 'text'},
+        {field: 'colour', width: '130px', type: 'text'},
+        {field: 'erpModelCode', width: '130px', type: 'text'},
+        {field: 'remarks', width: '220px', type: 'text'},
+      ],
+      modelPdtLabel:[], // 用于存放产品型号验证标签
+      modelPdtLabelList:[
+        {field: 'modelName', width: '200px', type: 'text'},
+        {field: 'labelKind', width: '200px', type: 'text'},
+        {field: 'labelCode', width: '200px', type: 'text'},
+        {field: 'remarks', width: '200px', type: 'text'},
+      ],
+      searchContent: [
+        {
+          itemCode: 'modelName',
+        },
+        self.$config.flgValidSearch //有效标识
+      ],
+      productModel: 'productModel',
+      detailOptions: [{label: self.$t('modelPdtErp'), name: 'modelPdtErp'}, //产品erp型号-产品型号bom 树形表格
+        {label: self.$t('modelPdtLabel'), name: 'modelPdtLabel'},//产品型号验证标签
+      ],
+    }
+  },
+  methods: {
+
+    // region 一览界面操作
+    /**
+     * @desc   : 分页变化
+     * @author : 周兴
+     * @date   : 2022年12月13日09:56:24
+     */
+    pageSizeChange(pageInfo) {
+      this.searchData(pageInfo) // 查询数据
+    },
+    /**
+     * @desc   : 缩放查询条件
+     * @author : 周兴
+     * @date   : 2022/3/15 14:57
+     */
+    collapseChange() {
+      setTimeout(() => {
+        this.resizeTable() // 重新计算表格高度
+      }, 300)
+
+      // 光标停留在第一个控件上
+      this.$refs['searchCond'].focus()
+    },
+    /**
+     * @desc   : 启用禁用
+     * @author : 夏常明
+     * @date   : 2023/2/1 10:44
+     */
+    onSwitchChange(param) {
+      if (param.flgValid) {
+        this.excuteNoParam(this.$service.productBrandService, this.$service.productBrandService.enable, [param.brandId])
+      } else {
+        this.excuteNoParam(this.$service.productBrandService, this.$service.productBrandService.disable, [param.brandId])
+      }
+    },
+    /**
+     * @desc   : 加载数据
+     * @author : 夏常明
+     * @date   : 2023/2/1 9:52
+     */
+    initData(type) {
+
+    },
+    // endregion
+
+  },
+  created() {
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

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

@@ -120,6 +120,9 @@ export default {
     },
     type: {
       type: String
+    },
+    modelKind: {
+      type: String
     }
   },
   data() {
@@ -311,7 +314,7 @@ export default {
     getCategoryList() {
       let params = {
         ftyId: this.$store.state.user.ftyId,
-        modelKind: '型号种类-' + this.$t(this.type).replace('型号', '')
+        modelKind: this.modelKind
       }
       this.excute(this.$service.commonService, this.$service.commonService.getModelCategory, params, false).then(res => {//调用api查询方法
         if (res.code === this.$config.SUCCESS_CODE) {

+ 2 - 1
src/view/mst/model/model-carrier.vue

@@ -1,5 +1,6 @@
 <template>
-  <CommonIndex :type="$config.formCode.modelCarrier" :service="$service.modelCarrierService"></CommonIndex>
+  <CommonIndex :type="$config.formCode.modelCarrier" :service="$service.modelCarrierService"
+               :model-kind="$config.modelKind.modelCarrier"></CommonIndex>
 </template>
 
 <script>

+ 2 - 1
src/view/mst/model/model-equipment.vue

@@ -1,5 +1,6 @@
 <template>
-  <CommonIndex :type="$config.formCode.modelEquipment" :service="$service.modelEquipmentService"></CommonIndex>
+  <CommonIndex :type="$config.formCode.modelEquipment" :service="$service.modelEquipmentService"
+               :model-kind="$config.modelKind.modelEquipment"></CommonIndex>
 </template>
 
 <script>

+ 2 - 1
src/view/mst/model/model-material.vue

@@ -1,5 +1,6 @@
 <template>
-  <CommonIndex :type="$config.formCode.modelMaterial" :service="$service.modelMaterialService"></CommonIndex>
+  <CommonIndex :type="$config.formCode.modelMaterial" :service="$service.modelMaterialService"
+               :model-kind="$config.modelKind.modelMaterial"></CommonIndex>
 </template>
 
 <script>

+ 2 - 1
src/view/mst/model/model-mould.vue

@@ -1,5 +1,6 @@
 <template>
-  <CommonIndex :type="$config.formCode.modelMould" :service="$service.modelMouldService"></CommonIndex>
+  <CommonIndex :type="$config.formCode.modelMould" :service="$service.modelMouldService"
+               :model-kind="$config.modelKind.modelMould"></CommonIndex>
 </template>
 
 <script>

+ 10 - 3
src/view/sale/order/index.vue

@@ -119,11 +119,18 @@
       <div v-if="detailModel === this.$config.orderDetailAllocation.goodsDetail
                         && this.orderType != $config.orderType.return
                         && this.orderType != $config.orderType.refund">
-        <DkTable :pageFlag="false" :pageTotalFlag="false" :treeFlag="true" primaryKey="itemId"
+        <DkTable :pageFlag="false"
+                 :pageTotalFlag="false"
+                 :treeFlag="true"
+                 primaryKey="itemId"
                  :expand-flag="true"
-                 :id="'table-'+$options.name" :show-footer="true"
+                 :id="'table-'+$options.name"
+                 :show-footer="true"
                  :export-url="$libaray.checkButtonHasRight('sale-export')?'/order-server/sale/order_item/export/'+orderId:''"
-                 name="table" ref="detail-select" :data="tableDataDetail_goodsDetail" :height="tableHeight-15">
+                 name="table"
+                 ref="detail-select"
+                 :data="tableDataDetail_goodsDetail"
+                 :height="tableHeight-15">
           <DkTableColumn type="seq" width="60" sortable></DkTableColumn>
           <DkTableColumn
             v-for="(item, index) in tableDataTitle_goodsDetail"