|
@@ -124,6 +124,7 @@ export function template60_60(model = {}, title = '') {
|
|
|
w = 115;
|
|
w = 115;
|
|
|
h = 20;
|
|
h = 20;
|
|
|
this.ADD_PRINT_TEXT(y, x, w, h, template(`{{patient.name}}`));
|
|
this.ADD_PRINT_TEXT(y, x, w, h, template(`{{patient.name}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'FontSize', 15);
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
x += w;
|
|
x += w;
|
|
|
w = 30;
|
|
w = 30;
|
|
@@ -162,10 +163,10 @@ export function template60_60(model = {}, title = '') {
|
|
|
|
|
|
|
|
y += h;
|
|
y += h;
|
|
|
h = 32;
|
|
h = 32;
|
|
|
- this.ADD_PRINT_TEXT(y, margin, 170, h, template(`{{record.remark}}`));
|
|
|
|
|
- this.SET_PRINT_STYLEA(0, 'FontSize', 9);
|
|
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y, margin, width - margin, h, template(`{{record.remark}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 1);
|
|
|
- if (model.record.orderNo) this.ADD_PRINT_BARCODE(y + (32 + 20 - 46) / 2, 175, 46, 46, 'QRCode', model.record.orderNo);
|
|
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'LineSpacing', -2);
|
|
|
|
|
|
|
|
y += h;
|
|
y += h;
|
|
|
x = margin;
|
|
x = margin;
|
|
@@ -175,8 +176,8 @@ export function template60_60(model = {}, title = '') {
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 1);
|
|
|
x += w;
|
|
x += w;
|
|
|
- w = 100;
|
|
|
|
|
- this.ADD_PRINT_TEXT(y, x, w, h, template(`{{record.date}}`));
|
|
|
|
|
|
|
+ w = width - margin - x;
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y + 4, x, w, h, template(`{{record.date}}`));
|
|
|
|
|
|
|
|
y += h;
|
|
y += h;
|
|
|
x = 0;
|
|
x = 0;
|
|
@@ -334,6 +335,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.SET_PRINT_STYLE('FontSize', 15);
|
|
this.SET_PRINT_STYLE('FontSize', 15);
|
|
|
this.ADD_PRINT_TEXT(y, x, w, h, template(`{{record.title}}`));
|
|
this.ADD_PRINT_TEXT(y, x, w, h, template(`{{record.title}}`));
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Alignment', 2);
|
|
|
|
|
|
|
|
y += h + 10;
|
|
y += h + 10;
|
|
|
x = margin;
|
|
x = margin;
|
|
@@ -343,7 +345,8 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.SET_PRINT_STYLEA(0, 'FontSize', 12);
|
|
this.SET_PRINT_STYLEA(0, 'FontSize', 12);
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 2);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 2);
|
|
|
|
|
|
|
|
- this.ADD_PRINT_TEXT(y, x, 100, h, template(`{{recipe.decoction}}`));
|
|
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y - 2, x, 100, h + 2, template(`{{recipe.decoction}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'FontSize', 15);
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
this.ADD_PRINT_TEXT(y, w - 100 + x, 100, h, template(`{{record.serialNumber}}`));
|
|
this.ADD_PRINT_TEXT(y, w - 100 + x, 100, h, template(`{{record.serialNumber}}`));
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 2);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 2);
|
|
@@ -361,7 +364,8 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.ADD_PRINT_TEXT(y, x, w, h, '姓名:');
|
|
this.ADD_PRINT_TEXT(y, x, w, h, '姓名:');
|
|
|
x += w - offset;
|
|
x += w - offset;
|
|
|
w = 100;
|
|
w = 100;
|
|
|
- this.ADD_PRINT_TEXT(y, x, w + offset, h, template(`{{patient.name}}`));
|
|
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y - 2, x - 2, w + 20, h + 2, template(`{{patient.name}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'FontSize', 15);
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
x += w;
|
|
x += w;
|
|
|
w = 58;
|
|
w = 58;
|
|
@@ -452,7 +456,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.ADD_PRINT_TEXT(y, 158, 72, h, '单帖量');
|
|
this.ADD_PRINT_TEXT(y, 158, 72, h, '单帖量');
|
|
|
this.ADD_PRINT_TEXT(y, 220, 62, h, '用法');
|
|
this.ADD_PRINT_TEXT(y, 220, 62, h, '用法');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
- const H = 36;
|
|
|
|
|
|
|
+ const H = 36 - 4;
|
|
|
y -= H - h;
|
|
y -= H - h;
|
|
|
h = H;
|
|
h = H;
|
|
|
}
|
|
}
|
|
@@ -462,6 +466,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.SET_PRINT_STYLE('LineSpacing', -4);
|
|
this.SET_PRINT_STYLE('LineSpacing', -4);
|
|
|
|
|
|
|
|
// 循环输出药品
|
|
// 循环输出药品
|
|
|
|
|
+ const max = y + (Math.round(size / 2) + 1) * h;
|
|
|
for (let i = 0; i < chunk.length; i++) {
|
|
for (let i = 0; i < chunk.length; i++) {
|
|
|
if (i % 2) {
|
|
if (i % 2) {
|
|
|
x = 277;
|
|
x = 277;
|
|
@@ -478,7 +483,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- y = 666;
|
|
|
|
|
|
|
+ y = Math.max(y, max);
|
|
|
this.ADD_PRINT_SHAPE(4, y, margin, width - margin * 2, 1, 0, 1, '#000000');
|
|
this.ADD_PRINT_SHAPE(4, y, margin, width - margin * 2, 1, 0, 1, '#000000');
|
|
|
this.SET_PRINT_STYLE('LineSpacing', 0);
|
|
this.SET_PRINT_STYLE('LineSpacing', 0);
|
|
|
|
|
|
|
@@ -486,18 +491,26 @@ export function templateA5(model = {}, title = '') {
|
|
|
y += offset;
|
|
y += offset;
|
|
|
|
|
|
|
|
h = 16;
|
|
h = 16;
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y, 6, 74, h, '备注:');
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
|
|
+ this.ADD_PRINT_TEXT(y, 80, width - margin - 80 + 6, h, template(`{{record.remark}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
|
|
+
|
|
|
|
|
+ y += h + 4;
|
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '用法:');
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '用法:');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{recipe.method}}`));
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{recipe.method}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
this.ADD_PRINT_TEXT(y, 287 - 16, 266 + 16, h, template(`{{recipe.volume}}`));
|
|
this.ADD_PRINT_TEXT(y, 287 - 16, 266 + 16, h, template(`{{recipe.volume}}`));
|
|
|
|
|
+ this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
|
|
|
|
|
- y += h + offset;
|
|
|
|
|
|
|
+ y += h + 4;
|
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '金额:');
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '金额:');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{recipe.totalFees}} 元`));
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{recipe.totalFees}} 元`));
|
|
|
this.ADD_PRINT_TEXT(y, 287 - 16, 266 + 16, h, template(`共 {{recipe.count}} 剂,煎 {{recipe.count}} 剂`));
|
|
this.ADD_PRINT_TEXT(y, 287 - 16, 266 + 16, h, template(`共 {{recipe.count}} 剂,煎 {{recipe.count}} 剂`));
|
|
|
|
|
|
|
|
- y += h + offset;
|
|
|
|
|
|
|
+ y += h + 4;
|
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '医生:');
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '医生:');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field1}}`));
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field1}}`));
|
|
@@ -506,7 +519,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
|
|
|
|
|
this.ADD_PRINT_SHAPE(4, y + h + offset, margin, width - margin * 2, 1, 0, 1, '#000000');
|
|
this.ADD_PRINT_SHAPE(4, y + h + offset, margin, width - margin * 2, 1, 0, 1, '#000000');
|
|
|
|
|
|
|
|
- y += h + offset * 2;
|
|
|
|
|
|
|
+ y += h + offset * 4;
|
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '审方人:');
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '审方人:');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field2}}`));
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field2}}`));
|
|
@@ -516,7 +529,7 @@ export function templateA5(model = {}, title = '') {
|
|
|
this.ADD_PRINT_TEXT(y, 361, 192, h, template(`{{sign.field3}}`));
|
|
this.ADD_PRINT_TEXT(y, 361, 192, h, template(`{{sign.field3}}`));
|
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
this.SET_PRINT_STYLEA(0, 'Bold', 1);
|
|
|
|
|
|
|
|
- y += h + offset;
|
|
|
|
|
|
|
+ y += h + offset * 3;
|
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '复核人:');
|
|
this.ADD_PRINT_TEXT(y, 6, 74, h, '复核人:');
|
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
this.SET_PRINT_STYLEA(0, 'Alignment', 3);
|
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field4}}`));
|
|
this.ADD_PRINT_TEXT(y, 80, 192, h, template(`{{sign.field4}}`));
|