Update rx-paper.vue

This commit is contained in:
huxuejian 2026-07-31 09:25:25 +08:00
parent f417e6905f
commit 875eccc803

View File

@ -60,7 +60,7 @@
<view class="signatures"> <view class="signatures">
<view class="signature-item" style="width: 33%"> <view class="signature-item" style="width: 33%">
<view>医生 <view>医生
<image v-if="doctorImg" class="signImage" :src="doctorImg"></image> <image v-if="data.doctorSignImg" class="signImage" :src="data.data"></image>
<text v-else>{{ data.doctorName }}</text> <text v-else>{{ data.doctorName }}</text>
</view> </view>
<view class="stamp"> <view class="stamp">
@ -68,7 +68,7 @@
</view> </view>
</view> </view>
<view class="signature-item" style="width: 33%"> <view class="signature-item" style="width: 33%">
<view>审方<image v-if="yaoshiImg" class="signImage" :src="yaoshiImg"></image> <view>审方<image v-if="data.pharmacistSignImg" class="signImage" :src="data.pharmacistSignImg"></image>
<text v-else>{{ data.pharmacist }}</text> <text v-else>{{ data.pharmacist }}</text>
</view> </view>
<view>发药</view> <view>发药</view>
@ -104,8 +104,6 @@ import { loading as showLoading, hideLoading, toast } from "@/utils/widget";
const { userInfo } = useUser(); const { userInfo } = useUser();
const data = ref(null); const data = ref(null);
const doctorImg = ref('')
const yaoshiImg = ref('')
const id = ref(''); const id = ref('');
const serviceTime = ref(0); const serviceTime = ref(0);
@ -156,29 +154,11 @@ async function getRx() {
data.value = rx; data.value = rx;
serviceTime.value = typeof res.now === 'number' ? res.now : 0; serviceTime.value = typeof res.now === 'number' ? res.now : 0;
data.value.time = rx.createTime ? dayjs(rx.createTime).format('YYYY-MM-DD HH:mm') : ''; data.value.time = rx.createTime ? dayjs(rx.createTime).format('YYYY-MM-DD HH:mm') : '';
getDoctorSign()
} else { } else {
toast(message || '获取处方详情失败'); toast(message || '获取处方详情失败');
} }
} }
function getDoctorSign() {
if (data.value.doctorCode && !doctorImg.value) {
getSealImage(data.value.doctorCode).then(res => {
if (res.success && res.data) {
doctorImg.value = `data:image/png;base64,${res.data}`
}
})
}
if (data.value.pharmacistNo && !yaoshiImg.value) {
getSealImage(data.value.pharmacistNo).then(res => {
if (res.success && res.data) {
yaoshiImg.value = `data:image/png;base64,${res.data}`
}
})
}
}
async function handleInsurancePayment() { async function handleInsurancePayment() {
showLoading(); showLoading();
const res = await getRxMedicinePurchaseOrderId({ const res = await getRxMedicinePurchaseOrderId({