dev
This commit is contained in:
parent
b978006a69
commit
73d2554c98
|
|
@ -92,6 +92,7 @@ const saveRetail = () => {
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
close()
|
||||||
emit('confirm')
|
emit('confirm')
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
@ -179,7 +180,6 @@ const addTraceAbilityCodeHandler = (item: any, code: any) => {
|
||||||
addTraceabilityCodeDo(item, code)
|
addTraceabilityCodeDo(item, code)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.header {
|
.header {
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,7 @@ const completeSettlement = () => {
|
||||||
changeOrderCode: orderInfo.value.changeOrderCode,
|
changeOrderCode: orderInfo.value.changeOrderCode,
|
||||||
}
|
}
|
||||||
post("charge/socialRealPay", {...params}).then((res: any) => {
|
post("charge/socialRealPay", {...params}).then((res: any) => {
|
||||||
show.value = false;
|
orderCompleted()
|
||||||
emit('orderCompleted')
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,6 +147,7 @@ const openPsnPayment = (payInfo: any, orderInfo: any) => {
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = () => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
emit('orderCompleted')
|
||||||
}
|
}
|
||||||
const orderCanceled = () => {
|
const orderCanceled = () => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ const socialCard = ref<any>({
|
||||||
});
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const printReceipt = ref(false);
|
const printReceipt = ref(true);
|
||||||
const payType = ref(null);
|
const payType = ref(null);
|
||||||
const retailOrder = ref<any>(null);
|
const retailOrder = ref<any>(null);
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
||||||
import {nextTick, onMounted, ref} from "vue";
|
import {nextTick, onMounted, onUnmounted, ref} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
||||||
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
||||||
|
|
@ -95,6 +95,9 @@ import PatientCard from "@/components/charge/PatientCard.vue";
|
||||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||||
import CheckoutDetail from "@/components/charge/CheckoutDetail.vue";
|
import CheckoutDetail from "@/components/charge/CheckoutDetail.vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {medTypeJson} from "@/assets/config/constants.ts";
|
||||||
|
import {useWsStore} from "@/stores/wsStore.ts";
|
||||||
|
import type {Request, Response} from "@/utils/ws.ts";
|
||||||
|
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({
|
||||||
patientInfo: {},
|
patientInfo: {},
|
||||||
|
|
@ -103,6 +106,16 @@ const formData = ref<any>({
|
||||||
itemDetail: [],
|
itemDetail: [],
|
||||||
patientRegistration: {}
|
patientRegistration: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const initFormData = () => {
|
||||||
|
formData.value = {
|
||||||
|
patientInfo: {},
|
||||||
|
diagnosisMedicalRecord: {},
|
||||||
|
goodsDetail: [],
|
||||||
|
itemDetail: [],
|
||||||
|
patientRegistration: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
const statusDisabled = ref(0)
|
const statusDisabled = ref(0)
|
||||||
const diagnosisKeyword = ref("")
|
const diagnosisKeyword = ref("")
|
||||||
const chargeQueueRef = ref()
|
const chargeQueueRef = ref()
|
||||||
|
|
@ -212,11 +225,65 @@ const getDockerList = () => {
|
||||||
dockerList.value = res
|
dockerList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = (printReceipt: any) => {
|
||||||
|
if (printReceipt) {
|
||||||
|
//打印小票
|
||||||
|
printReceiptDo()
|
||||||
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.init()
|
||||||
|
})
|
||||||
|
initFormData()
|
||||||
|
}
|
||||||
|
|
||||||
|
type MedTypeKey = keyof typeof medTypeJson;
|
||||||
|
const wsStore = useWsStore()
|
||||||
|
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
|
||||||
|
printConfig.pageType = res.pageType
|
||||||
|
if (!printConfig.printName || !printConfig.pageType) {
|
||||||
|
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
post("charge/getPrintInfoByCode", {code}).then((res: any) => {
|
||||||
|
res.printerName = printConfig.printName
|
||||||
|
res.pageType = printConfig.pageType
|
||||||
|
if (res.chargeSocialPayLog) {
|
||||||
|
res.chargeSocialPayLog.medTypeStr = medTypeJson[res.chargeSocialPayLog.medType as MedTypeKey];
|
||||||
|
}
|
||||||
|
console.log(res)
|
||||||
|
wsStore.sendMessage({
|
||||||
|
type: "PrintReceipt",
|
||||||
|
config: null,
|
||||||
|
data: res
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let request: Request = {
|
||||||
|
type: "getPrintList",
|
||||||
|
config: null,
|
||||||
|
data: null
|
||||||
|
}
|
||||||
|
wsStore.sendMessage(request);
|
||||||
|
const reciceMessage = (response: Response) => {
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
wsStore.setMessageCallback(reciceMessage)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
wsStore.removeAllMessageCallback()
|
||||||
|
})
|
||||||
|
|
||||||
const orderCanceled = () => {
|
const orderCanceled = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.getOrderList()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue