This commit is contained in:
ChenQiuYu 2025-05-19 14:10:42 +08:00
parent aae6e720ea
commit 1ed5d1d71a
8 changed files with 25 additions and 39 deletions

View File

@ -74,10 +74,19 @@ const getInfoFor1101 = (params: any) => {
}
onMounted(async () => {
wsStore.setMessageCallback(reciceMessage)
wsStore.setErrorCallback(errorCallBack)
});
onUnmounted(() => {
wsStore.removeAllMessageCallback()
wsStore.removeAllErrorCallback()
})
const errorCallBack = () => {
ElMessage({
message: '请连接设备',
type: 'warning',
});
isReading.value = false;
}
</script>
<template>

View File

@ -71,7 +71,7 @@ const socialCard = ref<any>({
});
const loading = ref(false);
const show = ref(false)
const printReceipt = ref(true);
const printReceipt = ref(false);
const payType = ref(null);
const retailOrder = ref<any>(null);
const close = () => {

View File

@ -36,7 +36,7 @@
:current-page="pageNum"
:page-size="pageSize"
:total="total"
@change="changePage"
@current-change="changePage"
/>
</div>
</template>
@ -64,9 +64,8 @@ const close = () => {
const pageNum = ref(1);
const pageSize = ref(20);
const total = ref(0);
const changePage = (pageNum: any) => {
pageNum.value = pageNum
console.log(pageNum.value)
const changePage = (value: any) => {
pageNum.value = value
init()
}
</script>

View File

@ -40,7 +40,7 @@
:current-page="pageNum"
:page-size="pageSize"
:total="total"
@change="changePage"
@current-change="changePage"
/>
</div>
</template>
@ -67,10 +67,10 @@ const close = () => {
tableData.value = []
};
const pageNum = ref(1);
const pageSize = ref(1);
const pageSize = ref(20);
const total = ref(0);
const changePage = (pageNum: any) => {
pageNum.value = pageNum
const changePage = (value: any) => {
pageNum.value = value
init()
}
</script>

View File

@ -15,8 +15,8 @@
</div>
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号" width="180"></el-table-column>
<el-table-column prop="status" label="状态" width="180">
<el-table-column prop="phone" label="手机号" width="180" show-overflow-tooltip></el-table-column>
<el-table-column prop="status" label="状态" width="180" show-overflow-tooltip>
<template #default="scope">
<el-tag
:type="scope.row.status === 1 ? 'warning' : scope.row.status === 2 ? 'success' : scope.row.status === 3 ? 'info' : 'danger'"
@ -27,27 +27,27 @@
</el-tag>
</template>
</el-table-column>
<el-table-column prop="organizationSectionId" label="科室">
<el-table-column prop="organizationSectionId" label="科室" show-overflow-tooltip>
<template #default="scope">
{{ sectionList.find((item:any)=>item.id===scope.row.organizationSectionId)?.name || '-' }}
</template>
</el-table-column>
<el-table-column prop="organizationDoctorId" label="医生">
<el-table-column prop="organizationDoctorId" label="医生" show-overflow-tooltip>
<template #default="scope">
{{ roleList.find((item: any) => item.id === scope.row.organizationDoctorId)?.name || '-' }}
</template>
</el-table-column>
<el-table-column prop="visitType" label="初/复诊">
<el-table-column prop="visitType" label="初/复诊" show-overflow-tooltip>
<template #default="scope">
{{ visitType[scope.row.visitType] || '-' }}
</template>
</el-table-column>
<el-table-column prop="createDatetime" label="挂号日期" width="180">
<el-table-column prop="createDatetime" label="挂号日期" width="180" show-overflow-tooltip>
<template #default="scope">
{{ formatDate(scope.row.createDatetime) || '-' }}
</template>
</el-table-column>
<el-table-column prop="memo" label="备注"></el-table-column>
<el-table-column prop="memo" label="备注" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</template>

View File

@ -1,15 +1 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useLogoStore = defineStore('logo', () => {
const logoUrl = ref<string>("")
function setLogoUrl(url: string) {
logoUrl.value = url
}
function getLogoUrl() {
return logoUrl.value
}
// 返回需要暴露的方法和变量
return { logoUrl, setLogoUrl, getLogoUrl }
})

View File

@ -246,10 +246,8 @@ 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("该订单不存在")
@ -269,7 +267,6 @@ const printReceiptDo = async () => {
if (res.chargeSocialPayLog) {
res.chargeSocialPayLog.medTypeStr = medTypeJson[res.chargeSocialPayLog.medType as MedTypeKey];
}
console.log(res)
wsStore.sendMessage({
type: "PrintReceipt",
config: null,
@ -317,8 +314,6 @@ const getOrderTotalPrice = () => {
})
formData.value.preTotalPrice = Math.round(totalPrice * 100) / 100
formData.value.totalPrice = Math.round(totalPrice * 100) / 100
}
@ -357,7 +352,6 @@ const refund = async () => {
}
let chargeOrder:any = await post("charge/getOrderByDiagnosisCode", {
diagnosisCode: formData.value.code,
status: formData.value.status
})
if (!chargeOrder) {
ElMessage.error("该订单不存在")

View File

@ -126,6 +126,7 @@ const clickItem = (item: any) => {
formData.value.itemDetail = res.itemDetail
formData.value.diagType = Number(formData.value.diagType)
patientRegistration.value = res.patientRegistration
getOrderTotalPrice()
})
}
@ -162,14 +163,11 @@ const getOrderTotalPrice = () => {
formData.value.itemDetail?.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
console.log(totalPrice, 'totalPrice')
formData.value.goodsDetail?.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
})
console.log(totalPrice, 'totalPrice')
formData.value.preTotalPrice = Math.round((totalPrice * 100) / 100)
formData.value.totalPrice = totalPrice
console.log(formData.value.totalPrice, 'formData.value.totalPrice')
}
const caseRef = ref<any>("")
const copyForm = (item: any) => {