|
@@ -1,32 +1,44 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import {key, ProjectInput} from "@/components/xmlr/index";
|
|
|
|
|
|
+import { key, ProjectInput } from "@/components/xmlr/index";
|
|
import SystemStaffSelect from "@/components/system/staff-select/SystemStaffSelect.vue";
|
|
import SystemStaffSelect from "@/components/system/staff-select/SystemStaffSelect.vue";
|
|
import SystemDeptSelect from "@/components/system/dept-select/SystemDeptSelect.vue";
|
|
import SystemDeptSelect from "@/components/system/dept-select/SystemDeptSelect.vue";
|
|
-import {ElMessageBox} from "element-plus";
|
|
|
|
|
|
+import { ElMessageBox } from "element-plus";
|
|
import XEUtils from "xe-utils";
|
|
import XEUtils from "xe-utils";
|
|
-import {getBingQuDuiYingKeShi, getWard, xiangMuFeiYongShangChuan} from "@/api/inpatient/xiang-mu-lu-ru";
|
|
|
|
-import {useUserStore} from "@/pinia/user-store";
|
|
|
|
-import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
|
-import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
|
|
|
+import {
|
|
|
|
+ getBingQuDuiYingKeShi,
|
|
|
|
+ getWard,
|
|
|
|
+ xiangMuFeiYongShangChuan,
|
|
|
|
+} from "@/api/inpatient/xiang-mu-lu-ru";
|
|
|
|
+import { useUserStore } from "@/pinia/user-store";
|
|
|
|
+import { stringIsBlank, stringNotBlank } from "@/utils/blank-utils";
|
|
|
|
+import { BizException, ExceptionEnum } from "@/utils/BizException";
|
|
import SaveTemplate from "@/components/xmlr/dialog/SaveTemplate.vue";
|
|
import SaveTemplate from "@/components/xmlr/dialog/SaveTemplate.vue";
|
|
-import {useDialog} from "@/components/cy/CyDialog/index";
|
|
|
|
|
|
+import { useDialog } from "@/components/cy/CyDialog/index";
|
|
import NewDialog from "@/components/xmlr/dialog/NewDialog.vue";
|
|
import NewDialog from "@/components/xmlr/dialog/NewDialog.vue";
|
|
-import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
|
|
|
+import { xcMessage } from "@/utils/xiaochan-element-plus";
|
|
import ScanCodeGun from "@/components/xmlr/dialog/ScanCodeGun.vue";
|
|
import ScanCodeGun from "@/components/xmlr/dialog/ScanCodeGun.vue";
|
|
|
|
+import { isDev } from "@/utils/public";
|
|
|
|
|
|
-const {saveData, saveProxy, store, muBanRef, medicalTechnology} = inject(key) as ProjectInput
|
|
|
|
|
|
+const { saveData, saveProxy, store, muBanRef, medicalTechnology } = inject(
|
|
|
|
+ key
|
|
|
|
+) as ProjectInput;
|
|
|
|
|
|
-const wardData = ref([])
|
|
|
|
-const xiaoKeShiList = ref([])
|
|
|
|
|
|
+const wardData = ref([]);
|
|
|
|
+const xiaoKeShiList = ref([]);
|
|
|
|
|
|
-const ssCode = ref('')
|
|
|
|
|
|
+const ssCode = ref("");
|
|
|
|
|
|
const userStore = useUserStore().userInfo;
|
|
const userStore = useUserStore().userInfo;
|
|
|
|
|
|
function handleSave() {
|
|
function handleSave() {
|
|
if (!medicalTechnology) {
|
|
if (!medicalTechnology) {
|
|
- if (store.patInfo.ward !== userStore.deptCode) {
|
|
|
|
- BizException(ExceptionEnum.LOGICAL_ERROR, "患者已不在您所处的科室,无法录入。");
|
|
|
|
|
|
+ if (!isDev) {
|
|
|
|
+ if (store.patInfo.ward !== userStore.deptCode && !isDev) {
|
|
|
|
+ BizException(
|
|
|
|
+ ExceptionEnum.LOGICAL_ERROR,
|
|
|
|
+ "患者已不在您所处的科室,无法录入。"
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -39,13 +51,13 @@ function handleSave() {
|
|
}
|
|
}
|
|
|
|
|
|
if (
|
|
if (
|
|
- operationRoom() &&
|
|
|
|
- stringNotBlank(ssCode.value) &&
|
|
|
|
- !XEUtils.isStringNumber(ssCode.value)
|
|
|
|
|
|
+ operationRoom() &&
|
|
|
|
+ stringNotBlank(ssCode.value) &&
|
|
|
|
+ !XEUtils.isStringNumber(ssCode.value)
|
|
) {
|
|
) {
|
|
BizException(
|
|
BizException(
|
|
- ExceptionEnum.LOGICAL_ERROR,
|
|
|
|
- "手术编码必须纯数字且中间不得有空格。"
|
|
|
|
|
|
+ ExceptionEnum.LOGICAL_ERROR,
|
|
|
|
+ "手术编码必须纯数字且中间不得有空格。"
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -69,52 +81,55 @@ function handleSave() {
|
|
};
|
|
};
|
|
|
|
|
|
ElMessageBox.confirm(
|
|
ElMessageBox.confirm(
|
|
- "共上传【" + saveData.value.length + "】条",
|
|
|
|
- "请认真核对",
|
|
|
|
- {
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- }
|
|
|
|
|
|
+ "共上传【" + saveData.value.length + "】条",
|
|
|
|
+ "请认真核对",
|
|
|
|
+ {
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ }
|
|
).then(() => {
|
|
).then(() => {
|
|
xiangMuFeiYongShangChuan(shangChuanFeiYong).then(() => {
|
|
xiangMuFeiYongShangChuan(shangChuanFeiYong).then(() => {
|
|
saveProxy.clear();
|
|
saveProxy.clear();
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
-function handleDeptCode({row}) {
|
|
|
|
- ElMessageBox.confirm(`是否把项目的执行科室全部选为【${row.name}】`, '提示').then(() => {
|
|
|
|
- saveData.value.forEach(value => {
|
|
|
|
- value.deptCode = row.code
|
|
|
|
|
|
+function handleDeptCode({ row }) {
|
|
|
|
+ ElMessageBox.confirm(`是否把项目的执行科室全部选为【${row.name}】`, "提示")
|
|
|
|
+ .then(() => {
|
|
|
|
+ saveData.value.forEach(value => {
|
|
|
|
+ value.deptCode = row.code;
|
|
|
|
+ });
|
|
})
|
|
})
|
|
- }).catch(XEUtils.noop)
|
|
|
|
|
|
+ .catch(XEUtils.noop);
|
|
}
|
|
}
|
|
|
|
|
|
-function handleDoctor({row}) {
|
|
|
|
- ElMessageBox.confirm(`是否把项目的医生全部选为【${row.name}】`, '提示').then(() => {
|
|
|
|
- saveData.value.forEach(value => {
|
|
|
|
- value.doctorCode = row.code
|
|
|
|
|
|
+function handleDoctor({ row }) {
|
|
|
|
+ ElMessageBox.confirm(`是否把项目的医生全部选为【${row.name}】`, "提示")
|
|
|
|
+ .then(() => {
|
|
|
|
+ saveData.value.forEach(value => {
|
|
|
|
+ value.doctorCode = row.code;
|
|
|
|
+ });
|
|
})
|
|
})
|
|
- }).catch(XEUtils.noop)
|
|
|
|
|
|
+ .catch(XEUtils.noop);
|
|
}
|
|
}
|
|
|
|
|
|
function getBingQuDuiYingKeShiChange() {
|
|
function getBingQuDuiYingKeShiChange() {
|
|
getBingQuDuiYingKeShi(store.queryWard).then(res => {
|
|
getBingQuDuiYingKeShi(store.queryWard).then(res => {
|
|
xiaoKeShiList.value = res as any[];
|
|
xiaoKeShiList.value = res as any[];
|
|
});
|
|
});
|
|
- store.queryDept = ''
|
|
|
|
|
|
+ store.queryDept = "";
|
|
}
|
|
}
|
|
|
|
|
|
function getSummaries(param) {
|
|
function getSummaries(param) {
|
|
- const {data} = param
|
|
|
|
|
|
+ const { data } = param;
|
|
let sum = 0;
|
|
let sum = 0;
|
|
data.forEach(value => {
|
|
data.forEach(value => {
|
|
- sum += (value.chargeAmount * value.amount)
|
|
|
|
- })
|
|
|
|
- return ['', '', sum];
|
|
|
|
|
|
+ sum += value.chargeAmount * value.amount;
|
|
|
|
+ });
|
|
|
|
+ return ["", "", sum];
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
function operationRoom() {
|
|
function operationRoom() {
|
|
let dept = userStore.deptCode;
|
|
let dept = userStore.deptCode;
|
|
return dept === "1300000";
|
|
return dept === "1300000";
|
|
@@ -122,7 +137,7 @@ function operationRoom() {
|
|
|
|
|
|
function handleSaveTemplate() {
|
|
function handleSaveTemplate() {
|
|
if (saveData.value.length === 0) {
|
|
if (saveData.value.length === 0) {
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
useDialog(SaveTemplate, {
|
|
useDialog(SaveTemplate, {
|
|
dialogProps: {
|
|
dialogProps: {
|
|
@@ -130,29 +145,31 @@ function handleSaveTemplate() {
|
|
},
|
|
},
|
|
params: {
|
|
params: {
|
|
data: saveData.value,
|
|
data: saveData.value,
|
|
- }
|
|
|
|
|
|
+ },
|
|
}).then(() => {
|
|
}).then(() => {
|
|
muBanRef.value?.reloadData();
|
|
muBanRef.value?.reloadData();
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
function openNewDialog() {
|
|
function openNewDialog() {
|
|
useDialog(NewDialog, {
|
|
useDialog(NewDialog, {
|
|
dialogProps: {
|
|
dialogProps: {
|
|
title: "新增",
|
|
title: "新增",
|
|
- width: "90vw"
|
|
|
|
|
|
+ width: "90vw",
|
|
},
|
|
},
|
|
params: {
|
|
params: {
|
|
medicalTechnology,
|
|
medicalTechnology,
|
|
add(val) {
|
|
add(val) {
|
|
if (stringIsBlank(val.deptCode)) {
|
|
if (stringIsBlank(val.deptCode)) {
|
|
- val.deptCode = userStore.deptCode;
|
|
|
|
|
|
+ val.deptCode = medicalTechnology
|
|
|
|
+ ? userStore.deptCode
|
|
|
|
+ : store.patInfo.zkWard;
|
|
}
|
|
}
|
|
saveProxy.push(val);
|
|
saveProxy.push(val);
|
|
- xcMessage.success('添加成功')
|
|
|
|
|
|
+ xcMessage.success("添加成功");
|
|
},
|
|
},
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
function openScanCodeGun() {
|
|
function openScanCodeGun() {
|
|
@@ -162,38 +179,46 @@ function openScanCodeGun() {
|
|
closeOnClickModal: false,
|
|
closeOnClickModal: false,
|
|
closeOnPressEscape: false,
|
|
closeOnPressEscape: false,
|
|
showClose: false,
|
|
showClose: false,
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getWard().then(res => {
|
|
getWard().then(res => {
|
|
wardData.value = res as any[];
|
|
wardData.value = res as any[];
|
|
});
|
|
});
|
|
-})
|
|
|
|
|
|
+});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
<div class="layout_container" style="padding-left: 5px">
|
|
<div class="layout_container" style="padding-left: 5px">
|
|
<header>
|
|
<header>
|
|
- <el-button icon="Document" type="warning" @click="handleSaveTemplate">存模板</el-button>
|
|
|
|
- <el-button icon="Upload" type="primary" @click="handleSave">保存</el-button>
|
|
|
|
- <el-button icon="Plus" type="success" @click="openNewDialog">新增</el-button>
|
|
|
|
- <el-button icon="Tickets" type="info" @click="openScanCodeGun">扫码枪</el-button>
|
|
|
|
|
|
+ <el-button icon="Document" type="warning" @click="handleSaveTemplate"
|
|
|
|
+ >存模板</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button icon="Upload" type="primary" @click="handleSave"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button icon="Plus" type="success" @click="openNewDialog"
|
|
|
|
+ >新增</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button icon="Tickets" type="info" @click="openScanCodeGun"
|
|
|
|
+ >扫码枪</el-button
|
|
|
|
+ >
|
|
<template v-if="medicalTechnology">
|
|
<template v-if="medicalTechnology">
|
|
病区:
|
|
病区:
|
|
<el-select
|
|
<el-select
|
|
- v-model="store.queryWard"
|
|
|
|
- filterable
|
|
|
|
- clearable
|
|
|
|
- style="width: 120px"
|
|
|
|
- @change="getBingQuDuiYingKeShiChange"
|
|
|
|
|
|
+ v-model="store.queryWard"
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 120px"
|
|
|
|
+ @change="getBingQuDuiYingKeShiChange"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in wardData"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+ v-for="item in wardData"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
>
|
|
>
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
<el-divider direction="vertical"></el-divider>
|
|
<el-divider direction="vertical"></el-divider>
|
|
@@ -201,12 +226,17 @@ onMounted(() => {
|
|
>
|
|
>
|
|
</el-select>
|
|
</el-select>
|
|
小科室:
|
|
小科室:
|
|
- <el-select v-model="store.queryDept" filterable style="width: 120px" clearable>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="store.queryDept"
|
|
|
|
+ filterable
|
|
|
|
+ style="width: 120px"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in xiaoKeShiList"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+ v-for="item in xiaoKeShiList"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
>
|
|
>
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
<el-divider direction="vertical"></el-divider>
|
|
<el-divider direction="vertical"></el-divider>
|
|
@@ -214,56 +244,68 @@ onMounted(() => {
|
|
>
|
|
>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
- <template
|
|
|
|
- v-if="operationRoom()"
|
|
|
|
- >
|
|
|
|
|
|
+ <template v-if="operationRoom()">
|
|
手术编码:
|
|
手术编码:
|
|
<el-input
|
|
<el-input
|
|
- v-model="ssCode"
|
|
|
|
- @blur="ssCode = ssCode.trim()"
|
|
|
|
- clearable
|
|
|
|
- placeholder="请输入手术编码"
|
|
|
|
- style="width: 120px"
|
|
|
|
|
|
+ v-model="ssCode"
|
|
|
|
+ @blur="ssCode = ssCode.trim()"
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请输入手术编码"
|
|
|
|
+ style="width: 120px"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</header>
|
|
</header>
|
|
<div class="layout_main">
|
|
<div class="layout_main">
|
|
- <el-table :data="saveData" border show-summary
|
|
|
|
- :summary-method="getSummaries"
|
|
|
|
- max-height="100%"
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ :data="saveData"
|
|
|
|
+ border
|
|
|
|
+ show-summary
|
|
|
|
+ :summary-method="getSummaries"
|
|
|
|
+ max-height="100%"
|
|
>
|
|
>
|
|
<el-table-column label="是否自费" width="130">
|
|
<el-table-column label="是否自费" width="130">
|
|
- <template #default="{row}">
|
|
|
|
|
|
+ <template #default="{ row }">
|
|
<el-switch
|
|
<el-switch
|
|
- v-model="row.ybSelfFlag"
|
|
|
|
- :active-value="1"
|
|
|
|
- :inactive-value="0"
|
|
|
|
- active-color="#ff4949"
|
|
|
|
- active-text="自费"
|
|
|
|
- inactive-color="#13ce66"
|
|
|
|
- inactive-text="医保"/>
|
|
|
|
|
|
+ v-model="row.ybSelfFlag"
|
|
|
|
+ :active-value="1"
|
|
|
|
+ :inactive-value="0"
|
|
|
|
+ active-color="#ff4949"
|
|
|
|
+ active-text="自费"
|
|
|
|
+ inactive-color="#13ce66"
|
|
|
|
+ inactive-text="医保"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="医生" width="89px">
|
|
<el-table-column label="医生" width="89px">
|
|
- <template #default="{row}">
|
|
|
|
- <SystemStaffSelect style="width: 80px" clearable v-model="row.doctorCode" @rowClick="handleDoctor"/>
|
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <SystemStaffSelect
|
|
|
|
+ style="width: 80px"
|
|
|
|
+ clearable
|
|
|
|
+ v-model="row.doctorCode"
|
|
|
|
+ @rowClick="handleDoctor"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="项目编码" width="75" prop="chargeCodeMx"/>
|
|
|
|
- <el-table-column label="名称" prop="chargeName" min-width="50"/>
|
|
|
|
|
|
+ <el-table-column label="项目编码" width="75" prop="chargeCodeMx" />
|
|
|
|
+ <el-table-column label="名称" prop="chargeName" min-width="50" />
|
|
<el-table-column label="执行科室" prop="deptCode" width="150">
|
|
<el-table-column label="执行科室" prop="deptCode" width="150">
|
|
- <template #default="{row}">
|
|
|
|
- <SystemDeptSelect style="width: 90%" clearable v-model="row.deptCode" @rowClick="handleDeptCode"/>
|
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <SystemDeptSelect
|
|
|
|
+ style="width: 90%"
|
|
|
|
+ clearable
|
|
|
|
+ v-model="row.deptCode"
|
|
|
|
+ @rowClick="handleDeptCode"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="单价" prop="chargeAmount" width="50"/>
|
|
|
|
|
|
+ <el-table-column label="单价" prop="chargeAmount" width="50" />
|
|
<el-table-column label="数量" prop="amount" width="130">
|
|
<el-table-column label="数量" prop="amount" width="130">
|
|
- <template #default="{row}">
|
|
|
|
|
|
+ <template #default="{ row }">
|
|
<el-input-number
|
|
<el-input-number
|
|
- v-model="row.amount"
|
|
|
|
- :min="0"
|
|
|
|
- :precision="row.serial === '00' ? 2 : 3"
|
|
|
|
- style="width: 120px"
|
|
|
|
|
|
+ v-model="row.amount"
|
|
|
|
+ :min="0"
|
|
|
|
+ :precision="row.serial === '00' ? 2 : 3"
|
|
|
|
+ style="width: 120px"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -272,12 +314,15 @@ onMounted(() => {
|
|
{{ (scope.row.chargeAmount * scope.row.amount).toFixed(2) }}
|
|
{{ (scope.row.chargeAmount * scope.row.amount).toFixed(2) }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="账单码" prop="billItemName" width="50"></el-table-column>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="账单码"
|
|
|
|
+ prop="billItemName"
|
|
|
|
+ width="50"
|
|
|
|
+ ></el-table-column>
|
|
<el-table-column label="操作" fixed="right" width="60">
|
|
<el-table-column label="操作" fixed="right" width="60">
|
|
- <template #default="{$index}">
|
|
|
|
- <el-button
|
|
|
|
- type="danger"
|
|
|
|
- @click=" () => saveData.splice($index , 1)">删除
|
|
|
|
|
|
+ <template #default="{ $index }">
|
|
|
|
+ <el-button type="danger" @click="() => saveData.splice($index, 1)"
|
|
|
|
+ >删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|