Преглед изворни кода

手术安排已接后推送消息

lighter пре 1 година
родитељ
комит
7d242ad420

+ 8 - 0
src/api/surgical-management/surgery-arrangement.js

@@ -30,3 +30,11 @@ export function updateArrangement(recordId, column, value) {
         params: { recordId, column, value }
     })
 }
+
+export function notifyDoctor(data) {
+    return request({
+        url: '/surgeryArrangement/notifyDoctor',
+        method: 'post',
+        data
+    })
+}

+ 21 - 4
src/views/surgical-management/SurgeryArrangement.vue

@@ -265,18 +265,19 @@ import {
   getDicList,
   selectSurgeryArrangements,
   updateSurgeryStatus,
-  updateArrangement
+  updateArrangement,
+  notifyDoctor
 } from '@/api/surgical-management/surgery-arrangement'
 import {shortcuts} from '@/data/shortcuts.js'
-import {formatDate, formatDatetime, getDateRangeFormatDate, getDateRangeFormatDateTime, getDatetime} from '@/utils/date'
-import {listIsBlank, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
+import {formatDate, formatDatetime, getDateRangeFormatDate} from '@/utils/date'
+import {listIsBlank, stringNotBlank} from '@/utils/blank-utils'
 import store from '@/store'
 import {ElMessage, ElMessageBox} from 'element-plus'
 import PageLayer from '@/layout/PageLayer.vue'
 import Search from '@/components/search/Index.vue'
 import router from '@/router'
 import {initLodop, getLodop} from '@/utils/c-lodop'
-import {refundOrder} from "@/api/wxpay-refund";
+import cyMessageBox from "@/components/cy/message-box/src/cy-message-box";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -389,6 +390,22 @@ const changeArrangementExecuted = (row) => {
   const targetVal = row.arrangementExecuted === 0 ? 1 : 0
   updateArrangement(row.recordId, 'arrangement_executed', targetVal).then(() => {
     currentRow.value.arrangementExecuted = targetVal
+    if (targetVal === 1) {
+      cyMessageBox.confirm({
+        title: '提示',
+        message: '是否向手术医生发送通知?',
+        type: 'warning'
+      }).then(() => {
+        notifyDoctor(row).then((res2) => {
+          ElMessage({
+            message: res2,
+            type: 'success',
+            duration: 2000,
+            showClose: true
+          })
+        })
+      })
+    }
   })
 }