Browse Source

电子处方撤销上传添加确认提示,已撤销的电子处方可以重新预核验

lighter 10 months ago
parent
commit
b7b7d2e79e

+ 3 - 2
src/api/medical-insurance/si-outpatient.js

@@ -152,10 +152,11 @@ export function rxPreCheck(data) {
   })
 }
 
-export function getRxIndex() {
+export function getRxIndex(data) {
   return request({
     url: '/siMz/getRxIndex',
-    method: 'get',
+    method: 'post',
+    data
   })
 }
 

+ 53 - 14
src/views/medical-insurance/outpatient/DigitalRx.vue

@@ -2,8 +2,24 @@
   <div class="layout_container layout-horizontal digital-rx">
     <aside class="layout_el-table">
       <div class="rx-list-header">
-        电子处方列表&nbsp;&nbsp;
-        <el-button circle icon="Refresh" title="重新获取" @click="refreshRxList"></el-button>
+        <CyDateRange style="width: 220px" />
+        <el-select v-model="indexInquiry.state" style="width: 100px">
+          <el-option
+              v-for="item in allState"
+              :value="item.code"
+              :key="item.code"
+              :label="item.label"
+          ></el-option>
+        </el-select>
+        <el-divider direction="vertical"></el-divider>
+        <el-button
+            plain
+            circle
+            type="primary"
+            icon="Search"
+            title="检索"
+            @click="refreshRxList"
+        ></el-button>
       </div>
       <el-table :data="rxList" stripe highlight-current-row @row-click="handleClickRow">
         <el-table-column prop="patnName" label="患者姓名" width="90"></el-table-column>
@@ -21,7 +37,7 @@
         <el-button
             type="primary"
             @click="doPreCheck"
-            :disabled="currentRow.state !== 'NEW_RECEIPT'"
+            :disabled="currentRow.state !== 'NEW_RECEIPT' && currentRow.state !== 'REVOKED'"
         >处方预核验</el-button>
         <el-button
             type="primary"
@@ -37,27 +53,27 @@
             type="primary"
             @click="doRxInfoQuery"
             :disabled="currentRow.state !== 'UPLOADED'"
-        >处方信息查询</el-button>
+        >处方查询</el-button>
         <el-button
             type="primary"
             @click="doRxAuditingQuery"
             :disabled="currentRow.state !== 'UPLOADED'"
-        >处方审核查询</el-button>
+        >审核查询</el-button>
         <el-button
             type="primary"
             @click="doRxSettleQuery"
             :disabled="currentRow.state !== 'UPLOADED'"
-        >处方结算查询</el-button>
+        >结算查询</el-button>
         <el-button
             type="danger"
             @click="doRxRevoke"
             :disabled="currentRow.state !== 'UPLOADED'"
-        >撤销处方上传</el-button>
+        >撤销上传</el-button>
         <el-button
             type="danger"
             @click="doRegRevoke"
             :disabled="currentRow.state !== 'NEW_RECEIPT'"
-        >撤销医保登记(限门诊)</el-button>
+        >撤销门诊登记)</el-button>
       </header>
       <div class="layout_main">
         <iframe class="layout_full_iframe" :src="pdfSrc" />
@@ -140,6 +156,7 @@ import {
 } from "@/api/medical-insurance/si-outpatient";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import {ElMessageBox} from "element-plus";
+import useDateRange from "@/utils/cy-use/useDateRange";
 
 const rxList = ref([])
 
@@ -151,6 +168,16 @@ const rxFromQuery = ref({
   rxDetlList: []
 })
 
+const allState = [
+  { code: 'ALL', label: '全部'},
+  { code: 'NEW_RECEIPT', label: '待预核验'},
+  { code: 'PRE_CHECKED', label: '待签名'},
+  { code: 'SIGNED', label: '待上传'},
+  { code: 'UPLOADED', label: '已上传'},
+  { code: 'REVOKED', label: '已撤销'},
+  { code: 'SETTLED', label: '已取药'},
+]
+
 function filterRxState(state) {
   switch (state) {
     case 'NEW_RECEIPT':
@@ -254,11 +281,15 @@ function doRxSettleQuery() {
 }
 
 function doRxRevoke() {
-  rxRevoke({
-    hospRxno: currentRow.value.hospRxno,
-  }).then(res => {
-    xcMessage.success("处方撤销成功。")
-    currentRow.value.state = 'REVOKED'
+  ElMessageBox.confirm('确定要撤销处方上传吗?', '提示', {
+    type: 'warning',
+  }).then(() => {
+    rxRevoke({
+      hospRxno: currentRow.value.hospRxno,
+    }).then(res => {
+      xcMessage.success("处方撤销成功。")
+      currentRow.value.state = 'REVOKED'
+    })
   })
 }
 
@@ -270,8 +301,16 @@ function doRegRevoke() {
   })
 }
 
+const {CyDateRange, dateRange} = useDateRange({shortcutsIndex: 4, clearable: false})
+const indexInquiry = reactive({
+  begintime: null,
+  endtime: null,
+  state: 'ALL'
+})
 function refreshRxList() {
-  getRxIndex().then(res => {
+  indexInquiry.begintime = dateRange.value.start;
+  indexInquiry.endtime = dateRange.value.end
+  getRxIndex(indexInquiry).then(res => {
     rxList.value = res
   })
 }