| | |
| | | <el-form-item label="设备描述" prop=""> |
| | | {{deviceInfo.brand + " " + deviceInfo.model + " " + deviceInfo.state}} |
| | | </el-form-item> |
| | | <el-form-item label="装机时间" prop="rentTime"> |
| | | <el-form-item label="领用时间" prop="rentTime"> |
| | | <el-date-picker |
| | | v-model="formData.rentTime" |
| | | type="date" |
| | | value-format="x" |
| | | placeholder="选择装机时间" |
| | | placeholder="选择领用时间" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | |
| | | </el-form> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">领用完成</el-button> |
| | | <el-button @click="resetForm()">重 置</el-button> |
| | | <el-button @click="printBill()">打印小票</el-button> |
| | | <el-button @click="printBill(formData.patName)">打印小票</el-button> |
| | | <el-button @click="cancelInstall" :disabled="formLoading">放弃装机</el-button> |
| | | |
| | | <!-- 医生装机列表 --> |
| | |
| | | import {DeviceApi, DeviceVO} from "@/api/ecg/devmanage"; |
| | | import {curDayEnd, curDayStart} from "@/utils/dateUtil"; |
| | | import {RoomBedVO} from "@/api/ecg/doctor"; |
| | | import {hiprint, defaultElementTypeProvider} from "vue-plugin-hiprint" |
| | | import {hiprint} from "vue-plugin-hiprint"; |
| | | |
| | | /** 设备领用 表单 */ |
| | | defineComponent({ name: 'DevReadyPanel' }) |
| | |
| | | return |
| | | |
| | | // formDate 对应 DevRent |
| | | // formData.value = data //不能整个赋值,1.会导致 rent_id 出现从而影响后端逻辑处理,2. 默认装机时间被清空 |
| | | // formData.value = data //不能整个赋值, 默认领用时间被清空 |
| | | formData.value.id = data.id; |
| | | formData.value.patDetails = data.patDetails |
| | | } |
| | | |
| | |
| | | formData.value = await DevRentApi.getDevRent(rentId) |
| | | } |
| | | |
| | | const printBill = async () => { |
| | | // ElNotification({ |
| | | // title: '温馨提示', |
| | | // message: '待实现!', |
| | | // type: 'warning' |
| | | // }) |
| | | const printBill = async (myContent: string) => { |
| | | |
| | | // 引入后使用示例 |
| | | hiprint.init({ |
| | | // host: 'http://192.168.2.100:17521', |
| | | // host: 'http://192.168.2.100:17521', |
| | | token: '111111' |
| | | }); |
| | | // 下列方法都是没有拖拽设计页面的, 相当于代码模式, 使用代码设计页面 |
| | | // 想要实现拖拽设计页面,请往下看 '自定义设计' |
| | | var hiprintTemplate = new hiprint.PrintTemplate(); // 可传参数 |
| | | var panel = hiprintTemplate.addPrintPanel({ width: 100, height: 130, paperFooter: 340, paperHeader: 10 }); |
| | | //文本 |
| | | panel.addPrintText({ options: { width: 140, height: 15, top: 20, left: 20, title: myContent, textAlign: 'center' } }); |
| | | //打印 |
| | | 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 |
| | | } |
| | | /* hiprint 示例 |
| | | // 引入后使用示例 |
| | | hiprint.init({ |
| | | // host: 'http://192.168.2.100:17521', |
| | | token: '111111' |
| | | }); |
| | | // 下列方法都是没有拖拽设计页面的, 相当于代码模式, 使用代码设计页面 |
| | |
| | | panel.addPrintText({ options: { width: 35, height: 35, top: 40, left: 165, title: '123456', textType: 'qrcode' } }); |
| | | //长文本 |
| | | panel.addPrintLongText({ options: { width: 180, height: 35, top: 90, left: 20, title: '长文本:hiprint是一个很好的webjs打印,浏览器在的地方他都可以运行' } }); |
| | | //打印 |
| | | //打印 直接打印 |
| | | 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 |
| | | } |
| | | */ |
| | | /* 分页打印 |
| | | HiPrint.print({ |
| | | pages: [ |