@@ -26,8 +45,8 @@ const openSettlement =()=>{
追溯码
收费
- 打印
- 退费
+ 打印
+ 退费
@@ -42,16 +61,19 @@ const openSettlement =()=>{
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;
}
diff --git a/src/views/charge/index.vue b/src/views/charge/index.vue
index ce5c483..260ac80 100644
--- a/src/views/charge/index.vue
+++ b/src/views/charge/index.vue
@@ -60,6 +60,8 @@
:status="formData.status"
@openSettlement="charge"
@openCheckOut="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"
+ @refund="refund"
+ @print="printReceiptDo"
>
@@ -173,7 +175,7 @@ const openCheckoutDetail = (goodsList: any[], psnNo: string) => {
const saveAndCharge = () => {
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
- formData.value.code = res
+ formData.value.orderCode = res
nextTick(() => {
settlementRef.value?.init(res, formData.value.patientRegistration.psnNo)
})
@@ -243,12 +245,16 @@ const orderCompleted = (printReceipt: any) => {
type MedTypeKey = keyof typeof medTypeJson;
const wsStore = useWsStore()
-const printReceiptDo = () => {
- if (!formData.value.code) {
+const printReceiptDo = async () => {
+
+ let chargeOrder:any = await post("charge/getOrderByDiagnosisCode", {
+ diagnosisCode: formData.value.code,
+ status: formData.value.status
+ })
+ if (!chargeOrder) {
+ ElMessage.error("该订单不存在")
return
}
- let code = formData.value.code;
-
const printConfig = {} as any;
post("common/config/getPrintConfig").then((res: any) => {
printConfig.printName = res.printName
@@ -257,7 +263,7 @@ const printReceiptDo = () => {
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
return;
}
- post("charge/getPrintInfoByCode", {code}).then((res: any) => {
+ post("charge/getPrintInfoByCode", {code: chargeOrder.code}).then((res: any) => {
res.printerName = printConfig.printName
res.pageType = printConfig.pageType
if (res.chargeSocialPayLog) {
@@ -343,7 +349,27 @@ 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()
+ })
+}