Эх сурвалжийг харах

新增刻码判断和网络请求判断

695593266@qq.com 1 жил өмнө
parent
commit
48e047d924

+ 5 - 5
src/enum/dict.js

@@ -14,15 +14,15 @@ export default {
   处置仓库: 'modificatiWnarehouse',
   干燥区域: 'drying_area',
   日期方式: 'date_method',
-  开槽类型:'slotting_type',
-  不良品处理类型:'unqualified_products_type',
-  返工返修处置 :'return_repair_work_type',
+  开槽类型: 'slotting_type',
+  不良品处理类型: 'unqualified_products_type',
+  返工返修处置: 'return_repair_work_type',
   订单类型: 'order_type',
-  不合格品原因:'unqualified_products_reason',
+  不合格品原因: 'unqualified_products_reason',
   订单计划类型: 'plan_type',
   异常类型: 'Exception_type',
   请托类型: 'entrust_type',
   退料场景: 'returnScenario',
-  
+  质检计划类型: 'inspection_plan_type'
 };
 export const numberList = ['date_method'];

+ 84 - 87
src/utils/request.js

@@ -1,90 +1,87 @@
 /**
  * axios 实例
  */
- import axios from 'axios';
- import router from '@/router';
- import store from '@/store';
- import { MessageBox, Message } from 'element-ui';
- import { API_BASE_URL, TOKEN_HEADER_NAME, LAYOUT_PATH } from '@/config/setting';
- import { getToken, setToken } from './token-util';
- import { logout } from './page-tab-util';
- import JSONBIG from 'json-bigint';
- const service = axios.create({
-   baseURL: API_BASE_URL,
-   transformResponse: [
-     function (data) {
-       if (data instanceof Blob) {
-         return data;
-       }
-       const json = JSONBIG({
-         storeAsString: true
-       });
-       const res = json.parse(data);
-       return res;
-     }
-   ]
- });
- /**
-  * 添加请求拦截器
-  */
- service.interceptors.request.use(
-   (config) => {
-     // 添加 token 到 header
-     const token = getToken();
-     if (token && config.headers) {
-       config.headers.common[TOKEN_HEADER_NAME] = token;
-     }
- 
-     return config;
-   },
-   (error) => {
-     return Promise.reject(error);
-   }
- );
- 
- /**
-  * 添加响应拦截器
-  */
- service.interceptors.response.use(
- 
- 
- 
-   
-   (res) => {
-     // token 自动续期
-     if (res.data.code == '-1' && res.config?.showErrorToast !== false) {
-       Message.error(res.data.message);
-     }
-     const token = res.headers[TOKEN_HEADER_NAME.toLowerCase()];
-     if (token) {
-       setToken(token);
-     }
-     return res;
-   },
-   (error) => {
-     // 登录过期处理
-     if (error?.response?.status === 401) {
-       const currentPath = router.currentRoute.path;
-       if (currentPath === LAYOUT_PATH) {
-         logout(true);
-       } else {
-         MessageBox.alert('登录状态已过期, 请退出重新登录!', '系统提示', {
-           confirmButtonText: '重新登录',
-           callback: (action) => {
-             if (action === 'confirm') {
-               logout(false, currentPath);
-             }
-           },
-           beforeClose: () => {
-             MessageBox.close();
-           }
-         });
-       }
-       return Promise.reject(new Error(error.response.data?.message));
-     }
-     return Promise.reject(error);
-   }
- );
- 
- export default service;
- 
+import axios from 'axios';
+import router from '@/router';
+import store from '@/store';
+import { MessageBox, Message } from 'element-ui';
+import { API_BASE_URL, TOKEN_HEADER_NAME, LAYOUT_PATH } from '@/config/setting';
+import { getToken, setToken } from './token-util';
+import { logout } from './page-tab-util';
+import JSONBIG from 'json-bigint';
+const service = axios.create({
+  baseURL: API_BASE_URL,
+  transformResponse: [
+    function (data) {
+      if (data instanceof Blob) {
+        return data;
+      }
+      const json = JSONBIG({
+        storeAsString: true
+      });
+      const res = json.parse(data);
+      return res;
+    }
+  ]
+});
+/**
+ * 添加请求拦截器
+ */
+service.interceptors.request.use(
+  (config) => {
+    // 添加 token 到 header
+    const token = getToken();
+    if (token && config.headers) {
+      config.headers.common[TOKEN_HEADER_NAME] = token;
+    }
+
+    return config;
+  },
+  (error) => {
+    return Promise.reject(error);
+  }
+);
+
+/**
+ * 添加响应拦截器
+ */
+service.interceptors.response.use(
+  (res) => {
+    // token 自动续期
+    if (res.data.code == '-1' && res.config?.showErrorToast !== false) {
+      Message.error(res.data.message);
+    }
+    const token = res.headers[TOKEN_HEADER_NAME.toLowerCase()];
+    if (token) {
+      setToken(token);
+    }
+    return res;
+  },
+  (error) => {
+    // 登录过期处理
+    if (error?.response?.status === 401) {
+      const currentPath = router.currentRoute.path;
+      if (currentPath === LAYOUT_PATH) {
+        logout(true);
+      } else {
+        MessageBox.alert('登录状态已过期, 请退出重新登录!', '系统提示', {
+          confirmButtonText: '重新登录',
+          callback: (action) => {
+            if (action === 'confirm') {
+              logout(false, currentPath);
+            }
+          },
+          beforeClose: () => {
+            MessageBox.close();
+          }
+        });
+      }
+      return Promise.reject(new Error(error.response.data?.message));
+    } else if (!error?.response?.status) {
+      Message.error('服务器调用失败,请联系管理人员!');
+    }
+    return Promise.reject(error);
+  }
+);
+
+export default service;

+ 8 - 8
src/views/produce/components/inspection/components/newQualityTesting.vue

@@ -224,20 +224,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 7 - 7
src/views/produce/components/inspection/components/oneJobQualityBom.vue

@@ -319,20 +319,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
+            code: 6,
             label: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 8 - 8
src/views/produce/components/inspection/components/semiProductJobBom.vue

@@ -567,20 +567,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 8 - 8
src/views/produce/components/inspection/components/semiProductJobBomPL.vue

@@ -420,20 +420,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 8 - 8
src/views/produce/components/inspection/components/semiProductJobBomQT.vue

@@ -288,20 +288,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 8 - 8
src/views/produce/components/jobBooking/components/oneJobQualityBom.vue

@@ -319,20 +319,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 46 - 13
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -20,6 +20,7 @@
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
       :selection.sync="selection"
+      @selection-change="handleSelectionChange"
       row-key="id"
     >
       <template v-slot:engrave="{ row, $index }">
@@ -157,7 +158,7 @@
           @change="handlerSelect"
           filterable
           placeholder="请选择"
-          :disabled="isDetails"
+          :disabled="isDetails || isDisable"
         >
           <el-option
             v-for="item in isQualifiedList"
@@ -176,7 +177,7 @@
           v-model="row.extInfo.notType"
           filterable
           placeholder="请选择"
-          :disabled="isDetails"
+          :disabled="isDetails || isDisable"
         >
           <el-option
             v-for="item in notTypeList"
@@ -197,7 +198,8 @@
           v-if="
             row.extInfo.isQualified != 1 &&
             row.extInfo.notType &&
-            row.extInfo.notType != 5
+            row.extInfo.notType != 5 &&
+            row.extInfo.notType != 8
           "
         >
           <span v-if="isDetails">{{ row.extInfo.notReason }}</span>
@@ -209,7 +211,9 @@
             placeholder="原因"
           />
         </div>
-        <div v-if="![1, 2, 3, 4].includes(Number(row.extInfo.notType))">
+        <div
+          v-if="![1, 2, 3, 4, 6, 9, 7].includes(Number(row.extInfo.notType))"
+        >
           <span v-if="isDetails">{{ row.extInfo.taskName }}</span>
           <el-select
             v-else
@@ -366,6 +370,7 @@
     saveParam
   } from '@/api/produce/job';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     name: 'semiProductJobBom',
@@ -401,6 +406,7 @@
           this.deviceList = newVal;
           console.log(newVal, '1111121547646549896498');
           this.changeHeatNumber();
+          this.getCodeData();
         }
       },
       list: {
@@ -621,6 +627,7 @@
     },
     created() {
       this.getTaskFn();
+      this.getCodeData();
     },
 
     // item
@@ -674,23 +681,25 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ],
-        selectArr: []
+        selectArr: [],
+        isDisable: false,
+        chooseData: []
       };
     },
 
@@ -732,11 +741,35 @@
         );
       },
 
+      async getCodeData() {
+        await parameterGetByCode({ code: 'enable_quality_plus' }).then(
+          (res) => {
+            if (res.value == '1') {
+              console.log('请求code');
+              this.isDisable = true;
+            } else {
+              this.isDisable = false;
+            }
+          }
+        );
+      },
+
       handlerSelect() {
         this.sunTj();
         this.sumweight(this.list);
       },
 
+      handleSelectionChange(data) {
+        if (data.length > 0) {
+          this.chooseData = data.map((item) => {
+            item.confirm = 1;
+            return item;
+          });
+        } else {
+          this.chooseData = [];
+        }
+      },
+
       handleInput() {
         console.log(12354987498498);
         let arr = JSON.parse(JSON.stringify(this.list));

+ 8 - 8
src/views/produce/components/jobBooking/components/semiProductJobBomPL.vue

@@ -544,20 +544,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 8 - 8
src/views/produce/components/jobBooking/components/semiProductJobBomQT.vue

@@ -288,20 +288,20 @@
             name: '让步接收'
           },
           {
-            value: 6,
-            label: '留样'
+            code: 6,
+            name: '留样'
           },
           {
-            value: 7,
-            label: '消耗'
+            code: 7,
+            name: '消耗'
           },
           {
-            value: 8,
-            label: '回用'
+            code: 8,
+            name: '回用'
           },
           {
-            value: 9,
-            label: '转试销'
+            code: 9,
+            name: '转试销'
           }
         ]
       };

+ 28 - 6
src/views/produce/components/jobBooking/index.vue

@@ -311,6 +311,7 @@
   import packingBom from './components/packingBom.vue';
   import packingTgBom from './components/packingTgBom';
   import { timestampToDateTime } from '@/utils/index.js';
+  import { parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     components: {
@@ -575,6 +576,7 @@
       },
 
       allSelection(id, selectList) {
+        console.log('111111111111');
         this.List.forEach((m) => {
           if (m.workOrderId == id) {
             let turnover = [];
@@ -598,6 +600,25 @@
       },
 
       async save(type) {
+        const required = await parameterGetByCode({
+          code: 'mes_report_engrave_required'
+        }).then((res) => {
+          return res;
+        });
+
+        if (required.value == '1') {
+          if (this.List.length > 0) {
+            if (this.List[0].semiProductList.length > 0) {
+              for (let i = 0; i < this.List[0].semiProductList.length; i++) {
+                if (!this.List[0].semiProductList[i].extInfo.engrave) {
+                  this.$message.warning('请输入刻码!');
+                  return;
+                }
+              }
+            }
+          }
+        }
+
         console.log('11111', this.List);
         this.loading = this.$loading({
           lock: true,
@@ -621,15 +642,16 @@
         let bol2;
         bol2 = this.List.every((e) => {
           return (
-            e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
+            // e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
+            e.workReportInfo['formedNum'] != ''
           );
         });
 
-        if (!bol2) {
-          this.$message.warning('请输入合格品数量');
-          this.loading.close();
-          return false;
-        }
+        // if (!bol2) {
+        //   this.$message.warning('请输入合格品数量');
+        //   this.loading.close();
+        //   return false;
+        // }
 
         // 预制体
 

+ 530 - 492
src/views/produce/components/picking/pickingList.vue

@@ -1,22 +1,55 @@
 <template>
-  <el-dialog :title="title" :visible.sync="visible" v-if="visible" :before-close="handleClose"
-    :close-on-click-modal="false" :close-on-press-escape="false" append-to-body width="75%">
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    v-if="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="75%"
+  >
     <el-card shadow="never">
       <pickingListSearch @search="reload" ref="searchRef" />
 
-      <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
         <div class="ele-border-lighter split-layout-right-content">
-          <AssetTree ref="assetTreeRef" :treeIds="treeIds" @handleNodeClick="handleNodeClick" @setRootId="setRootId" />
+          <AssetTree
+            ref="assetTreeRef"
+            :treeIds="treeIds"
+            @handleNodeClick="handleNodeClick"
+            @setRootId="setRootId"
+          />
         </div>
         <!-- 表格 -->
 
         <template v-slot:content>
-          <ele-pro-table :initLoad="false" ref="table" :columns="columns" :datasource="datasource"
-            :selection.sync="selection" row-key="id" height="calc(100vh - 350px)" class="dict-table"
-            :cache-key="tableKey" :row-style="rowStyle" :row-click-checked="true" :row-click-checked-intelligent="false"
-            @update:selection="handleSelectionChange">
+          <ele-pro-table
+            :initLoad="false"
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            :selection.sync="selection"
+            row-key="id"
+            height="calc(100vh - 350px)"
+            class="dict-table"
+            :cache-key="tableKey"
+            :row-style="rowStyle"
+            :row-click-checked="true"
+            :row-click-checked-intelligent="false"
+            @update:selection="handleSelectionChange"
+          >
             <template v-slot:toolbar>
-              <el-alert type="info" :closable="false" class="ele-alert-border" style="width: 300px">
+              <el-alert
+                type="info"
+                :closable="false"
+                class="ele-alert-border"
+                style="width: 300px"
+              >
                 <i class="el-icon-info ele-text-info"></i>
                 <span class="ele-text">
                   <span>
@@ -45,9 +78,12 @@
             </template>
 
             <template v-slot:status="{ row }">
-              <span :style="{ color: row.status == 0 ? '#157A2C' : '#FFA929' }">{{
-                row.status == 0 ? '空闲' : row.status == 1 ? '占用' : ''
-              }}</span>
+              <span
+                :style="{ color: row.status == 0 ? '#157A2C' : '#FFA929' }"
+                >{{
+                  row.status == 0 ? '空闲' : row.status == 1 ? '占用' : ''
+                }}</span
+              >
             </template>
 
             <template v-slot:packingCountBase="{ row }">
@@ -70,21 +106,25 @@
                   row.expirationDateUnit == 'year'
                     ? '年'
                     : row.expirationDateUnit == 'month'
-                      ? '月'
-                      : '日'
+                    ? '月'
+                    : '日'
                 }}
               </span>
             </template>
             <!-- 质检状态 -->
             <template v-slot:qualityStatus="{ row }">
-              <span v-if="row.qualityResult == 0 || row.qualityResult == 1">已检</span>
+              <span v-if="row.qualityResult == 0 || row.qualityResult == 1"
+                >已检</span
+              >
               <span v-else-if="row.qualityStatus == 1">已检</span>
               <span v-else-if="row.qualityStatus == 0">未检</span>
               <span v-else>-</span>
             </template>
             <!-- 质检结果 -->
             <template v-slot:qualityResult="{ row }">
-              <span v-if="row.qualityResult == 0 || row.qualityResult == ''">合格</span>
+              <span v-if="row.qualityResult == 0 || row.qualityResult == ''"
+                >合格</span
+              >
               <span v-else-if="row.qualityResult == 1">不合格</span>
               <span v-else-if="row.qualityResult == 3">让步接收</span>
               <span v-else>-</span>
@@ -102,519 +142,517 @@
 </template>
 
 <script>
-import AssetTree from '../../components/assetTree.vue';
-import pickingListSearch from './pickingListSearch.vue';
-import {
-  pageeLedgerMain,
-  assetPage,
-  listInProduct
-} from '@/api/produce/workOrder';
-
-export default {
-  components: { AssetTree, pickingListSearch },
-  props: {
-    isType: {
-      type: String,
-      default: '',
-      required: true
-    }
-  },
-  data() {
-    return {
-      visible: false,
-
-      id: null,
-      treeIds: null,
-      categoryLevelId: null,
-      rootCategoryLevelId: null,
-      isCategory: true,
-
-      stateList: [
-        '启动',
-        '空闲',
-        '运行',
-        '故障',
-        '检修',
-        '停机',
-        '待料',
-        '占用'
-      ],
-
-      selection: [],
-
-      allSelection: [],
-      temporaryList: []
-    };
-  },
-
-  computed: {
-    tableKey() {
-      return `table-${this.rootCategoryLevelId}`;
+  import AssetTree from '../../components/assetTree.vue';
+  import pickingListSearch from './pickingListSearch.vue';
+  import {
+    pageeLedgerMain,
+    assetPage,
+    listInProduct
+  } from '@/api/produce/workOrder';
+
+  export default {
+    components: { AssetTree, pickingListSearch },
+    props: {
+      isType: {
+        type: String,
+        default: '',
+        required: true
+      }
     },
-
-    // 表格列配置
-    columns() {
-      return [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center',
-          reserveSelection: true
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 50,
-          align: 'center'
-        },
-        {
-          prop: 'code',
-          label: '编码',
-          slot: 'code'
-        },
-        {
-          prop: 'name',
-          label: '名称',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'brandNum',
-          label: '牌号',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'specification',
-          label: '规格',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'modelType',
-          label: '型号',
-          showOverflowTooltip: true
-        },
-
-        {
-          prop: 'batchNo',
-          label: '批次号',
-          align: 'center'
-        },
-        {
-          prop: 'manualBatchNo',
-          label: '批次号',
-          align: 'center'
-        },
-        {
-          prop: 'availableCountBase',
-          label: '计量库存数量',
-          sortable: 'custom',
-          slot: 'availableCountBase',
-          showOverflowTooltip: true,
-          width: 130,
-          align: 'center'
-        },
-
-        ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
-          ? [
-            {
-              prop: 'packingCountBase',
-              label: '包装库存',
-              slot: 'packingCountBase',
-              showOverflowTooltip: true
-            }
-          ]
-          : []),
-
-        {
-          prop: 'weight',
-          label: '重量',
-          showOverflowTooltip: true,
-          slot: 'weight'
-        },
-
-        {
-          prop: 'expirationDate',
-          slot: 'expirationDate',
-          label: '库存保质期',
-          width: 100
-        },
-        {
-          prop: 'expirationTime',
-          label: '周期倒计时',
-          showOverflowTooltip: true,
-          width: 100
-        },
-        {
-          prop: 'qualityResult',
-          slot: 'qualityResult',
-          label: '质检结果',
-          showOverflowTooltip: true,
-          width: 100
-        },
-        {
-          prop: 'qualityStatus',
-          slot: 'qualityStatus',
-          label: '质检状态',
-          showOverflowTooltip: true,
-          width: 100
-        },
-        {
-          prop: 'pathName',
-          width: 230,
-          label: '仓库',
-          showOverflowTooltip: true
-        },
-
-        ...(this.rootCategoryLevelId == '4'
-          ? [
-            {
-              prop: 'workstationName',
-              label: '工位',
-              showOverflowTooltip: true
-            },
-
-            {
-              prop: 'runStatus',
-              label: '状态',
-              slot: 'runStatus',
-              showOverflowTooltip: true
-            }
-          ]
-          : []),
-
-        // ...(this.rootCategoryLevelId == '5'
-        //   ? [
-        //       {
-        //         prop: 'dieHoleNum',
-        //         label: '模孔数量',
-        //         showOverflowTooltip: true
-        //       },
-        //       {
-        //         prop: 'mandrelDiameter',
-        //         label: '芯棒直径',
-        //         showOverflowTooltip: true
-        //       },
-        //       {
-        //         prop: 'shrinkEffictive',
-        //         label: '收缩系数',
-        //         showOverflowTooltip: true
-        //       }
-        //     ]
-        //   : []),
-
-        // ...(this.rootCategoryLevelId == '7'
-        //   ? [
-        //       {
-        //         prop: 'materialQuality',
-        //         label: '材质',
-        //         showOverflowTooltip: true
-        //       },
-
-        //       {
-        //         prop: 'vehicleLen',
-        //         label: '长宽高',
-        //         slot: 'vehicleLen',
-        //         showOverflowTooltip: true
-        //       }
-        //     ]
-        //   : []),
-
-        ...(this.rootCategoryLevelId == '8'
-          ? [
-            {
-              prop: 'extInfo.slotNum',
-              label: '槽数',
-              showOverflowTooltip: true
-            }
-          ]
-          : []),
-
-        ...(this.rootCategoryLevelId == '11'
-          ? [
-            {
-              prop: 'status',
-              label: '状态',
-              slot: 'status',
-              showOverflowTooltip: true
-            },
-
-            {
-              prop: 'region',
-              label: '位置',
-              showOverflowTooltip: true
-            }
-          ]
-          : [])
-      ];
-    }
-  },
-  watch: {},
-  methods: {
-    /* 表格数据源 */
-    async datasource({ page, where, limit }) {
-      let URL;
-
-      let param = {
-        ...where,
-        pageNum: page,
-        size: limit,
-        categoryLevelId: this.categoryLevelId
+    data() {
+      return {
+        visible: false,
+
+        id: null,
+        treeIds: null,
+        categoryLevelId: null,
+        rootCategoryLevelId: null,
+        isCategory: true,
+
+        stateList: [
+          '启动',
+          '空闲',
+          '运行',
+          '故障',
+          '检修',
+          '停机',
+          '待料',
+          '占用'
+        ],
+
+        selection: [],
+
+        allSelection: [],
+        temporaryList: []
       };
-      if (this.isType == 'pick') {
-        param.dimension = 1;
+    },
 
-        URL = pageeLedgerMain;
-      } else if (this.isType == 'feed') {
-        if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
-          URL = assetPage;
-        } else if (this.rootCategoryLevelId == 2) {
-          param.workOrderId = this.id;
-          delete param.taskId;
-          delete param.categoryLevelId;
-          URL = listInProduct;
-        } else if (
-          ![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))
-        ) {
+    computed: {
+      tableKey() {
+        return `table-${this.rootCategoryLevelId}`;
+      },
+
+      // 表格列配置
+      columns() {
+        return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 50,
+            align: 'center'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center'
+          },
+          {
+            prop: 'manualBatchNo',
+            label: '批次号',
+            align: 'center'
+          },
+          {
+            prop: 'availableCountBase',
+            label: '计量库存数量',
+            sortable: 'custom',
+            slot: 'availableCountBase',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+
+          ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+            ? [
+                {
+                  prop: 'packingCountBase',
+                  label: '包装库存',
+                  slot: 'packingCountBase',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true,
+            slot: 'weight'
+          },
+
+          {
+            prop: 'expirationDate',
+            slot: 'expirationDate',
+            label: '库存保质期',
+            width: 100
+          },
+          {
+            prop: 'expirationTime',
+            label: '周期倒计时',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityResult',
+            slot: 'qualityResult',
+            label: '质检结果',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityStatus',
+            slot: 'qualityStatus',
+            label: '质检状态',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'pathName',
+            width: 230,
+            label: '仓库',
+            showOverflowTooltip: true
+          },
+
+          ...(this.rootCategoryLevelId == '4'
+            ? [
+                {
+                  prop: 'workstationName',
+                  label: '工位',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'runStatus',
+                  label: '状态',
+                  slot: 'runStatus',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          // ...(this.rootCategoryLevelId == '5'
+          //   ? [
+          //       {
+          //         prop: 'dieHoleNum',
+          //         label: '模孔数量',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'mandrelDiameter',
+          //         label: '芯棒直径',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'shrinkEffictive',
+          //         label: '收缩系数',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          // ...(this.rootCategoryLevelId == '7'
+          //   ? [
+          //       {
+          //         prop: 'materialQuality',
+          //         label: '材质',
+          //         showOverflowTooltip: true
+          //       },
+
+          //       {
+          //         prop: 'vehicleLen',
+          //         label: '长宽高',
+          //         slot: 'vehicleLen',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          ...(this.rootCategoryLevelId == '8'
+            ? [
+                {
+                  prop: 'extInfo.slotNum',
+                  label: '槽数',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          ...(this.rootCategoryLevelId == '11'
+            ? [
+                {
+                  prop: 'status',
+                  label: '状态',
+                  slot: 'status',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'region',
+                  label: '位置',
+                  showOverflowTooltip: true
+                }
+              ]
+            : [])
+        ];
+      }
+    },
+    watch: {},
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, where, limit }) {
+        let URL;
+
+        let param = {
+          ...where,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId
+        };
+        if (this.isType == 'pick') {
+          param.dimension = 1;
+
+          URL = pageeLedgerMain;
+        } else if (this.isType == 'feed') {
+          if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+            URL = assetPage;
+          } else if (this.rootCategoryLevelId == 2) {
+            param.workOrderId = this.id;
+            delete param.taskId;
+            delete param.categoryLevelId;
+            URL = listInProduct;
+          } else if (
+            ![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))
+          ) {
+            URL = assetPage;
+          }
+        } else if (this.isType == 'job') {
           URL = assetPage;
         }
-      } else if (this.isType == 'job') {
-        URL = assetPage;
-      }
 
-      const res = await URL(param);
-
-      if (this.rootCategoryLevelId == '11') {
-        let _res = res;
-        let _list = [];
-        _res.list.forEach((e) => {
-          if (e.aridRegionList && e.aridRegionList.length != 0) {
-            e.aridRegionList.map((i) => {
-              let obj = {
-                name: e.name,
-                region: e.extInfo.region,
-                rootCategoryLevelId: e.rootCategoryLevelId,
+        const res = await URL(param);
+
+        if (this.rootCategoryLevelId == '11') {
+          let _res = res;
+          let _list = [];
+          _res.list.forEach((e) => {
+            if (e.aridRegionList && e.aridRegionList.length != 0) {
+              e.aridRegionList.map((i) => {
+                let obj = {
+                  name: e.name,
+                  region: e.extInfo.region,
+                  rootCategoryLevelId: e.rootCategoryLevelId,
+                  ...i,
+                  instanceId: i.id
+                };
+                _list.push(obj);
+              });
+            }
+          });
+          res.list = _list;
+          return res;
+        } else {
+          let _res = res;
+          let _list = [];
+
+          _list.push(
+            ..._res.list.map((i) => {
+              const warehouseId = i.pathIds && i.pathIds.split(',')[0];
+
+              return {
+                warehouseId,
                 ...i,
                 instanceId: i.id
               };
-              _list.push(obj);
-            });
-          }
-        });
-        res.list = _list;
-        return res;
-      } else {
-        let _res = res;
-        let _list = [];
-
-        _list.push(
-          ..._res.list.map((i) => {
-            const warehouseId = i.pathIds && i.pathIds.split(',')[0];
-
-            return {
-              warehouseId,
-              ...i,
-              instanceId: i.id
-            };
-          })
-        );
-
-        res.list = _list;
-        return res;
-      }
-    },
-
-    handleSelectionChange(data) {
-      this.allSelection = data;
-    },
-
-    /* 清空选择 */
-    clearChoose() {
-      this.allSelection = [];
-      this.$refs.table.clearSelection();
-    },
-    rowStyle({ row }) {
-      return this.selection.includes(row) ? { background: '#e6f7ff' } : null;
-    },
-    handleNodeClick(data) {
-      this.isCategory = true;
-      this.categoryLevelId = data.id;
-      this.rootCategoryLevelId = data.rootCategoryLevelId;
-      this.reload();
-    },
-
-    setRootId(data) {
-      this.categoryLevelId = data.id;
-      this.rootCategoryLevelId = data.rootCategoryLevelId;
-      this.reload();
-    },
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$nextTick(() => {
-        this.isCategory = false;
-        this.$refs.table.reload({ pageNum: 1, where: where });
-      });
-    },
+            })
+          );
 
-    onDone() {
-      this.$nextTick(() => {
-        this.allSelection.forEach((item) => {
-          this.$refs.table.toggleRowSelection(item, true);
+          res.list = _list;
+          return res;
+        }
+      },
+
+      handleSelectionChange(data) {
+        this.allSelection = data;
+      },
+
+      /* 清空选择 */
+      clearChoose() {
+        this.allSelection = [];
+        this.$refs.table.clearSelection();
+      },
+      rowStyle({ row }) {
+        return this.selection.includes(row) ? { background: '#e6f7ff' } : null;
+      },
+      handleNodeClick(data) {
+        this.isCategory = true;
+        this.categoryLevelId = data.id;
+        this.rootCategoryLevelId = data.rootCategoryLevelId;
+        this.reload();
+      },
+
+      setRootId(data) {
+        this.categoryLevelId = data.id;
+        this.rootCategoryLevelId = data.rootCategoryLevelId;
+        this.reload();
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.isCategory = false;
+          this.$refs.table.reload({ pageNum: 1, where: where });
         });
-      });
-    },
-    open(id, item, t) {
-      this.id = id;
-
-      if (t) {
-        this.title = t;
-      } else {
-        this.title = '领料列表';
-      }
-
+      },
 
-      if (this.isType == 'pick') {
-        this.temporaryList = item.pickList || [];
-        this.allSelection = item.pickList || [];
-        this.visible = true;
+      onDone() {
         this.$nextTick(() => {
           this.allSelection.forEach((item) => {
             this.$refs.table.toggleRowSelection(item, true);
           });
         });
-      } else if (this.isType == 'feed') {
-        let feedList = [];
-        feedList = [
-          ...item.modelList,
-          ...item.equipmentList,
-          ...item.instanceList,
-          ...item.aridRegionList,
-          ...item.turnover,
-          ...item.palletList,
-          ...item.revolvingDiskList,
-          ...item.semiProductList
-        ];
-        this.temporaryList = feedList || [];
-        this.allSelection = feedList || [];
-        this.visible = true;
+      },
+      open(id, item, t) {
+        this.id = id;
+
+        if (t) {
+          this.title = t;
+        } else {
+          this.title = '领料列表';
+        }
 
-        this.$nextTick(() => {
-          feedList.forEach((item) => {
-            this.$refs.table.toggleRowSelection(item, true);
+        if (this.isType == 'pick') {
+          this.temporaryList = item.pickList || [];
+          this.allSelection = item.pickList || [];
+          this.visible = true;
+          this.$nextTick(() => {
+            this.allSelection.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
           });
-        });
-      } else if (this.isType == 'job') {
-        let feedList = [];
-        feedList = [
-          ...item.turnover,
-          ...item.equipmentList,
-        ];
-        this.temporaryList = feedList || [];
-        this.allSelection = feedList || [];
-        this.visible = true;
-
-        this.$nextTick(() => {
-          feedList.forEach((item) => {
-            this.$refs.table.toggleRowSelection(item, true);
+        } else if (this.isType == 'feed') {
+          let feedList = [];
+          feedList = [
+            ...item.modelList,
+            ...item.equipmentList,
+            ...item.instanceList,
+            ...item.aridRegionList,
+            ...item.turnover,
+            ...item.palletList,
+            ...item.revolvingDiskList,
+            ...item.semiProductList
+          ];
+          this.temporaryList = feedList || [];
+          this.allSelection = feedList || [];
+          this.visible = true;
+
+          this.$nextTick(() => {
+            feedList.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
           });
-        });
-      }
-    },
-
-    handleClose() {
-      this.clearChoose();
-      this.temporaryList = [];
-      this.allSelection = [];
-      this.visible = false;
-    },
-    selected() {
-      if (this.allSelection.length == 0) {
-        this.$message.warning('请选择物料');
-        return false;
-      }
-
+        } else if (this.isType == 'job') {
+          let feedList = [];
+          feedList = [...item.turnover, ...item.equipmentList];
+          this.temporaryList = feedList || [];
+          this.allSelection = feedList || [];
+          this.visible = true;
+
+          this.$nextTick(() => {
+            feedList.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
+          });
+        }
+      },
+
+      handleClose() {
+        this.clearChoose();
+        this.temporaryList = [];
+        this.allSelection = [];
+        this.visible = false;
+      },
+      selected() {
+        if (this.allSelection.length == 0) {
+          this.$message.warning('请选择物料');
+          return false;
+        }
 
-      if (this.temporaryList.length > 0) {
-        // 使用Promise来“模拟”异步操作
-        new Promise((resolve) => {
-          if (this.temporaryList.length > 0) {
-            this.temporaryList.forEach((item) => {
-              this.allSelection.forEach((item2) => {
-                if (item.id == item2.id && this.isType == 'pick') {
-                  this.$set(item2, 'demandQuantity', item.demandQuantity || null);
-                } else if (item.id == item2.id && this.isType == 'feed') {
-                  this.$set(item2, 'feedQuantity', item.feedQuantity || null);
-                }
+        if (this.temporaryList.length > 0) {
+          // 使用Promise来“模拟”异步操作
+          new Promise((resolve) => {
+            if (this.temporaryList.length > 0) {
+              this.temporaryList.forEach((item) => {
+                this.allSelection.forEach((item2) => {
+                  if (item.id == item2.id && this.isType == 'pick') {
+                    this.$set(
+                      item2,
+                      'demandQuantity',
+                      item.demandQuantity || null
+                    );
+                  } else if (item.id == item2.id && this.isType == 'feed') {
+                    this.$set(item2, 'feedQuantity', item.feedQuantity || null);
+                  }
+                });
               });
-            });
-          }
+            }
+            this.allSelection.sort(
+              (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
+            );
+
+            resolve();
+          }).then(() => {
+            this.$emit('allSelection', this.id, this.allSelection);
+            this.handleClose();
+          });
+        } else {
           this.allSelection.sort(
             (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
           );
 
-          resolve();
-        }).then(() => {
-
           this.$emit('allSelection', this.id, this.allSelection);
           this.handleClose();
-        });
-      } else {
-        this.allSelection.sort(
-          (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
-        );
+        }
+      }
+    },
 
-        this.$emit('allSelection', this.id, this.allSelection);
-        this.handleClose();
+    created() {
+      if (this.isType == 'pick') {
+        // this.treeIds = '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28';
+        this.treeIds = '9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22';
+      } else if (this.isType == 'feed') {
+        this.treeIds = '1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 23,28';
+      } else if (this.isType == 'job') {
+        this.treeIds = '4, 7';
       }
     }
-  },
-
-  created() {
-    if (this.isType == 'pick') {
-      // this.treeIds = '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28';
-      this.treeIds='9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22'
-    } else if (this.isType == 'feed') {
-      this.treeIds = '1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 23,28';
-    } else if (this.isType == 'job') {
-      this.treeIds = '4, 7';
-    }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.tree_col {
-  border: 1px solid #eee;
-  padding: 10px 0;
-  box-sizing: border-box;
-  height: 500px;
-  overflow: auto;
-}
-
-.table_col {
-  padding-left: 10px;
-
-  ::v-deep .el-table th.el-table__cell {
-    background: #f2f2f2;
+  .tree_col {
+    border: 1px solid #eee;
+    padding: 10px 0;
+    box-sizing: border-box;
+    height: 500px;
+    overflow: auto;
   }
-}
 
-.pagination {
-  text-align: right;
-  padding: 10px 0;
-}
+  .table_col {
+    padding-left: 10px;
 
-.btns {
-  text-align: center;
-  padding: 10px 0;
-}
+    ::v-deep .el-table th.el-table__cell {
+      background: #f2f2f2;
+    }
+  }
 
-.topsearch {
-  margin-bottom: 15px;
-}
+  .pagination {
+    text-align: right;
+    padding: 10px 0;
+  }
 
-::v-deep .is-checked {
-  background: #e6f7ff;
-}
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+
+  .topsearch {
+    margin-bottom: 15px;
+  }
+
+  ::v-deep .is-checked {
+    background: #e6f7ff;
+  }
 </style>

+ 2 - 2
src/views/produce/components/workPlan/components/baseInfo.vue

@@ -187,7 +187,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="检验标准" prop="inspectionStandards">
+          <el-form-item label="计量类型" prop="inspectionStandards">
             <!-- 计量 计重 -->
             <el-select
               style="width: 100%"
@@ -384,7 +384,7 @@
         default: ''
       },
       qualityType1: {
-        type: String,
+        type: Number,
         default: ''
       },
       sampleList: {

+ 9 - 3
src/views/produce/components/workPlan/edit.vue

@@ -252,9 +252,7 @@
         this.dataWork = req.data;
         this.getDetail(req.workOrderId);
         this.type = req.data.type ? req.data.type : '';
-        this.qualityType = req.data.qualityType
-          ? '' + req.data.qualityType
-          : '';
+        this.qualityType = req.data.qualityType ? req.data.qualityType : '';
 
         this.title =
           this.type == 'add' ? '新增' : this.type == 'edit' ? '报工' : '详情';
@@ -657,6 +655,8 @@
         console.log(unit, '所选单位');
         console.log(sampleCount, '数量');
         try {
+          console.log(this.isStandard1OrWeightSample());
+          console.log(this.isWeightStandardFullSample());
           if (this.isStandard1OrWeightSample()) {
             //抽检计量整样小样或者抽检计重小样
             if (!this.validateMeasureQuantity(measureQ, unit, sampleCount))
@@ -670,8 +670,10 @@
               unit
             );
           } else if (this.isWeightStandardFullSample()) {
+            console.log('1111111111111');
             //抽检取计重取整样
             if (!this.validateSampleCount(sampleCount)) return;
+            console.log('1111111111111');
             await this.handleWeightFullSample(sampleCount);
           }
           this.activeName = '2';
@@ -1313,6 +1315,10 @@
             ?.length
             ? JSON.parse(JSON.stringify(item.qualitySampleTemplateList))
             : JSON.parse(JSON.stringify(this.schemeList));
+          console.log(
+            this.isStandard1OrWeightSample(),
+            'this.isStandard1OrWeightSample()'
+          );
           this.sampleList.push({
             ...item,
             measureQuantity: sampleCount, //作为计量数量

+ 44 - 12
src/views/produce/components/workPlan/index.vue

@@ -13,20 +13,20 @@
         <!-- <search ref="search" @search="search"></search> -->
         <!-- <seek-page :seekList="seekList" @search="search"></seek-page> -->
 
-        <!-- <ele-pro-table
+        <ele-pro-table
           ref="table"
           :columns="columns"
           :datasource="datasource"
           :pageSize="20"
           :pageSizes="[20, 30, 40, 50, 100]"
-        > -->
-        <ele-pro-table
+        >
+          <!-- <ele-pro-table
           ref="table"
           :columns="columns"
           :datasource="sourceList"
           :pageSize="20"
           :pageSizes="[20, 30, 40, 50, 100]"
-        >
+        > -->
           <!-- 表头工具栏 -->
           <!--        <template v-slot:toolbar>-->
           <!--          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit('add')">-->
@@ -441,6 +441,19 @@
       //   });
       // },
 
+      async datasource({ page, limit }) {
+        const res = await getList({
+          produceSourceTaskId: this.dataWork.taskId,
+          sourceCode: this.dataWork.data.code,
+          pageNum: page,
+          size: limit
+        });
+
+        console.log(res);
+
+        return res;
+      },
+
       async getSourceList({ page, limit }) {
         const res = await getList({
           produceSourceTaskId: this.dataWork.taskId,
@@ -454,22 +467,36 @@
       },
 
       search(where) {
+        // this.$refs.table.reload({
+        //   where: where,
+        //   page: 1
+        // });
+        console.log(1111)
         this.$refs.table.reload({
-          where: where,
+          limit: 20,
           page: 1
         });
+        // this.getSourceList({
+        //   page: 1,
+        //   limit: 10
+        // });
       },
       open(req) {
-        console.log(req, '列表数据');
         this.visible = true;
         this.dataWork = req;
         // this.$refs.table.reload({
         //   where: where,
         //   page: 1
         // });
-        this.getSourceList({
-          page: 1,
-          limit: 10
+        // this.getSourceList({
+        //   page: 1,
+        //   limit: 10
+        // });
+        this.$nextTick(() => {
+          this.datasource({
+            limit: 20,
+            page: 1
+          });
         });
       },
 
@@ -506,9 +533,9 @@
         //   }
         // }
 
-        if (!found) {
-          this.$message.error('请到角色管理配置菜单权限!');
-        }
+        // if (!found) {
+        //   this.$message.error('请到角色管理配置菜单权限!');
+        // }
       },
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
@@ -522,7 +549,12 @@
           .catch((e) => {});
       },
       done() {
+        console.log(22222)
         this.$refs.search.search();
+        // this.getSourceList({
+        //   page: 1,
+        //   limit: 10
+        // });
       },
       openNumber(row) {
         this.formData.certificateNumber = row.certificateNumber;

+ 3 - 4
src/views/produce/index.vue

@@ -329,7 +329,8 @@
         reportNeedFeed: 0, //生产质检是否需要处置再报工1是0否
         singleReportInspection: null, //获取选中的工单是单个还是批量
         workTaskId: null, //选中的工单工序id
-        workData: {}
+        workData: {},
+        isDisable: false
       };
     },
 
@@ -508,11 +509,9 @@
       },
 
       async getCodeData(req) {
-        // enable_quality_plus
-        console.log('获取123464654');
         await parameterGetByCode({ code: 'enable_quality_plus' }).then(
           (res) => {
-            if (res.enable == '1') {
+            if (res.value == '1') {
               this.$refs.jobRefs.open(req);
             }
           }

+ 2 - 2
src/views/produceOrder/index.vue

@@ -826,8 +826,8 @@ export default {
 
     async updateFn(row) {
       let req = {
-        id: this.id,	//工艺路线id		false	
-        produceRoutingId: row[0].id,	//工艺路线id		false	
+        id: this.id,	//工艺路线id		false
+        produceRoutingId: row[0].id,	//工艺路线id		false
         produceRoutingName: row[0].name,
 
       };