|
@@ -87,6 +87,9 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="dismissBtnText + '申请'" v-model="showSettleApplyForm" width="500px">
|
|
|
+ <div v-if="settleApply.deathFlag" style="margin-bottom: 20px; color: red">
|
|
|
+ 患者已死亡。
|
|
|
+ </div>
|
|
|
<div style="margin-bottom: 20px">
|
|
|
{{ dismissBtnText }}时间:
|
|
|
<el-date-picker
|
|
@@ -159,6 +162,7 @@
|
|
|
<span style="background: orange" class="color-span"></span> 未接收
|
|
|
</el-tag>
|
|
|
<div style="float: right; margin-top: 5px" v-cloak>
|
|
|
+ <el-checkbox v-model="patient.deathFlag">患者已死亡</el-checkbox>
|
|
|
<ReadCard :pat-no="patient.inpatientNo" biztype="01301" @success="afterReadCard"/>
|
|
|
<el-button type="primary" icon="DataAnalysis" @click="doCalFee">费用计算</el-button>
|
|
|
<el-button type="success" icon="Timer" @click="excuteDismiss">{{ dismissBtnText }}</el-button>
|
|
@@ -348,20 +352,18 @@ const confirmSettleApply = () => {
|
|
|
type: 'warning',
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- submitSettleApply(settleApply.value).then((res) => {
|
|
|
- ElMessage({
|
|
|
- message: res,
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
- showSettleApplyForm.value = false
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ }).then(() => {
|
|
|
+ submitSettleApply(settleApply.value).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: res,
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
})
|
|
|
+ showSettleApplyForm.value = false
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const dismissBtnText = computed(() => {
|
|
@@ -378,6 +380,32 @@ const closeActOrder = () => {
|
|
|
dismissCalMsg.value = ''
|
|
|
showActOrders.value = false
|
|
|
}
|
|
|
+const executeDismissCalculate = (midSetl, setlDatetime) => {
|
|
|
+ dismissCalculate(patient.value).then(() => {
|
|
|
+ settleApply.value.patNo = patient.value.inpatientNo
|
|
|
+ settleApply.value.times = patient.value.admissTimes
|
|
|
+ settleApply.value.ledgerSn = patient.value.ledgerSn
|
|
|
+ settleApply.value.type = midSetl ? 2 : 1
|
|
|
+ settleApply.value.settleDatetime = setlDatetime
|
|
|
+ settleApply.value.acctUsedFlag = '0'
|
|
|
+ settleApply.value.deathFlag = patient.value.deathFlag
|
|
|
+ settleApply.value.inputComment = midSetl ? null : '医嘱离院。'
|
|
|
+ showSettleApplyForm.value = true
|
|
|
+ }).catch((res2) => {
|
|
|
+ if (res2.code && res2.code === 1004) {
|
|
|
+ negativeFees.value = res2.data
|
|
|
+ dismissCalMsg.value = res2.message
|
|
|
+ showNegativeFee.value = true
|
|
|
+ } else if (res2.code && res2.code === 1104) {
|
|
|
+ negativeFees.value = res2.data
|
|
|
+ dismissCalMsg.value = res2.message
|
|
|
+ showUnhandledDrugOrder.value = true
|
|
|
+ } else {
|
|
|
+ dismissCalMsg.value = res2.toString()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
const beforeSettle = (midSetl) => {
|
|
|
if (nullPatient()) {
|
|
|
return
|
|
@@ -387,26 +415,20 @@ const beforeSettle = (midSetl) => {
|
|
|
if (null === res.status) {
|
|
|
patient.value.sid = store.getters['user/sid']
|
|
|
patient.value.zjdzDatetime = getDatetime()
|
|
|
- dismissCalculate(patient.value).then(() => {
|
|
|
- settleApply.value.patNo = patient.value.inpatientNo
|
|
|
- settleApply.value.times = patient.value.admissTimes
|
|
|
- settleApply.value.ledgerSn = patient.value.ledgerSn
|
|
|
- settleApply.value.type = midSetl ? 2 : 1
|
|
|
- settleApply.value.settleDatetime = res.settleDatetime
|
|
|
- settleApply.value.acctUsedFlag = '0'
|
|
|
- settleApply.value.inputComment = midSetl ? null : '医嘱离院。'
|
|
|
- showSettleApplyForm.value = true
|
|
|
- }).catch((res2) => {
|
|
|
- if (res2.code && res2.code === 1004) {
|
|
|
- negativeFees.value = res2.data
|
|
|
- dismissCalMsg.value = res2.message
|
|
|
- showNegativeFee.value = true
|
|
|
- } else if (res2.code && res2.code === 1104) {
|
|
|
- negativeFees.value = res2.data
|
|
|
- dismissCalMsg.value = res2.message
|
|
|
- showUnhandledDrugOrder.value = true
|
|
|
- } else {
|
|
|
- dismissCalMsg.value = res2.toString()
|
|
|
+ ElMessageBox.confirm('请确认患者状态:', '提示', {
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '患者未死亡',
|
|
|
+ cancelButtonText: '患者已死亡',
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ closeOnClickModal: false,
|
|
|
+ closeOnPressEscape: false
|
|
|
+ }).then(() => {
|
|
|
+ patient.value.deathFlag = false
|
|
|
+ executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
+ }).catch((action) => {
|
|
|
+ if (action === 'cancel') {
|
|
|
+ patient.value.deathFlag = true
|
|
|
+ executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -418,6 +440,7 @@ const beforeSettle = (midSetl) => {
|
|
|
break
|
|
|
case 1:
|
|
|
patient.value.acctUsedFlag = res.acctUsedFlag
|
|
|
+ patient.value.deathFlag = res.deathFlag
|
|
|
if (res.settleDatetime) {
|
|
|
patient.value.zjdzDatetime = res.settleDatetime
|
|
|
fetchActOrders()
|
|
@@ -441,29 +464,17 @@ const beforeSettle = (midSetl) => {
|
|
|
if (action === 'cancel') {
|
|
|
patient.value.sid = store.getters['user/sid']
|
|
|
patient.value.zjdzDatetime = res.settleDatetime
|
|
|
- dismissCalculate(patient.value)
|
|
|
- .then(() => {
|
|
|
- settleApply.value.patNo = patient.value.inpatientNo
|
|
|
- settleApply.value.times = patient.value.admissTimes
|
|
|
- settleApply.value.ledgerSn = patient.value.ledgerSn
|
|
|
- settleApply.value.type = res.type
|
|
|
- settleApply.value.inputComment = null
|
|
|
- settleApply.value.settleDatetime = res.settleDatetime
|
|
|
- showSettleApplyForm.value = true
|
|
|
- })
|
|
|
- .catch((res) => {
|
|
|
- if (res.code && res.code === 1004) {
|
|
|
- negativeFees.value = res.data
|
|
|
- dismissCalMsg.value = res.message
|
|
|
- showNegativeFee.value = true
|
|
|
- } else if (res.code && res.code === 1104) {
|
|
|
- negativeFees.value = res.data
|
|
|
- dismissCalMsg.value = res.message
|
|
|
- showUnhandledDrugOrder.value = true
|
|
|
- } else {
|
|
|
- dismissCalMsg.value = res.toString()
|
|
|
- }
|
|
|
- })
|
|
|
+ ElMessageBox.confirm('请确认患者状态:', '提示', {
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '患者未死亡',
|
|
|
+ cancelButtonText: '患者已死亡'
|
|
|
+ }).then(() => {
|
|
|
+ patient.value.deathFlag = false
|
|
|
+ executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
+ }).catch(() => {
|
|
|
+ patient.value.deathFlag = true
|
|
|
+ executeDismissCalculate(midSetl, res.settleDatetime)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
break
|