瀏覽代碼

解决质检计划和质检工单路由右边数量

hezhanp 7 月之前
父節點
當前提交
4c2303f667
共有 2 個文件被更改,包括 42 次插入21 次删除
  1. 11 3
      src/views/inspectionPlan/index.vue
  2. 31 18
      src/views/inspectionWork/index.vue

+ 11 - 3
src/views/inspectionPlan/index.vue

@@ -120,6 +120,7 @@ import {
 import dictMixins from '@/mixins/dictMixins';
 import { getFile } from '@/api/system/file';
 import { getByCode } from '@/api/system/dictionary-data';
+import { queryTodo } from '@/api/bpm/task';
 
 import tabMixins from '@/mixins/tableColumnsMixin';
 export default {
@@ -375,11 +376,18 @@ export default {
     //     size: limit
     //   });
     // },
-    datasource({ page, limit, where }) {
+    
+    async datasource({ page, where, limit }) {
+      try {
+        await queryTodo({});
+      } catch (err) {
+        console.error('调用queryTodo失败:', err);
+      }
+
       return getList({
+        ...where,
         pageNum: page,
-        size: limit,
-        ...where
+        size: limit
       });
     },
     search(e) {

+ 31 - 18
src/views/inspectionWork/index.vue

@@ -99,7 +99,15 @@
             businessCode="qmsqualityinspectionprint"
           ></jimureportBrowse>
           <!-- 质检报告审批  -->
-          <el-link v-if="row.status == 1 && isReportApproval == 1 && !row.reportApprovalStatus" type="primary" :underline="false" @click="reportApprovalSubmit(row)"
+          <el-link
+            v-if="
+              row.status == 1 &&
+              isReportApproval == 1 &&
+              !row.reportApprovalStatus
+            "
+            type="primary"
+            :underline="false"
+            @click="reportApprovalSubmit(row)"
             >质检报告审批</el-link
           >
 
@@ -176,6 +184,7 @@ import {
   closeWork,
   verificationQualityInspector
 } from '@/api/inspectionWork';
+import { queryTodo } from '@/api/bpm/task';
 import dictMixins from '@/mixins/dictMixins';
 import { getFile } from '@/api/system/file';
 import { getByCode } from '@/api/system/dictionary-data';
@@ -184,7 +193,7 @@ import tabMixins from '@/mixins/tableColumnsMixin';
 import { getCategoryByCode } from '@/api/main/index';
 
 export default {
-  mixins: [dictMixins,tabMixins],
+  mixins: [dictMixins, tabMixins],
   components: {
     search,
     jimureportBrowse,
@@ -410,7 +419,7 @@ export default {
     this.requestDict('质检计划类型');
     this.requestDict('不良品处理类型');
     this.requestDict('取样类型');
-    this.getCode()
+    this.getCode();
     this.getTnspectionPlanType();
     this.getQualityMethodCode();
   },
@@ -497,18 +506,18 @@ export default {
         };
         console.log(this.clientEnvironmentId, 'parathis.clientEnvironmentIdms');
         if (this.clientEnvironmentId == 5) {
-            // 嘉实环境
-            const data = await getCategoryByCode(res.productCode);
+          // 嘉实环境
+          const data = await getCategoryByCode(res.productCode);
 
-            // 判断品类
-            if (data && data.categoryLevelCodePath?.includes('W3-209')) {
-              // 药品
-              params.businessKey = 'qms_report_approval1';
-            } else {
-              // 器械
-              params.businessKey = 'qms_report_approval';
-            }
+          // 判断品类
+          if (data && data.categoryLevelCodePath?.includes('W3-209')) {
+            // 药品
+            params.businessKey = 'qms_report_approval1';
+          } else {
+            // 器械
+            params.businessKey = 'qms_report_approval';
           }
+        }
         this.$refs.processSubmitDialogRef.init(params);
       });
     },
@@ -518,18 +527,22 @@ export default {
         code: 'qms_report_approval'
       }).then((res) => {
         console.log(res, 'qms_report_approval');
-        console
+        console;
         this.isReportApproval = res.value;
-        console.log('isReportApproval', this.isReportApproval)
+        console.log('isReportApproval', this.isReportApproval);
       });
     },
-    datasource({ page, where, limit }) {
+    async datasource({ page, where, limit }) {
+      try {
+        await queryTodo({});
+      } catch (err) {
+        console.error('调用queryTodo失败:', err);
+      }
+
       return getList({
         ...where,
         pageNum: page,
         size: limit
-        // status: 0,
-        // qualityMode:'02'
       });
     },
     search(where) {