lucw 7 luni în urmă
părinte
comite
214cb3dbb4

+ 28 - 18
src/views/batchRecord/components/editModal.vue

@@ -35,7 +35,6 @@
         :model="form"
         :rules="rules"
         label-width="130px"
-        :disabled="type == 'detail'"
       >
         <header-title title="事项信息"></header-title>
         <el-row style="margin-bottom: 20px">
@@ -786,6 +785,7 @@
   import material from '@/views/produce/components/prenatalExamination/material.vue';
   import statistics from './statistics.vue';
   import selectWorkOrder from '@/views/checklistManagement/components/selectWorkOrder.vue';
+  import { set } from 'nprogress';
 
   export default {
     name: 'editModal',
@@ -888,7 +888,6 @@
         pickDetails: [],
         // 本次产出明细
         outputDetails: [],
-        executeUsersIds: [],
         workshopAreaId: null,
         workshopArea: '',
         checkStartTime: null,
@@ -1159,6 +1158,7 @@
         return list;
       },
       activeTeamUserList() {
+        if (!this.teamUserList || this.teamUserList.length === 0) return [];
         return this.teamUserList.filter((user) =>
           this.form.executeUsersIds.includes(user.id)
         );
@@ -1183,6 +1183,7 @@
         console.log('data', type, data);
         this.type = type;
         this.form.reportWorkType = this.reportWorkType;
+
         if (type == 'add') {
           this.title = `新增${this.reportWorkTypeName}事项`;
         } else if (type == 'edit') {
@@ -1242,16 +1243,8 @@
             ? this.form.executeUsers[0].teamId
             : '';
         // 加载班组人员列表
-        if (this.form.teamId) {
-          const index = this.teamList.findIndex(
-            (item) => item.id == this.form.teamId
-          );
-          this.teamUserList = this.teamAllList[index];
-        }
-        // 加载班组列表
-        if(this.teamList.length == 0 && this.form.teamId){
-          this.getTeamList(this.form.teamId);
-        }
+        this.setTeamList();
+
         console.log('this.form', this.form);
         this.loading = false;
         this.getListByWorkOrderId();
@@ -1852,23 +1845,40 @@
         this.teamUserList = this.teamAllList[index];
         console.log('this.teamUserList', this.teamUserList);
       },
+      // 查看详情加载班组人员
+      async setTeamList() {
+        await this.getTeamList(this.form.teamId);
+        this.$nextTick(() => {
+          const index = this.teamList.findIndex(
+            (item) => item.id == this.form.teamId
+          );
+          this.teamUserList = this.teamAllList[index];
+          console.log('this.teamUserList', this.teamUserList);
+        });
+      },
       async getTeamList(id) {
-        if(!id) return;
+        if (!id) return;
         const ids = id.split(',');
-        this.teamList = [];
+        console.log('ids', ids);
         this.teamUserList = [];
         const list = ids.map((item) => getTeam(item));
 
         const dataList = await Promise.all(list);
 
         dataList.forEach((item) => {
-          this.teamList.push({
-            name: item.name,
-            id: item.id
-          });
+          const any = this.teamList.find((team) => team.id == item.id);
+
+          if (!any) {
+            this.teamList.push({
+              name: item.name,
+              id: item.id
+            });
+          }
 
           this.teamAllList.push(item.userVOList);
         });
+
+        this.teamAllList = Array.from(new Set(this.teamAllList));
       },
       changeId() {
         if (this.form.executeUsersIds.length == this.teamUserList.length) {

+ 2 - 0
src/views/checklistManagement/components/checkDetails.vue

@@ -82,6 +82,7 @@
             >详情</el-link
           >
           <el-link
+            v-if="type != 'detail'"
             icon="el-icon-delete"
             type="danger"
             :underline="false"
@@ -628,6 +629,7 @@
       selectWorkOrderConfirm(selection) {
         const selectList = selection.map((i) => {
           return {
+            formedNum: i.formedNum,
             batchNo: i.batchNo,
             createUserName: i.createUserName,
             formingNum: i.formingNum,

+ 3 - 2
src/views/checklistManagement/components/selectWorkOrder.vue

@@ -40,11 +40,11 @@
           ></el-radio>
         </template>
 
-        <template v-slot:code="{ row }">
+        <!-- <template v-slot:code="{ row }">
           <el-link type="primary" :underline="false" @click="goDetail(row)">
             {{ row.code }}
           </el-link>
-        </template>
+        </template> -->
 
         <template v-slot:QRcode="{ row }">
           <el-link type="primary" :underline="false" @click="handleQRcode(row)">
@@ -255,6 +255,7 @@
         const list = [
           {
             slot: 'code',
+            prop: 'code',
             label: '生产工单号',
             align: 'center',
             minWidth: 150,

+ 2 - 1
src/views/checklistManagement/components/templateAdd.vue

@@ -14,6 +14,7 @@
       :rules="rules"
       label-width="130px"
       v-loading="loading"
+      :disabled="type == 'detail'"
     >
       <header-title title="基本信息"></header-title>
       <el-row style="margin-bottom: 15px" gap="10">
@@ -400,7 +401,7 @@
           this.getDetails(data.id);
         } else {
           // 克隆
-          this.title = '编辑放行单模版';
+          this.title = '克隆放行单模版';
           this.getDetails(data.id);
         }
         this.visible = true;

+ 0 - 3
src/views/produce/components/warehousing/index.vue

@@ -830,9 +830,6 @@
           this.teamAllList.push(item.userVOList);
         });
 
-        if(this.form.teamId && this.teamUserList.length == 0){
-          this.checkTeamList(this.form.teamId);
-        }
       },
 
       changeId() {

+ 2 - 2
vue.config.js

@@ -37,14 +37,14 @@ module.exports = {
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.125:18086',
-        // target: 'http://192.168.1.116:18086', // 赵沙金
+        target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.33:18086',
-        target: 'http://192.168.1.251:18186', // 测试环境
+        // target: 'http://192.168.1.251:18186', // 测试环境
         // target: 'http://192.168.1.251:18087',
         // target: 'http://116.163.22.90:86/api', // 嘉实生产
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域