| | |
| | | > |
| | | <el-form-item label="患者编号" prop="patId"> |
| | | <el-input v-model="formData.patId" placeholder="请输入患者编号" @input="getRentInfoByPatId" /> |
| | | <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 /> |
| | | <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" :width=100 /> |
| | | </el-form-item> |
| | | <el-form-item label="患者名称" prop="patName"> |
| | | <el-input v-model="formData.patName" placeholder="请输入患者名称" /> |
| | |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">领用完成</el-button> |
| | | <el-button @click="resetForm()">重 置</el-button> |
| | | <el-button @click="printBill(formData.patId)">打印小票</el-button> |
| | | <el-button @click="printBill(formData.patId, 8)">打印小票2</el-button> |
| | | <el-button @click="cancelInstall" :disabled="formLoading">放弃装机</el-button> |
| | | |
| | | <!-- 医生装机列表 --> |
| | |
| | | patWardDesc: undefined, |
| | | patBedNo: undefined, |
| | | patDetails: undefined, |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | interference: undefined, |
| | |
| | | |
| | | // formDate 对应 DevRent |
| | | // formData.value = data //不能整个赋值, 默认领用时间被清空 |
| | | formData.value.id = data.id; |
| | | formData.value.id = data.id; //rent id |
| | | formData.value.patDetails = data.patDetails |
| | | } |
| | | |
| | |
| | | devId: undefined, |
| | | patId: undefined, |
| | | patName: undefined, |
| | | checkType: undefined, |
| | | rentTime: new Date().getTime(), |
| | | returnTime: undefined, |
| | | interference: undefined, |
| | | baseline: undefined, |
| | | detachment: undefined, |
| | | remark: undefined |
| | | remark: undefined, |
| | | patDeptCode: undefined, |
| | | patDeptDesc: undefined, |
| | | patWardCode: undefined, |
| | | patWardDesc: undefined, |
| | | patBedNo: undefined, |
| | | patDetails: undefined, |
| | | paid: undefined, |
| | | roomId: props.room.roomId, |
| | | bedNo: props.room.bedNo |
| | | } |
| | | formRef.value?.resetFields() |
| | | |
| | |
| | | resetForm() |
| | | formData.value.patId = queueVO?.patId |
| | | formData.value.patName = queueVO?.patName |
| | | formData.value.checkType = queueVO?.bookCheckType |
| | | getFreeRentInfo(formData.value) |
| | | } |
| | | defineExpose({ setPatient }) // 提供 setPatient 方法,用于设置患者 |
| | |
| | | formData.value = await DevRentApi.getDevRent(rentId) |
| | | } |
| | | |
| | | const printBill = async (patId: string) => { |
| | | const printBill = async (patId: string, printMode?: number) => { |
| | | |
| | | const curAppointment: AppointmentVO = await AppointmentApi.getCurAppointmentByPatId( patId ) |
| | | console.info( curAppointment ) |
| | |
| | | var panel = hiprintTemplate.addPrintPanel({ width: 100, height: 130, paperFooter: 340, paperHeader: 10 }); |
| | | //文本 |
| | | const checkTypeName = checkTypeStore.getCheckTypeName(curAppointment.bookCheckType) |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 20, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 11 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 2, left: 20, title: checkTypeName, textAlign: 'center', fontSize: 8 } }); |
| | | const patientBaisc = curAppointment.patName + " " + calGender(curAppointment.patGender) + " " + calculateAge(curAppointment.patBirthday) + "岁" |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 40, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 11} }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 16, left: 20, title: patientBaisc, textAlign: 'center' , fontSize: 8 } }); |
| | | const ward_bed = curAppointment.patWardDesc + "-" + curAppointment.patBedNo |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 60, left: 20, title: ward_bed, textAlign: 'center', fontSize: 11 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 30, left: 20, title: ward_bed, textAlign: 'center', fontSize: 8 } }); |
| | | const bookTime = formatTimestamp(curAppointment.bookDate) + " " + getBookBeginTime(curAppointment.bookTimeslot) |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 80, left: 20, title: bookTime, textAlign: 'center', fontSize: 10 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 100, left: 20, title: curAppointment.patId, textAlign: 'center', fontSize: 10} }); |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 120, left: 20, title: curAppointment.patMobile, textAlign: 'center', fontSize: 10 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 44, left: 20, title: bookTime, textAlign: 'center', fontSize: 8 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 58, left: 20, title: curAppointment.patId, textAlign: 'center', fontSize: 8 } }); |
| | | panel.addPrintText({ options: { width: 140, height: 12, top: 72, left: 20, title: curAppointment.patMobile, textAlign: 'center', fontSize: 8 } }); |
| | | //条形码 |
| | | panel.addPrintText({ options: { width: 140, height: 35, top: 140, left: 20, title: curAppointment.patId, textType: 'barcode' } }); |
| | | panel.addPrintText({ options: { width: 140, height: 22, top: 86, left: 20, title: curAppointment.patId, textType: 'barcode' } }); |
| | | |
| | | //打印 |
| | | hiprintTemplate.print([{},{},{}]); // 可以传 [定位参数] http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B |
| | | if (undefined === printMode) |
| | | hiprintTemplate.print2([{},{},{}]); // 可以传 [定位参数] http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B |
| | | else |
| | | hiprintTemplate.print([{},{},{}]); |
| | | } |
| | | /* hiprint 示例 |
| | | // 引入后使用示例 |