|
|
@@ -245,29 +245,30 @@ const printInfusionLabelNew = (data) => {
|
|
|
LODOP.NEWPAGE(); // 重要:每页都要NEWPAGE
|
|
|
}
|
|
|
let html = printStyle;
|
|
|
- html += `<table style="width: 76%;border-spacing: 0; border-collapse: collapse;table-layout: fixed">`;
|
|
|
- html += `<thead><tr><td colspan="24" style="text-align: left">${page[0].deptName} ${page[0].patName} ${page[0].patientId}</td></tr>`;
|
|
|
- html += `<tr><td colspan="24" style="text-align: left">${page[0].gender} ${page[0].age === 0 ? '不满1岁' : page[0].age + '岁'} ${page[0].days}</td></tr>`;
|
|
|
+ html += `<table style="width: 73%;border-spacing: 0; border-collapse: collapse;table-layout: fixed">`;
|
|
|
+ html += `<thead><tr><td colspan="24" style="text-align: left; font-size: 12px">${page[0].deptName} ${page[0].patName} ${page[0].patientId}</td></tr>`;
|
|
|
+ html += `<tr><td colspan="24" style="text-align: left;font-size: 12px">${page[0].gender} ${page[0].age === 0 ? '不满1岁' : page[0].age + '岁'} ${page[0].days}</td></tr>`;
|
|
|
html += `</thead><tbody>`;
|
|
|
- html += `<tr><td colspan="17"><strong>药品名称/规格/一次剂量</strong></td><td colspan="4"><strong>频率</strong></td><td colspan="3"><strong>数量</strong></td></tr>`;
|
|
|
+ html += `<tr><td colspan="17" style="text-align: left;font-size: 10px"><strong>药品名称/规格/一次剂量</strong></td><td colspan="4" style="text-align: center;font-size: 10px"><strong>频率</strong></td><td colspan="3" style="text-align: center;font-size: 10px"><strong>数量</strong></td></tr>`;
|
|
|
if (page.length > 0) {
|
|
|
- page.forEach(item => {
|
|
|
- html += `<tr><td colSpan="17" style="width: 100%;height: 100%;position: relative">`;
|
|
|
+ page.forEach((item, index) => {
|
|
|
+ html += `<tr><td colspan="17" style="width: 100%;height: 100%;position: relative;font-size: 12px">`;
|
|
|
html += `<div style="position: absolute;left: 2px;top: 2px;">`;
|
|
|
- if(page.length !== 1 && item.infusionFlag === '1') {
|
|
|
+ if(index !== 0 && item.infusionFlag === '1') {
|
|
|
html += `<span style="font-size: 10px">▲</span>${item.drugName}</div>`;
|
|
|
+ html += `<div style="position: absolute;right: 2px;bottom: 0; font-weight: bolder">${item.drugQuan + item.unitName}</div></td>`;
|
|
|
} else {
|
|
|
- html += `${item.drugName}</div>`;
|
|
|
+ html += `${item.drugName}${item.specification}</div>`;
|
|
|
+ html += `<div style="position: absolute;right: 2px;bottom: 0; font-weight: bolder">${item.drugQuan + item.unitName}</div></td>`;
|
|
|
}
|
|
|
- if(item.infusionFlag === '0' || page.length === 1) {
|
|
|
- html += `<div style="position: absolute;left: 2px;bottom: 0; font-weight: bolder">${item.specification}</div>`;
|
|
|
- }
|
|
|
- html += `<div style="position: absolute;right: 2px;bottom: 0; font-weight: bolder">${item.drugQuan + item.unitName}</div></td>`;
|
|
|
- html += `<td colSpan="4" style="text-align: right"><div>${item.frequency}</div><div>${item.hours}</div></td>`;
|
|
|
- html += `<td colSpan="3" style="text-align: center; vertical-align: middle">${item.quantity}</td></tr>`;
|
|
|
+ // if(item.infusionFlag === '0' || index === 0) {
|
|
|
+ // html += `<div style="position: absolute;left: 2px;bottom: 0; font-weight: bolder">${item.specification}</div>`;
|
|
|
+ // }
|
|
|
+ html += `<td colspan="4" style="text-align: right;font-size: 12px"><div>${item.frequency}</div><div>${item.hours}</div></td>`;
|
|
|
+ html += `<td colspan="3" style="text-align: center; vertical-align: middle;font-size: 12px">${item.quantity}</td></tr>`;
|
|
|
});
|
|
|
} else {
|
|
|
- html += `<tr><td colspan="24" style="height: 15mm; text-align: center;">无药品信息</td></tr>`;
|
|
|
+ html += `<tr><td colspan="24" style="height: 15mm; text-align: center;font-size: 16px">无药品信息</td></tr>`;
|
|
|
}
|
|
|
|
|
|
html += `</tbody></table>`;
|