Compare commits
No commits in common. "d673a634904f8c03eafa29b986993b76ec8b54ef" and "032ffd1383ea41fb7ed3f639d9b5a3822d4b9679" have entirely different histories.
d673a63490
...
032ffd1383
|
|
@ -166,7 +166,6 @@ const getTipCount = () => {
|
|||
}).then((res: any) => {
|
||||
statusList.value[0].num = res.unchargedCount
|
||||
statusList.value[1].num = res.chargedCount
|
||||
statusList.value[2].num = res.refundedCount
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import Panel from '../common/Panel.vue';
|
||||
import {defineEmits, defineModel, defineProps} from 'vue'
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {defineEmits, defineModel,defineProps} from 'vue'
|
||||
|
||||
const {status} = defineProps(['status'])
|
||||
const emit = defineEmits(['save', 'deleteItem', 'openCheckOut', "openSettlement", "print", "refund"]);
|
||||
const {status}=defineProps(['status'])
|
||||
const emit = defineEmits(['save','deleteItem','openCheckOut',"openSettlement","print","refund"]);
|
||||
const save = () => {
|
||||
emit('save');
|
||||
};
|
||||
|
|
@ -12,30 +11,12 @@ const deleteItem = () => {
|
|||
emit('deleteItem');
|
||||
};
|
||||
const totalAmount = defineModel<any>()
|
||||
const openCheckOut = () => {
|
||||
const openCheckOut= () => {
|
||||
emit('openCheckOut');
|
||||
};
|
||||
const openSettlement = () => {
|
||||
const openSettlement =()=>{
|
||||
emit('openSettlement')
|
||||
}
|
||||
const refund = () => {
|
||||
ElMessageBox.confirm(
|
||||
'退款后不能撤销,确定要继续退款吗?',
|
||||
'Warning',
|
||||
{
|
||||
confirmButtonText: '继续退款',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
emit('refund')
|
||||
})
|
||||
|
||||
}
|
||||
const print = () => {
|
||||
emit('print')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -45,8 +26,8 @@ const print = () => {
|
|||
<div class="btn-group">
|
||||
<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="print" v-if="status ==1">打印</span>
|
||||
<span class="default-btn" @click="refund" style="margin-left: 24px" v-if="status ==1">退费</span>
|
||||
<span class="default-btn" @click="" v-if="status ==1 || status == 2">打印</span>
|
||||
<span class="default-btn" @click="" style="margin-left: 24px" v-if="status ==1">退费</span>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
@ -61,19 +42,16 @@ const print = () => {
|
|||
font-size: 22px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
padding: 0 24px 0 24px;
|
||||
|
||||
.icon {
|
||||
padding:0 24px 0 24px;
|
||||
.icon{
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #FF282E
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
span {
|
||||
.btn-group{
|
||||
span{
|
||||
display: inline-block;
|
||||
width: 119px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@
|
|||
:status="formData.status"
|
||||
@openSettlement="charge"
|
||||
@openCheckOut="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"
|
||||
@refund="refund"
|
||||
@print="printReceiptDo"
|
||||
|
||||
></TotalPrice>
|
||||
</div>
|
||||
|
|
@ -175,7 +173,7 @@ const openCheckoutDetail = (goodsList: any[], psnNo: string) => {
|
|||
|
||||
const saveAndCharge = () => {
|
||||
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
|
||||
formData.value.orderCode = res
|
||||
formData.value.code = res
|
||||
nextTick(() => {
|
||||
settlementRef.value?.init(res, formData.value.patientRegistration.psnNo)
|
||||
})
|
||||
|
|
@ -245,16 +243,12 @@ const orderCompleted = (printReceipt: any) => {
|
|||
|
||||
type MedTypeKey = keyof typeof medTypeJson;
|
||||
const wsStore = useWsStore()
|
||||
const printReceiptDo = async () => {
|
||||
|
||||
let chargeOrder:any = await post("charge/getOrderByDiagnosisCode", {
|
||||
diagnosisCode: formData.value.code,
|
||||
status: formData.value.status
|
||||
})
|
||||
if (!chargeOrder) {
|
||||
ElMessage.error("该订单不存在")
|
||||
const printReceiptDo = () => {
|
||||
if (!formData.value.code) {
|
||||
return
|
||||
}
|
||||
let code = formData.value.code;
|
||||
|
||||
const printConfig = {} as any;
|
||||
post("common/config/getPrintConfig").then((res: any) => {
|
||||
printConfig.printName = res.printName
|
||||
|
|
@ -263,7 +257,7 @@ const printReceiptDo = async () => {
|
|||
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
||||
return;
|
||||
}
|
||||
post("charge/getPrintInfoByCode", {code: chargeOrder.code}).then((res: any) => {
|
||||
post("charge/getPrintInfoByCode", {code}).then((res: any) => {
|
||||
res.printerName = printConfig.printName
|
||||
res.pageType = printConfig.pageType
|
||||
if (res.chargeSocialPayLog) {
|
||||
|
|
@ -349,27 +343,7 @@ const getStatus = (status: any) => {
|
|||
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>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in New Issue