소스 검색

存为协定方,直接赋值不调转换接口

cc12458 1 년 전
부모
커밋
cb0b37a9be
2개의 변경된 파일10개의 추가작업 그리고 7개의 파일을 삭제
  1. 5 0
      src/api/diagnosis.js
  2. 5 7
      src/views/business/AccordEdit.vue

+ 5 - 0
src/api/diagnosis.js

@@ -210,6 +210,11 @@ export function getPharmacyID(data) {
 
 // 切换药房 id
 export function changePharmacy(data) {
+    if (data && Array.isArray(data.drugIds) && data.drugIds.length === 0) return Promise.resolve({
+        "Data": [],
+        "ResultInfo": "操作成功",
+        "ResultCode": 0
+    });
     return request({
         url: '/test/outpatient/changeDrug',
         method: 'post',

+ 5 - 7
src/views/business/AccordEdit.vue

@@ -395,6 +395,7 @@ export default {
           page: 1,
           loadMore: true,
           usageList: this.useList,
+          color: item1.color || '',
           id: item1.seqn || item1.id,
           name: item1.drugname || item1.name,
           spec: item1.specification || item1.spec, // 规格
@@ -439,16 +440,13 @@ export default {
 
         let data1 = children[0];
 
+        data1.changePharmacy(
+          data1.recipe_tabs[data1.recipe_tabs_c].lastType,
+          type
+        );
         data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = this.totalTableD;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData = this.tableData;
         data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = this.tableData1;
-
-        setTimeout(() => {
-          data1.changePharmacy(
-            data1.recipe_tabs[data1.recipe_tabs_c].lastType,
-            type
-          );
-        }, 500);
       }, 1000);
     },