Sfoglia il codice sorgente

益兽园医生确认处方

xdd 1 mese fa
parent
commit
d640d07069
2 ha cambiato i file con 35 aggiunte e 2 eliminazioni
  1. 14 0
      src/api/his/prescribe.js
  2. 21 2
      src/views/his/prescribe/index.vue

+ 14 - 0
src/api/his/prescribe.js

@@ -11,6 +11,20 @@ export function listPrescribe(query) {
   })
 }
 
+/**
+ * 确认处方
+ * @param payload
+ * @returns {*}
+ */
+export function confirmPrescribe(payload) {
+
+  return request({
+    url: '/his/prescribe/confirmPrescribe',
+    method: 'post',
+    params: payload
+  })
+}
+
 // 查询处方详细
 export function getPrescribe(prescribeId) {
   return request({

+ 21 - 2
src/views/his/prescribe/index.vue

@@ -329,7 +329,16 @@
   </div>
 </template>
 <script>
-import { listPrescribe, getPrescribe, delPrescribe, addPrescribe, updatePrescribe, exportPrescribe, exportMessageFeedback } from "@/api/his/prescribe";
+import {
+  listPrescribe,
+  getPrescribe,
+  delPrescribe,
+  addPrescribe,
+  updatePrescribe,
+  exportPrescribe,
+  exportMessageFeedback,
+  confirmPrescribe
+} from '@/api/his/prescribe'
 import { listPrescribeDrug, addPrescribeDrug, updatePrescribeDrug, deletePrescribeDrug } from "@/api/his/prescribeDrug";
 export default {
   name: "Prescribe",
@@ -429,7 +438,7 @@ export default {
       this.loading = true;
       let userId = this.$store.state.user.userId;
       let query = this.addDateRange(this.queryParams, this.dateRange, 'Create');
-      // query.doctorId = userId.toString().replaceAll("D-","").toString();
+      query.doctorId = userId.toString().replaceAll("D-","").toString();
       listPrescribe(query).then(response => {
         this.prescribeList = response.rows;
         this.total = response.total;
@@ -513,6 +522,16 @@ export default {
       });
     },
     confirmPrescribe(){
+      confirmPrescribe(this.form).then(response => {
+        if(response.code === 200) {
+          this.$message.success("确认成功!");
+          this.open = false;
+        } else {
+          this.$message.error(response.message);
+        }
+      }).finally(()=>{
+        this.getList();
+      })
 
     },
     /** 提交按钮操作 */