Prechádzať zdrojové kódy

医生端优化拒方列表处理逻辑

cgp 1 týždeň pred
rodič
commit
7e415cfc83
2 zmenil súbory, kde vykonal 11 pridanie a 9 odobranie
  1. 1 1
      src/api/his/prescribe.js
  2. 10 8
      src/views/his/refuse/index.vue

+ 1 - 1
src/api/his/prescribe.js

@@ -26,7 +26,7 @@ export function confirmPrescribe(payload) {
 }
 
 
-// 查询处方列表
+// 查询处方列表-个微采集信息(后付款版本)
 export function waitPrescribeAfterPaymentList(query) {
 
   return request({

+ 10 - 8
src/views/his/refuse/index.vue

@@ -86,7 +86,7 @@
       <!-- 处方图片  医生确认过的处方过才展示 否则都展示为空 v-if="scope.row.doctorConfirm == 1"  -->
       <el-table-column label="处方图片" align="center" prop="prescribePic">
         <template slot-scope="scope">
-          <el-image v-if="scope.row.doctorConfirm == 1"
+          <el-image v-if="scope.row.doctorConfirm == 1 && scope.row.prescribeImgUrl"
                     style="width: 100px; height: 100px"
                     :src="scope.row.prescribeImgUrl"
                     :preview-src-list="[scope.row.prescribeImgUrl]">
@@ -303,7 +303,8 @@ import {
   updatePrescribe,
   exportPrescribe,
   exportMessageFeedback,
-  confirmPrescribe
+  confirmPrescribe,
+  confirmPrescribeAfterPayment
 } from '@/api/his/prescribe'
 import { listPrescribeDrug, addPrescribeDrug, updatePrescribeDrug, deletePrescribeDrug } from "@/api/his/prescribeDrug";
 import collectionDetail from "@/views/components/collection/collectionDetail.vue";
@@ -490,6 +491,7 @@ export default {
 
       getPrescribe(prescribeId).then(response => {
         this.form = response.data;
+        this.form.qwTag = row.qwTag;//从所在行赋值qwTag
         //根据historyAllergic设置isHistoryAllergic
         if (this.form.historyAllergic) {
           // 如果historyAllergic有值,设置为"是"
@@ -515,7 +517,10 @@ export default {
 
           //这里应该临时设置为 0 因为确认处方后 status 应该为0了 这里没有从数据库取最新的status
           this.form.status = 0;
-          confirmPrescribe(this.form).then(response => {
+          // 根据 qwTag 选择接口
+          console.log("this.form.qwTag:",this.form.qwTag)
+          const apiCall = this.form.qwTag === 1 ? confirmPrescribeAfterPayment : confirmPrescribe;
+          apiCall(this.form).then(response => {
             if (response.code === 200) {
               console.log('提交的处方数据:', this.form);
               this.submitForm();
@@ -530,12 +535,9 @@ export default {
               this.form.status = originalStatus;
             }
             this.getList();
-          })
+          });
         }
-
-      })
-
-
+      });
     },
     /** 提交按钮操作 */
     submitForm() {