Compare commits

..

No commits in common. "d673a634904f8c03eafa29b986993b76ec8b54ef" and "032ffd1383ea41fb7ed3f639d9b5a3822d4b9679" have entirely different histories.

3 changed files with 18 additions and 67 deletions

View File

@ -166,7 +166,6 @@ const getTipCount = () => {
}).then((res: any) => { }).then((res: any) => {
statusList.value[0].num = res.unchargedCount statusList.value[0].num = res.unchargedCount
statusList.value[1].num = res.chargedCount statusList.value[1].num = res.chargedCount
statusList.value[2].num = res.refundedCount
}) })
} }

View File

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import Panel from '../common/Panel.vue'; import Panel from '../common/Panel.vue';
import {defineEmits, defineModel,defineProps} from 'vue' import {defineEmits, defineModel,defineProps} from 'vue'
import {ElMessageBox} from "element-plus";
const {status}=defineProps(['status']) const {status}=defineProps(['status'])
const emit = defineEmits(['save','deleteItem','openCheckOut',"openSettlement","print","refund"]); const emit = defineEmits(['save','deleteItem','openCheckOut',"openSettlement","print","refund"]);
@ -18,24 +17,6 @@ const openCheckOut = () => {
const openSettlement =()=>{ const openSettlement =()=>{
emit('openSettlement') emit('openSettlement')
} }
const refund = () => {
ElMessageBox.confirm(
'退款后不能撤销,确定要继续退款吗?',
'Warning',
{
confirmButtonText: '继续退款',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
emit('refund')
})
}
const print = () => {
emit('print')
}
</script> </script>
<template> <template>
@ -45,8 +26,8 @@ const print = () => {
<div class="btn-group"> <div class="btn-group">
<span class="default-btn" @click="openCheckOut" v-if="status ==0">追溯码</span> <span class="default-btn" @click="openCheckOut" v-if="status ==0">追溯码</span>
<span class="default-btn" @click="openSettlement" style="margin-left: 24px" v-if="status ==0">收费</span> <span class="default-btn" @click="openSettlement" style="margin-left: 24px" v-if="status ==0">收费</span>
<span class="default-btn" @click="print" v-if="status ==1">打印</span> <span class="default-btn" @click="" v-if="status ==1 || status == 2">打印</span>
<span class="default-btn" @click="refund" style="margin-left: 24px" v-if="status ==1">退费</span> <span class="default-btn" @click="" style="margin-left: 24px" v-if="status ==1">退费</span>
</div> </div>
</div> </div>
</Panel> </Panel>
@ -62,16 +43,13 @@ const print = () => {
color: #333333; color: #333333;
font-style: normal; font-style: normal;
padding:0 24px 0 24px; padding:0 24px 0 24px;
.icon{ .icon{
font-size: 16px; font-size: 16px;
} }
.text { .text {
color: #FF282E color: #FF282E
} }
} }
.btn-group{ .btn-group{
span{ span{
display: inline-block; display: inline-block;

View File

@ -60,8 +60,6 @@
:status="formData.status" :status="formData.status"
@openSettlement="charge" @openSettlement="charge"
@openCheckOut="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)" @openCheckOut="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"
@refund="refund"
@print="printReceiptDo"
></TotalPrice> ></TotalPrice>
</div> </div>
@ -175,7 +173,7 @@ const openCheckoutDetail = (goodsList: any[], psnNo: string) => {
const saveAndCharge = () => { const saveAndCharge = () => {
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => { post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
formData.value.orderCode = res formData.value.code = res
nextTick(() => { nextTick(() => {
settlementRef.value?.init(res, formData.value.patientRegistration.psnNo) settlementRef.value?.init(res, formData.value.patientRegistration.psnNo)
}) })
@ -245,16 +243,12 @@ const orderCompleted = (printReceipt: any) => {
type MedTypeKey = keyof typeof medTypeJson; type MedTypeKey = keyof typeof medTypeJson;
const wsStore = useWsStore() const wsStore = useWsStore()
const printReceiptDo = async () => { const printReceiptDo = () => {
if (!formData.value.code) {
let chargeOrder:any = await post("charge/getOrderByDiagnosisCode", {
diagnosisCode: formData.value.code,
status: formData.value.status
})
if (!chargeOrder) {
ElMessage.error("该订单不存在")
return return
} }
let code = formData.value.code;
const printConfig = {} as any; const printConfig = {} as any;
post("common/config/getPrintConfig").then((res: any) => { post("common/config/getPrintConfig").then((res: any) => {
printConfig.printName = res.printName printConfig.printName = res.printName
@ -263,7 +257,7 @@ const printReceiptDo = async () => {
ElMessage.error("打印机未设置,请先到设置-打印管理中设置") ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
return; return;
} }
post("charge/getPrintInfoByCode", {code: chargeOrder.code}).then((res: any) => { post("charge/getPrintInfoByCode", {code}).then((res: any) => {
res.printerName = printConfig.printName res.printerName = printConfig.printName
res.pageType = printConfig.pageType res.pageType = printConfig.pageType
if (res.chargeSocialPayLog) { if (res.chargeSocialPayLog) {
@ -349,27 +343,7 @@ const getStatus = (status: any) => {
patientRegistration: {} patientRegistration: {}
} }
} }
//退
const refund = async () => {
if (!formData.value.code) {
ElMessage.error("请先选择要退费的订单")
return
}
let chargeOrder:any = await post("charge/getOrderByDiagnosisCode", {
diagnosisCode: formData.value.code,
status: formData.value.status
})
if (!chargeOrder) {
ElMessage.error("该订单不存在")
return
}
await post("charge/refund", {changeOrderCode: chargeOrder.code})
ElMessage.success("退费成功")
initFormData()
nextTick(() => {
chargeQueueRef.value?.init()
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">