Browse Source

退费不退药,管理员可见

xiaochan 1 year ago
parent
commit
2819ae15cd

+ 1 - 1
.env.production

@@ -1,6 +1,6 @@
 ENV = 'production'
 
-VITE_BASE_URL = 'http://172.16.32.160:8077'
+VITE_BASE_URL = 'http://172.16.32.167:8077'
 VITE_SOCKET_URL = 'ws://172.16.32.160:8707/websocket/'
 VITE_EMR_CONTROL_URL = '172.16.32.160:9227'
 VITE_DATA_BASE = 'http://172.16.32.160:9205'

+ 1 - 0
src/App.vue

@@ -25,6 +25,7 @@ import {CyMessageBox} from "@/components/cy/message-box";
 
 const store = useStore()
 
+
 let windowSize = getWindowSize()
 store.commit('app/setWindowSize', windowSize)
 store.commit('app/setJdt', {

+ 8 - 7
src/components/med-tec-mod/RefundForProjectEntry.vue

@@ -22,13 +22,13 @@
                    title="项目可直接退费,只有对应的执行科室可以退费,药品会产生药单,在药房确认退药后会产生退费数据,口服药无法退费。如药房拒绝可再次退费。">
           {{ isDrug ? '退药且退费' : '退费' }}
         </el-button>
-        <!--        <el-button v-if="isDrug"-->
-        <!--                   @click="confirmRefund('refundOnly')"-->
-        <!--                   icon="Delete"-->
-        <!--                   type="warning"-->
-        <!--                   title="只会生成退费的费用,不会产生药单到药房。">-->
-        <!--          仅退费不退药-->
-        <!--        </el-button>-->
+        <el-button v-if="needRule(1)"
+                   @click="confirmRefund('refundOnly')"
+                   icon="Delete"
+                   type="warning"
+                   title="只会生成退费的费用,不会产生药单到药房。">
+          仅退费不退药
+        </el-button>
       </template>
 
       <template #mainMaxContentHeight>
@@ -89,6 +89,7 @@ import {ElMessageBox} from "element-plus";
 import PageLayer from "@/layout/PageLayer";
 import {refund} from "@/api/hospitalization-costs/hospitalization-costs-api";
 import {useVModel} from "@vueuse/core";
+import {needRule} from "@/utils/public";
 
 const props = defineProps({
   modelValue: {

+ 1 - 0
src/main.js

@@ -31,6 +31,7 @@ DomZIndex.getCurrent = () => {
     return useZIndex().currentZIndex.value
 }
 
+
 addRoutes()
 initVxeConfig()
 

+ 4 - 1
src/utils/CyCache.ts

@@ -9,7 +9,6 @@ class CyCache {
     }
 
     async get(key: string, cb: Function) {
-
         if (this.#data.size > this.maxSize) {
             this.#data.clear()
         }
@@ -30,6 +29,10 @@ class CyCache {
         this.maxSize = size;
     }
 
+    clear() {
+        this.#data.clear()
+    }
+
 }
 
 export default CyCache

+ 6 - 0
src/utils/database/magic-api-request.ts

@@ -52,6 +52,12 @@ service.interceptors.response.use((response) => {
         })
         return Promise.reject(response.data)
     }
+
+    if (response.data.code === -3) {
+        xcMessage.warning(response.data.message)
+        return Promise.reject(response.data)
+    }
+
     xcMessage.error(response.data.message)
     return Promise.reject(response.data)
 })

+ 13 - 0
src/utils/request.js

@@ -3,6 +3,7 @@ import {ElMessage, ElMessageBox} from 'element-plus'
 import router from '@/router'
 import store from '@/store'
 import {startLoading, endLoading} from './loading'
+import {CyMessageBox} from "@/components/cy/message-box";
 
 let loginBox = null
 let popUps = null
@@ -70,6 +71,18 @@ service.interceptors.response.use(
             })
             return response.data.data
         }
+        if (response.data.code === 202) {
+            CyMessageBox.alert({
+                type: "success",
+                message: response.data.message,
+                dangerouslyUseHTMLString: true,
+            }).then(() => {
+            }).catch(() => {
+            })
+            response.data.data
+        }
+
+
         if (response.data.code > 1000 && response.data.code < 2000) {
             ElMessage({
                 type: 'error',

+ 38 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/AddShouShu.vue

@@ -8,9 +8,15 @@ import AddShouShuEditor
 import type {OpRecord} from "@/ts-type/op-record";
 import {useZIndex} from "element-plus";
 import {getServerDate} from "@/utils/moment-utils";
-import {yzMitt, shouShuDiagnosis} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {
+  yzMitt,
+  shouShuDiagnosis,
+  huanZheXinXi
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import CyComboGrid from "@/components/cy/combo-grid/src/CyComboGrid.vue";
 import {stringNotBlank} from "@/utils/blank-utils";
+import {magicApi} from "@/utils/database/magic-api-request";
+import {CyMessageBox} from "@/components/cy/message-box";
 
 const initAddData = (): OpRecord => {
   return {
@@ -134,6 +140,7 @@ const nextIndex = () => {
 
 const addClick = async () => {
   clearData()
+  查询术前讨论()
   const now = await getServerDate()
   addData.value.applyDate = now;
   addData.value.opDatetime = now;
@@ -146,11 +153,38 @@ const createMark = () => {
   nextIndex()
 }
 
+yzMitt.on('ssNotSave', () => {
+  return !markShow.value
+})
+
+
+function 查询术前讨论() {
+  magicApi({
+    url: '/intergration/surgery/addShouShu',
+    method: 'get',
+    params: {
+      patNo: huanZheXinXi.value.inpatientNo,
+      times: huanZheXinXi.value.admissTimes,
+    }
+  }).then(res => {
+    CyMessageBox.confirm({
+      message: '检测到有术前讨论是否填充数据',
+    }).then(() => {
+      // @ts-ignore
+      addData.value = {
+        ...addData.value,
+        ...res
+      }
+      changeDiagList()
+      checkOneOpCodeList()
+    }).catch(() => {
+
+    })
+  })
+}
+
 onMounted(() => {
   nextIndex()
-  yzMitt.on('ssNotSave', () => {
-    return !markShow.value
-  })
 })
 </script>