dev
This commit is contained in:
parent
cb2904e7b6
commit
9fde1b41e8
|
|
@ -167,6 +167,7 @@ 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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
<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"]);
|
||||||
const save = () => {
|
const save = () => {
|
||||||
emit('save');
|
emit('save');
|
||||||
};
|
};
|
||||||
|
|
@ -11,12 +12,30 @@ const deleteItem = () => {
|
||||||
emit('deleteItem');
|
emit('deleteItem');
|
||||||
};
|
};
|
||||||
const totalAmount = defineModel<any>()
|
const totalAmount = defineModel<any>()
|
||||||
const openCheckOut= () => {
|
const openCheckOut = () => {
|
||||||
emit('openCheckOut');
|
emit('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>
|
||||||
|
|
@ -26,8 +45,8 @@ const openSettlement =()=>{
|
||||||
<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="" v-if="status ==1 || status == 2">打印</span>
|
<span class="default-btn" @click="print" v-if="status ==1">打印</span>
|
||||||
<span class="default-btn" @click="" style="margin-left: 24px" v-if="status ==1">退费</span>
|
<span class="default-btn" @click="refund" style="margin-left: 24px" v-if="status ==1">退费</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
@ -42,16 +61,19 @@ const openSettlement =()=>{
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
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{
|
|
||||||
span{
|
.btn-group {
|
||||||
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 119px;
|
width: 119px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@
|
||||||
: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>
|
||||||
|
|
@ -173,7 +175,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.code = res
|
formData.value.orderCode = res
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
settlementRef.value?.init(res, formData.value.patientRegistration.psnNo)
|
settlementRef.value?.init(res, formData.value.patientRegistration.psnNo)
|
||||||
})
|
})
|
||||||
|
|
@ -243,12 +245,16 @@ const orderCompleted = (printReceipt: any) => {
|
||||||
|
|
||||||
type MedTypeKey = keyof typeof medTypeJson;
|
type MedTypeKey = keyof typeof medTypeJson;
|
||||||
const wsStore = useWsStore()
|
const wsStore = useWsStore()
|
||||||
const printReceiptDo = () => {
|
const printReceiptDo = async () => {
|
||||||
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
|
||||||
|
|
@ -257,7 +263,7 @@ const printReceiptDo = () => {
|
||||||
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
post("charge/getPrintInfoByCode", {code}).then((res: any) => {
|
post("charge/getPrintInfoByCode", {code: chargeOrder.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) {
|
||||||
|
|
@ -343,7 +349,27 @@ 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">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue