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

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

周兴 2 лет назад
Родитель
Сommit
4758e507d0

+ 2 - 0
src/api/pages/pdm/molding-record.js

@@ -16,6 +16,8 @@ export default {
     prefix: '/mdm-server/pdm/molding/',
     //查询产品型号变更
     selectMoldingGiveCodeChange: 'select_molding_give_code_change',
+    //查询开模报损
+    selectMoldingGiveDamage:'select_molding_give_damage',
   },
   moldingRecordItemService: {
     // 前缀

+ 11 - 0
src/components/business/multi-select/multi-select.vue

@@ -145,6 +145,11 @@ export default {
       type: String,
       default: '【主】'
     },
+    // 主业务列默认id
+    mainFieldId: {
+      type: Number,
+      default: undefined
+    },
   },
   data() {
     const vm = window.vm
@@ -391,6 +396,10 @@ export default {
                 }
                 //设置勾选
                 this.setCheckRow(it, filterRows[0]);
+                //如果传入值只是id的数组,并且传入了主业务id,将此id的行选中
+                if(this.mainFieldId&&filterRows[0][this.selectKey]===this.mainFieldId){
+                  this.$set(filterRows[0], this.mainField, true);
+                }
               }
             })
             // console.log('first',firstRow,this.value)
@@ -425,6 +434,7 @@ export default {
      * @date   : 2022/6/21 16:16
      */
     setCheckRow(it, row) {
+      //传入值只有id的情况
       if(typeof it !== 'object'){
         if (!this.batchKeysPage.includes(it)) {
           this.batchKeysPage.push(it);
@@ -434,6 +444,7 @@ export default {
         }
         this.$refs['table-select'].setCheckboxRow(row);
       }else{
+        //传入行的情况
         if (!this.batchKeysPage.includes(it[this.selectKey])) {
           this.batchKeysPage.push(it[this.selectKey]);
           this.batchRowsPage.push(it)

+ 248 - 228
src/components/business/process/node-modal/node-modal.vue

@@ -14,7 +14,7 @@
       @modalCancel="modalCancel"
       @on-cancel="modalCancel"
       :valid-form-ref-list="['formInLine-tab1','formInLine-tab2','formInLine-tab3','formInLine-tab4']">
-        <DkTabs :options="tabsOptions" v-model="currentTab" @on-click="changeTabs" style="margin: 0 0 10px;"/>
+        <DkTabs :options="tabsOptions" v-model="currentTab" @on-click="changeTabs" style="margin: 10px 0;"/>
 
         <!--          &lt;!&ndash;    返回工序    &ndash;&gt;-->
         <!--          <DkFormItem prop="backNodeId" v-if="nodeControl?.backNodeId?.visible">-->
@@ -28,6 +28,7 @@
         <!--                       :multiple="false" :options="packKindList"/>-->
         <!--          </DkFormItem>-->
 
+        {{ nodeData }}<br/>
 
         <!--   tab1 - 基本信息    -->
         <DkForm ref="formInline-tab1" v-if="currentTab =='tab1'" v-model="nodeData" :label-max-words="6" :colCount="2">
@@ -46,13 +47,14 @@
                        :multiple="false"
                        :options="flowKindList.filter(it=>!(nodeControl?.flowKind?.invalidCode||[]).includes(it.kindCode))"/>
           </DkFormItem>
-          <!--    可判分级   todo 选择组件带不出来已选值 -->
+          <!--    可判分级  -->
           <DkFormItem prop="judgeGradeIds"
                       :required="[$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)"
                       v-if="nodeControl?.judgeGradeIds?.visible" :data-type="$config.dataType.array">
             <MultiSelect v-model="nodeData.judgeGradeIds"
                          main-field="defGradeId"
                          main-field-text="【默认】"
+                         :mainFieldId="nodeData.defGradeId"
                          @ok="chooseJudgeGradeIds"
                          :default-value="judgeGradeDefaultValue"
                          :check-auto-set-main-field="false"
@@ -188,88 +190,98 @@
                        :multiple="true" :options="moldingSysTagsList"/>
           </DkFormItem>
         </DkForm>
+        <Divider></Divider>
         <!--   表格     -->
-        <div v-if="currentTab =='tab1'">
-          <!--    生产工号    -->
-          <EditTable ref="productUserTable" :title='"生产工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以作为此工序生产工号"'
-                     :data="nodeData.userList"
-                     v-if="nodeControl?.userTable?.visible&&productUserTableFlag"
-                     :columns="userColumns_noKind"
-                     enabledRepeatId="userId"
-                     :height="200"
-                     controlId="userId"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-          <!--                   @chooseData="chooseUser"/>-->
-          <!--    操作工号    -->
-          <EditTable ref="operateUserTable" :title='"操作工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以操作此工序"'
-                     :data="nodeData.userList"
-                     v-if="nodeControl?.userTable?.visible&&operateUserTableFlag&&nodeData.userKind==$config.userKind.operate"
-                     :columns="userColumns_noKind"
-                     enabledRepeatId="userId"
-                     :height="200"
-                     controlId="userId"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-          <!--                   @chooseData="chooseUser"/>-->
+        <div style="margin-bottom: 8px">
+          <div v-if="currentTab =='tab1'">
+            <!--    生产工号    -->
+            <EditTable ref="productUserTable" :title='"生产工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以作为此工序生产工号"'
+                       :data="nodeData.userList.filter(it=>it.userKind==$config.userKind.product)"
+                       v-if="nodeControl?.userTable?.visible&&productUserTableFlag"
+                       :columns="userColumns_noKind"
+                       enabledRepeatId="userId"
+                       :height="200"
+                       controlId="userId"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+            <!--    操作工号    -->
+            <EditTable ref="operateUserTable" :title='"操作工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以操作此工序"'
+                       :data="nodeData.userList.filter(it=>it.userKind==$config.userKind.operate)"
+                       v-if="nodeControl?.userTable?.visible&&operateUserTableFlag&&nodeData.userKind==$config.userKind.operate"
+                       :columns="userColumns_noKind"
+                       enabledRepeatId="userId"
+                       :height="200"
+                       controlId="userId"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+          </div>
+          <div v-if="currentTab =='tab2'">
+            <!--    工序可检缺陷    -->
+            <EditTable ref="defectTable" :title='"工序可检缺陷"' :data="nodeData.defectList"
+                       v-if="nodeControl?.defectTable?.visible&&defectTableFlag"
+                       :columns="defectColumns"
+                       enabledRepeatId="defectId"
+                       :height="200"
+                       controlId="pdtDefectId"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+            <!--    工序工种缺陷    -->
+            <EditTable ref="jobDefectTable" :title='"工序工种缺陷"' :data="nodeData.jobDefectList"
+                       v-if="nodeControl?.jobDefectTable?.visible&&jobDefectTableFlag&&nodeData.flgJobDefect"
+                       :columns="jobDefectColumns"
+                       enabledRepeatId="defectId"
+                       :height="200"
+                       controlId="pdtDefectId"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+          </div>
+          <div v-if="currentTab =='tab3'">
+            <!--    回收/检验设置    -->
+            <EditTable ref="checkRecoverTable" :title='nodeData.nodeKind===$config.nodeKind.recover?"回收设置":"检验设置"'
+                       :data="nodeData.routerList"
+                       v-if="[$config.nodeKind.recover,$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)"
+                       :columns="routerColumns"
+                       :controlId="'node1Id'"
+                       :height="200"
+                       :enabledRepeatId="['node1Id','backNodeId']"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+          </div>
+          <div v-if="currentTab =='tab4'">
+            <!--    工序在制品    -->
+            <EditTable ref="pdtTable" :title='"工序在制品"' :data="nodeData.pdtList"
+                       v-if="nodeControl?.pdtTable?.visible&&pdtTableFlag"
+                       :columns="pdtColumns"
+                       enabledRepeatId="modelId"
+                       controlId="pdtModelId"
+                       :height="200"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+            <!--    跨流程工序    -->
+            <!--          {{nodeData.routerType}}-->
+            <EditTable ref="routerTable" :title='"跨流程工序"' :data="nodeData.routerList"
+                       v-if="nodeControl?.routerTable?.visible&&routerTableFlag&&nodeData.recycledKind!==$config.recycledKind.before"
+                       :columns="routerColumns_noNode1AndBack"
+                       :controlId="'node2Id'"
+                       :height="200"
+                       :enabledRepeatId="'nodeId'"
+                       :enabledRepeat="false"
+                       :show-setting-flag="false"/>
+          </div>
         </div>
-        <div v-if="currentTab =='tab2'">
-          <!--    工序可检缺陷    -->
-          <EditTable ref="defectTable" :title='"工序可检缺陷"' :data="nodeData.defectList"
-                     v-if="nodeControl?.defectTable?.visible&&defectTableFlag"
-                     :columns="defectColumns"
-                     enabledRepeatId="defectId"
-                     :height="200"
-                     controlId="pdtDefectId"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-          <!--    工序工种缺陷    -->
-          <EditTable ref="jobDefectTable" :title='"工序工种缺陷"' :data="nodeData.jobDefectList"
-                     v-if="nodeControl?.jobDefectTable?.visible&&jobDefectTableFlag&&nodeData.flgJobDefect"
-                     :columns="jobDefectColumns"
-                     enabledRepeatId="defectId"
-                     :height="200"
-                     controlId="pdtDefectId"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-        </div>
-        <div v-if="currentTab =='tab3'">
-          <!--    回收/检验设置    -->
-          <EditTable ref="checkRecoverTable" :title='nodeData.nodeKind===$config.nodeKind.recover?"回收设置":"检验设置"'
-                     :data="nodeData.routerList"
-                     v-if="[$config.nodeKind.recover,$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)"
-                     :columns="routerColumns"
-                     :controlId="'node1Id'"
-                     :height="200"
-                     :enabledRepeatId="['node1Id','backNodeId']"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-        </div>
-        <div v-if="currentTab =='tab4'">
-          <!--    工序在制品    -->
-          <EditTable ref="pdtTable" :title='"工序在制品"' :data="nodeData.pdtList"
-                     v-if="nodeControl?.pdtTable?.visible&&pdtTableFlag"
-                     :columns="pdtColumns"
-                     enabledRepeatId="modelId"
-                     controlId="pdtModelId"
-                     :height="200"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-          <!--    跨流程工序    -->
-          <!--          {{nodeData.routerType}}-->
-          <EditTable ref="routerTable" :title='"跨流程工序"' :data="nodeData.routerList"
-                     v-if="nodeControl?.routerTable?.visible&&routerTableFlag&&nodeData.recycledKind!==$config.recycledKind.before"
-                     :columns="routerColumns_noNode1AndBack"
-                     :controlId="'node2Id'"
-                     :height="200"
-                     :enabledRepeatId="'nodeId'"
-                     :enabledRepeat="false"
-                     :show-setting-flag="false"/>
-        </div>
-        <!--                  {{ nodeData }}<br/>-->
         <!--            {{ nodeControl }}<br/>-->
         <!--            {{ allNodes }}<br/>-->
         <!--      {{nodeData.routerList}}<br/>-->
+<!--   todo 切换tab保存各list   -->
+<!--   todo 2个userList数据问题   -->
+<!--   todo 2个routerList数据问题   -->
+<!--   todo routerType切换的问题   -->
+<!--   todo 返回分级不为null时有返回工序列,null时,隐藏并清空   -->
+<!--   todo 返回工序(回收后处理方式为 后续流程 时,此列隐藏并清空)   -->
+<!--   todo 产品分级表【t_product_grade】增加了分级类型字段【grade_types】,半检时数据源为分级类型为null或【工艺节点-半检】,成检时数据源为分级类型为null或【工艺节点-成检】)   -->
+<!--   todo 可用窑炉【非必须,多选】   -->
+<!--   todo 校验问题,并跳转到对应tab   -->
+
     </DkModal>
   </div>
 </template>
@@ -632,7 +644,8 @@ export default {
      * @date   : 2023/5/29 14:50
      */
     changeTabs(e) {
-      //重新渲染各table
+
+      // region重新渲染各table
       this.productUserTableFlag = !this.productUserTableFlag
       this.operateUserTableFlag = !this.operateUserTableFlag
       this.$nextTick(() => {
@@ -665,8 +678,10 @@ export default {
         }
         this.checkRecoverTable = !this.checkRecoverTable
       })
+      //endregion
 
-
+      //设置表单数据
+      this.setFormData()
     },
     /**
      * @desc   : 改变操作模式
@@ -762,38 +777,10 @@ export default {
     changeUserKind(e) {
       //当切换到生产工号时,删除userTable中设置的操作工号
       if (e == this.$config.userKind.product) {
-        this.$refs?.userTable?.getTableDataFilter().forEach((it) => {
-          if ((it.userKind === this.$config.userKind.operate)) {
-            this.$refs?.userTable?.del(this.$refs?.userTable?.getTableDataFilter().findIndex(item => item._X_ID == it._X_ID))
-          }
-        })
+        this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind==this.$config.userKind.product)
       }
     },
     /**
-     * @desc   : 选择用户
-     * @author : 周兴
-     * @date   : 2023/3/13 17:50
-     */
-    chooseUser() {
-      this.$nextTick(() => {
-        let userKind = this.nodeData.userKind
-        let userList = this.$refs['userTable'].tableData
-        if (userKind && userList != null && userList.length > 0) {
-          let userKindName = this.$refs['userKind']?.getDisplayText()
-          userList.forEach(it => {
-            if (!it.userKind && it.userId) {
-              // 判断用户是否已经存在
-              let filters = userList.filter(item => item.userId === it.userId && item['_X_ID'] !== it['_X_ID'])
-              if (!filters || filters.length === 0) {
-                this.$set(it, 'userKind', userKind)
-                this.$set(it, 'userKind_Name', userKindName)
-              }
-            }
-          })
-        }
-      })
-    },
-    /**
      * @desc   : 确定
      * @author : 张潇木
      * @date   : 2023/1/5 10:38
@@ -829,121 +816,8 @@ export default {
      * @date   : 2023/2/16 16:21
      */
     setParams() {
-      // console.log('this.$refs?.defectTable?.getTableDataFilter()',this.$refs?.jobDefectTable?.getTableDataFilter())
-      // console.log("routerTable?.getTableDataFilter()",this.$refs?.routerTable?.getTableDataFilter())
-      // region 设置表单数据
-      // 半检、成检、成型 直接指定为生产工号类型
-      let userKindProduct = ''
-      if (this.nodeData.nodeKind === this.$config.nodeKind.halfCheck ||
-        this.nodeData.nodeKind === this.$config.nodeKind.finishCheck ||
-        this.nodeData.nodeKind === this.$config.nodeKind.shaping) {
-        userKindProduct = this.$config.userKind.product
-        this.nodeData.userKind = userKindProduct
-      }
-      //工序工号
-      this.nodeData.userList = this.$refs?.userTable?.getTableDataFilter().map((it, index) => {
-        return {
-          flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
-          nodeId: this.process.currentNodeId,
-          userId: it.userId,
-          userCode: it.userCode,
-          userName: it.userName,
-          // 生产工号
-          //userKind:it.userKind,
-          userKind: userKindProduct ? userKindProduct : 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: this.isFromIndex ? this.flowFormData.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: this.isFromIndex ? this.flowFormData.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: this.isFromIndex ? this.flowFormData.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: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
-          nodeId: this.process.currentNodeId,
-          jobId: it.jobId,
-          pdtDefectId: it.pdtDefectId,
-          defectCode: it.defectCode,
-          defectName: it.defectName,
-          defectTypesName: it.defectTypesName,
-          remarks: it.remarks,
-          ftyId: this.$store.state.user.ftyId
-        }
-      })
-      //跨流程工序
-      this.nodeData.routerList = this.$refs?.routerTable?.getTableDataFilter().map((it) => {
-        if (this.nodeData.routerType === 4) {
-          return {
-            routeType: this.nodeData.routerType,
-            flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
-            nodeId: this.process.currentNodeId,
-            node1Id: this.process.currentNodeId,
-            node2Id: it.node2Id,
-            node2IdName: it.node2IdName,
-            productGrade: it.productGrade,
-            moldingSysTags: it.moldingSysTags,
-            remarks: it.remarks,
-            ftyId: this.$store.state.user.ftyId
-          }
-        } else {
-          return {
-            routeType: this.nodeData.routerType,
-            flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
-            nodeId: this.process.currentNodeId,
-            node1Id: it.node1Id,
-            node2Id: this.process.currentNodeId,
-            backNodeId: it.backNodeId,
-            productGrade: it.productGrade,
-            moldingSysTags: it.moldingSysTags,
-            remarks: it.remarks,
-            ftyId: this.$store.state.user.ftyId
-          }
-        }
-      })
-      //数量
-      this.nodeData.cntPdtModel = this.nodeData.pdtList?.length  // 在制品型号数量
-      this.nodeData.cntCarModel = this.nodeData.carList?.length  // 可用载具数量
-      this.nodeData.cntQuyDefect = this.nodeData.defectList?.length  // 可检缺陷数量
-      this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1  // 工种缺陷数量,产生缺陷为true时设置成 -1
-      // endregion
+      // 设置表单数据
+      this.setFormData()
 
       // region 设置图形业务数据
       //根据工序id获取工序数据
@@ -974,7 +848,154 @@ export default {
           }
         })
       }
-      //end
+      //endregion
+
+    },
+    /**
+     * @desc   : 设置表单数据
+     * @author : 张潇木
+     * @date   : 2023/5/30 17:19
+     */
+    setFormData(){
+      //判断当前哪些table存在,不存在的table 不需要重新设置数据
+      //操作工号
+      if(this.$refs.operateUserTable){
+        //将原操作工号删除
+        this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind!==this.$config.userKind.operate)
+        //取新的操作工号
+        let operateUserList = this.$refs?.operateUserTable?.getTableDataFilter().map((it, index) => {
+          return {
+            flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
+            nodeId: this.process.currentNodeId,
+            userId: it.userId,
+            userCode: it.userCode,
+            userName: it.userName,
+            userKind :this.$config.userKind.operate,
+            displayNo: index + 1,
+            remarks: it.remarks,
+            ftyId: this.$store.state.user.ftyId
+          }
+        })
+        //增加到userList中
+        this.nodeData.userList=[...this.nodeData.userList,...operateUserList]
+      }
+      //生产工号
+      if(this.$refs.productUserTable){
+        //将原操作工号删除
+        this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind!==this.$config.userKind.product)
+        //取新的生产工号
+        let productUserList = this.$refs?.productUserTable?.getTableDataFilter().map((it, index) => {
+          return {
+            flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
+            nodeId: this.process.currentNodeId,
+            userId: it.userId,
+            userCode: it.userCode,
+            userName: it.userName,
+            userKind :this.$config.userKind.product,
+            displayNo: index + 1,
+            remarks: it.remarks,
+            ftyId: this.$store.state.user.ftyId
+          }
+        })
+        //增加到userList中
+        this.nodeData.userList=[...this.nodeData.userList,...productUserList]
+      }
+      //工序在制品
+      if(this.$refs.pdtTable){
+        this.nodeData.pdtList = this.$refs?.pdtTable?.getTableDataFilter().map((it) => {
+          return {
+            flowId: this.isFromIndex ? this.flowFormData.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.cntPdtModel = this.nodeData.pdtList?.length  // 在制品型号数量
+      }
+      //载具
+      if(this.$refs.carTable){
+        this.nodeData.carList = this.$refs?.carTable?.getTableDataFilter().map((it) => {
+          return {
+            flowId: this.isFromIndex ? this.flowFormData.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.cntCarModel = this.nodeData.carList?.length  // 可用载具数量
+      }
+      //缺陷
+      if(this.$refs.defectTable){
+        this.nodeData.defectList = this.$refs?.defectTable?.getTableDataFilter().map((it) => {
+        return {
+          flowId: this.isFromIndex ? this.flowFormData.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.cntQuyDefect = this.nodeData.defectList?.length  // 可检缺陷数量
+      }
+      //工种缺陷
+      if(this.$refs.jobDefectTable) {
+        this.nodeData.jobDefectList = this.$refs?.jobDefectTable?.getTableDataFilter().map((it) => {
+          return {
+            flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
+            nodeId: this.process.currentNodeId,
+            jobId: it.jobId,
+            pdtDefectId: it.pdtDefectId,
+            defectCode: it.defectCode,
+            defectName: it.defectName,
+            defectTypesName: it.defectTypesName,
+            remarks: it.remarks,
+            ftyId: this.$store.state.user.ftyId
+          }
+        })
+        this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1  // 工种缺陷数量,产生缺陷为true时设置成 -1
+      }
+      //跨流程工序
+      if(this.$refs.routerTable) {
+        this.nodeData.routerList = this.$refs?.routerTable?.getTableDataFilter().map((it) => {
+          if (this.nodeData.routerType === 4) {
+            return {
+              routeType: this.nodeData.routerType,
+              flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
+              nodeId: this.process.currentNodeId,
+              node1Id: this.process.currentNodeId,
+              node2Id: it.node2Id,
+              node2IdName: it.node2IdName,
+              productGrade: it.productGrade,
+              moldingSysTags: it.moldingSysTags,
+              remarks: it.remarks,
+              ftyId: this.$store.state.user.ftyId
+            }
+          } else {
+            return {
+              routeType: this.nodeData.routerType,
+              flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
+              nodeId: this.process.currentNodeId,
+              node1Id: it.node1Id,
+              node2Id: this.process.currentNodeId,
+              backNodeId: it.backNodeId,
+              productGrade: it.productGrade,
+              moldingSysTags: it.moldingSysTags,
+              remarks: it.remarks,
+              ftyId: this.$store.state.user.ftyId
+            }
+          }
+        })
+      }
     },
     /**
      * @desc   : 校验数据
@@ -1126,7 +1147,7 @@ export default {
 <style scoped>
 
 .ivu-divider-horizontal {
-  margin: 12px 0 !important;
+  margin: 10px 0 2px !important;
 }
 
 .switch {
@@ -1138,5 +1159,4 @@ export default {
 /deep/ .vxe-select-slots {
   z-index: 5100 !important;
 }
-
 </style>

+ 59 - 40
src/components/business/select-magnifier/select-magnifier.vue

@@ -775,41 +775,43 @@ export default {
       }
       this.excute(this.service, this.service[this.methodsNameDetail], param).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          let arr = [...res.data.list]
-          if (this.multiple) {
-            if (this.$refs['table-select'].batchKeys && this.$refs['table-select'].batchRows.length > 0) {
-              arr.forEach(it => {
-                let batchKeysMuti = this.$refs['table-select'].batchKeys;
-                if (batchKeysMuti.filter(it => it === it[this.selectKey]).length > 0) {
-                  this.$refs['table-select'].setCheckboxRow(it);
-                }
-              })
+          if(res.data &&res.data.list){
+            let arr = [...res.data.list]
+            if (this.multiple) {
+              if (this.$refs['table-select'].batchKeys && this.$refs['table-select'].batchRows.length > 0) {
+                arr.forEach(it => {
+                  let batchKeysMuti = this.$refs['table-select'].batchKeys;
+                  if (batchKeysMuti.filter(it => it === it[this.selectKey]).length > 0) {
+                    this.$refs['table-select'].setCheckboxRow(it);
+                  }
+                })
+              }
+            } else {
+              if (this.batchKeysPage && this.batchKeysPage.length > 0) {
+                let keyName = this.telephone ? 'customerPhone' : this.selectKey;
+                this.batchRowsPage = []
+                arr.forEach(it => {
+                  if (it[this.selectKey] && this.batchKeysPage && this.batchKeysPage.includes(it[keyName])) {
+                    // this.$set(it, 'radio', this.batchKeysPage.includes(it[this.selectKey]))
+                    this.batchRowsPage.push(it);
+                    // this.$refs['table-select'].$refs['table'].setRadioRow(it)
+                  }
+                })
+              }
             }
-          } else {
-            if (this.batchKeysPage && this.batchKeysPage.length > 0) {
-              let keyName = this.telephone ? 'customerPhone' : this.selectKey;
-              this.batchRowsPage = []
-              arr.forEach(it => {
-                if (it[this.selectKey] && this.batchKeysPage && this.batchKeysPage.includes(it[keyName])) {
-                  // this.$set(it, 'radio', this.batchKeysPage.includes(it[this.selectKey]))
-                  this.batchRowsPage.push(it);
-                  // this.$refs['table-select'].$refs['table'].setRadioRow(it)
-                }
+            this.tableData = arr
+            // 单选需要设置当前行状态
+            if (!this.multiple && this.batchRowsPage && this.batchRowsPage.length > 0) {
+              this.$nextTick(() => {
+                this.$refs['table-select'].setCurrentRow(this.batchRowsPage[0]);
               })
             }
+            // if (this.batchKeysPage) {
+            //   this.batchRowsPage = this.tableData.filter(it => this.batchKeysPage.includes(it[this.selectKey])).map(m => m)
+            //   this.$refs['table-select'].batchRows = this.batchRowsPage
+            // }
+            this.$refs['table-select'].pageInfo.total = res.data.total
           }
-          this.tableData = arr
-          // 单选需要设置当前行状态
-          if (!this.multiple && this.batchRowsPage && this.batchRowsPage.length > 0) {
-            this.$nextTick(() => {
-              this.$refs['table-select'].setCurrentRow(this.batchRowsPage[0]);
-            })
-          }
-          // if (this.batchKeysPage) {
-          //   this.batchRowsPage = this.tableData.filter(it => this.batchKeysPage.includes(it[this.selectKey])).map(m => m)
-          //   this.$refs['table-select'].batchRows = this.batchRowsPage
-          // }
-          this.$refs['table-select'].pageInfo.total = res.data.total
           this.loading = false;
         } else {
           this.$Message.warning(res.message)
@@ -1685,7 +1687,7 @@ export default {
         ]
       }
       // 获取员工用于报工记录查询
-      if (self.type === self.$config.MagnifierType.getStaffWithWork) {
+      else if (self.type === self.$config.MagnifierType.getStaffWithWork) {
         self.service = this.$service.commonService
         self.methodsName = 'getStaffWithWork'
         self.methodsNameDetail = 'getStaffWithWork'
@@ -1703,20 +1705,37 @@ export default {
         ]
       }
       // 型号种类 成型线类型
-      if (self.type === self.$config.MagnifierType.getKind) {
+      else if (self.type === self.$config.MagnifierType.moldlineType) {
+        self.service = this.$service.commonService
+        self.methodsName = 'getMoldlineType'
+        self.methodsNameDetail = 'getMoldlineType'
+        self.searchContent = [
+          {itemCode: 'modelCode',itemName:'typesOfCode'},
+        ]
+        self.modalWidth = 550
+        self.colCount = 2
+        self.selectKey = 'modelId'
+        self.selectLabel = 'modelCode'
+        self.columns = [
+          {field: 'modelCode',title: this.$t('typesOfCode'), width: '200'},
+          {field: 'modelName',title: this.$t('typesOfName'), width: '200'},
+        ]
+      }
+      // 数据字典
+      else if (self.type === self.$config.MagnifierType.dictionaryData) {
         self.service = this.$service.commonService
-        self.methodsName = 'getDataKind'
-        self.methodsNameDetail = 'getDataKind'
+        self.methodsName = 'getDictionaryData'
+        self.methodsNameDetail = 'getDictionaryData'
         self.searchContent = [
-          {itemCode: 'kindCode'},
+          {itemCode: 'dictCode',itemName:'experimentCode'},
         ]
         self.modalWidth = 550
         self.colCount = 2
-        self.selectKey = 'kindCode'
-        self.selectLabel = 'kindName'
+        self.selectKey = 'dataId'
+        self.selectLabel = 'dictCode'
         self.columns = [
-          {field: 'kindCode', width: '200'},
-          {field: 'kindName', width: '200'},
+          {field: 'dictCode', title: this.$t('experimentCode'),width: '100'},
+          {field: 'dataValue',title: this.$t('experimentValue'), width: '150'},
         ]
       }
     }

+ 3 - 1
src/config/index.js

@@ -985,7 +985,9 @@ export default {
     //可判分级-检验模型
     judgeGrade:'judgeGrade',
     //型号种类 成型线类型
-    getKind:'getKind',
+    moldlineType:'moldlineType',
+    //数据字典
+    dictionaryData:'dictionaryData',
   },
 
   /**

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

@@ -999,6 +999,10 @@ export const columns = {
   inspectMissTime: '检验漏扫时间',
   moldLineKindName: '成型线类型',
   flgExperimentList: '实验标识',
+  experimentCode: '实验编码',
+  experimentValue: '实验数据',
+  typesOfCode: '类型编码',
+  typesOfName: '类型名称',
 
   //产品实验单
   expCode: '实验单号',
@@ -1724,7 +1728,9 @@ export const appOthers = {
    * @date   : 2023/2/8 9:59
    */
   appFMoldLineItemInstall: 'f_moldline_item_install',
+  appFMoldLineItemInstallById: 'f_moldline_item_install_byid',
   appFMoldLineItemInstallAuto: 'f_moldline_item_install_auto',
+  appFMoldLineItemInstallAutoById: 'f_moldline_item_install_auto_byid',
   appFMoldLineItemUninstall: 'f_moldline_item_uninstall',
   appFMoldLineItemInstallSuccess: '上模',
   appFMoldLineItemUninstallSuccess: '卸模',

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

@@ -98,7 +98,7 @@ export default {
         materialTypeName: '',//原料类型显示用
         remarks: '',//备注
         flgValid: '',//有效标识
-        ftyId: 1,//工厂ID
+        ftyId: this.$store.state.user.ftyId,//工厂ID
         mouldKind: this.$config.modelKind.mouldKindInventory,
         pdtModelId: this.$t('appProductModel'),
       },
@@ -262,7 +262,7 @@ export default {
         materialTypeName: '',             //原料类型显示用
         remarks: '',                      //备注
         flgValid: '',                     //有效标识
-        ftyId: 1,                         //工厂ID
+        ftyId: this.$store.state.user.ftyId,                         //工厂ID
         mouldKind: this.$config.modelKind.mouldKindInventory,  //模具状态-在库
         pdtModelId: this.$t('appProductModel'),            //产品型号
       }

+ 60 - 24
src/view-app/app/mold-management/molding-mold-management/molding-mold-management-operation.vue

@@ -7,7 +7,7 @@
     <div class="main">
       <!--      表头-->
       <div v-if="pageType === 1">
-        <div style="width: 100%;background: white; padding: 10px 17px 10px 17px;">
+        <div style="width: 100%;background: white; padding: 10px 17px 10px 17px;" v-if="settingValue === '3'">
           <van-radio-group v-model="radio" direction="horizontal">
             <van-radio name="1" icon-size="23px" checked-color="#1B365D" @click="radioClick($event, '1')">
               {{ $t('appMouldCodeInstallAuto') }}
@@ -18,7 +18,7 @@
           </van-radio-group>
         </div>
         <!--   自动模具-->
-        <div v-show="radio === '1'">
+        <div v-show="radio === '1' || settingValue === '1'">
           <!--          起始位置序号-->
           <dk-app-field :focus="true" :label="$t('appStartItemNo')" typeInput="number" ref="appStartItemNo"
             v-model="formData.startItemNo"></dk-app-field>
@@ -34,7 +34,7 @@
 
         </div>
         <!--   条码模具-->
-        <div v-show="radio === '2'">
+        <div v-show="radio === '2' || settingValue === '2'">
           <!--        位置序号-->
           <dk-app-field :focus="true" :label="$t('appItemNo')" typeInput="number" ref="appItemNo"
             v-model="formData.itemNo"></dk-app-field>
@@ -100,7 +100,8 @@ export default {
         modelProductNames: '', //产品型号
         moldLineGroupNames: '' //成型线分组
       },
-      tableRowData: []
+      tableRowData: [],
+      settingValue: '3' //系统参数
     }
   },
   methods: {
@@ -136,7 +137,7 @@ export default {
             //存在
             if (this.pageType === 1) {
               // 上模(带条码)
-              type = this.$t('appFMoldLineItemInstall')
+              type = this.$t('appFMoldLineItemInstallById')
             }
             ///卸模 操作函数
             this.moldLineItemOperation(type, res.data);
@@ -181,31 +182,38 @@ export default {
      */
     moldLineItemOperation(type, data) {
       let params = {}
-      if (type === this.$t('appFMoldLineItemInstall')) {
+      if (type === this.$t('appFMoldLineItemInstallById')) { //规定 有位置无模具上模
         //上模(带条码)
         params.itemNo = Number(this.formData.itemNo)
+        params.itemId = data.itemId
         params.moldingUser = this.$store.state.user.id  //成型工号
         params.mouldId = data.uniqueId
         params.groupId = this.formData.moldLineGroupIds //成型线分组
         params.remarks = this.$t('appMoldingMoldManagementTop')
-      } else if (type === this.$t('appFMoldLineItemInstallAuto')) {
-        // 上模(无条码)
+      } else if (type === this.$t('appFMoldLineItemInstallAutoById')) {
+        //过滤 无模具 数据
+        let tableRowDataNoKindList = []
+        tableRowDataNoKindList = this.tableRowData.filter(it => {
+          return it.itemKind === '无模'
+        })
         let tempList = []
-        for (let i = 0; i < this.formData.outputQty; i++) {
-          tempList.push({
-            itemNo: Number(this.formData.startItemNo) + Number(i),  //起始位置序号
-            moldingUser: this.$store.state.user.id,//成型工号
-            stdNum: Number(this.formData.stdNum),
-            modelId: this.formData.modelProductIds,  //产品型号
-            groupId: this.formData.moldLineGroupIds,  //成型线分组
-            remarks: this.$t('appMoldingMoldManagementTop'),
-            userId: this.$store.state.user.id,
-            ftyId: this.$store.state.user.ftyId,
-            moldlineId: this.item.form.uniqueId,
-            userBindKind: this.item.form.userBindKind,
-            type: type
+        // 上模(无条码)
+          //TODO
+          tableRowDataNoKindList.forEach((itemm, index) => {
+            if ((index + 1) <= this.formData.outputQty) {
+              tempList.push({
+                itemId: itemm.itemId,
+                itemNo: Number(this.formData.startItemNo) + Number(index),  //起始位置序号
+                stdNum: Number(this.formData.stdNum),
+                pdtModelId: this.formData.modelProductIds,  //产品型号
+                groupId: this.formData.moldLineGroupIds,  //成型线分组
+                userId: this.$store.state.user.id,
+                ftyId: this.$store.state.user.ftyId,
+                moldlineId: itemm.moldlineId,
+                type: type
+              })
+            }
           })
-        }
         params.moldLineItemList = tempList
       } else if (type === this.$t('appFMoldLineItemUninstall')) {
         // 批量卸模(已选)
@@ -228,7 +236,7 @@ export default {
         })
         params.moldLineItemUninstallList = moldLineItemUninstallList  //批量卸模数组
       }
-      if (type !== this.$t('appFMoldLineItemUninstall') && type !== this.$t('appFMoldLineItemInstallAuto')) {
+      if (type !== this.$t('appFMoldLineItemUninstall') && type !== this.$t('appFMoldLineItemInstallAutoById')) {
         //不等于卸模
         params.userId = this.$store.state.user.id
         params.ftyId = this.$store.state.user.ftyId
@@ -318,7 +326,7 @@ export default {
       if (this.pageType === 1 && this.radio === '1') {
         // 上模(无条码)
         if (this.validData()) {
-          this.moldLineItemOperation(this.$t('appFMoldLineItemInstallAuto'), null);
+          this.moldLineItemOperation(this.$t('appFMoldLineItemInstallAutoById'), null);
         }
       } else if (this.pageType === 2) {
         //卸模
@@ -417,15 +425,43 @@ export default {
     },
     // endregion
 
+    /**
+ * @desc   : 获取系统参数
+ * @author : 于继渤
+ * @date   : 2023/2/7 17:23
+ */
+    getSettingValue() {
+      this.excute(this.$service.commonService, this.$service.commonService.getSettingValue, {
+        ftyId: this.$store.state.user.ftyId,
+        code: 'PDM_008'
+      }, '', true).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.settingValue = res.data
+          if (res.data === '1') {
+            this.radio = res.data
+          } else if (res.data === '2') {
+            this.radio = res.data
+          }
+
+        }
+      })
+    },
+
   },
 
 
+
   /**
    * @desc   : 页面初始化
    * @author : 于继渤
    * @date   : 2023/2/7 17:23
    */
   created(e) {
+
+    this.getSettingValue()
+
+
+
     //接收参数
     //判断传递数据是否成功
     if (this.$route.params.item) {

+ 11 - 0
src/view/pdm/data-collection/climbKiln-add.vue

@@ -29,6 +29,7 @@
           <DkFormItem :required="true" prop="kilnId"  :label="$t('kilnCode')">
             <SelectPop v-model="formData.kilnId" ref="kilnId"
                        :multiple="false"
+                       @on-select-label="selectKiln"
                        :disabled="tableData.length>0"
                        :options="kilnList"
                        labelKey="kilnCode"
@@ -151,6 +152,16 @@
         })
       },
       /**
+       *   @desc   : 选择窑车
+       *   @date   : 2023/5/30 10:02
+       *   @author : 寇珊珊
+       */
+      selectKiln(row){
+        if(row){
+          this.formData.kilnCode= row.kilnCode
+        }
+      },
+      /**
        *   @desc   : 选择工位
        *   @date   : 2023/2/28 9:24
        *   @author : 寇珊珊

+ 11 - 0
src/view/pdm/data-collection/inKiln-add.vue

@@ -37,6 +37,7 @@
                       :label="$t('kilnCode')">
             <SelectPop v-model="formData.kilnId" ref="kilnId"
                        :multiple="false"
+                       @on-select-label="selectKiln"
                        :disabled="tableData.length>0"
                        :options="kilnList"
                        labelKey="kilnCode"
@@ -147,6 +148,16 @@
         })
       },
       /**
+       *   @desc   : 选择窑车
+       *   @date   : 2023/5/30 10:02
+       *   @author : 寇珊珊
+       */
+      selectKiln(row){
+        if(row){
+          this.formData.kilnCode= row.kilnCode
+        }
+      },
+      /**
        *   @desc   : 选择工位
        *   @date   : 2023/2/28 9:24
        *   @author : 寇珊珊

+ 11 - 0
src/view/pdm/data-collection/outKiln-add.vue

@@ -39,6 +39,7 @@
                       :label="$t('kilnCode')">
             <SelectPop v-model="formData.kilnId" ref="kilnId"
                        :multiple="false"
+                       @on-select-label="selectKiln"
                        :disabled="tableData.length>0"
                        :options="kilnList"
                        labelKey="kilnCode"
@@ -147,6 +148,16 @@
         })
       },
       /**
+       *   @desc   : 选择窑车
+       *   @date   : 2023/5/30 10:02
+       *   @author : 寇珊珊
+       */
+      selectKiln(row){
+        if(row){
+          this.formData.kilnCode= row.kilnCode
+        }
+      },
+      /**
        *   @desc   : 选择工位
        *   @date   : 2023/2/28 9:24
        *   @author : 寇珊珊

+ 11 - 0
src/view/pdm/data-collection/uninstallKiln-add.vue

@@ -29,6 +29,7 @@
           <DkFormItem :required="true" prop="kilnId" :label="$t('kilnCode')">
             <SelectPop v-model="formData.kilnId" ref="kilnId"
                        :multiple="false"
+                       @on-select-label="selectKiln"
                        :disabled="tableData.length>0"
                        :options="kilnList"
                        labelKey="kilnCode"
@@ -132,6 +133,16 @@
         })
       },
       /**
+       *   @desc   : 选择窑车
+       *   @date   : 2023/5/30 10:02
+       *   @author : 寇珊珊
+       */
+      selectKiln(row){
+        if(row){
+          this.formData.kilnCode= row.kilnCode
+        }
+      },
+      /**
        *   @desc   : 选择工位
        *   @date   : 2023/2/28 9:24
        *   @author : 寇珊珊

+ 196 - 77
src/view/pdm/molding-record/damage.vue

@@ -5,7 +5,7 @@
       <template #left>
         <!--    选择成型线    -->
         <BaseIndexButton right-button="molding-record-chooseMoldline" ref="chooseMoldline" name="chooseMoldline"
-                         @click="open($config.routeUrl.moldingItem.chooseMoldline)"/>
+                         @click="chooseMoldline"/>
         <!--    清空条件    -->
         <BaseIndexButton ref="clearDetail" name="clearDetail"
                          @click="open($config.routeUrl.moldingItem.clearDetail)"></BaseIndexButton>
@@ -64,6 +64,58 @@
         </div>
       </DkPanel>
     </DkCollapse>
+    <!--选择成型线弹窗-->
+    <DkModal
+      :loading="loading"
+      ref="modal_search"
+      id="search-data-class"
+      class="search-data-class"
+      width="1200px"
+      v-model="chooseModal"
+      :shortcut-flag="false"
+      @modalOk="modalOk"
+      @modalCancel="modalCancel"
+      @on-visible-change="openMoldlineModal"
+      :title="modalTitle">
+      <BaseIndexButtonGroup id="ButtonGroup">
+        <template #left>
+          <BaseIndexButton ref="search" name="search" @click="getDataTable"></BaseIndexButton>
+          <BaseIndexButton :finalFlag="true" ref="clear" name="clear"
+                           @click="$refs['searchCond'].clearCondition()"></BaseIndexButton>
+        </template>
+      </BaseIndexButtonGroup>
+      <SearchCond id="search-cond-div" width="1100px" v-if="searchContent && searchContent.length > 0" ref="searchCond"
+                  v-model="searchCond" :setFlag="false" :searchContent="searchContent" :col-count="4"></SearchCond>
+      <div style="width: 100%;height: 10px"></div>
+
+      <DkTable
+        ref="moldlineTable"
+        :data="moldlineList"
+        :height="chooseTableHeight"
+        :page-flag="false"
+        :show-setting-flag="false"
+        :freeze="false"
+        :multiple="false"
+        :clearCheckFlag="false"
+        :auto-width-flag="false"
+        :autoWidthFlag="false"
+        primaryKey="moldingId" >
+        <!--成型线-->
+        <DkTableColumn field="moldlineCodeName" :title="$t('moldlineCodeName')" width="200"></DkTableColumn>
+        <!--分组序号-->
+        <DkTableColumn field="groupNo" type="number" width="90"></DkTableColumn>
+        <!--多批次标识-->
+        <DkTableColumn field="flgCanBatches" type="switch" :switch-disabled="true" width="100"></DkTableColumn>
+        <!--模具数量-->
+        <DkTableColumn field="mlGroupItemQty"  :title="$t('groupItemQty')" type="number" width="90"></DkTableColumn>
+        <!--绑定工位-->
+        <DkTableColumn field="stationName"  :title="$t('stationId')" width="90"></DkTableColumn>
+        <!--已成型日期-->
+        <DkTableColumn field="moldingBatch" type="number" width="100"></DkTableColumn>
+        <!--成型批次-->
+        <DkTableColumn field="moldingDate" type="date" width="100"></DkTableColumn>
+      </DkTable>
+    </DkModal>
     <!--      下部分按钮区域-->
     <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
   </div>
@@ -90,6 +142,7 @@ export default {
       editColumns:['itemId','flgScrap','scrapReasonId','remarks','moldingId'],
       // 画面表单数据
       formData: {
+        ftyId:this.$store.state.user.ftyId,
         moldingDate: null, // 成型日期
         scrapReasonId: null, // 损坯原因
         moldingInfo: null,// 成型信息
@@ -138,10 +191,152 @@ export default {
         // 备注
         {field: 'remarks', type: 'text', width: 'auto'},
       ],
+      modalTitle: self.$v('chooseMoldline'),//选择成型线弹窗名称
+      chooseTableHeight: 420,//选择成型线弹窗高度
+      // 选择成型线弹窗查询条件
+      formDataMoldline:[],
+      searchCond: {},
+      searchContent:
+        [
+          {
+            itemCode: 'moldingDate',
+            valueFormat: { code: 'moldingDate', default: new Date().toDateStr() },
+            valueKind: 'DATE',
+          },
+          {
+            itemCode: 'moldlineCodeAndName',
+            itemName: 'moldlineCodeName',
+          },
+          {
+            itemCode: 'groupNo',
+          },
+          {
+            itemCode: 'moldingBatch',
+          },
+        ],
     }
   },
 
   methods: {
+    // region 选择成型线
+    /**
+     * @desc   : 选择成型线
+     * @author : 姜宁
+     * @date   : 2023/2/15 16:39
+     */
+    chooseMoldline() {
+      this.chooseModal = true
+    },
+    /**
+     * @desc   : 清空选择框
+     * @author : 周兴
+     * @date   : 2023/2/21 15:34
+     */
+    modalCancel() {
+      this.$refs['searchCond'].clearCondition()
+      // 清空数据源
+      this.moldlineList = []
+    },
+    /**
+     * @desc   : 打开成型线modal
+     * @author : 周兴
+     * @date   : 2023/2/21 15:24
+     */
+    openMoldlineModal(e) {
+      this.$nextTick(()=>{
+        // 清空列表和查询条件
+        this.$refs['searchCond'].clearCondition()
+        // 清空数据源
+        this.moldlineList = []
+      })
+    },
+    /**
+     * @desc   : 获取表格数据
+     * @author : 沈博
+     * @date   : 2022/3/7 16:59
+     */
+    getDataTable() {
+      let param = {}
+      param.userId = this.$store.state.user.id
+      param.manageUser = this.$store.state.user.id
+      param.ftyId = this.$store.state.user.ftyId
+      if (this.searchCond) {
+        if(this.searchCond._value.moldingDate){
+          param = Object.assign(param, this.searchCond._value)
+        }
+        // else{
+        //   this.searchCond._value.moldingDate= new Date().toDateStr()
+        //   param = Object.assign(param, this.searchCond._value)
+        // }
+      }
+      // if (!param.moldingDate) {
+      //   this.$Message.warning(this.$t('W_093', {
+      //     'param': this.$t('moldingDate')
+      //   }))
+      //   return
+      // }
+      this.loading = true;
+      this.excute(this.$service.moldingRecordService, this.$service.moldingRecordService.selectMoldingGiveDamage, param).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.moldlineList = res.data.list
+        } else {
+          this.$Message.warning(res.message)
+          this.moldlineList = []
+        }
+        this.loading = false;
+      })
+    },
+    /**
+     * @desc   : 选择成线性后确定事件
+     * @author : 姜宁
+     * @date   : 2023/2/17 12:57
+     */
+    modalOk() {
+      let batchRows = []
+      if (this.moldlineList) {
+        batchRows = this.$refs['moldlineTable'].batchRows
+        if (batchRows) {
+          //成型日期
+          this.formData.moldingDate = batchRows[0].moldingDate
+          //获取成型记录信息
+          this.getMoldline(batchRows[0].moldingId, batchRows[0].groupId, batchRows[0].moldlineName)
+          // 清空选择界面
+          this.modalCancel()
+          //关闭选择弹框
+          this.chooseModal = false
+        }
+      }
+    },
+    /**
+     * @desc   : 根据成型线Id获取成型记录信息
+     * @author : 周兴
+     * @date   : 2023/2/18 18:35
+     */
+    getMoldline(moldlineId, moldingGroupId,moldlineName) {
+      let params = {
+        ftyId: this.$store.state.user.ftyId,
+        moldlineId: moldlineId,
+        moldingGroupId:moldingGroupId
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getMoldingItemByMoldlineId, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if(res.data && res.data.length > 0){
+            this.moldingRecordList = res.data;
+            this.moldingRecordList.forEach(it=>{
+              if(!it.flgMolding){
+                it['readOnly'] = ['flgScrap']
+              }
+            })
+            // 如果未成型标识,不允许进行开模损
+            this.tableDataSocial = res.data.copy();     // 记录原始数据
+            // 给成型线信息赋值
+            this.formData.moldingInfo = moldlineName + '(' + res.data.length + ')'
+          }
+        }
+      })
+    },
+    //endregion
+
     // region 列表
     /**
      * @desc   : 选择开模损原因
@@ -179,29 +374,6 @@ export default {
       }
     },
     /**
-     * @desc   : 选择成型线
-     * @author : 姜宁
-     * @date   : 2023/2/15 16:39
-     */
-    chooseMoldline() {
-      // this.chooseModal = true
-      this.$SearchForm({
-          type: this.$config.MagnifierType.moldline,
-          otherCondition: {manageUser: this.$store.state.user.id}, title: this.$v('chooseMoldline')
-        },
-        {
-          // 切换查询出的数据
-          ok: ({batchKeys, batchRows, searchCond}) => {
-            if (batchRows && batchRows.length > 0) {
-              // 给成型日期赋值
-              this.formData.moldingDate = searchCond.lastMoldingDate
-              // 获取成型记录信息
-              this.getMoldline(batchRows[0].uniqueId, batchKeys[0], batchRows[0].moldlineName)
-            }
-          },
-        })
-    },
-    /**
      * @desc   : 加载数据
      * @author : 姜宁
      * @date   : 2023/1/29 16:33
@@ -227,31 +399,6 @@ export default {
       })
     },
     /**
-     * @desc   : 获取表格数据
-     * @author : 沈博
-     * @date   : 2022/3/7 16:59
-     */
-    getDataTable() {
-      let param = {}
-      param.userId = this.$store.state.user.id
-      param.manageUser = this.$store.state.user.id
-      param.ftyId = this.$store.state.user.ftyId
-      if (this.searchCond) {
-        param = Object.assign(param, this.searchCond._value)
-      }
-      if (param.lastMoldingDate) {
-        param.lastMoldingDate = param.lastMoldingDate.toDateStr();
-      }
-      this.excute(this.$service.moldingService, this.$service.moldingService.searchMoldline, param).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.moldlineList = res.data;
-        } else {
-          this.$Message.warning(res.message)
-          this.moldlineList = null
-        }
-      })
-    },
-    /**
      * @desc   : 值改变
      * @author : 周兴
      * @date   : 2023/2/20 11:39
@@ -277,34 +424,6 @@ export default {
       // 查询数据
       return this.excute(this.$service.moldingService, this.$service.moldingService.searchMoldline, params);
     },
-    /**
-     * @desc   : 根据成型线Id获取成型记录信息
-     * @author : 周兴
-     * @date   : 2023/2/18 18:35
-     */
-    getMoldline(moldlineId, moldingGroupId,moldlineName) {
-      let params = {
-        ftyId: this.$store.state.user.ftyId,
-        moldlineId: moldlineId,
-        moldingGroupId:moldingGroupId
-      }
-      this.excute(this.$service.commonService, this.$service.commonService.getMoldingItemByMoldlineId, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          if(res.data && res.data.length > 0){
-            this.moldingRecordList = res.data;
-            this.moldingRecordList.forEach(it=>{
-              if(!it.flgMolding){
-                it['readOnly'] = ['flgScrap']
-              }
-            })
-            // 如果未成型标识,不允许进行开模损
-            this.tableDataSocial = res.data.copy();     // 记录原始数据
-            // 给成型线信息赋值
-            this.formData.moldingInfo = moldlineName + '(' + res.data.length + ')'
-          }
-        }
-      })
-    },
     // endregion
 
     // region 保存方法

+ 7 - 12
src/view/report/molding-record-report/index.vue

@@ -109,8 +109,7 @@ export default {
             itemName: 'moldLineKindName',
             valueFormat: {code: 'modelKindList'},
             valueKind: self.$config.docUserInput.mSearch,
-            magnifierType: self.$config.MagnifierType.getKind,
-            otherCondition:{kindType:'型号种类-成型线'}
+            magnifierType: self.$config.MagnifierType.moldlineType,
           },
           //成型线
           {
@@ -211,16 +210,12 @@ export default {
           },
           //实验标识
           {
-            itemCode: 'flgExperimentList',
-            valueFormat: {
-              data: [
-                {valueKey: 'true', flgValid: self.$config.searchDataEnum.flgExperimentTrue},
-                {valueKey: 'false', flgValid: self.$config.searchDataEnum.flgExperimentFalse}],
-              valueKey: 'valueKey',
-              labelKey: 'flgValid',
-              default: ['true', 'false']
-            },
-            valueKind: self.$config.docUserInput.mChoice
+            itemCode: 'moldlineTags',
+            itemName: 'flgExperimentList',
+            valueFormat: {code: 'moldlineTags'},
+            valueKind: self.$config.docUserInput.mSearch,
+            magnifierType: self.$config.MagnifierType.dictionaryData,
+            otherCondition:{dictCode:self.$config.dictType.moldlineTag}
           },
           //成型日期
           {