Răsfoiți Sursa

放行单提交审核区分分类

lucw 8 luni în urmă
părinte
comite
99cc76cd40
3 a modificat fișierele cu 33 adăugiri și 6 ștergeri
  1. 9 1
      src/api/main/index.js
  2. 22 3
      src/views/checklistManagement/checklist.vue
  3. 2 2
      vue.config.js

+ 9 - 1
src/api/main/index.js

@@ -59,7 +59,6 @@ export async function getIndicatorRootNodeList() {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 获取指标类型列表 /main/indicatorManage/getIndicatorTypeList
 export async function getIndicatorUseLevel() {
   const res = await request.post(`/main/indicator/getIndicatorUseLevel`);
@@ -68,3 +67,12 @@ export async function getIndicatorUseLevel() {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// /main/category/getByCode/{code}
+export async function getCategoryByCode(code) {
+  const res = await request.get(`/main/category/getByCode/${code}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 22 - 3
src/views/checklistManagement/checklist.vue

@@ -71,6 +71,7 @@
   import checkAdd from './components/checkAdd.vue';
   import checkDetails from './components/checkDetails.vue';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
+  import { getCategoryByCode } from '@/api/main/index';
 
   export default {
     mixins: [dictMixins, tableColumnsMixin],
@@ -242,6 +243,9 @@
             ]
           }
         ];
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
     methods: {
@@ -288,8 +292,8 @@
       // 提交审批
       openApproval(row) {
         console.log('row', row);
-        this.processSubmitDialogFlag = true;
-        this.$nextTick(() => {
+        // this.processSubmitDialogFlag = true;
+        this.$nextTick(async () => {
           let params = {
             businessId: row.id,
             businessKey: 'work_order_checklist_approval',
@@ -298,7 +302,22 @@
               businessCode: row.code
             }
           };
-          console.log('1', 1);
+
+          if (this.clientEnvironmentId == 5) {
+            // 嘉实环境
+            const data = await getCategoryByCode(row.orders[0]?.productCode);
+
+            // 判断品类
+            if (data && data.categoryLevelCodePath?.includes('W3-209')) {
+              // 药品
+              params.businessKey = 'work_order_checklist_approval1';
+            } else {
+              // 器械
+              params.businessKey = 'work_order_checklist_approval';
+            }
+          }
+
+          console.log('params', params);
           this.$refs.processSubmitDialogRef.init(params);
         });
       }

+ 2 - 2
vue.config.js

@@ -34,11 +34,11 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // 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.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.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',