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

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

lucw 8 месяцев назад
Родитель
Сommit
06f01a8ef8

+ 8 - 3
src/views/operationControl/index.vue

@@ -145,13 +145,18 @@
             label: item[values[0]]
           };
         });
-
-        console.log(this.dateTypeList);
       },
 
       async getInfoData() {
         const res = await getInfo();
-        if (typeof res == 'string') {
+        // console.log(res, '返回的数据');
+        // if (typeof res == 'string') {
+        //   this.fnType = 1;
+        // } else {
+        //   this.formData = res;
+        //   this.fnType = 2;
+        // }
+        if (!res.id) {
           this.fnType = 1;
         } else {
           this.formData = res;

+ 2 - 1
src/views/produce/components/jobBooking/details.vue

@@ -495,7 +495,8 @@
 
     created() {
       this.getPlanCode();
-      this.get;
+      // this.get;
+      // console.log(this.curTaskObj, 'curTaskObj');
     },
 
     methods: {

+ 1 - 1
src/views/produce/components/picking/pickingList.vue

@@ -67,7 +67,7 @@
             </template>
 
             <template v-slot:code="{ row }">
-              {{ row.rootCategoryLevelId == 4 ? row.code : row.code }}
+              {{ row.rootCategoryLevelId == 4 ? row.categoryCode : row.code }}
             </template>
 
             <template v-slot:runStatus="{ row }">

+ 33 - 73
src/views/produce/components/workPlan/detailsIndex.vue

@@ -9,8 +9,9 @@
     <ele-pro-table
       ref="table"
       :columns="columns"
-      :datasource="datasource"
+      :datasource="workPlanList"
       :need-page="false"
+      cache-key="work-plan-detail-index"
     >
       <!-- <ele-pro-table
           ref="table"
@@ -363,15 +364,32 @@
         addOpen: false,
         visible: false,
         dataWork: {},
-        sourceList: []
+        sourceList: [],
+        workPlanList: []
       };
     },
+
+    watch: {
+      taskId: {
+        handler(obj) {
+          if (obj) {
+            this.getPlanList();
+          }
+        },
+        deep: true,
+        immediate: true
+      }
+    },
+
     created() {
       this.requestDict('质检计划类型');
       this.requestDict('不良品处理类型');
       this.requestDict('取样类型');
       this.getTnspectionPlanType();
       this.getQualityMethodCode();
+
+      // this.getPlanList();
+      // this.search();
     },
     computed: {
       seekList() {
@@ -431,30 +449,26 @@
       }
     },
     methods: {
-      // datasource({ page, where, limit }) {
-      //   // return getList({
-      //   //   ...where,
-      //   //   pageNum: page,
-      //   //   size: limit
-      //   // });
-      //   return getList({
-      //     // ...where,
-      //     produceSourceTaskId: this.dataWork.taskId,
-      //     sourceCode: this.dataWork.data.code,
+      // async datasource({ page, limit }) {
+      //   const res = await getList({
+      //     produceSourceTaskId: this.taskId,
+      //     sourceCode: this.code,
       //     pageNum: page,
       //     size: limit
       //   });
+
+      //   return res;
       // },
 
-      async datasource({ page, limit }) {
+      async getPlanList() {
         const res = await getList({
           produceSourceTaskId: this.taskId,
           sourceCode: this.code,
-          pageNum: page,
-          size: limit
+          pageNum: 1,
+          size: -1
         });
 
-        return res;
+        this.workPlanList = res.list;
       },
 
       openEdits(type, row) {
@@ -462,38 +476,13 @@
         this.$refs.detailsRef.open(row);
       },
 
-      // async getSourceList({ page, limit }) {
-      //   const res = await getList({
-      //     produceSourceTaskId: this.dataWork.taskId,
-      //     sourceCode: this.dataWork.data.code,
-      //     pageNum: page,
-      //     size: limit
-      //   });
-
-      //   console.log(res);
-      //   this.sourceList = res?.list ? res?.list : [];
-      // },
-
       search(where) {
+        this.getPlanList();
         // this.$refs.table.reload({
-        //   where: where,
+        //   limit: 20,
         //   page: 1
         // });
-        this.$refs.table.reload({
-          limit: 20,
-          page: 1
-        });
       },
-      // open(req) {
-      //   this.visible = true;
-      //   this.dataWork = req;
-      //   this.$nextTick(() => {
-      //     this.datasource({
-      //       limit: 20,
-      //       page: 1
-      //     });
-      //   });
-      // },
 
       openEdit(type, row) {
         const req = {
@@ -503,35 +492,6 @@
         };
 
         this.$refs.editRef.open(req);
-        // const menusList = this.$store.state.user.menus;
-        // let found = false;
-        // for (const item of menusList) {
-        //   if (item.children) {
-        //     for (const item2 of item.children) {
-        //       if (item2.path === '/inspectionWork/edit') {
-        //         found = true;
-        //         const id = type !== 'add' ? row.id : '';
-        //         const qualityType = type !== 'add' ? row.qualityType : null;
-        //         const qualityTimeStart = row.qualityTimeStart || '';
-
-        //         this.$router.push({
-        //           path: '/inspectionWork/edit',
-        //           query: {
-        //             type,
-        //             id,
-        //             qualityType,
-        //             qualityTimeStart
-        //           }
-        //         });
-        //         return;
-        //       }
-        //     }
-        //   }
-        // }
-
-        // if (!found) {
-        //   this.$message.error('请到角色管理配置菜单权限!');
-        // }
       },
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
@@ -545,7 +505,7 @@
           .catch((e) => {});
       },
       done() {
-        console.log(22222);
+        this.search();
         // this.$refs.search.search();
         // this.getSourceList({
         //   page: 1,

+ 1 - 0
src/views/produce/components/workPlan/index.vue

@@ -21,6 +21,7 @@
           :datasource="datasource"
           :pageSize="20"
           :pageSizes="[20, 30, 40, 50, 100]"
+          cache-key="work-planindex"
         >
           <!-- <ele-pro-table
           ref="table"

+ 9 - 7
src/views/produceOrder/components/details/index.vue

@@ -47,6 +47,13 @@
         </el-steps>
 
         <el-tabs type="border-card">
+          <el-tab-pane label="领料详情">
+            <pickDetails
+              :isDetails="true"
+              :workOrderInfo="workOrderInfo"
+            ></pickDetails>
+          </el-tab-pane>
+
           <el-tab-pane label="投料详情">
             <feedDetails
               :routeObj="routeObj"
@@ -62,13 +69,6 @@
             ></jobDetails>
           </el-tab-pane>
 
-          <el-tab-pane label="领料详情">
-            <pickDetails
-              :isDetails="true"
-              :workOrderInfo="workOrderInfo"
-            ></pickDetails>
-          </el-tab-pane>
-
           <el-tab-pane label="生产明细">
             <productionDetails
               :workOrderInfo="workOrderInfo"
@@ -165,6 +165,8 @@
       handIdx(index, item) {
         this.curTaskObj = JSON.parse(JSON.stringify(item));
 
+        console.log(item, '返回的数据');
+
         if (item.taskId == -2) {
           this.$message.info('完结状态不能点击');
         } else {

+ 6 - 6
src/views/produceOrder/workReport.vue

@@ -242,12 +242,6 @@
               ></footBtn>
             </el-tab-pane>
 
-            <el-tab-pane label="生产明细">
-              <productionDetails
-                :workOrderInfo="workOrderInfo"
-              ></productionDetails>
-            </el-tab-pane>
-
             <el-tab-pane label="投料详情">
               <feedDetails
                 :routeObj="routeObj"
@@ -263,6 +257,12 @@
               ></jobDetails>
             </el-tab-pane>
 
+            <el-tab-pane label="生产明细">
+              <productionDetails
+                :workOrderInfo="workOrderInfo"
+              ></productionDetails>
+            </el-tab-pane>
+
             <!-- <el-tab-pane label="退料详情"> </el-tab-pane> -->
           </el-tabs>
         </div>

+ 7 - 0
src/views/warehousing/index.vue

@@ -199,6 +199,13 @@
             showOverflowTooltip: true
           },
 
+          {
+            prop: 'executorName',
+            label: '执行人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
           {
             prop: 'createTime',
             label: '创建时间',

+ 5 - 10
src/views/workOrderList/components/productionDetails.vue

@@ -88,17 +88,12 @@
     },
     methods: {
       produce() {
-        // console.log(this.workOrderInfo,99999999);
-
-        this.produceList = [];
-
         produceDetail(this.id).then((res) => {
-          // this.produceList = res.produceDetail;
-          res.produceDetail.forEach((item) => {
-            if (item.taskId != '-2') {
-              this.produceList.push(item);
-            }
-          });
+          if (res.produceDetail.length != 0) {
+            this.produceList = res.produceDetail.filter(
+              (item) => item.taskId != '-2'
+            );
+          }
         });
       }
     }

+ 4 - 2
vue.config.js

@@ -35,10 +35,12 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.125: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.251: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',