quwangxin před 2 roky
rodič
revize
13428b1f8e

+ 6 - 6
src/views/produceOrder/components/produceOrder-search.vue

@@ -127,7 +127,7 @@
 <script>
   export default {
     props: ['activeName', 'statusOpt', 'planType'],
-    data () {
+    data() {
       // 默认表单数据
       const defaultWhere = {
         code: '',
@@ -150,13 +150,13 @@
     },
     computed: {
       // 是否开启响应式布局
-      styleResponsive () {
+      styleResponsive() {
         return this.$store.state.theme.styleResponsive;
       }
     },
     watch: {
       activeName: {
-        handler () {
+        handler() {
           if (this.activeName) {
             this.where.status = this.statusOpt[this.activeName][0].value;
             this.search();
@@ -165,10 +165,10 @@
         immediate: true
       }
     },
-    created () {},
+    created() {},
     methods: {
       /* 搜索 */
-      search () {
+      search() {
         const where = { ...this.where };
 
         if (where.createTime?.length) {
@@ -182,7 +182,7 @@
         this.$emit('search', where);
       },
       /*  重置 */
-      reset () {
+      reset() {
         this.where = { ...this.defaultWhere };
         this.search();
       }

+ 33 - 0
src/views/produceOrder/components/report/Drying.vue

@@ -353,6 +353,39 @@
       this.workReport.executorJobNum = this.$store.state.user.info?.jobNumber;
     },
     watch: {
+      taskInfo: {
+        immediate: true,
+        handler() {
+          if (this.taskInfo.code) {
+            this.getReportCount();
+          }
+        }
+      },
+      infoData: {
+        immediate: true,
+        handler() {
+          if (
+            this.infoData.id &&
+            this.currentInfo.code == this.firstInfo.code &&
+            this.infoData.deviceCode
+          ) {
+            // 设备
+            this.workReportDeviceList = Object.assign(
+              {},
+              this.workReportDeviceList,
+              {
+                code: this.infoData.deviceCode,
+                name: this.infoData.deviceName,
+                rootCategoryLevelId: this.infoData.rootCategoryLevelId,
+                path: this.infoData.path[0]?.pathName,
+                model: this.infoData.model,
+                sourceInstanceId: this.infoData.sourceInstanceId,
+                specification: this.infoData.specification
+              }
+            );
+          }
+        }
+      },
       formData: {
         immediate: true,
         handler() {

+ 12 - 2
src/views/produceOrder/detail.vue

@@ -246,7 +246,6 @@
   import otherMission from './components/otherMission';
   import OrderPrint from '@/components/print/OrderPrint';
   import bomList from './components/bomList';
-  import { getTaskListById } from '@/api/mainData/index.js';
   import dictMixins from '@/mixins/dictMixins';
   import {
     reportPage,
@@ -1140,7 +1139,18 @@
         if (typeof res.taskTypeProcessDiagrams == 'string') {
           this.tabList = [];
         } else {
-          this.tabList = res.taskTypeProcessDiagrams;
+          const list = res.taskTypeProcessDiagrams.filter(
+            (i) => !i.taskTypeName?.includes('工具')
+          );
+
+          const index = list.findIndex((i) =>
+            i.taskTypeName.includes('挤压干燥')
+          );
+          if (index > -1) {
+            list[index].taskTypeName = '升温干燥';
+          }
+
+          this.tabList = list;
         }
         // this.activeName = this.tabList[0]?.taskTypeName || ''
         this.chooseItem = this.tabList[0]?.taskTypeName;

+ 13 - 1
src/views/produceOrder/report.vue

@@ -270,7 +270,19 @@
         // 获取工序
         const res1 = await getTaskListById(this.infoData.produceVersionId);
 
-        this.tabList = res1;
+        const list = res1.filter((i) => !i.name.includes('工具'));
+
+        const index = list.findIndex((i) => i.name.includes('挤压干燥'));
+        if (index > -1) {
+          list[index].name = '升温干燥';
+
+          list.splice(index, 0, {
+            name: '自然干燥',
+            code: list[index].code + '-01',
+            sortNum: 88
+          });
+        }
+        this.tabList = list;
         this.tabList.push({
           name: '入库',
           code: '999999',