Przeglądaj źródła

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

# Conflicts:
#	src/api/pages/common/common.js
koushanshan 3 lat temu
rodzic
commit
cece30d1ad
46 zmienionych plików z 1555 dodań i 839 usunięć
  1. 5 4
      src/api/pages/common/common.js
  2. 11 0
      src/api/pages/pdm/molding-item-his.js
  3. BIN
      src/assets/icons/交坯.png
  4. BIN
      src/assets/icons/喷雾.png
  5. BIN
      src/assets/icons/回收.png
  6. BIN
      src/assets/icons/打包.png
  7. BIN
      src/assets/icons/打磨.png
  8. BIN
      src/assets/icons/检查.png
  9. BIN
      src/assets/icons/火炉.png
  10. BIN
      src/assets/icons/烘干.png
  11. BIN
      src/assets/icons/登记.png
  12. BIN
      src/assets/icons/装卸.png
  13. BIN
      src/assets/icons/马桶.png
  14. BIN
      src/assets/images/app-image/app_climb_kiln.png
  15. BIN
      src/assets/images/app-image/app_finish_check.png
  16. BIN
      src/assets/images/app-image/app_half_check.png
  17. BIN
      src/assets/images/app-image/app_in_kiln.png
  18. BIN
      src/assets/images/app-image/app_out_kiln.png
  19. BIN
      src/assets/images/app-image/app_recover.png
  20. BIN
      src/assets/images/app-image/app_register.png
  21. BIN
      src/assets/images/app-image/app_uninstall_kiln.png
  22. 6 4
      src/components/base/edit-table/edit-table.vue
  23. 12 10
      src/components/business/process/edge-modal/edge-modal.vue
  24. 606 559
      src/components/business/process/node-modal/node-modal.vue
  25. 4 2
      src/components/business/select-magnifier/select-magnifier.vue
  26. 1 0
      src/components/business/table-select/table-select.vue
  27. 10 1
      src/config/index.js
  28. 10 0
      src/libs/update-columns/index.js
  29. 9 1
      src/locale/lang/zh-CN.js
  30. 0 5
      src/view-app/app/mold-management/mold-management-add/index.vue
  31. 29 0
      src/view-app/app/piecework-procedure/register/index.vue
  32. 228 0
      src/view-app/app/piecework-procedure/shaping/index.vue
  33. 1 1
      src/view-app/app/piecework-procedure/uninstall-kiln/index.vue
  34. 146 88
      src/view-app/main/index.vue
  35. 6 1
      src/view-app/main/other.vue
  36. 0 2
      src/view/core/system-setting/index.vue
  37. 24 2
      src/view/mst/molding/form.vue
  38. 28 4
      src/view/pdm/molding-record/form.vue
  39. 5 1
      src/view/pdm/molding-record/index.vue
  40. 63 21
      src/view/pdm/prod-logo-colour/index.vue
  41. 0 2
      src/view/pdm/work-station/index.vue
  42. 163 1
      src/view/pdm/ws-clock/clock-user.vue
  43. 125 123
      src/view/pdm/ws-clock/form.vue
  44. 2 0
      src/view/pdm/ws-clock/index.vue
  45. 44 6
      src/view/process/process-flow/config/ProcessConfig.js
  46. 17 1
      src/view/process/process-flow/process-setting.vue

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

@@ -87,8 +87,10 @@ export default {
     getMoldlineGroupByPage:'get_moldline_group_by_page',
     // 分页获取组织部门
     getProcessNodeByPage: 'get_process_node_by_page',
-    // 获取生产工号
+    // 获取工位工号
     getWorkStationUser:'get_work_station_user',
+    // 获取工位工号(分页)
+    getWorkStationUserPage:'get_work_station_user_page',
     // 根据成型线Id获取成型记录数据
     getMoldingItemByMoldlineId: 'get_molding_item_by_moldline_id',
     //条码变更放大镜
@@ -99,7 +101,6 @@ export default {
     getColourForSet:'get_colour_for_set',
     //商标设定放大镜详细查询
     getLogoForSet:'get_logo_for_set',
-
     // 获取工艺节点
     getProcessNode:'get_process_node',
     // 获取成型线
@@ -108,12 +109,12 @@ export default {
     getUserByCode:'get_user_by_code',
     //用户分页
     getUserByCodePage:'get_user_by_code_page',
-    //工位工号(工位打卡选择用户)
-    getStationUserPage:'get_station_user_page',
     //工位工号(工位打卡选择工位数据源)
     getWsStation:'get_ws_station',
     // 获取工位分页
     getWorkStationByPage:'get_work_station_by_page',
+    // 根据用户Id获取班组信息
+    getWorkTeamByUserId:'get_work_team_by_user_id'
   },
   appCommonService: {
     prefix: 'mdm-server/app/mst/common/',

+ 11 - 0
src/api/pages/pdm/molding-item-his.js

@@ -0,0 +1,11 @@
+/**
+ * @desc   : 成型记录履历
+ * @author : 夏常明
+ * @date   : 2023/3/1 11:48
+ */
+export default {
+  moldingItemHisService:{
+    // 前缀
+    prefix:'/mdm-server/pdm/moldingItemHis/',
+  }
+}

BIN
src/assets/icons/交坯.png


BIN
src/assets/icons/喷雾.png


BIN
src/assets/icons/回收.png


BIN
src/assets/icons/打包.png


BIN
src/assets/icons/打磨.png


BIN
src/assets/icons/检查.png


BIN
src/assets/icons/火炉.png


BIN
src/assets/icons/烘干.png


BIN
src/assets/icons/登记.png


BIN
src/assets/icons/装卸.png


BIN
src/assets/icons/马桶.png


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


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


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


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


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


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


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


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


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

@@ -2502,10 +2502,12 @@ export default {
      */
     changeSettingLocation() {
       let self = this;
-      setTimeout(() => {
-        self.settingLeft = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetWidth + self.$refs[self.name].$el.offsetLeft - 26) + 'px' : 0// 设置图标居左的位置
-        self.settingTop = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetTop + 1) + 'px' : 0;           // 设置图标居上的位置
-      }, 100)
+      this.$nextTick(()=>{
+        setTimeout(() => {
+          self.settingLeft = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetWidth + self.$refs[self.name].$el.offsetLeft - 26) + 'px' : 0// 设置图标居左的位置
+          self.settingTop = self.$refs[self.name] ? (self.$refs[self.name].$el.offsetTop + 1) + 'px' : 0;           // 设置图标居上的位置
+        }, 700)
+      })
     },
   },
   mounted() {

+ 12 - 10
src/components/business/process/edge-modal/edge-modal.vue

@@ -15,11 +15,11 @@
       {{edgeData}}
       <DkForm ref="formInline" :col-count="2" >
         <!--    默认分级    -->
-        <DkFormItem prop="pdtGradeIds">
+        <DkFormItem prop="pdtGradeIds" :data-type="$config.dataType.array">
           <SelectPop ref="pdtGradeIds" v-model="edgeData.pdtGradeIds" label-key="gradeName" value-key="gradeId" :multiple="true" :options="productGradeList" />
         </DkFormItem>
         <!--    成型标签    -->
-        <DkFormItem prop="moldingSysTags">
+        <DkFormItem prop="moldingSysTags" :data-type="$config.dataType.array">
           <SelectPop ref="moldingSysTags" v-model="edgeData.moldingSysTags" label-key="kindName" value-key="kindCode" :multiple="true"
                      :options="dataKindList.filter(it=>it.kindType==='成线标签')" />
         </DkFormItem>
@@ -68,9 +68,11 @@ export default {
   },
   watch:{
     id(n,o){
-      let graph = Process.graph;
-      let cell = graph.getCellById(this.process.currentEdgeId);
-      this.edgeData=cell.data
+      if(n){
+        let graph = Process.graph;
+        let cell = graph.getCellById(this.process.currentEdgeId);
+        this.edgeData=cell.data
+      }
     }
   },
   data() {
@@ -107,13 +109,13 @@ export default {
      * @date   : 2023/1/5 10:38
      */
     modalOk(){
-      this.edgeData.pdtList=this.$refs.pdtTable.getTableDataFilter().map((it) => {
+      this.edgeData.pdtList=this.$refs.pdtTable?.getTableDataFilter()?.map((it) => {
         return {
           flowId:parseInt(this.$route.params.id),
           routeId:this.process.currentEdgeId,
           pdtModelId:it.pdtModelId,
-          modelCode:it.modelCode,
-          modelName:it.modelName,
+          pdtModelCode:it.modelCode,
+          pdtModelName:it.modelName,
           categoryName:it.categoryName,
           remarks:it.remarks,
           ftyId:this.$store.state.user.ftyId
@@ -124,8 +126,8 @@ export default {
       //设置业务数据
       cell.setData(this.edgeData,{overwrite:true})
       //设置样式
-      if(Object.keys(cell.data).length!=0&&((cell.data.pdtGradeIds&&cell.data.pdtGradeIds.length!=0)||(cell.data.moldingSysTags&&cell.data.moldingSysTags.length!=0))){
-        cell.setAttrs({ line: { stroke: 'red', }, }, );
+      if(Object.keys(cell.data).length!=0&&((cell?.data?.pdtGradeIds&&cell?.data?.pdtGradeIds.length>0)||(cell?.data?.moldingSysTags&&cell?.data?.moldingSysTags.length>0))){
+        cell.setAttrs({ line: { stroke: '#4169E1', }, }, );
       }else{
         cell.setAttrs({ line: { stroke: '#A2B1C3', }, },);
       }

+ 606 - 559
src/components/business/process/node-modal/node-modal.vue

@@ -1,567 +1,614 @@
-<!--&lt;!&ndash; @desc:工艺流程节点弹窗  @auth:张潇木  @time:2023/1/5 9:35 &ndash;&gt;-->
-<!--<template>-->
-<!--  <div>-->
-<!--    <DkModal-->
-<!--      title="工艺节点"-->
-<!--      width="1600"-->
-<!--      v-model="process.nodeModal.display"-->
-<!--      :mask-closable="false"-->
-<!--      :mask="false"-->
-<!--      :closable="false"-->
-<!--      draggable-->
-<!--      sticky-->
-<!--      :autoClearFlag="false"-->
-<!--      @modalOk="modalOk"-->
-<!--      @modalCancel="modalCancel">-->
-<!--      <DkForm ref="formInline" v-model="nodeData" :col-count="4" :label-max-words="6">-->
-<!--        &lt;!&ndash;    节点名称    &ndash;&gt;-->
-<!--        <DkFormItem prop="nodeName" :required="true">-->
-<!--          <InputPop v-model="nodeData.nodeName" ref="nodeName"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    节点种类    &ndash;&gt;-->
-<!--        <DkFormItem prop="nodeKind" :required="true">-->
-<!--          <SelectPop ref="nodeKind" v-model="nodeData.nodeKind" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="false" disabled :options="dataKindList.filter(it=>it.kindType==='工艺节点')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    流程类型  工艺节点-计件&&节点流程-结束,报损标识不可用(否)。其他可用) &ndash;&gt;-->
-<!--        <DkFormItem prop="flowKind" :required="true">-->
-<!--          <SelectPop ref="flowKind" v-model="nodeData.flowKind" label-key="kindName" value-key="kindCode"-->
-<!--                     @on-select="()=>{-->
-<!--                       if(nodeData.nodeKind=='工艺节点-计件'&&nodeData.flowKind=='节点流程-结束') this.nodeData.flgScrap=false;-->
-<!--                       if(['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始') this.nodeData.flgAloneJudge=false;}"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点流程').filter(it=>!(nodeControl?.flowKind?.invalidCode||[]).includes(it.kindCode))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    工号类型    &ndash;&gt;-->
-<!--        <DkFormItem prop="userKind" :required="true" v-if="nodeControl?.userKind?.visible">-->
-<!--          <SelectPop ref="userKind" v-model="nodeData.userKind" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点工号').filter(it=>!(nodeControl?.userKind?.invalidCode||[]).includes(it.kindCode))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    计件模式    &ndash;&gt;-->
-<!--        <DkFormItem prop="pieceKind" :required="true" v-if="nodeControl?.pieceKind?.visible">-->
-<!--          <SelectPop ref="pieceKind" v-model="nodeData.pieceKind" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点计件').filter(it=>!(nodeControl?.pieceKind?.invalidCode||[]).includes(it.kindCode))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    操作模式 工艺节点-计件&&节点操作-产品码,撤销标识可用。其他:不可用(否)&ndash;&gt;-->
-<!--        <DkFormItem prop="opnKind" :required="true" v-if="nodeControl?.opnKind?.visible">-->
-<!--          <SelectPop ref="opnKind" v-model="nodeData.opnKind" label-key="kindName" value-key="kindCode"-->
-<!--                     @on-select="()=>{ if(nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码')-->
-<!--                     {nodeData.flgUndo=false;nodeData.packKind=undefined;nodeData.flgCheckLabel=false} }"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点操作').filter(it=>!(nodeControl?.opnKind?.invalidCode||[]).includes(it.kindCode))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    工序标签    &ndash;&gt;-->
-<!--        <DkFormItem prop="nodeSysTags" v-if="nodeControl?.nodeSysTags?.visible">-->
-<!--          <SelectPop ref="nodeSysTags" v-model="nodeData.nodeSysTags" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='节点标签').filter(it=>!(nodeControl?.nodeSysTags?.invalidCode||[]).includes(it.kindCode))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    报损标识    &ndash;&gt;-->
-<!--        <DkFormItem prop="scrapFlg" v-if="nodeControl?.flgScrap?.visible">-->
-<!--          <div class="switch">-->
-<!--            <template>-->
-<!--              &lt;!&ndash;   工艺节点-计件&&节点流程-结束,报损标识不可用(否)。其他可用)  &ndash;&gt;-->
-<!--              <i-switch ref="flgScrap" v-model="nodeData.flgScrap" :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.flowKind=='节点流程-结束'">-->
-<!--                <Icon type="md-checkmark" slot="open"></Icon>-->
-<!--                <Icon type="md-close" slot="close"></Icon>-->
-<!--              </i-switch>-->
-<!--            </template>-->
-<!--          </div>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    撤销标识    &ndash;&gt;-->
-<!--        <DkFormItem prop="flgUndo" v-if="nodeControl?.flgUndo?.visible">-->
-<!--          <div class="switch">-->
-<!--            <template>-->
-<!--              &lt;!&ndash;    工艺节点-计件&&节点操作-产品码,撤销标识可用。其他:不可用(否)   &ndash;&gt;-->
-<!--              <i-switch ref="flgUndo" v-model="nodeData.flgUndo" :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'">-->
-<!--                <Icon type="md-checkmark" slot="open"></Icon>-->
-<!--                <Icon type="md-close" slot="close"></Icon>-->
-<!--              </i-switch>-->
-<!--            </template>-->
-<!--          </div>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    默认分级    &ndash;&gt;-->
-<!--        <DkFormItem prop="defGradeId" v-if="nodeControl?.defGradeId?.visible"-->
-<!--                    :required="['工艺节点-回收','工艺节点-成型'].includes(nodeData.nodeKind)-->
-<!--                    ||(['工艺节点-计件','工艺节点-登窑','工艺节点-入窑'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始')" >-->
-<!--          <SelectPop ref="defGradeId" v-model="nodeData.defGradeId" label-key="gradeName" value-key="gradeId"-->
-<!--                     :multiple="false" :options="productGradeList.filter(it=>['产品等级-优','产品等级-良'].includes(it.gradeKind))"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    成型标签    &ndash;&gt;-->
-<!--        <DkFormItem prop="moldingSysTags" v-if="nodeControl?.moldingSysTags?.visible">-->
-<!--          <SelectPop ref="moldingSysTags" v-model="nodeData.moldingSysTags" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='成线标签')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    可判分级    &ndash;&gt;-->
-<!--        <DkFormItem prop="judgeGradeIds" :required="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)"  v-if="nodeControl?.judgeGradeIds?.visible">-->
-<!--          <SelectPop ref="judgeGradeIds" v-model="nodeData.judgeGradeIds" label-key="gradeName" value-key="gradeId"-->
-<!--                     :multiple="true" :options="productGradeList.filter(it=>it.gradeKind!='产品等级-损')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    独立检验    &ndash;&gt;-->
-<!--        <DkFormItem prop="flgAloneJudge" v-if="nodeControl?.flgAloneJudge?.visible">-->
-<!--          <div class="switch">-->
-<!--            <template>-->
-<!--              <i-switch ref="flgAloneJudge" v-model="nodeData.flgAloneJudge"-->
-<!--                        @on-change="(e)=>{if(!e) nodeData.backGradeIds=undefined}"-->
-<!--                        :disabled="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始'">-->
-<!--                <Icon type="md-checkmark" slot="open"></Icon>-->
-<!--                <Icon type="md-close" slot="close"></Icon>-->
-<!--              </i-switch>-->
-<!--            </template>-->
-<!--          </div>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    返回分级    &ndash;&gt;-->
-<!--        <DkFormItem prop="backGradeIds" v-if="nodeControl?.backGradeIds?.visible" :required="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge">-->
-<!--          <SelectPop ref="backGradeIds" v-model="nodeData.backGradeIds" label-key="gradeName" value-key="gradeId"-->
-<!--                     :disabled="!(['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge)" :multiple="true" :options="productGradeList"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    返回完成工序    &ndash;&gt;-->
-<!--        <DkFormItem prop="backNodeId" v-if="nodeControl?.backNodeId?.visible">-->
-<!--          <SelectPop ref="backNodeId" v-model="nodeData.backNodeId" label-key="name" value-key="id" :multiple="false" :options="allNodes"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    可回收分级    &ndash;&gt;-->
-<!--        <DkFormItem prop="recycledGradeIds" v-if="nodeControl?.recycledGradeIds?.visible">-->
-<!--          <SelectPop ref="recycledGradeIds" v-model="nodeData.recycledGradeIds" label-key="gradeName"-->
-<!--                     value-key="gradeId" :multiple="true" :options="productGradeList"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    回收后处理方式    &ndash;&gt;-->
-<!--        <DkFormItem prop="recycledKind" :auto-label-width="true" v-if="nodeControl?.recycledKind?.visible">-->
-<!--          <SelectPop ref="recycledKind" v-model="nodeData.recycledKind" label-key="kindName" value-key="kindCode"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='回收到达')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    组装方式    &ndash;&gt;-->
-<!--        <DkFormItem prop="packKind" v-if="nodeControl?.packKind?.visible">-->
-<!--          <SelectPop ref="packKind" v-model="nodeData.packKind" label-key="kindName" value-key="kindCode"-->
-<!--                     :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'"-->
-<!--                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='产品组装')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    验证标签    &ndash;&gt;-->
-<!--        <DkFormItem prop="flgCheckLabel" v-if="nodeControl?.flgCheckLabel?.visible">-->
-<!--          <template>-->
-<!--            <div class="switch">-->
-<!--              <i-switch ref="flgCheckLabel" v-model="nodeData.flgCheckLabel"-->
-<!--                        :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'"-->
-<!--                        @on-change="(e)=>{if(!e) nodeData.pdtLabelKinds=undefined}">-->
-<!--                <Icon type="md-checkmark" slot="open"></Icon>-->
-<!--                <Icon type="md-close" slot="close"></Icon>-->
-<!--              </i-switch>-->
-<!--            </div>-->
-<!--          </template>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    标签类型    &ndash;&gt;-->
-<!--        <DkFormItem prop="pdtLabelKinds" v-if="nodeControl?.pdtLabelKinds?.visible" :required="nodeData.flgCheckLabel">-->
-<!--          <SelectPop ref="pdtLabelKinds" v-model="nodeData.pdtLabelKinds" label-key="kindName" value-key="kindCode"-->
-<!--                     :disabled="!nodeData.flgCheckLabel"-->
-<!--                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='验证标签')"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    显示顺序    &ndash;&gt;-->
-<!--        <DkFormItem prop="displayNo" :required="true" :data-type="this.$config.dataType.number">-->
-<!--          <InputNumberPop v-model="nodeData.displayNo" ref="displayNo" :min="1" :digits="0"/>-->
-<!--        </DkFormItem>-->
-<!--        &lt;!&ndash;    备注    &ndash;&gt;-->
-<!--        <DkFormItem prop="remarks" :span="12">-->
-<!--          <InputPop ref="remarks" v-model="nodeData.remarks" maxlength=500 />-->
-<!--        </DkFormItem>-->
-<!--      </DkForm>-->
-<!--      {{ nodeData }}<br/>-->
-<!--&lt;!&ndash;      {{ allNodes }}<br/>&ndash;&gt;-->
-<!--      <Divider></Divider>-->
-<!--      &lt;!&ndash;   表格     &ndash;&gt;-->
-<!--      <div style=" display: flex">-->
-<!--        &lt;!&ndash;    工序工号    &ndash;&gt;-->
-<!--        <EditTable ref="userTable" :data="nodeData.userList"-->
-<!--                   v-if="nodeControl?.userTable?.visible"-->
-<!--                   :columns="userColumns"-->
-<!--                   enabledRepeatId="userId"-->
-<!--                   controlId="userId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--        &lt;!&ndash;    工序在制品    &ndash;&gt;-->
-<!--        <EditTable ref="pdtTable" :data="nodeData.pdtList"-->
-<!--                   v-if="nodeControl?.pdtTable?.visible"-->
-<!--                   :columns="pdtColumns"-->
-<!--                   enabledRepeatId="modelId"-->
-<!--                   controlId="pdtModelId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--        &lt;!&ndash;    工序可用载具    &ndash;&gt;-->
-<!--        <EditTable ref="carTable" :data="nodeData.carList"-->
-<!--                   v-if="nodeControl?.carTable?.visible"-->
-<!--                   :columns="carColumns"-->
-<!--                   enabledRepeatId="modelId"-->
-<!--                   controlId="carModelId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--      </div>-->
-<!--      <div style=" padding-top: 10px;display: flex">-->
-<!--        &lt;!&ndash;    工序可检缺陷    &ndash;&gt;-->
-<!--        <EditTable ref="defectTable" :data="nodeData.defectList"-->
-<!--                   v-if="nodeControl?.defectTable?.visible"-->
-<!--                   :columns="defectColumns"-->
-<!--                   enabledRepeatId="pdtDefectId"-->
-<!--                   controlId="pdtDefectId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--        &lt;!&ndash;    工序工种缺陷    &ndash;&gt;-->
-<!--        <EditTable ref="jobDefectTable" :data="nodeData.jobDefectList"-->
-<!--                   v-if="nodeControl?.jobDefectTable?.visible"-->
-<!--                   :columns="jobDefectColumns"-->
-<!--                   enabledRepeatId="pdtDefectId"-->
-<!--                   controlId="pdtDefectId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--        &lt;!&ndash;    无线路由    &ndash;&gt;-->
-<!--        <EditTable ref="routerTable" :data="nodeData.routerList"-->
-<!--                   v-if="nodeControl?.routerTable?.visible"-->
-<!--                   :columns="routerColumns"-->
-<!--                   enabledRepeatId="defectId"-->
-<!--                   controlId="defectId"-->
-<!--                   :height="200"-->
-<!--                   :showSeqBtnFlag="false"-->
-<!--                   :enabledRepeat="false"-->
-<!--                   :show-setting-flag="false"/>-->
-<!--      </div>-->
-<!--    </DkModal>-->
-<!--  </div>-->
-<!--</template>-->
+<!-- @desc:工艺流程节点弹窗  @auth:张潇木  @time:2023/1/5 9:35 -->
+<template>
+  <div>
+    <DkModal
+      title="工艺节点"
+      width="1600"
+      v-model="process.nodeModal.display"
+      :mask-closable="false"
+      :mask="false"
+      :closable="false"
+      draggable
+      sticky
+      :autoClearFlag="false"
+      @modalOk="modalOk"
+      @modalCancel="modalCancel">
+      <DkForm ref="formInline" v-model="nodeData" :col-count="4" :label-max-words="6">
+        <!--    节点名称    -->
+        <DkFormItem prop="nodeName" :required="true">
+          <InputPop v-model="nodeData.nodeName" ref="nodeName"/>
+        </DkFormItem>
+        <!--    节点种类    -->
+        <DkFormItem prop="nodeKind" :required="true">
+          <SelectPop ref="nodeKind" v-model="nodeData.nodeKind" label-key="kindName" value-key="kindCode"
+                     :multiple="false" disabled :options="dataKindList.filter(it=>it.kindType==='工艺节点')"/>
+        </DkFormItem>
+        <!--    流程类型  工艺节点-计件&&节点流程-结束,报损标识不可用(否)。其他可用) -->
+        <DkFormItem prop="flowKind" :required="true">
+          <SelectPop ref="flowKind" v-model="nodeData.flowKind" label-key="kindName" value-key="kindCode"
+                     @on-select="()=>{
+                       if(nodeData.nodeKind=='工艺节点-计件'&&nodeData.flowKind=='节点流程-结束') this.nodeData.flgScrap=false;
+                       if(['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始') this.nodeData.flgAloneJudge=false;}"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点流程').filter(it=>!(nodeControl?.flowKind?.invalidCode||[]).includes(it.kindCode))"/>
+        </DkFormItem>
+        <!--    工号类型    -->
+        <DkFormItem prop="userKind" :required="true" v-if="nodeControl?.userKind?.visible">
+          <SelectPop ref="userKind" v-model="nodeData.userKind" label-key="kindName" value-key="kindCode" @on-select="changeUserKind"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点工号').filter(it=>!(nodeControl?.userKind?.invalidCode||[]).includes(it.kindCode))"/>
+        </DkFormItem>
+        <!--    计件模式    -->
+        <DkFormItem prop="pieceKind" :required="true" v-if="nodeControl?.pieceKind?.visible">
+          <SelectPop ref="pieceKind" v-model="nodeData.pieceKind" label-key="kindName" value-key="kindCode"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点计件').filter(it=>!(nodeControl?.pieceKind?.invalidCode||[]).includes(it.kindCode))"/>
+        </DkFormItem>
+        <!--    操作模式 工艺节点-计件&&节点操作-产品码,撤销标识可用。其他:不可用(否)-->
+        <DkFormItem prop="opnKind" :required="true" v-if="nodeControl?.opnKind?.visible">
+          <SelectPop ref="opnKind" v-model="nodeData.opnKind" label-key="kindName" value-key="kindCode"
+                     @on-select="()=>{ if(nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码')
+                     {nodeData.flgUndo=false;nodeData.packKind=undefined;nodeData.flgCheckLabel=false} }"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='节点操作').filter(it=>!(nodeControl?.opnKind?.invalidCode||[]).includes(it.kindCode))"/>
+        </DkFormItem>
+        <!--    工序标签    -->
+        <DkFormItem prop="nodeSysTags" v-if="nodeControl?.nodeSysTags?.visible">
+          <SelectPop ref="nodeSysTags" v-model="nodeData.nodeSysTags" label-key="kindName" value-key="kindCode"
+                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='节点标签').filter(it=>!(nodeControl?.nodeSysTags?.invalidCode||[]).includes(it.kindCode))"/>
+        </DkFormItem>
+        <!--    报损标识    -->
+        <DkFormItem prop="scrapFlg" v-if="nodeControl?.flgScrap?.visible">
+          <div class="switch">
+            <template>
+              <!--   工艺节点-计件&&节点流程-结束,报损标识不可用(否)。其他可用)  -->
+              <i-switch ref="flgScrap" v-model="nodeData.flgScrap" :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.flowKind=='节点流程-结束'">
+                <Icon type="md-checkmark" slot="open"></Icon>
+                <Icon type="md-close" slot="close"></Icon>
+              </i-switch>
+            </template>
+          </div>
+        </DkFormItem>
+        <!--    撤销标识    -->
+        <DkFormItem prop="flgUndo" v-if="nodeControl?.flgUndo?.visible">
+          <div class="switch">
+            <template>
+              <!--    工艺节点-计件&&节点操作-产品码,撤销标识可用。其他:不可用(否)   -->
+              <i-switch ref="flgUndo" v-model="nodeData.flgUndo" :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'">
+                <Icon type="md-checkmark" slot="open"></Icon>
+                <Icon type="md-close" slot="close"></Icon>
+              </i-switch>
+            </template>
+          </div>
+        </DkFormItem>
+        <!--    默认分级    -->
+        <DkFormItem prop="defGradeId" v-if="nodeControl?.defGradeId?.visible" :data-type="$config.dataType.number"
+                    :required="['工艺节点-回收','工艺节点-成型'].includes(nodeData.nodeKind)
+                    ||(['工艺节点-计件','工艺节点-登窑','工艺节点-入窑'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始')" >
+          <SelectPop ref="defGradeId" v-model="nodeData.defGradeId" label-key="gradeName" value-key="gradeId"
+                     :multiple="false" :options="productGradeList.filter(it=>['产品等级-优','产品等级-良'].includes(it.gradeKind))"/>
+        </DkFormItem>
+        <!--    成型标签    -->
+        <DkFormItem prop="moldingSysTags" v-if="nodeControl?.moldingSysTags?.visible">
+          <SelectPop ref="moldingSysTags" v-model="nodeData.moldingSysTags" label-key="kindName" value-key="kindCode"
+                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='成线标签')"/>
+        </DkFormItem>
+        <!--    可判分级    -->
+        <DkFormItem prop="judgeGradeIds" :required="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)"  v-if="nodeControl?.judgeGradeIds?.visible" :data-type="$config.dataType.array">
+          <SelectPop ref="judgeGradeIds" v-model="nodeData.judgeGradeIds" label-key="gradeName" value-key="gradeId"
+                     :multiple="true" :options="productGradeList.filter(it=>it.gradeKind!='产品等级-损')"/>
+        </DkFormItem>
+        <!--    独立检验    -->
+        <DkFormItem prop="flgAloneJudge" v-if="nodeControl?.flgAloneJudge?.visible">
+          <div class="switch">
+            <template>
+              <i-switch ref="flgAloneJudge" v-model="nodeData.flgAloneJudge"
+                        @on-change="(e)=>{if(!e) nodeData.backGradeIds=undefined}"
+                        :disabled="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flowKind=='节点流程-开始'">
+                <Icon type="md-checkmark" slot="open"></Icon>
+                <Icon type="md-close" slot="close"></Icon>
+              </i-switch>
+            </template>
+          </div>
+        </DkFormItem>
+        <!--    返回分级    -->
+        <DkFormItem prop="backGradeIds" v-if="nodeControl?.backGradeIds?.visible" :required="['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge" :data-type="$config.dataType.array">
+          <SelectPop ref="backGradeIds" v-model="nodeData.backGradeIds" label-key="gradeName" value-key="gradeId"
+                     :disabled="!(['工艺节点-半检','工艺节点-成检'].includes(nodeData.nodeKind)&&nodeData.flgAloneJudge)" :multiple="true" :options="productGradeList"/>
+        </DkFormItem>
+        <!--    返回完成工序    -->
+        <DkFormItem prop="backNodeId" v-if="nodeControl?.backNodeId?.visible">
+          <SelectPop ref="backNodeId" v-model="nodeData.backNodeId" label-key="name" value-key="id" :multiple="false" :options="allNodes"/>
+        </DkFormItem>
+        <!--    可回收分级    -->
+        <DkFormItem prop="recycledGradeIds" v-if="nodeControl?.recycledGradeIds?.visible">
+          <SelectPop ref="recycledGradeIds" v-model="nodeData.recycledGradeIds" label-key="gradeName"
+                     value-key="gradeId" :multiple="true" :options="productGradeList"/>
+        </DkFormItem>
+        <!--    回收后处理方式    -->
+        <DkFormItem prop="recycledKind" :auto-label-width="true" v-if="nodeControl?.recycledKind?.visible">
+          <SelectPop ref="recycledKind" v-model="nodeData.recycledKind" label-key="kindName" value-key="kindCode"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='回收到达')"/>
+        </DkFormItem>
+        <!--    组装方式    -->
+        <DkFormItem prop="packKind" v-if="nodeControl?.packKind?.visible">
+          <SelectPop ref="packKind" v-model="nodeData.packKind" label-key="kindName" value-key="kindCode"
+                     :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'"
+                     :multiple="false" :options="dataKindList.filter(it=>it.kindType==='产品组装')"/>
+        </DkFormItem>
+        <!--    验证标签    -->
+        <DkFormItem prop="flgCheckLabel" v-if="nodeControl?.flgCheckLabel?.visible">
+          <template>
+            <div class="switch">
+              <i-switch ref="flgCheckLabel" v-model="nodeData.flgCheckLabel"
+                        :disabled="nodeData.nodeKind=='工艺节点-计件'&&nodeData.opnKind!='节点操作-产品码'"
+                        @on-change="(e)=>{if(!e) nodeData.pdtLabelKinds=undefined}">
+                <Icon type="md-checkmark" slot="open"></Icon>
+                <Icon type="md-close" slot="close"></Icon>
+              </i-switch>
+            </div>
+          </template>
+        </DkFormItem>
+        <!--    标签类型    -->
+        <DkFormItem prop="pdtLabelKinds" v-if="nodeControl?.pdtLabelKinds?.visible" :required="nodeData.flgCheckLabel">
+          <SelectPop ref="pdtLabelKinds" v-model="nodeData.pdtLabelKinds" label-key="kindName" value-key="kindCode"
+                     :disabled="!nodeData.flgCheckLabel"
+                     :multiple="true" :options="dataKindList.filter(it=>it.kindType==='验证标签')"/>
+        </DkFormItem>
+        <!--    显示顺序    -->
+        <DkFormItem prop="displayNo" :required="true" :data-type="this.$config.dataType.number">
+          <InputNumberPop v-model="nodeData.displayNo" ref="displayNo" :min="1" :digits="0"/>
+        </DkFormItem>
+        <!--    备注    -->
+        <DkFormItem prop="remarks" :span="12">
+          <InputPop ref="remarks" v-model="nodeData.remarks" maxlength=500 />
+        </DkFormItem>
+      </DkForm>
+      {{ nodeData }}<br/>
+<!--      {{ allNodes }}<br/>-->
+      <Divider></Divider>
+      <!--   表格     -->
+      <div style=" display: flex">
+        <!--    工序工号    -->
+        <EditTable ref="userTable" :data="nodeData.userList"
+                   v-if="nodeControl?.userTable?.visible"
+                   :columns="userColumns"
+                   :enabledRepeatId="['userId','userKind']"
+                   controlId="userId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+        <!--    工序在制品    -->
+        <EditTable ref="pdtTable" :data="nodeData.pdtList"
+                   v-if="nodeControl?.pdtTable?.visible"
+                   :columns="pdtColumns"
+                   enabledRepeatId="modelId"
+                   controlId="pdtModelId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+        <!--    工序可用载具    -->
+        <EditTable ref="carTable" :data="nodeData.carList"
+                   v-if="nodeControl?.carTable?.visible"
+                   :columns="carColumns"
+                   enabledRepeatId="modelId"
+                   controlId="carModelId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+      </div>
+      <div style=" padding-top: 10px;display: flex">
+        <!--    工序可检缺陷    -->
+        <EditTable ref="defectTable" :data="nodeData.defectList"
+                   v-if="nodeControl?.defectTable?.visible"
+                   :columns="defectColumns"
+                   enabledRepeatId="pdtDefectId"
+                   controlId="pdtDefectId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+        <!--    工序工种缺陷    -->
+        <EditTable ref="jobDefectTable" :data="nodeData.jobDefectList"
+                   v-if="nodeControl?.jobDefectTable?.visible"
+                   :columns="jobDefectColumns"
+                   enabledRepeatId="pdtDefectId"
+                   controlId="pdtDefectId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+        <!--    无线路由    -->
+        <EditTable ref="routerTable" :data="nodeData.routerList"
+                   v-if="nodeControl?.routerTable?.visible"
+                   :columns="routerColumns"
+                   enabledRepeatId="defectId"
+                   controlId="defectId"
+                   :height="200"
+                   :showSeqBtnFlag="false"
+                   :enabledRepeat="false"
+                   :show-setting-flag="false"/>
+      </div>
+    </DkModal>
+  </div>
+</template>
 
-<!--<script>-->
-<!--import { mapState, mapMutations } from 'vuex'-->
-<!--import Process from '@/view/process/process-flow/config/ProcessConfig'-->
+<script>
+import { mapState, mapMutations } from 'vuex'
+import Process from '@/view/process/process-flow/config/ProcessConfig'
 
-<!--export default {-->
-<!--  name: 'NodeModal',-->
-<!--  props: {-->
-<!--    jobList: {-->
-<!--      type: Array,-->
-<!--      default: () => []-->
-<!--    },-->
-<!--    dataKindList: {-->
-<!--      type: Array,-->
-<!--      default: () => []-->
-<!--    },-->
-<!--    productGradeList: {-->
-<!--      type: Array,-->
-<!--      default: () => []-->
-<!--    },-->
-<!--    flowId: {-->
-<!--      type: Number,-->
-<!--      default: undefined,-->
-<!--    },-->
-<!--  },-->
-<!--  computed: {-->
-<!--    ...mapState(['process']),-->
-<!--    id() {-->
-<!--      return this.process.currentNodeId-->
-<!--    },-->
-<!--    onShow() {//model是否显示-->
-<!--      return this.process.nodeModal.display-->
-<!--    }-->
-<!--  },-->
-<!--  watch: {-->
-<!--    //当前节点发生变化-->
-<!--    id(n, o) {-->
-<!--      console.log('watch-id',n)-->
-<!--      if(n){-->
-<!--        if(this.graph==null){-->
-<!--          this.graph = Process.graph-->
-<!--        }-->
-<!--        //刷新业务数据-->
-<!--        let cell = this.graph.getCellById(this.process.currentNodeId)-->
-<!--        this.nodeData = cell.data-->
-<!--        //刷新节点属性控制-->
-<!--        this.nodeControl=this.dataKindList.find(it=>it.kindCode===this.nodeData.nodeKind).kindTags-->
-<!--      }-->
-<!--    },-->
-<!--    //监听model显示,达到类似onShow的效果,节点每次显示,都要根据当前节点id重新渲染节点数据-->
-<!--    onShow(n, o) {-->
-<!--      if (n) {-->
-<!--        if(this.graph==null){-->
-<!--          this.graph = Process.graph-->
-<!--        }-->
-<!--        //过滤调节点组并将json解构成新结构数组-->
-<!--        this.allNodes = this.graph.getNodes().filter(it => it.shape == 'custom-image').map((it) => {-->
-<!--          return { id: it.id, name: it.data.nodeName }-->
-<!--        })-->
-<!--      }-->
-<!--    }-->
-<!--  },-->
-<!--  data() {-->
-<!--    let self = this-->
-<!--    return {-->
-<!--      allNodes: [],//所有节点-->
-<!--      graph: null,//图形对象-->
-<!--      nodeData: {},//节点数据-->
-<!--      nodeControl:{},//节点控制-->
-<!--      userColumns: [-->
-<!--        {-->
-<!--          field: 'userCode',-->
-<!--          type: 'tableSelect',-->
-<!--          controlId: 'userId',-->
-<!--          param: () => {-->
-<!--            return {}-->
-<!--          },-->
-<!--          sortBoolean: false,-->
-<!--          dataType: self.$config.tableSelectType.user,-->
-<!--          fieldUpdate: self.$updateColumns.processNodeChooseUser,-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'userName', type: 'disabled', width: 'auto' },-->
-<!--        {-->
-<!--          field: 'userKind',-->
-<!--          type: 'select',-->
-<!--          options: () => self.dataKindList.filter(it=>it.kindType==='节点工号'),-->
-<!--          labelKey: 'kindName',-->
-<!--          valueKey: 'kindCode',-->
-<!--          fieldUpdate: [-->
-<!--            {updateField: 'userKind', valueFiled: 'kindName'},-->
-<!--          ],-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--      pdtColumns: [-->
-<!--        {-->
-<!--          field: 'pdtModelCode',-->
-<!--          type: 'tableSelect',-->
-<!--          controlId: 'pdtModelId',-->
-<!--          param: () => {-->
-<!--            return {}-->
-<!--          },-->
-<!--          sortBoolean: false,-->
-<!--          dataType: self.$config.tableSelectType.product,-->
-<!--          fieldUpdate: self.$updateColumns.processNodeChooseProduct,-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'pdtModelName', type: 'disabled', width: 'auto', title:'产品名称'},-->
-<!--        { field: 'categoryName', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--      carColumns: [-->
-<!--        {-->
-<!--          field: 'carModelCode',-->
-<!--          type: 'tableSelect',-->
-<!--          controlId: 'carModelId',-->
-<!--          param: () => {-->
-<!--            return {}-->
-<!--          },-->
-<!--          sortBoolean: false,-->
-<!--          dataType: self.$config.tableSelectType.carrier,-->
-<!--          fieldUpdate: self.$updateColumns.processNodeChooseCarrier,-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'carModelName', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--      defectColumns: [-->
-<!--        {-->
-<!--          field: 'defectCode',-->
-<!--          type: 'tableSelect',-->
-<!--          controlId: 'pdtDefectId',-->
-<!--          param: () => {-->
-<!--            return {}-->
-<!--          },-->
-<!--          sortBoolean: false,-->
-<!--          dataType: self.$config.tableSelectType.defect,-->
-<!--          fieldUpdate: self.$updateColumns.processNodeChooseDefect,-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'defectName', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'defectTypesName', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--      jobDefectColumns: [-->
-<!--        {-->
-<!--          field: 'defectCode',-->
-<!--          type: 'tableSelect',-->
-<!--          controlId: 'pdtDefectId',-->
-<!--          param: () => {-->
-<!--            return {}-->
-<!--          },-->
-<!--          sortBoolean: false,-->
-<!--          dataType: self.$config.tableSelectType.defect,-->
-<!--          fieldUpdate: self.$updateColumns.processNodeChooseDefect,-->
-<!--          searchDetailFlag: false,-->
-<!--          width: 'auto',-->
-<!--        },-->
-<!--        { field: 'defectName', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'jobId',-->
-<!--          type: 'select',-->
-<!--          options: () => self.jobList,-->
-<!--          labelKey: 'jobName',-->
-<!--          valueKey: 'jobId',-->
-<!--          searchDetailFlag: false, width: 'auto' },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--      routerColumns: [-->
-<!--        { field: 'node1Id', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'backNodeId', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'productGrade', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'moldingSysTags', type: 'disabled', width: 'auto' },-->
-<!--        { field: 'remarks', type: 'text', width: 'auto' },-->
-<!--      ],-->
-<!--    }-->
-<!--  },-->
-<!--  created() {-->
-<!--  },-->
-<!--  mounted() {-->
-<!--  },-->
-<!--  methods: {-->
-<!--    ...mapMutations(['setProcessNodeModalDisplay', 'setCurrentNodeId']),-->
-<!--    /**-->
-<!--     * @desc   : 确定-->
-<!--     * @author : 张潇木-->
-<!--     * @date   : 2023/1/5 10:38-->
-<!--     */-->
-<!--    modalOk() {-->
-<!--      if(!this.validData()) return-->
-<!--      this.setParams()-->
-<!--      //关闭modal,清空当前选中节点id-->
-<!--      this.setProcessNodeModalDisplay(false)-->
-<!--      this.setCurrentNodeId(undefined)-->
-<!--    },-->
+export default {
+  name: 'NodeModal',
+  props: {
+    jobList: {
+      type: Array,
+      default: () => []
+    },
+    dataKindList: {
+      type: Array,
+      default: () => []
+    },
+    productGradeList: {
+      type: Array,
+      default: () => []
+    },
+    flowId: {
+      type: Number,
+      default: undefined,
+    },
+  },
+  computed: {
+    ...mapState(['process']),
+    id() {
+      return this.process.currentNodeId
+    },
+    onShow() {//model是否显示
+      return this.process.nodeModal.display
+    }
+  },
+  watch: {
+    //当前节点发生变化
+    id(n, o) {
+      console.log('watch-id',n)
+      if(n){
+        if(this.graph==null){
+          this.graph = Process.graph
+        }
+        //刷新业务数据
+        let cell = this.graph.getCellById(this.process.currentNodeId)
+        this.nodeData = cell?.data
+        //刷新节点属性控制
+        this.nodeControl=this.dataKindList.find(it=>it.kindCode===this.nodeData.nodeKind).kindTags
+      }
+    },
+    //监听model显示,达到类似onShow的效果,节点每次显示,都要根据当前节点id重新渲染节点数据
+    onShow(n, o) {
+      if (n) {
+        if(this.graph==null){
+          this.graph = Process.graph
+        }
+        //过滤调节点组并将json解构成新结构数组
+        this.allNodes = this.graph.getNodes().filter(it => it.shape == 'custom-image').map((it) => {
+          return { id: it.id, name: it.data.nodeName }
+        })
+      }
+    }
+  },
+  data() {
+    let self = this
+    return {
+      allNodes: [],//所有节点
+      graph: null,//图形对象
+      nodeData: {},//节点数据
+      nodeControl:{},//节点控制
+      userColumns: [
+        {
+          field: 'userCode',
+          type: 'tableSelect',
+          controlId: 'userId',
+          param: () => {
+            return {}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.user,
+          fieldUpdate: self.$updateColumns.processNodeChooseUser,
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'userName', type: 'disabled', width: 'auto' },
+        {
+          field: 'userKind',
+          type: 'select',
+          options: () => self.dataKindList.filter(it=>it.kindType==='节点工号').filter(it=>!(self.nodeData.userKind=='节点工号-生产'&&it.kindCode=='节点工号-操作')),
+          labelKey: 'kindName',
+          valueKey: 'kindCode',
+          fieldUpdate: [
+            {updateField: 'userKind', valueFiled: 'kindName'},
+          ],
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+      pdtColumns: [
+        {
+          field: 'pdtModelCode',
+          type: 'tableSelect',
+          controlId: 'pdtModelId',
+          param: () => {
+            return {}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.product,
+          fieldUpdate: self.$updateColumns.processNodeChooseProduct,
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'pdtModelName', type: 'disabled', width: 'auto', title:'产品名称'},
+        { field: 'categoryName', type: 'disabled', width: 'auto' },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+      carColumns: [
+        {
+          field: 'carModelCode',
+          type: 'tableSelect',
+          controlId: 'carModelId',
+          param: () => {
+            return {}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.carrier,
+          fieldUpdate: self.$updateColumns.processNodeChooseCarrier,
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'carModelName', type: 'disabled', width: 'auto' },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+      defectColumns: [
+        {
+          field: 'defectCode',
+          type: 'tableSelect',
+          controlId: 'pdtDefectId',
+          param: () => {
+            return {}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.defect,
+          fieldUpdate: self.$updateColumns.processNodeChooseDefect,
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'defectName', type: 'disabled', width: 'auto' },
+        { field: 'defectTypesName', type: 'disabled', width: 'auto' },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+      jobDefectColumns: [
+        {
+          field: 'defectCode',
+          type: 'tableSelect',
+          controlId: 'pdtDefectId',
+          param: () => {
+            return {}
+          },
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.defect,
+          fieldUpdate: self.$updateColumns.processNodeChooseDefect,
+          searchDetailFlag: false,
+          width: 'auto',
+        },
+        { field: 'defectName', type: 'disabled', width: 'auto' },
+        { field: 'jobId',
+          type: 'select',
+          options: () => self.jobList,
+          labelKey: 'jobName',
+          valueKey: 'jobId',
+          searchDetailFlag: false, width: 'auto' },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+      routerColumns: [
+        { field: 'node1Id', type: 'disabled', width: 'auto' },
+        { field: 'backNodeId', type: 'disabled', width: 'auto' },
+        { field: 'productGrade', type: 'disabled', width: 'auto' },
+        { field: 'moldingSysTags', type: 'disabled', width: 'auto' },
+        { field: 'remarks', type: 'text', width: 'auto' },
+      ],
+    }
+  },
+  created() {
+  },
+  mounted() {
+  },
+  methods: {
+    ...mapMutations(['setProcessNodeModalDisplay', 'setCurrentNodeId']),
+    /**
+     * @desc   : 修改用户类别
+     * @author : 张潇木
+     * @date   : 2023/3/1 14:11
+     */
+    changeUserKind(e){
+      //当切换到生产工号时,删除userTable中设置的操作工号
+      if(e=='节点工号-生产'){
+        this.$refs?.userTable?.getTableDataFilter().forEach((it)=> {
+          if((it.userKind==='节点工号-操作')){
+            this.$refs?.userTable?.del(this.$refs?.userTable?.getTableDataFilter().findIndex(item=>item._X_ID==it._X_ID))
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 确定
+     * @author : 张潇木
+     * @date   : 2023/1/5 10:38
+     */
+    modalOk() {
+      if(!this.validData()) return
+      this.setParams()
+      //关闭modal,清空当前选中节点id
+      this.setProcessNodeModalDisplay(false)
+      this.setCurrentNodeId(undefined)
+    },
 
-<!--    /**-->
-<!--     * @desc   : 取消-->
-<!--     * @author : 张潇木-->
-<!--     * @date   : 2023/1/5 10:38-->
-<!--     */-->
-<!--    modalCancel() {-->
-<!--      this.setProcessNodeModalDisplay(false)-->
-<!--      this.setCurrentNodeId(undefined)-->
-<!--    },-->
-<!--    /**-->
-<!--     * @desc   : 设置提交数据格式-->
-<!--     * @author : 张潇木-->
-<!--     * @date   : 2023/2/16 16:21-->
-<!--     */-->
-<!--    setParams(){-->
-<!--      console.log('setParams')-->
-<!--      // region 设置表单数据-->
-<!--      //工序工号-->
-<!--      this.nodeData.userList=this.$refs?.userTable?.getTableDataFilter().map((it,index) => {-->
-<!--        return {-->
-<!--          flowId:parseInt(this.$route.params.id),-->
-<!--          nodeId:this.process.currentNodeId,-->
-<!--          userId:it.userId,-->
-<!--          userCode:it.userCode,-->
-<!--          userName:it.userName,-->
-<!--          userKind:it.userKind,-->
-<!--          displayNo:index+1,-->
-<!--          remarks:it.remarks,-->
-<!--          ftyId:this.$store.state.user.ftyId-->
-<!--        }-->
-<!--      })-->
-<!--      //工序在制品-->
-<!--      this.nodeData.pdtList=this.$refs?.pdtTable?.getTableDataFilter().map((it) => {-->
-<!--        return {-->
-<!--          flowId:parseInt(this.$route.params.id),-->
-<!--          nodeId:this.process.currentNodeId,-->
-<!--          pdtModelId:it.pdtModelId,-->
-<!--          pdtModelCode:it.pdtModelCode,-->
-<!--          pdtModelName:it.pdtModelName,-->
-<!--          categoryName:it.categoryName,-->
-<!--          remarks:it.remarks,-->
-<!--          ftyId:this.$store.state.user.ftyId-->
-<!--        }-->
-<!--      })-->
-<!--      //载具-->
-<!--      this.nodeData.carList=this.$refs?.carTable?.getTableDataFilter().map((it) => {-->
-<!--        return {-->
-<!--          flowId:parseInt(this.$route.params.id),-->
-<!--          nodeId:this.process.currentNodeId,-->
-<!--          carModelId:it.carModelId,-->
-<!--          carModelCode:it.carModelCode,-->
-<!--          carModelName:it.carModelName,-->
-<!--          remarks:it.remarks,-->
-<!--          ftyId:this.$store.state.user.ftyId-->
-<!--        }-->
-<!--      })-->
-<!--      //缺陷-->
-<!--      this.nodeData.defectList=this.$refs?.defectTable?.getTableDataFilter().map((it) => {-->
-<!--        return {-->
-<!--          flowId:parseInt(this.$route.params.id),-->
-<!--          nodeId:this.process.currentNodeId,-->
-<!--          pdtDefectId:it.pdtDefectId,-->
-<!--          defectCode:it.defectCode,-->
-<!--          defectName:it.defectName,-->
-<!--          defectTypesName:it.defectTypesName,-->
-<!--          remarks:it.remarks,-->
-<!--          ftyId:this.$store.state.user.ftyId-->
-<!--        }-->
-<!--      })-->
-<!--      //工种缺陷-->
-<!--      this.nodeData.jobDefectList=this.$refs?.jobDefectTable?.getTableDataFilter().map((it) => {-->
-<!--        return {-->
-<!--          flowId:parseInt(this.$route.params.id),-->
-<!--          nodeId:this.process.currentNodeId,-->
-<!--          jobId:it.jobId,-->
-<!--          pdtDefectId:it.pdtDefectId,-->
-<!--          defectCode:it.defectCode,-->
-<!--          defectName:it.defectName,-->
-<!--          remarks:it.remarks,-->
-<!--          ftyId:this.$store.state.user.ftyId-->
-<!--        }-->
-<!--      })-->
-<!--      // endregion-->
+    /**
+     * @desc   : 取消
+     * @author : 张潇木
+     * @date   : 2023/1/5 10:38
+     */
+    modalCancel() {
+      this.setProcessNodeModalDisplay(false)
+      this.setCurrentNodeId(undefined)
+    },
+    /**
+     * @desc   : 设置提交数据格式
+     * @author : 张潇木
+     * @date   : 2023/2/16 16:21
+     */
+    setParams(){
+      // region 设置表单数据
+      //工序工号
+      this.nodeData.userList=this.$refs?.userTable?.getTableDataFilter().map((it,index) => {
+        return {
+          flowId:parseInt(this.$route.params.id),
+          nodeId:this.process.currentNodeId,
+          userId:it.userId,
+          userCode:it.userCode,
+          userName:it.userName,
+          userKind:it.userKind,
+          displayNo:index+1,
+          remarks:it.remarks,
+          ftyId:this.$store.state.user.ftyId
+        }
+      })
+      //工序在制品
+      this.nodeData.pdtList=this.$refs?.pdtTable?.getTableDataFilter().map((it) => {
+        return {
+          flowId:parseInt(this.$route.params.id),
+          nodeId:this.process.currentNodeId,
+          pdtModelId:it.pdtModelId,
+          pdtModelCode:it.pdtModelCode,
+          pdtModelName:it.pdtModelName,
+          categoryName:it.categoryName,
+          remarks:it.remarks,
+          ftyId:this.$store.state.user.ftyId
+        }
+      })
+      //载具
+      this.nodeData.carList=this.$refs?.carTable?.getTableDataFilter().map((it) => {
+        return {
+          flowId:parseInt(this.$route.params.id),
+          nodeId:this.process.currentNodeId,
+          carModelId:it.carModelId,
+          carModelCode:it.carModelCode,
+          carModelName:it.carModelName,
+          remarks:it.remarks,
+          ftyId:this.$store.state.user.ftyId
+        }
+      })
+      //缺陷
+      this.nodeData.defectList=this.$refs?.defectTable?.getTableDataFilter().map((it) => {
+        return {
+          flowId:parseInt(this.$route.params.id),
+          nodeId:this.process.currentNodeId,
+          pdtDefectId:it.pdtDefectId,
+          defectCode:it.defectCode,
+          defectName:it.defectName,
+          defectTypesName:it.defectTypesName,
+          remarks:it.remarks,
+          ftyId:this.$store.state.user.ftyId
+        }
+      })
+      //工种缺陷
+      this.nodeData.jobDefectList=this.$refs?.jobDefectTable?.getTableDataFilter().map((it) => {
+        return {
+          flowId:parseInt(this.$route.params.id),
+          nodeId:this.process.currentNodeId,
+          jobId:it.jobId,
+          pdtDefectId:it.pdtDefectId,
+          defectCode:it.defectCode,
+          defectName:it.defectName,
+          remarks:it.remarks,
+          ftyId:this.$store.state.user.ftyId
+        }
+      })
+      // endregion
 
-<!--      // region 设置图形业务数据-->
-<!--      //根据节点id获取节点数据-->
-<!--      let cell = this.graph.getCellById(this.process.currentNodeId)-->
-<!--      //设置节点数据-->
-<!--      cell.setData(this.nodeData, { overwrite: true })-->
-<!--      //设置节点样式-->
-<!--      cell.setAttrs({-->
-<!--        label: { text: this.nodeData.nodeName },-->
-<!--        text: { text: this.nodeData.nodeName },-->
-<!--      })-->
-<!--      // endregion-->
-<!--    },-->
-<!--    /**-->
-<!--     * @desc   : 校验数据-->
-<!--     * @author : 张潇木-->
-<!--     * @date   : 2023/2/27 11:12-->
-<!--     */-->
-<!--    validData(){-->
-<!--      console.log("validData")-->
-<!--      if((['工艺节点-登窑','工艺节点-卸窑'].includes(this.nodeData.nodeKind)-->
-<!--        ||(['工艺节点-入窑','工艺节点-出窑'].includes(this.nodeData.nodeKind)&&this.nodeData.opnKind=='节点操作-载具码'))-->
-<!--        &&!(this.$refs?.carTable?.getTableDataFilter()||[]).length>0)-->
-<!--      {-->
-<!--        this.$message.error(this.$t('W_061', {'param': '载具'}))-->
-<!--        return false-->
-<!--      }-->
-<!--      return true-->
-<!--    }-->
-<!--  }-->
+      // region 设置图形业务数据
+      //根据节点id获取节点数据
+      let cell = this.graph.getCellById(this.process.currentNodeId)
+      //移除非法连线
+      this.removeInvalidEdge(cell)
+      //设置节点数据
+      cell.setData(this.nodeData, { overwrite: true })
+      //设置节点样式
+      cell.setAttrs({
+        label: { text: this.nodeData.nodeName },
+        text: { text: this.nodeData.nodeName },
+        body: { stroke: '#5F95FF'}
+      })
+      // endregion
+    },
+    /**
+     * @desc   : 校验数据
+     * @author : 张潇木
+     * @date   : 2023/2/27 11:12
+     */
+    validData(){
+      if((['工艺节点-登窑','工艺节点-卸窑'].includes(this.nodeData.nodeKind)
+        ||(['工艺节点-入窑','工艺节点-出窑'].includes(this.nodeData.nodeKind)&&this.nodeData.opnKind=='节点操作-载具码'))
+        &&!(this.$refs?.carTable?.getTableDataFilter()||[]).length>0)
+      {
+        this.$message.error(this.$t('W_061', {'param': '载具'}))
+        return false
+      }
+      return true
+    },
+    /**
+     * @desc   : 移除非法连线
+     * @author : 张潇木
+     * @date   : 2023/3/1 13:29
+     */
+    removeInvalidEdge(cell){
+      // 开始节点不能作为连线起点
+      if(this.nodeData?.flowKind=='节点流程-开始') {
+        this.graph.getIncomingEdges(cell)?.forEach(it=>{
+          this.graph.removeEdge(it.id)
+        })
+      }
+      // 结束节点不能作为连线起点
+      if(this.nodeData?.flowKind=='节点流程-结束') {
+        this.graph.getOutgoingEdges(cell)?.forEach(it=>{
+          this.graph.removeEdge(it.id)
+        })
+      }
+      // 回收节点既不能作为开始也不能作为结束
+      if(this.nodeData?.nodeKind==='工艺节点-回收') {
+        this.graph.getConnectedEdges(cell)?.forEach(it=>{
+          this.graph.removeEdge(it.id)
+        })
+      }
+      // 独立检验既不能作为开始也不能作为结束
+      if(this.nodeData?.flgAloneJudge) {
+        this.graph.getConnectedEdges(cell)?.forEach(it=>{
+          this.graph.removeEdge(it.id)
+        })
+      }
+    }
+  }
 
-<!--}-->
-<!--</script>-->
+}
+</script>
 
-<!--<style scoped>-->
-<!--/deep/ .ivu-radio-wrapper {-->
-<!--  font-size: 12px !important;-->
-<!--}-->
+<style scoped>
+/deep/ .ivu-radio-wrapper {
+  font-size: 12px !important;
+}
 
-<!--.ivu-divider-horizontal {-->
-<!--  margin: 12px 0 !important;-->
-<!--}-->
+.ivu-divider-horizontal {
+  margin: 12px 0 !important;
+}
 
-<!--.switch {-->
-<!--  height: 28px;-->
-<!--  display: flex;-->
-<!--  align-items: center;-->
-<!--}-->
-<!--</style>-->
+.switch {
+  height: 28px;
+  display: flex;
+  align-items: center;
+}
+</style>

+ 4 - 2
src/components/business/select-magnifier/select-magnifier.vue

@@ -1261,8 +1261,8 @@ export default {
       // 工位工号(工位打卡选择用户)
       else if (self.type === self.$config.MagnifierType.stationUser) {
         self.service = this.$service.commonService
-        self.methodsName = 'getStationUserPage'
-        self.methodsNameDetail = 'getStationUserPage'
+        self.methodsName = 'getWorkStationUserPage'
+        self.methodsNameDetail = 'getWorkStationUserPage'
         self.searchContent = [
           {itemCode: 'userCode'},
           {itemCode: 'userName'},
@@ -1272,6 +1272,8 @@ export default {
         self.columns = [
           {field: 'userCode', width: '200'},
           {field: 'userName', width: '200'},
+          {field: 'stationCode', width: '200'},
+          {field: 'stationName', width: 'auto'},
         ]
       }
       // 工位

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

@@ -1342,6 +1342,7 @@ export default {
         this.selectKey = 'staffId'
         this.selectLabel = 'staffName'
         this.columns = [
+          {field: 'jobName', width: '150'},
           {field: 'staffCode', width: '120'},
           {field: 'staffName', width: 'auto'},
         ]

+ 10 - 1
src/config/index.js

@@ -39,6 +39,7 @@ export default {
   dkAuthSysServerUrl: null,
   sysUuid: '00000002-b4ac-4912-a4c5-0945a775647f',
   appUuid: '6d2208ba-7ca9-41b2-96d3-b39a109ba811',
+  appRegistMenuUuid:'d891a6cc-8a94-47dd-8bda-2cfddee0710f',// pda数据采集的
   redirectUrl: null,
 
   dkMallUrl: 'https://ibossmp.dongkesoft.com:7050/', /* 菜单查询的类型 1:change 2:Enter */
@@ -655,7 +656,15 @@ export default {
     part: '收款状态-部分',
     all: '收款状态-完成'
   },
-
+  /**
+   * @desc   : 成型记录履历类型
+   * @author : 夏常明
+   * @date   : 2023/3/1 13:26
+   */
+  moldingItemHisType:{
+    modelBefore:-4,//型号(变更前)
+    modelAfter:4,//型号(变更后)
+  },
   /**
    * @desc   : 表格中的选择类型
    * @author : 周兴

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

@@ -103,6 +103,16 @@ export default {
   ],
 
   /**
+   * @desc   : 用户选择员工替班
+   * @author : 周兴
+   * @date   : 2023/2/2 10:42
+   */
+  userChooseReplaceStaff:[
+    {updateField: 'replaceStaffId', valueFiled: 'staffId'},
+    {updateField: 'replaceStaffName', valueFiled: 'staffName'},
+  ],
+
+  /**
    * @desc   : 生产工位选择用户时使用
    * @author : 夏常明
    * @date   : 2023/2/28 11:21

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

@@ -690,11 +690,12 @@ export const columns = {
   setLogo:'商标设定',
   setColour:'釉色设定',
   oldColourName:'原釉色',
-  setLogoColour:'商标釉色',
+  setLogoColour:'更改',
   defJobId:'默认工种',
   defJobName:'默认工种',
   newPdtLogo:'新商标',
   newPdtColour:'新釉色',
+  hisTime:'变更时间',
 
   //工号变更
   unMoldedReasonId:'未成型原因',
@@ -724,6 +725,9 @@ export const columns = {
   modelMouldCode:'模具编码',
   flgRecycled:'回收标识',
 
+  //工位打卡
+  relief:'替班员工',
+
 }
 
 /**
@@ -807,6 +811,10 @@ export const messages = {
   W_101: '请选择新商标或新釉色',
   W_103: '请输入打卡明细数据',
   W_104: '请输入包含数字的商品条码',
+  W_105: '成型线位置序号的范围【1-999】,最多999个模具',
+  W_106: '成型线上分组序号的范围【1-9】',
+  W_107: '第{param1}条员工和替班员工必须选其一',
+  W_108: '员工和替班员工必须选其一',
   E_001: '系统出现异常,请联系管理员。',
   Q_001: '当前页面的数据有过更改,请确认需要保存吗?',
   Q_002: '确定要进行{param}操作吗?',

+ 0 - 5
src/view-app/app/mold-management/mold-management-add/index.vue

@@ -364,11 +364,6 @@ export default {
     // 设置滚动的位置和高度
     this.setAppTableHeight()
   },
-
-  /**
-   * 初始生命周期
-   * @param e
-   */
   created(e) {
     //接收参数
     // this.focusItem = "moldCode"

+ 29 - 0
src/view-app/app/piecework-procedure/register/index.vue

@@ -13,6 +13,15 @@
       :label="$t('appProductionJobNumber')"
       placeholderType="scan"
       @changeBarCode="queryUser"/>
+    <!-- 选择工位 -->
+    <dk-app-field
+      v-if="stationList.length>0"
+      v-model="formData.stationName"
+      :label="$t('stationName')"
+      :readonly="true"
+      @click="showStation = true"
+      placeholderType="choose" is-link arrow-direction="down"
+    />
     <!--    产品条码-->
     <dk-app-field
       :label="$t('appProductCode')"
@@ -80,12 +89,31 @@ export default {
         flgValid: '',//有效标识
         ftyId: 1,//工厂ID
       },
+      stationList:[],//工位list数据源
+      showStation:false //是否显示空位选择框
     }
   },
   methods: {
 
 
     // region 基础数据源
+    /**
+     * @desc   : 获取工位
+     * @author : 王英杰
+     * @date   : 2023/2/10 9:16
+     */
+    getWorkStation() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        flowNodeId: "c565f042-05fc-411a-9059-21c8758ce171",//工序id
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          console.log("getWorkStation",res.data)
+          this.stationList = res.data;
+        }
+      })
+    },
 
     /**
      * @desc   : 根据输入的usercode 查询 userid
@@ -204,6 +232,7 @@ export default {
     } else if (this.functionCode === '0104') {//施釉
       this.appActiveTitle = this.$t('appGlazingTitle')
     }
+    //this.getWorkStation()
   }
 }
 </script>

+ 228 - 0
src/view-app/app/piecework-procedure/shaping/index.vue

@@ -0,0 +1,228 @@
+<template>
+  <!--  计件工序(单点 和 集中)     功能(functionCode) index : 预干(0101) 打磨(0102) 擦洗(0103) 施釉(0104) -->
+  <div class="main-app-form">
+    <!-- 顶部导航栏 -->
+    <dk-app-nav-bar :title="appActiveTitle"
+                    @click-left="onClickLeft" :rightIcon="true" @click-right="onClickRight"></dk-app-nav-bar>
+
+    <!-- 生产工号 -->
+    <dk-app-field
+      v-model="formData.makeUserName"
+      formatter-flg
+      ref="moldCode"
+      :label="$t('appProductionJobNumber')"
+      placeholderType="scan"
+      @changeBarCode="queryUser"/>
+    <!--    产品条码-->
+    <dk-app-field
+      :label="$t('appProductCode')"
+      ref="productCode"
+      v-model="formData.productCode"
+      placeholderType="scan"></dk-app-field>
+
+    <div ref="scrollTable" class="main-app-table">
+      <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
+      <!--    列表-->
+      <dk-app-table :rows="rows" :tableRowData="tableRowData" :disabled-swipe="true">
+      </dk-app-table>
+    </div>
+    <!--  保存按钮-->
+    <div class="app_save_bottom-class">
+      <dk-app-button @click="save">{{ $t('appSave') }}
+      </dk-app-button>
+    </div>
+    <div style="height: 0">  <!--    右上角弹框-->
+      <dk-app-popup :showPopup="showPopup" :gridItemList="gridItemList" @onClose="onClose"
+                    @onClick="onClick"></dk-app-popup>
+    </div>
+    <!-- 加载页面   -->
+    <dk-app-loading :loading="loading"></dk-app-loading>
+  </div>
+</template>
+
+<script>
+
+import {appFormMixin} from '@/mixins/appform.js'
+
+export default {
+  name: "app-shaping",
+  mixins: [appFormMixin],
+  data() {
+    let self = this
+    return {
+      showPopup: false,//点击 三个小点 弹出popup
+      gridItemList: [  //右上角功能菜单
+        {
+          gridName: this.$t('appCollectionStatistics'), //采集统计
+          pageType: 1,
+          imagePath: '1',
+          routerName: 'collection-statistics'
+        },
+      ],
+      rows: [
+        {name: 'billetIdentification', title: self.$t('appBilletIdentification')},//公坯标识
+        {name: 'productBarcode', title: self.$t('appProductBarcode')},//产品条码
+        {name: 'productCodeB', title: self.$t('appProductCodeB')},//产品编码
+        {name: 'productName', title: self.$t('appProductName')},//产品名称
+        {name: 'moldingStationNo', title: self.$t('appMoldingStationNo')},//成型工号
+        {name: 'moldNo', title: self.$t('appMoldNo')},//模具编号
+        {name: 'logoName', title: self.$t('appLogoName')},//商标名称
+        {name: 'numberOfGrouting', title: self.$t('appNumberOfGrouting')},//注浆次数
+        {name: 'dateOfGrouting', title: self.$t('appDateOfGrouting')},//注浆日期
+      ],//每一条的内容
+      tableRowData: [{}],
+      //标题
+      appActiveTitle: '',
+      formData: {
+        makeUserName: '',//生产工号
+        makeUser: '',//生产工号id
+        productCode: '',//产品条码
+        flgValid: '',//有效标识
+        ftyId: 1,//工厂ID
+      },
+    }
+  },
+  methods: {
+
+
+    // region 基础数据源
+    /**
+     * @desc   : 获取工位
+     * @author : 王英杰
+     * @date   : 2023/2/10 9:16
+     */
+    getWorkStation() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        flowNodeId: "c565f042-05fc-411a-9059-21c8758ce171",//工序id
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          console.log("getWorkStation",res.data)
+        }
+      })
+    },
+
+    /**
+     * @desc   : 根据输入的usercode 查询 userid
+     * @author : 王英杰
+     * @date   : 2023/2/10 9:16
+     */
+    queryUser() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        userCode: this.formData.makeUserName,
+      }
+      this.excute(this.$service.appCommonService, this.$service.appCommonService.selectUser, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data) {
+            this.formData.makeUser = res.data.userId
+            //接收参数
+            this.focusItem = "productCode"
+          } else { //没查找
+            this.$appToast((this.$t('appProductionJobNumbeErro')));
+            this.formData.makeUserName = ""
+            this.formData.makeUser = ""
+          }
+        }
+      })
+    },
+
+
+    // endregion
+
+    // region 控件 回调
+    /**
+     * @desc   : 点击弹窗图标功能事件
+     * @author : 王英杰
+     * @date   : 2023/2/7 17:23
+     */
+    onClick(item) {
+
+
+      //跳转新页面
+      item.form = {} //要传的参数
+      this.$router.push({name: item.routerName, params: {item: item}})
+
+    },
+    /**
+     * @desc   : 关闭pupop弹窗
+     * @author : 王英杰
+     * @date   : 2023/2/7 17:23
+     */
+    onClose() {
+      this.showPopup = false
+    },
+
+    /**
+     * @desc   : 点击标题右侧事件
+     * @author : 王英杰
+     * @date   : 2023/2/7 17:23
+     */
+    onClickRight() {
+      this.showPopup = true
+    },
+    // endregion
+
+    // region 保存
+    /**
+     * @desc   : 给参数赋值
+     * @author : 王英杰
+     * @date   : 2023/2/10 11:46
+     */
+    setParams() {
+      this.params = {...this.formData}
+    },
+    /**
+     * @desc   : 检验
+     * @author : 王英杰
+     * @date   : 2023/2/10 11:46
+     */
+    validData(flag) {
+      // 生产工号不能为空
+      if (!this.formData.makeUser) {
+        this.$appToast((this.$t('appProductionJobNumbeWrong')));
+        return false;
+      }
+
+      return true;
+    },
+    /**
+     * @desc   : 保存方法
+     * @author : 王英杰
+     * @date   : 2023/2/10 11:46
+     */
+    saveData() {
+      return this.excute(this.$service.appMouldService, this.$service.appMouldService.insert, this.params);
+    },
+    // endregion
+
+  },
+  mounted() {
+    // 设置滚动的位置和高度
+    this.setAppTableHeight()
+  },
+  /**
+   * 初始生命周期
+   * @param e
+   */
+  created(e) {
+    //接收参数
+    this.focusItem = "moldCode"
+    this.functionCode = this.$route.params.FunctionCode   //功能码 区分页面
+    //判断传递数据是否成功
+    if (this.functionCode === '0101') {//预干
+      this.appActiveTitle = this.$t('appPredryingTitle')
+    } else if (this.functionCode === '0102') {//打磨
+      this.appActiveTitle = this.$t('appPolishTitle')
+    } else if (this.functionCode === '0103') {//擦洗
+      this.appActiveTitle = this.$t('appScrubbingTitle')
+    } else if (this.functionCode === '0104') {//施釉
+      this.appActiveTitle = this.$t('appGlazingTitle')
+    }
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 1 - 1
src/view-app/app/piecework-procedure/uninstall-kliln/index.vue → src/view-app/app/piecework-procedure/uninstall-kiln/index.vue

@@ -60,7 +60,7 @@
 import {appFormMixin} from '@/mixins/appform.js'
 
 export default {
-  name: "app-climb-kiln",
+  name: "app-uninstall-kiln",
   mixins: [appFormMixin],
   data() {
     let self = this

+ 146 - 88
src/view-app/main/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!--app主页-数据采集-->
-  <div >
+  <div>
     <div class="menu-box">
       <div style="width:32%;background:white;">
         <!-- 顶部下拉-->
@@ -15,28 +15,31 @@
         <dk-app-search :placeholder="placeholder"></dk-app-search>
       </div>
     </div>
+    <div :style="{height:(tableHeight-60-60-60)+'px'}" style="width: 100%; overflow-y: auto;overflow-x: hidden;">
+      <div class="panel-class" v-for="(item,index) in regions" v-if="hasAuth(functionRegions,item.menuName)">
+        <!--  模块名称-->
+        <div class="app-name">{{ item.menuName }}</div>
+        <div style="background: #fff;border-radius: 7px;">
+          <div style="display: flex;flex-wrap: wrap;padding: 21px 0px;align-items: center;">
+            <div class="app-item" v-for="(item2,index2) in functionItems"
+                 v-if="item.menuUuid==item2.parentUuid" @click="toApp(item2.objectCode,item2.objectCode)"
+                 style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class"
+                 text-class="index-grid-item-text-class" content-class="index-grid-item-class">
+              <van-image width="40" height="40" :src="(item2.ImageUri)"/>
+              <div class="index-grid-item-text-class">{{ item2.menuName }}</div>
+            </div>
 
-    <div class="panel-class" v-for="(item,index) in regions" v-if="hasAuth(functionRegions,item.FunctionName)">
-      <!--  模块名称-->
-      <div class="app-name">{{ item.FunctionName }}</div>
-      <div style="background: #fff;border-radius: 7px;">
-        <div style="display: flex;flex-wrap: wrap;padding: 21px 0px;align-items: center;">
-          <div class="app-item" v-for="(item2,index2) in functionItems"
-               v-if="item.FunctionCodeOrder==item2.PFunctionCode" @click="toApp(item2.FormName,item2.FunctionCode)"
-               style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class"
-               text-class="index-grid-item-text-class" content-class="index-grid-item-class">
-            <van-image width="40" height="40" :src="item2.ImageUri"/>
-            <div class="index-grid-item-text-class">{{ item2.FunctionName }}</div>
           </div>
 
         </div>
-
       </div>
     </div>
   </div>
 </template>
 
 <script>
+import {mapMutations} from "vuex";
+
 export default {
   name: "index",
   data() {
@@ -48,91 +51,141 @@ export default {
       optionFunc: [
         {text: this.$t('appFunctionalPartition'), value: 0}
       ],
+      tableHeight: 667,
       //功能分类-大功能模块
       regions: [
-        {
-          FunctionName: '生产线',
-          FunctionCodeOrder: '01'
-        }
+        // {
+        //   FunctionName: '生产线',
+        //   FunctionCodeOrder: '01'
+        // }
       ],
       //功能分类-大功能模块-页面
       functionItems: [
-        {
-          FunctionName: '预干',
-          FormName: 'app-register',
-          ImageUri: require('@/assets/images/app-image/oven_drying.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0101'
-        },
-        {
-          FunctionName: '打磨',
-          FormName: 'app-register',
-          ImageUri: require('@/assets/images/app-image/polish.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0102'
-        },
-        {
-          FunctionName: '擦洗',
-          FormName: 'app-register',
-          ImageUri: require('@/assets/images/app-image/scrubbing.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0103',
-        },
-        {
-          FunctionName: '施釉',
-          FormName: 'app-register',
-          ImageUri: require('@/assets/images/app-image/glazing.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0104',
-        },
-        {
-          FunctionName: '登窑',
-          FormName: 'app-climb-kiln',
-          ImageUri: require('@/assets/images/app-image/climbing_kiln.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0105',
-        },
-        {
-          FunctionName: '入窑',
-          FormName: 'app-climb-kiln',
-          ImageUri: require('@/assets/images/app-image/enter_kiln.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0106',
-        },
-        {
-          FunctionName: '卸窑',
-          FormName: 'app-climb-kiln',
-          ImageUri: require('@/assets/images/app-image/unloading_kiln.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0107',
-        },
-        {
-          FunctionName: '质量登记',
-          FormName: 'app-finish-check',
-          ImageUri: require('@/assets/images/app-image/quality_registration.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0108',
-        },
-        {
-          FunctionName: '半检',
-          FormName: 'app-half-check',
-          ImageUri: require('@/assets/images/app-image/test_model.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0109',
-        },
-        {
-          FunctionName: '产品跟踪',
-          FormName: 'app-product-tracking',
-          ImageUri: require('@/assets/images/app-image/product_tracking.png'),
-          PFunctionCode: '01',
-          FunctionCode: '0110',
-        },
+        // {
+        //   FunctionName: '预干',
+        //   FormName: 'app-register',
+        //   ImageUri: require('@/assets/images/app-image/oven_drying.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0101'
+        // },
+        // {
+        //   FunctionName: '打磨',
+        //   FormName: 'app-register',
+        //   ImageUri: require('@/assets/images/app-image/polish.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0102'
+        // },
+        // {
+        //   FunctionName: '擦洗',
+        //   FormName: 'app-register',
+        //   ImageUri: require('@/assets/images/app-image/scrubbing.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0103',
+        // },
+        // {
+        //   FunctionName: '施釉',
+        //   FormName: 'app-register',
+        //   ImageUri: require('@/assets/images/app-image/glazing.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0104',
+        // },
+        // {
+        //   FunctionName: '登窑',
+        //   FormName: 'app-climb-kiln',
+        //   ImageUri: require('@/assets/images/app-image/climbing_kiln.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0105',
+        // },
+        // {
+        //   FunctionName: '入窑',
+        //   FormName: 'app-climb-kiln',
+        //   ImageUri: require('@/assets/images/app-image/enter_kiln.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0106',
+        // },
+        // {
+        //   FunctionName: '卸窑',
+        //   FormName: 'app-climb-kiln',
+        //   ImageUri: require('@/assets/images/app-image/unloading_kiln.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0107',
+        // },
+        // {
+        //   FunctionName: '质量登记',
+        //   FormName: 'app-finish-check',
+        //   ImageUri: require('@/assets/images/app-image/quality_registration.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0108',
+        // },
+        // {
+        //   FunctionName: '半检',
+        //   FormName: 'app-half-check',
+        //   ImageUri: require('@/assets/images/app-image/test_model.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0109',
+        // },
+        // {
+        //   FunctionName: '产品跟踪',
+        //   FormName: 'app-product-tracking',
+        //   ImageUri: require('@/assets/images/app-image/product_tracking.png'),
+        //   PFunctionCode: '01',
+        //   FunctionCode: '0110',
+        // },
       ],
       //生产线
-      functionRegions: ['生产线'],
+      functionRegions: [],
     }
   },
   methods: {
+    ...mapMutations([
+      'setTagNavList',
+    ]),
+    /**
+     * @desc   : 获取常用功能的菜单
+     * @author : jyh
+     * @date   : 2022/8/22 10:47
+     */
+    getCommonMenu() {
+      let menuList = [...this.$store.state.app.menuList]
+      //默认是一行数据
+      if (menuList && menuList.length > 0) {
+        let funcList = []
+        menuList.forEach(itMenu => {
+          let funcItem = {}
+          // 查询子级
+          if (itMenu.children && itMenu.children.length > 0) {
+            itMenu.children.forEach(itm => {
+              // 导航的管理模块
+              // 排除数据采集 和报表的模块
+              if (itm.menuUuid != this.$config.appRegistMenuUuid) {
+                return;
+              }
+              if (itm.children && itm.children.length > 0) {
+                itm.children.forEach(it => {
+                  this.regions.push(it)
+                  this.functionRegions.push(it.menuName)
+                  // 如果还有子级,需要去查询子级
+                  if (it.children && it.children.length > 0) {
+                    if (it.children && it.children.length > 0) {
+                      it.children.forEach(c => {
+                        console.log(c)
+                        // 主页显示图标
+                        if (c.fastImage) {
+                          c.ImageUri = require("@/assets/images/app-image/" + c.fastImage + "\.png")
+                        }
+                        if (c.flgRight) {
+                          this.functionItems.push(c)
+                        }
+                      })
+                    }
+                  }
+                })
+              }
+            })
+          }
+        })
+      }
+    },
     /**
      * @desc   : 验证权限
      * @author : 姜永辉
@@ -152,6 +205,11 @@ export default {
     },
 
   },
+  created() {
+    this.tableHeight = window.screen.height;
+    // 获取常用功能的菜单
+    this.getCommonMenu()
+  }
 }
 </script>
 

+ 6 - 1
src/view-app/main/other.vue

@@ -15,7 +15,7 @@
         <dk-app-search :placeholder="placeholder"></dk-app-search>
       </div>
     </div>
-    <div :style="{height:(tableHeight-65-65-60)+'px'}" style="width: 100%; overflow-y: auto;overflow-x: hidden;">
+    <div :style="{height:(tableHeight-60-60-60)+'px'}" style="width: 100%; overflow-y: auto;overflow-x: hidden;">
       <div class="panel-class" v-for="(item,index) in regions" v-if="hasAuth(functionRegions,item.menuName)">
         <!--  模块名称-->
         <div class="app-name">{{ item.menuName }}</div>
@@ -85,6 +85,10 @@ export default {
           if (itMenu.children && itMenu.children.length > 0) {
             itMenu.children.forEach(it => {
               // 导航的管理模块
+              // 排除数据采集 和报表的模块
+              if (it.menuUuid == this.$config.appRegistMenuUuid){
+                return;
+              }
               this.regions.push(it)
               this.functionRegions.push(it.menuName)
               // 如果还有子级,需要去查询子级
@@ -128,6 +132,7 @@ export default {
     },
   },
   created() {
+    console.log("this.$store.state.app.menuList",this.$store.state.app.menuList)
     this.tableHeight = window.screen.height;
     // 获取常用功能的菜单
     this.getCommonMenu()

+ 0 - 2
src/view/core/system-setting/index.vue

@@ -139,7 +139,6 @@ export default {
      * @date   : 2022/3/7 17:32
      */
     changeOption(e, row) {
-      debugger
       // 值是否发生变化
       if (row.settingValueBack != row.settingValue) {
         this.tableRightData.forEach(it => {
@@ -300,7 +299,6 @@ export default {
       // 值发生变化的保存 valueChangeFlg为true值发生变化
       let list = this.tableRightData.filter(it => it.valueChangeFlg == true)
       if (list && list.length > 0) {
-        debugger
         let message = ''
         list.forEach(it => {
           // 输入类型 布尔类型 下拉类型的赋值

+ 24 - 2
src/view/mst/molding/form.vue

@@ -101,6 +101,7 @@
         <DkSplit slot="content" v-model="split" :height="150">
           <EditTable slot="left" ref="moldlineGroupTable" :data="moldlineGroupList" :show-setting-flag="false"
                      :columns="moldlineGroupColumn" :height="150" :requiredColumn="['groupNo', 'groupName']"
+                     :add-flag="moldlineGroupList.length < 9"
                      @current-change="changeCurrentGroup" @addRow="addGroup" @delRow="delGroup" :canDelete="canDeleteGroup"
           ></EditTable>
 
@@ -269,8 +270,11 @@ export default {
      * @date   : 2023-02-06 17:26
      */
     addGroup (rowIndex) {
+      if (!rowIndex) rowIndex = 0
       if (!this.moldlineGroupList[rowIndex]) {
-        this.moldlineGroupList.splice(rowIndex, 0, {})
+        this.moldlineGroupList.splice(rowIndex, 0, {
+          groupNo: rowIndex + 1
+        })
       }
     },
     /**
@@ -346,6 +350,12 @@ export default {
     addItem (val){
       let list = this.moldlineItemList.copy().filter(f => f.itemNo)
       for (let i = val.outputQty; i > 0; i--) {
+        //成型线位置序号的范围【1-999】,最多999个模具
+        if (val.startItemNo + i - 1 < 1 || val.startItemNo + i - 1 > 999) {
+          this.$Message.error(this.$t('W_105'))
+          return
+        }
+
         list.push({
           itemNo: val.startItemNo + i - 1,
           productId: val.productId,
@@ -359,6 +369,12 @@ export default {
         })
       }
 
+      //成型线位置序号的范围【1-999】,最多999个模具
+      if (list.length > 999) {
+        this.$Message.error(this.$t('W_105'))
+        return
+      }
+
       //按位置序号排序
       list.sort((a,b)=>{
         return a.itemNo - b.itemNo
@@ -587,13 +603,19 @@ export default {
         this.$Message.error(this.$t('W_097'))
         return false;
       }
-      //检查位置序号是否重复
+
       let noList = []
       for (let it of this.moldlineGroupList) {
+        //成型线上分组序号的范围【1-9】
+        if (it.groupNo < 1 || it.groupNo > 9) {
+          this.$Message.error(this.$t('W_106'))
+          return
+        }
         if (it.moldlineItemList) {
           noList = noList.concat(it.moldlineItemList.copy().filter(f => f.itemNo).map(m => m.itemNo))
         }
       }
+      //检查位置序号是否重复
       if (noList.length != noList.unique().length) {
         this.$Message.error(this.$t('W_094'))
         return

+ 28 - 4
src/view/pdm/molding-record/form.vue

@@ -275,7 +275,7 @@ export default {
         // 成型线名称
         {field: 'moldlineName', type: 'disabled', width: 'auto'},
         // 分组序号
-        //{field: 'groupNo', type: 'disabled', width: 'auto'},
+        {field: 'moldlineGroupNo', title: self.$t('groupNo'),  type: 'disabled', width: 'auto'},
         // 成型班长
         {field: 'manageUserName', type: 'disabled', width: 'auto'},
         // 成型工号
@@ -459,10 +459,18 @@ export default {
       }
       this.excute(this.$service.moldingService, this.$service.moldingService.searchMoldline, param).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          this.moldlineList = res.data;
+          let table = res.data
+          if (table && table.length > 0){
+             table.forEach(item => {
+               if (!item.flgCanBatches){
+                 param.moldingBatch = 1
+               }
+            })
+          }
+          this.moldlineList = table;
         } else {
           this.$Message.error(res.message)
-          this.moldlineList = null
+          this.moldlineList = []
         }
       })
     },
@@ -522,6 +530,22 @@ export default {
           }));// 给行增加错误提示信息
           return false;
         }
+        // 成型次数输入范围1-10
+        if (index >= 0 && it.moldingCount > 10) {
+          this.$message.error(this.$t('W_051', {
+            'param1': this.$t('sequence') + rows + this.$t('rowNo') + this.$t('moldingCount'),
+            'param2': 10
+          }))
+          return false;
+        }
+        // 多批次标识为false的成型次数只能为1
+        if (index >= 0 && !it.flgCanBatches && it.moldingCount > 1) {
+          this.$message.error(this.$t('W_051', {
+            'param1': this.$t('sequence') + rows + this.$t('rowNo') + this.$t('moldingCount'),
+            'param2': 10
+          }))
+          return false;
+        }
       }
       return true;
     },
@@ -611,7 +635,7 @@ export default {
               this.addItemColumns.forEach(itt=>{
                 param[itt] = item[itt]
               })
-              param.moldingBatch =  parseInt(i) + parseInt(it.lastMoldingBatch)
+              param.moldingBatch =  i + parseInt(it.lastMoldingBatch)
               param.modelId_Name = item.modelName
               param.modelName = item.modelName
               param.moldlineItemId = item.itemId

+ 5 - 1
src/view/pdm/molding-record/index.vue

@@ -46,7 +46,7 @@
                @pageChange="pageSizeChange">
         <DkTableColumn field="uniqueCode" :title="$t('moldlineCode')" ></DkTableColumn>
         <DkTableColumn field="moldlineName"></DkTableColumn>
-        <DkTableColumn field="groupNo" data-type="number"></DkTableColumn>
+        <DkTableColumn field="moldlineGroupNo" :title="$t('groupNo')" data-type="number"></DkTableColumn>
         <DkTableColumn field="moldingDate" data-type="date"></DkTableColumn>
         <DkTableColumn field="moldingBatch" data-type="number"></DkTableColumn>
         <DkTableColumn field="moldingUserName"></DkTableColumn>
@@ -90,6 +90,10 @@ export default {
             itemCode: 'moldlineName',
           },
           {
+            itemCode: 'groupNo',
+            valueFormat: {code: 'moldlineGroupNo'},
+          },
+          {
             itemCode: 'moldingModelCode',
             valueFormat: {code: 'moldlineItemCode'},
           },

+ 63 - 21
src/view/pdm/prod-logo-colour/index.vue

@@ -6,7 +6,8 @@
         <BaseIndexButton right-button="product-code-select" ref="search" name="search"
                          @click="open($config.routeUrl.search)"></BaseIndexButton>
         <!--清空查询条件-->
-        <BaseIndexButton ref="clear" name="clear" @click="open($config.routeUrl.productColourLogo.clear)"></BaseIndexButton>
+        <BaseIndexButton ref="clear" name="clear"
+                         @click="open($config.routeUrl.productColourLogo.clear)"></BaseIndexButton>
         <!--商标设定-->
         <BaseIndexButton right-button="productColourLogo-productLogoColour" ref="setLogoColour" name="setLogoColour"
                          @click="open($config.routeUrl.productColourLogo.logoColour)"></BaseIndexButton>
@@ -31,10 +32,18 @@
                @pageChange="pageSizeChange">
         <!-- 产品条码-->
         <DkTableColumn field="pdtBarcode"></DkTableColumn>
-        <!-- 商标-->
+        <!-- 原商标-->
+        <DkTableColumn field="oldLogoName"></DkTableColumn>
+        <!-- 新商标-->
         <DkTableColumn field="logoName"></DkTableColumn>
-        <!-- 釉色-->
+        <!-- 原釉色-->
+        <DkTableColumn field="oldColourName"></DkTableColumn>
+        <!-- 新釉色-->
         <DkTableColumn field="colourName"></DkTableColumn>
+        <!-- 变更者-->
+        <DkTableColumn :title="$t('changeUser')" field="opCreateUserName"></DkTableColumn>
+        <!-- 变更时间-->
+        <DkTableColumn field="hisTime"></DkTableColumn>
       </DkTable>
     </div>
 
@@ -47,24 +56,26 @@
       :saveFlag="true"
       :title=modalTitle
     >
-      <DkForm ref="formInline" :labelMaxWords="5" v-model="formData" :col-count="1">
+      <DkForm ref="formInline" v-model="formData" :col-count="1">
         <!--   产品条码商标     -->
-        <DkFormItem  prop="pdtBarcode" :required="true">
+        <DkFormItem prop="pdtBarcode" :required="true">
           <SelectMagnifier v-model="formData.pdtBarcode" :display-text="formData.pdtBarcode"
                            :type="this.$config.MagnifierType.productLogoColour"
                            :multiple="false"
                            :inputReadOnly="false"
                            ref="pdtBarcode"
                            :search-info="{pdtBarcode:formData.pdtBarcode}"
-                           @ok="chooseLogoColour"></SelectMagnifier>
+                           @ok="chooseLogoColour"
+                           @modelOk="setPdtBarcode"
+          ></SelectMagnifier>
         </DkFormItem>
         <!-- 原商标 -->
-        <DkFormItem prop="oldLogoName" :required="true">
+        <DkFormItem prop="oldLogoName">
           <InputPop v-model="formData.oldLogoName" :readonly="true" ref="pdtCode"/>
         </DkFormItem>
         <!-- 新商标 -->
-        <DkFormItem  :label="$t('newPdtLogo')" :data-type="this.$config.dataType.number" prop="pdtLogoId" >
-          <SelectPop v-model="formData.pdtLogoId" ref="pdtLogoId" :multiple="false"
+        <DkFormItem :label="$t('newPdtLogo')" :data-type="this.$config.dataType.number" prop="pdtLogoId">
+          <SelectPop v-model="formData.pdtLogoId" :disabled='newEnable' ref="pdtLogoId" :multiple="false"
                      :options="logoList"
                      :show-toolbar="true"
                      labelKey="logoName"
@@ -72,12 +83,12 @@
           </SelectPop>
         </DkFormItem>
         <!-- 原釉色 -->
-        <DkFormItem  prop="oldColourName" :required="true">
+        <DkFormItem prop="oldColourName">
           <InputPop v-model="formData.oldColourName" :readonly="true" ref="oldColourName"/>
         </DkFormItem>
         <!-- 新釉色 -->
-        <DkFormItem :label="$t('newPdtColour')" prop="pdtColourId" >
-          <SelectPop v-model="formData.pdtColourId" ref="pdtColourId" :multiple="false"
+        <DkFormItem :label="$t('newPdtColour')" prop="pdtColourId">
+          <SelectPop v-model="formData.pdtColourId" :disabled='newEnable' ref="pdtColourId" :multiple="false"
                      :options="colourList"
                      :show-toolbar="true"
                      labelKey="colourName"
@@ -117,6 +128,7 @@ export default {
       },
       logoList: [],//商标
       colourList: [],//釉色
+      newEnable: true, //启用、禁用新釉色,新商标(true 禁用 false 启用)
     }
   },
   methods: {
@@ -130,13 +142,23 @@ export default {
       this.searchData(pageInfo) // 查询数据
     },
     /**
+     * @desc   : 设置查询条件
+     * @author : 夏常明
+     * @date   : 2023/1/12 11:24
+     */
+    setSearchParams(params) {
+      //成型记录履历类型
+      params.hisTypeList = [this.$config.moldingItemHisType.modelBefore, this.$config.moldingItemHisType.modelAfter];
+      return params
+    },
+    /**
      * @desc   : 获取数据
      * @author : 夏常明
      * @date   : 2023/2/21 10:39
      */
     getData(params) {
       // 查询数据
-      return this.excute(this.$service.productColourLogoService, this.$service.productColourLogoService.getProductColourLogoByBarcode, params);
+      return this.excute(this.$service.moldingItemHisService, this.$service.moldingItemHisService.selectByCond, params);
     },
     /**
      * @desc   : 放大镜控件绑定值--产品商标
@@ -150,6 +172,23 @@ export default {
         this.formData.itemId = rows[0].itemId;
         this.formData.oldColourName = rows[0].colourName;
         this.formData.pdtBarcode = rows[0].pdtBarcode;
+        this.newEnable = false;
+      }
+    },
+    /**
+     * @desc   : 放大镜输入事件
+     * @author : 夏常明
+     * @date   : 2023/3/1 10:00
+     */
+    setPdtBarcode(val) {
+      if (val) {
+        this.newEnable = false;
+      } else {
+        this.newEnable = true;
+        this.formData = {
+          oldLogoName: '',//原商标名称
+          oldColourName: '',//原釉色名称
+        }
       }
     },
     /**
@@ -157,7 +196,7 @@ export default {
      * @author : 夏常明
      * @date   : 2023/2/1 15:13
      */
-    chooseColour(rows){
+    chooseColour(rows) {
       if (rows) {
         this.formData.oldColourName = rows[0].colourName;
         this.formData.pdtBarcode = rows[0].pdtBarcode;
@@ -172,6 +211,8 @@ export default {
     productLogoColour() {
       this.modalTitle = this.setTitle('setLogoColour')
       this.changeModal = true
+      // 打开选择界面
+      this.$refs.pdtBarcode.magnifierClick();
     },
     /**
      * @desc   : 设定釉色按钮事件
@@ -224,11 +265,11 @@ export default {
       //查询产品釉色
       this.getProductColour()
     },
-   /**
-    * @desc   : 清空数据
-    * @author : 夏常明
-    * @date   : 2023/2/21 15:13
-    */
+    /**
+     * @desc   : 清空数据
+     * @author : 夏常明
+     * @date   : 2023/2/21 15:13
+     */
     clear() {
       this.formData = {
         itemId: '',//成型明细id
@@ -238,6 +279,7 @@ export default {
         oldLogoName: '',//原商标名称
         oldColourName: '',//原釉色名称
       }
+      this.newEnable = true;//新商标。釉色下拉控件禁用
     },
 
     //endregion
@@ -250,7 +292,7 @@ export default {
      * @date   : 2023/2/20 14:46
      */
     saveData() {
-        return this.excute(this.$service.productColourLogoService, this.$service.productColourLogoService.updateLogoOrColour, this.params)
+      return this.excute(this.$service.productColourLogoService, this.$service.productColourLogoService.updateLogoOrColour, this.params)
     },
     /**
      * @desc   : 参数赋值
@@ -266,7 +308,7 @@ export default {
      * @date   : 2023/2/6 13:08
      */
     validData() {
-      if(this.formData.pdtLogoId==''&&this.formData.pdtColourId==''){
+      if (this.formData.pdtLogoId == '' && this.formData.pdtColourId == '') {
         this.$message.error(this.$t('W_101'))
         return false;
       }

+ 0 - 2
src/view/pdm/work-station/index.vue

@@ -355,9 +355,7 @@ export default {
     * @date   : 2023/2/16 14:17
     */
     chooseData(row, rowIndex) {
-
       this.$nextTick(() => {
-        debugger
         if (!row) {
           return
         }

+ 163 - 1
src/view/pdm/ws-clock/clock-user.vue

@@ -1,10 +1,172 @@
 <template>
+  <div class="main-div">
+    <DkCollapse>
+      <DkPanel prop="wsClockInformation">
+        <!--  下拉区域  -->
+        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
+          <!-- 工位编码-->
+          <DkFormItem prop="stationCode">
+            <SelectPop v-model="formData.stationId" :multiple="false" :options="stationList" ref="roleName"
+                       @on-select="chooseStation"
+                       labelKey="stationCode"
+                       valueKey=stationId>
+            </SelectPop>
+          </DkFormItem>
+          <!-- 工位名称-->
+          <DkFormItem prop="stationName">
+            <InputPop ref="stationName" :readonly="true" v-model="formData.stationName"/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <!-- 打卡明细-->
+      <DkPanel prop="wsClockItemInformation">
+        <div slot="content" :style="'height: ' + tableHeight + 'px'">
+          <EditTable slot="left" ref="editTableWsClockItem" name="table"
+                     :height="tableHeight"
+                     major-field="staffId"
+                     :enabledRepeat=false
+                     controlId="jobId"
+                     :new-row-flag="true"
+                     :addFlag="false"
+                     :deleteFlag="false"
+                     :id="'table-'+$options.name"
+                     :columns="editTableColumn"
+                     :data="formData.wsClockItemList"
+          ></EditTable>
+        </div>
+      </DkPanel>
+    </DkCollapse>
 
+    <!--      下部分按钮区域-->
+    <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
+  </div>
 </template>
 
 <script>
+import {formMixin} from "@/mixins/form";
+
 export default {
-  name: "ws-clock-user"
+  name: "ws-clock-user",
+  mixins: [formMixin],
+  data() {
+    let self = this
+    return {
+      formData: {
+        userId: this.$store.state.user.id,//工号id
+        stationId: '',//工位id
+        stationName: '',//工位名称
+        wsClockItemList: [], //打卡明细
+      },
+      stationList: [],//工位数据
+      jobList:[],//工种数据
+      editTableColumn: [
+        // 工种
+        {
+          field: 'jobId',
+          controlId: 'jobId',
+          type: 'select',
+          options: () => self.jobList,
+          labelKey: 'jobName',
+          valueKey: 'jobId',
+          width: 255
+        },
+        // 业务员
+        {
+          field: 'staffName',
+          width: 255,
+          sortBoolean: false,
+          multiple: false,
+          type: 'tableSelect',
+          param: () => {
+            return {
+              jobId: (self.$refs.editTableWsClockItem.getTableDataFilter() && self.$refs.editTableWsClockItem.getTableDataFilter()[self.rowIndex])
+                ? parseInt(self.$refs.editTableWsClockItem.getTableDataFilter()[self.rowIndex].jobId) : null
+            }
+          },
+          dataType: self.$config.tableSelectType.staff,
+          fieldUpdate: self.$updateColumns.userChooseStaff,
+          searchDetailFlag: false
+        },
+        // 替班员工
+        {
+          field: 'relief',
+          type: 'select',
+          options: () => self.jobList,
+          labelKey: 'staffName',
+          valueKey: 'staffID',
+          width: '255'
+        },
+      ],
+    }
+  },
+  methods: {
+
+    //region 获取数据源
+    /**
+     * @desc   : 获取工位
+     * @author : 夏常明
+     * @date   : 2023/3/1 15:37
+     */
+    getStationList() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,//工号id
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getWsStation, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+
+          this.stationList = res.data;
+          //工位数量为1 默认选中
+          if (this.stationList.length == 1) {
+            this.formData.stationId = this.stationList[0].stationId;
+            this.formData.stationName = this.stationList[0].stationName;
+          }
+        }
+      })
+    },
+    /**
+     * @desc   : 获取工种
+     * @author : 夏常明
+     * @date   : 2023/3/1 15:40
+     */
+    getJobList() {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        userId: this.$store.state.user.id,//工号id
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getWorkTeamByUserId, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.jobList = res.data;
+        }
+      })
+    },
+    /**
+     * @desc   : 工位选中改变事件
+     * @author : 夏常明
+     * @date   : 2023/3/1 16:14
+     */
+    chooseStation(val) {
+      if (val) {
+        let row = this.stationList.find(item => item.stationId == val);
+        this.formData.stationName = row.stationName
+      } else {
+        this.formData.stationName='';
+      }
+
+    }
+
+    //endregion
+
+  },
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 周兴
+   * @date   : 2022/3/3 10:32
+   */
+  created() {
+    this.getStationList();//获取工位
+    this.getJobList();//获取工位
+  },
 }
 </script>
 

+ 125 - 123
src/view/pdm/ws-clock/form.vue

@@ -11,20 +11,9 @@
                              :multiple="false"
                              @ok="chooseUserId"></SelectMagnifier>
           </DkFormItem>
-          <!--打卡时间-->
-          <DkFormItem  :required="true" :data-type="$config.dataType.date" prop="clockTime">
-            <DatePickerPop ref="clockTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="formData.clockTime"/>
-          </DkFormItem>
-          <!--下班时间-->
-          <DkFormItem prop="closeTime">
-            <DatePickerPop ref="closeTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="formData.closeTime"/>
-          </DkFormItem>
           <!-- 工位-->
           <DkFormItem prop="stationName">
-            <SelectPop v-model="formData.stationId" :multiple="false" :options="stationList" ref="roleName"
-                       labelKey="stationName"
-                       valueKey=stationId>
-            </SelectPop>
+            <InputPop ref="remarks" v-model="formData.stationName" :readonly="true"/>
           </DkFormItem>
           <!--备注-->
           <DkFormItem prop="remarks" :span="24">
@@ -40,11 +29,12 @@
                      major-field="staffId"
                      :enabledRepeat=false
                      controlId="jobId"
-                     @current-change="CurrentChange"
-                     :new-row-flag="showLabelList"
+                     :operate-flag="false"
                      :id="'table-'+$options.name"
-                     :columns="editTableColumn"
+                     :columns="this.type == $config.formMode.edit? editTableColumn:tableColumn"
                      :data="formData.wsClockItemList"
+                     @current-change="currentChange"
+                     @chooseData="chooseData"
           ></EditTable>
         </div>
       </DkPanel>
@@ -66,38 +56,68 @@ export default {
       showLabelList: true,// 是否显示标签新建行
       // 画面表单数据
       formData: {
+        stationName: '',// 工位名称
         clockId: '',//打卡记录id
-        userName:'',//用户名称
-        userId: '',//工号id
+        userName: null,//用户名称
+        userId: null,//工号id
         clockTime: null,//打卡时间
         closeTime: null,//下班时间
         stationId: '',//工位id
         remarks: '',//备注
-        wsClockItemList:[], //打卡明细
+        wsClockItemList: [], //打卡明细
       },
       stationList: [],//工位list
-      jobList:[],//工种list
-      stationId:'',//工位id
-      rowIndex:0,//打卡明细选中行
-      editTableColumn: [
+      jobList: [],//工种list
+      stationId: '',//工位id
+      rowIndex: 0,//打卡明细选中行
+      tableColumn: [
         // 工种
+        {field: 'jobName', type: 'disabled'},
+        // 业务员
         {
-          field: 'jobId',
-          controlId: 'jobId',
-          type: 'select',
-          options: () => self.jobList,
-          labelKey: 'jobName',
-          valueKey: 'jobId',
-          width: 'auto'
+          field: 'staffName',
+          width: 255,
+          sortBoolean: false,
+          multiple: false,
+          type: 'tableSelect',
+          // 不需要限定工种
+          param: () => {
+            return {
+              jobId: (self.$refs.editTableWsClockItem.getTableDataFilter() && self.$refs.editTableWsClockItem.getTableDataFilter()[self.rowIndex])
+                ? parseInt(self.$refs.editTableWsClockItem.getTableDataFilter()[self.rowIndex].jobId) : null
+            }
+          },
+          dataType: self.$config.tableSelectType.staff,
+          fieldUpdate: self.$updateColumns.userChooseStaff,
+          searchDetailFlag: false
         },
+        // 替班员工
+        {
+          field: 'replaceStaffName',
+          width: 255,
+          sortBoolean: false,
+          multiple: false,
+          type: 'tableSelect',
+          dataType: self.$config.tableSelectType.staff,
+          fieldUpdate: self.$updateColumns.userChooseReplaceStaff,
+          searchDetailFlag: false
+        },
+        // 备注
+        {field: 'remarks', type: 'text', width: 'auto'},
+      ],
+      editTableColumn: [
+        // 工种
+        {field: 'jobName', type: 'disabled'},
+        // 当前员工
+        {field: 'currentStaffName', type: 'disabled'},
         // 业务员
         {
           field: 'staffName',
           width: 255,
           sortBoolean: false,
-          multiple:false,
-         // controlId:'staffId',
+          multiple: false,
           type: 'tableSelect',
+          // 不需要限定工种
           param: () => {
             return {
               jobId: (self.$refs.editTableWsClockItem.getTableDataFilter() && self.$refs.editTableWsClockItem.getTableDataFilter()[self.rowIndex])
@@ -108,12 +128,19 @@ export default {
           fieldUpdate: self.$updateColumns.userChooseStaff,
           searchDetailFlag: false
         },
-        //显示顺序
-        {field: 'displayNo', type: 'number', width: 'auto'},
-        // 备注
+        // 替班员工
         {
-          field: 'remarks', type: 'text', width: 'auto'
+          field: 'replaceStaffName',
+          width: 255,
+          sortBoolean: false,
+          multiple: false,
+          type: 'tableSelect',
+          dataType: self.$config.tableSelectType.staff,
+          fieldUpdate: self.$updateColumns.userChooseReplaceStaff,
+          searchDetailFlag: false
         },
+        // 备注
+        {field: 'remarks', type: 'text', width: 'auto'},
       ],
     }
   },
@@ -126,81 +153,65 @@ export default {
      * @author : 夏常明
      * @date   : 2023/2/27 17:14
      */
-    CurrentChange(e){
+    currentChange(e) {
       this.rowIndex = 0
       this.rowIndex = e.rowIndex
     },
     /**
+     * @desc   : 选择数据
+     * @author : 周兴
+     * @date   : 2023/3/1 15:34
+     */
+    chooseData(row, rowIndex, colItem) {
+      // 如果选择员工需要清空替班,选择替班需要清空员工
+      if (colItem.field === 'staffName') {
+        this.$set(this.formData.wsClockItemList[rowIndex], 'replaceStaffId', null);
+        this.$set(this.formData.wsClockItemList[rowIndex], 'replaceStaffName', null)
+      } else if (colItem.field === 'replaceStaffName') {
+        this.$set(this.formData.wsClockItemList[rowIndex], 'staffId', null);
+        this.$set(this.formData.wsClockItemList[rowIndex], 'staffName', null)
+      }
+    },
+    /**
      * @desc   : 选择用户
      * @author : 夏常明
      * @date   : 2023/2/16 9:20
      */
     chooseUserId(rows) {
-      if (rows) {
+      if (rows && rows.length > 0) {
         this.formData.userId = rows[0].userId;
-        this.getWorkStationByUserId(rows[0].userId);
+        this.formData.stationId = rows[0].stationId;
+        this.formData.stationCode = rows[0].stationCode;
+        this.formData.stationName = rows[0].stationName;
       } else {
         this.formData.userId = '';
         this.formData.userName = null;
-        this.getWorkStation();
+        this.formData.stationId = null;
+        this.formData.stationCode = null;
+        this.formData.stationName = null;
       }
     },
     /**
-     * @desc   : 通过用户获取工位
-     * @author : 夏常明
-     * @date   : 2023/2/27 14:57
-     */
-    getWorkStationByUserId(userId) {
-      let params = {
-        ftyId: this.$store.state.user.ftyId,
-        userId:userId
-      }
-      this.excute(this.$service.commonService, this.$service.commonService.getWsStation, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.stationList = res.data;
-        }
-      })
-    },
-
-    /**
      * @desc   : 加载数据
      * @author : 夏常明
      * @date   : 2023/2/16 10:41
      */
     initData() {
-      // 获取工位数据
-     // this.getWorkStation();
-      // 获取工种数据
-      this.getJobList();
-    },
-    /**
-     * @desc   : 获取工位
-     * @author : 夏常明
-     * @date   : 2023/2/15 14:51
-     */
-    getWorkStation() {
-      let params = {
-        ftyId: this.$store.state.user.ftyId
-      }
-      this.excute(this.$service.commonService, this.$service.commonService.getWsStation, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.stationList = res.data;
-        }
-      })
+      // 获取班组信息
+      this.getWorkTeam();
     },
-
     /**
-     * @desc   : 获取工种
-     * @author : 夏常明
+     * @desc   : 获取班组信息
+     * @author : 周兴
      * @date   : 2023/2/16 10:48
      */
-    getJobList(){
+    getWorkTeam() {
       let params = {
-        ftyId: this.$store.state.user.ftyId
+        userId: this.$store.state.user.id
       }
-      this.excute(this.$service.commonService, this.$service.commonService.getJob, params).then(res => {
+      this.excute(this.$service.commonService, this.$service.commonService.getWorkTeamByUserId, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          this.jobList = res.data;
+          this.formData.wsClockItemList = res.data;
         }
       })
     },
@@ -212,20 +223,17 @@ export default {
      * @date   : 2023/2/2 15:57
      */
     validData() {
-// 判断是否有打卡明细信息
-      if (!this.$refs.editTableWsClockItem.getTableDataFilter() || this.$refs.editTableWsClockItem.getTableDataFilter() === 0) {
+      let table = this.$refs.editTableWsClockItem.getTableData();
+      // 判断是否有打卡明细信息
+      if (!table || table.length === 0) {
         this.$message.error(this.$t('W_103'))
         return false;
       }
-      for (let i = 0; i < this.$refs.editTableWsClockItem.getTableDataFilter().length; i++) {
-        //jobId 工种
-        if (!this.$refs.editTableWsClockItem.getTableDataFilter()[i].jobId) {
-          this.$Message.error('打卡明细:'+ this.$t('W_089', {'param1': (i + 1), 'param2': "工种"}) + ';')
-          return false;
-        }
-        //staffId 员工
-        if (!this.$refs.editTableWsClockItem.getTableDataFilter()[i].staffId) {
-          this.$Message.error('打卡明细:'+ this.$t('W_089', {'param1': (i + 1), 'param2': "员工"}) + ';')
+      for (let i = 0; i < table.length; i++) {
+        // 员工和替班员工需要 二选一
+        if (!table[i].staffId && !table[i].replaceStaffId) {
+          this.$Message.error(this.$t('W_107', {'param1': (i + 1)}))
+          this.setErrToRow(table[i], this.$t('W_108'));// 给行增加错误提示信息
           return false;
         }
       }
@@ -237,10 +245,9 @@ export default {
      * @date   : 2023/2/16 11:02
      */
     saveData() {
-      if (this.type === this.$config.formMode.add){
+      if (this.type === this.$config.formMode.add) {
         return this.excute(this.$service.wsClockService, this.$service.wsClockService.insert, this.params)
-      }
-      else{
+      } else {
         return this.excute(this.$service.wsClockService, this.$service.wsClockService.update, this.params)
       }
     },
@@ -252,14 +259,14 @@ export default {
     setParams() {
       this.params = {...this.formData}
       //装载区域
-      this.params.wsClockItemList= this.$refs.editTableWsClockItem.getTableDataFilter();
-      //时间转换
-      this.params.clockTime= this.params.clockTime?.toDateTimeStr();
-      this.params.closeTime= this.params.closeTime?.toDateTimeStr();
-      for(let i=0;i<this.params.wsClockItemList.length;i++)
-      {
-        this.params.wsClockItemList[i].clockTime=new Date() ?.toDateTimeStr();
-      }
+      this.params.wsClockItemList = this.$refs.editTableWsClockItem.getTableData();
+      this.params.wsClockItemList.forEach(it => {
+        if (!it.staffId) {
+          it.staffId = it.replaceStaffId;
+          it.userId = this.$store.state.user.id;
+          it.stationId = this.formData.stationId;
+        }
+      })
     },
     /**
      * @desc   : 通过id查询
@@ -275,7 +282,16 @@ export default {
      * @date   : 2023/2/3 11:49
      */
     setValuesByEdit(data) {
-      this.formData = data
+      if(data ){
+        this.formData = data
+        let wsClockItemList = data.wsClockItemList
+        wsClockItemList.forEach(it=>{
+          it.currentStaffName = it.staffName
+          it.currentStaffId = it.staffId
+        })
+        this.formData.wsClockItemList = wsClockItemList;
+        console.log('34343',wsClockItemList)
+      }
     },
     /**
      * @desc   : 清空表单
@@ -283,27 +299,13 @@ export default {
      * @date   : 2023/1/28 15:40
      */
     clear() {
-      this.formData.userId='';
-      this.formData.userName='';
-      this.formData = {
-        clockId: '',//打卡记录id
-        userId: '',//工号id
-        clockTime: null,//打卡时间
-        closeTime: null,//下班时间
-        stationId: '',//工位id
-        remarks: '',//备注
-        wsClockItemList:[], //打卡明细
-        userName:'',//用户名称
-      };
-
+      this.$refs['formInline'].$refs['dk-form'].resetFields();
+      console.log('34343', this.formData)
+      // 获取班组信息
+      this.getWorkTeam();
     },
     //endregion
   },
-
-
-
-
-
   /**
    * @desc   : 在实例创建完成后被立即同步调用
    * @author : 周兴

+ 2 - 0
src/view/pdm/ws-clock/index.vue

@@ -69,6 +69,8 @@
         <!--  工种-->
         <DkTableColumn field="jobName"></DkTableColumn>
         <!-- 员工编码-->
+        <DkTableColumn field="staffCode"></DkTableColumn>
+        <!-- 员工名称-->
         <DkTableColumn field="staffName"></DkTableColumn>
         <!-- 显示顺序-->
         <DkTableColumn field="displayNo"></DkTableColumn>

+ 44 - 6
src/view/process/process-flow/config/ProcessConfig.js

@@ -93,7 +93,9 @@ export default class Process {
         },
         anchor: 'center',
         connectionPoint: 'anchor',
-        allowBlank: false,
+        allowBlank: false,//不允许连接到画布空白位置的点
+        allowLoop: false,//不允许创建循环连线
+        allowMulti:false,//不允许在相同的起始节点和终止之间创建多条边
         snap: {
           radius: 20,
         },
@@ -123,7 +125,37 @@ export default class Process {
             data:{}
           })
         },
-        validateConnection({ targetMagnet }) {
+        validateConnection({ edge,
+                             edgeView,
+                             sourceView,
+                             targetView,
+                             sourcePort,
+                             targetPort,
+                             sourceMagnet,
+                             targetMagnet,
+                             sourceCell,
+                             targetCell,
+                             type }) {
+          let source=sourceCell.getData()
+          let target=targetCell.getData()
+          // console.log('sourceCell',source)
+          // console.log('targetCell',target)
+          // 开始节点不能作为连线起点
+          if(target?.flowKind=='节点流程-开始') {
+            return false
+          }
+          // 结束节点不能作为连线起点
+          if(source?.flowKind=='节点流程-结束') {
+            return false
+          }
+          // 回收节点既不能作为开始也不能作为结束
+          if(source?.nodeKind==='工艺节点-回收'||target?.nodeKind==='工艺节点-回收') {
+            return false
+          }
+          // 独立检验既不能作为开始也不能作为结束
+          if(source?.flgAloneJudge||target?.flgAloneJudge) {
+            return false
+          }
           return !!targetMagnet
         },
       },
@@ -623,11 +655,16 @@ export default class Process {
 
     // region 监听添加节点、线事件
     this.graph.on("cell:added", ({ cell }) => {
-      //添加节点或者线自动设置业务数据id
+      //节点
       if(cell.shape=='custom-image'){
+        //添加节点设置业务数据id
         cell.setData({'nodeId':cell.id,'ftyId': store.state.user.ftyId,'flowId':parseInt(router.app._route.params.id)})
+        //设置初始未校验样式
+        cell.setAttrs({body: {stroke: 'red',}})
       }
+      //连接线
       if(cell.shape=='edge'){
+        //添加线设置业务数据id
         cell.setData({'routeId':cell.id,'ftyId':store.state.user.ftyId,'routeType':1,'flowId':parseInt(router.app._route.params.id)})
       }
     });
@@ -814,8 +851,9 @@ export default class Process {
         ],
         attrs: {
           body: {
-            stroke: '#87CEFA',
-            fill: '#1E90FF',
+            stroke: '#5F95FF',
+            strokeWidth: 1,
+            fill: '#FFFFFF',
           },
           image: {
             width: 32,
@@ -829,7 +867,7 @@ export default class Process {
             textAnchor: 'left',
             textVerticalAnchor: 'top',
             fontSize: 12,
-            fill: '#fff',
+            fill: 'black',
           },
         },
         ports: { ...ports },

+ 17 - 1
src/view/process/process-flow/process-setting.vue

@@ -117,7 +117,8 @@ export default {
       })
       //转json
       this.formData.flowLayout=this.graph.toJSON()
-      //todo 校验
+      //流程整体校验
+      if (!this.validData()) return false
       //发送保存网络请求
       this.excute(this.$service.processService, this.$service.processService.processSetting, this.formData).then(res=>{
         if (res.code === this.$config.SUCCESS_CODE) {
@@ -132,6 +133,21 @@ export default {
       })
     },
     /**
+     * @desc   : 校验数据
+     * @author : 张潇木
+     * @date   : 2023/2/27 11:12
+     */
+    validData(){
+     let nodes= this.graph.getNodes().filter(it => it.shape == 'custom-image').filter((it) => {
+        if(it.getAttrs()?.body?.stroke==='red'){
+          this.$Message.error('[ '+it.getData()?.nodeName+'] 节点设置有误,请检查')
+          return true
+        }
+      })
+      if(nodes.length>0) return false
+      return true
+    },
+    /**
      * @desc   : 查询明细
      * @author : 张潇木
      * @date   : 2023/2/3 16:47