前端最新版本同步

This commit is contained in:
Zhang.WH
2025-09-25 10:36:07 +08:00
parent a3a06d6f3c
commit 1276dc4adb
117 changed files with 11964 additions and 2466 deletions

View File

@@ -74,3 +74,19 @@ export function getPerformRecord(params) {
params: params
})
}
export function listWesternmedicine(query) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/prescription-list',
method: 'get',
params: query
})
}
export function printBloodCode(query) {
return request({
url: '/outpatient-manage/treatment/blood-transfusion-patch',
method: 'get',
params: query
})
}

View File

@@ -0,0 +1,159 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "自定义",
"height": 30,
"width": 50,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 7.5,
"top": 4.5,
"height": 9.75,
"width": 61.5,
"title": "文本+beforeDragIn",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 76.5,
"top": 4.5,
"height": 9.75,
"width": 27,
"title": "文本+beforeDragIn",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 111,
"top": 4.5,
"height": 9.75,
"width": 25.5,
"title": "文本+beforeDragIn",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 7.5,
"top": 16.5,
"height": 9.75,
"width": 129,
"title": "文本+beforeDragIn",
"field": "activityName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 7.5,
"top": 30,
"height": 9.75,
"width": 58.5,
"title": "文本+beforeDragIn",
"field": "orgName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 72,
"top": 30,
"height": 9.75,
"width": 63,
"title": "文本+beforeDragIn",
"field": "practitionerName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 42,
"height": 33,
"width": 111,
"textType": "barcode",
"title": "1",
"field": "busNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "barcode",
"type": "text"
}
}
]
}
]
}

View File

@@ -0,0 +1,334 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "A5",
"height": 210,
"width": 148,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 169.5,
"top": 22.5,
"height": 12,
"width": 88.5,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 13.5,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 189,
"top": 45,
"height": 9.75,
"width": 42,
"title": "处置单",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 11.25,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "姓名",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 157.5,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "年龄",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "性别",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 94.5,
"height": 9.75,
"width": 96,
"title": "科室",
"field": "departmentName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 156,
"top": 94.5,
"height": 9.75,
"width": 118.5,
"title": "费用性质",
"field": "contractName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 94.5,
"height": 9.75,
"width": 120,
"title": "日期",
"field": "reqTime",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 121.5,
"height": 9.75,
"width": 123,
"title": "门诊号",
"field": "encounterNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 156,
"top": 121.5,
"height": 9.75,
"width": 120,
"title": "开单医生",
"field": "doctorName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 18,
"top": 141,
"height": 9,
"width": 393,
"borderWidth": "1.5",
"title": "undefined+beforeDragIn",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 22.5,
"top": 156,
"height": 9.75,
"width": 24,
"title": "Rp",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 12,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 177,
"height": 36,
"width": 387,
"title": "undefined+beforeDragIn",
"coordinateSync": false,
"widthHeightSync": false,
"field": "adviceItemList",
"columns": [
[
{
"title": "项目名",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 180.11284430829235,
"field": "itemName",
"checked": true,
"columnId": "itemName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' 元'; }",
"width": 65.15543233883191,
"field": "unitPrice",
"checked": true,
"columnId": "unitPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' ' + row.unitCode_dictText; }",
"width": 61.720533008519084,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "执行次数",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 80.01119034435662,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}
]
}
]
}

View File

@@ -0,0 +1,640 @@
{
"panels": [
{
"index": 1,
"name": 2,
"paperType": "A5",
"height": 210,
"width": 148,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
},
"paperHeader": 6,
"paperFooter": 595.2755905511812,
"printElements": [
{
"options": {
"left": 150,
"top": 16.5,
"height": 22.5,
"width": 120,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontFamily": "Microsoft YaHei",
"fontSize": 18,
"textAlign": "center",
"textContentVerticalAlign": "middle",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 187.5,
"top": 54,
"height": 10.5,
"width": 43.5,
"title": "处方签",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 13.5,
"textAlign": "justify",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 76.5,
"height": 12,
"width": 171,
"title": "医保编号:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 76.5,
"height": 10.5,
"width": 163.5,
"title": "就诊类型:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 93,
"height": 12,
"width": 163.5,
"title": "费用性质",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "contractName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 94.5,
"height": 12,
"width": 171,
"title": "处方编号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "prescriptionNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 28.5,
"top": 112.5,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 195,
"top": 121.5,
"height": 12,
"width": 63,
"title": "性别",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "genderEnum_enumText"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 294,
"top": 121.5,
"height": 12,
"width": 79.5,
"title": "年龄",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "age"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 123,
"height": 12,
"width": 133.5,
"title": "姓名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "patientName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 141,
"height": 12,
"width": 192,
"title": "门诊号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "encounterNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 295.5,
"top": 142.5,
"height": 12,
"width": 124.5,
"title": "科室",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "departmentName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 160.5,
"height": 12,
"width": 384,
"title": "临床诊断",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "conditionName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 178.5,
"height": 12,
"width": 124.5,
"title": "电话",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "phone"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 178.5,
"height": 12,
"width": 189,
"title": "开具日期",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "reqTime"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 195,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 201,
"height": 13.5,
"width": 19.5,
"title": "Rp",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"fontWeight": "500",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 25.5,
"top": 225,
"height": 229.5,
"width": 381,
"field": "prescriptionList",
"coordinateSync": false,
"widthHeightSync": false,
"tableBorder": "noBorder",
"tableHeaderBorder": "noBorder",
"tableHeaderCellBorder": "noBorder",
"tableHeaderBackground": "#ffffff",
"tableBodyRowBorder": "noBorder",
"tableBodyCellBorder": "noBorder",
"tableFooterBorder": "noBorder",
"tableFooterCellBorder": "noBorder",
"lHeight": 180,
"groupFieldsFormatter": "function(type,options,data){ return ['medicineName'] }",
"tableBodyRowHeight": 15,
"columns": [
[
{
"title": "组别",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 39.000229209979196,
"field": "group",
"checked": true,
"columnId": "group",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "名称",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '用法用量'; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 108.73814856163877,
"field": "itemName",
"checked": true,
"columnId": "itemName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "规格",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>'+ '每次:' + row.dose + row.doseUnitCode_dictText + ' ' + row.methodCode_dictText; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 69.3034805684682,
"field": "totalVolume",
"checked": true,
"columnId": "totalVolume",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 33.26994450894975,
"field": "unitPrice",
"checked": true,
"columnId": "unitPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + row.unitCode_dictText + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 44.36950563405129,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "金额",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 41.19436702834297,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "等级",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + row.rateCode_dictText }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 45.1243244885698,
"field": "contractName",
"checked": true,
"columnId": "contractName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "名称",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '用法用量'; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 108.73814856163877,
"field": "medicineName",
"checked": false,
"columnId": "medicineName",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
},
{
"options": {
"left": 30,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "医师",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "doctor"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 126,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "发药:高艳敏",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "划价:张思怡",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 324,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "调配:宋丹丹",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 540,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 547.5,
"height": 9.75,
"width": 120,
"title": "注1.本处方当日作废"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 553.5,
"height": 9.75,
"width": 120,
"title": "总金额",
"field": "medTotalAmount",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 48,
"top": 567,
"height": 9.75,
"width": 120,
"title": "2.延长处方用量时间原因"
},
"printElementType": {
"title": "文本",
"type": "text"
}
}
]
}
]
}

View File

@@ -0,0 +1,293 @@
{
"panels": [
{
"index": 1,
"name": 2,
"paperType": "自定义",
"height": 50,
"width": 70,
"paperHeader": 0,
"paperFooter": 141.73228346456693,
"printElements": [
{
"options": {
"left": 97.5,
"top": 9,
"height": 9.75,
"width": 33,
"title": "文本",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 6,
"top": 9,
"height": 9.75,
"width": 51,
"title": "文本",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 154.5,
"top": 9,
"height": 9.75,
"width": 45,
"title": "文本",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 129,
"top": 25.5,
"height": 9.75,
"width": 70.5,
"title": "文本",
"field": "date",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 6,
"top": 25.5,
"height": 9.75,
"width": 81,
"title": "频次",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 4.5,
"top": 42,
"height": 18,
"width": 9,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "竖线",
"type": "vline"
}
},
{
"options": {
"left": 192,
"top": 42,
"height": 18,
"width": 9,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "竖线",
"type": "vline"
}
},
{
"options": {
"left": 4.5,
"top": 42,
"height": 9,
"width": 187.5,
"borderWidth": 0.75,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 39,
"top": 46.5,
"height": 9.75,
"width": 46.5,
"title": "药名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 132,
"top": 46.5,
"height": 9.75,
"width": 33,
"title": "规格",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 4.5,
"top": 60,
"height": 36,
"width": 189,
"title": "undefined+beforeDragIn",
"field": "infuseData",
"coordinateSync": false,
"widthHeightSync": false,
"tableHeaderBackground": "#ffffff",
"tableBodyCellBorder": "noBorder",
"rowsColumnsMerge": "function(data, col, colIndex, rowIndex, tableData, printData){ \n // 合并前三列 (columnIndex 0-2)\n if (colIndex >= 0 && colIndex <= 2) {\n // 第一列显示合并后的单元格\n if (colIndex === 0) {\n return [1, 3]; // rowspan=1, colspan=3\n } \n // 其他两列不显示(被合并)\n else {\n return [0, 0]; // rowspan=0, colspan=0\n }\n }\n // 其他列正常显示\n return [1, 1]; // rowspan=1, colspan=1\n}",
"tableBodyRowBorder": "topBottomBorder",
"columns": [
[
{
"title": "用法",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 45.48982644423766,
"field": "data",
"checked": true,
"columnId": "data",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "剂量",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 47.79422504530706,
"checked": true,
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "速度",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 48.74985321589121,
"checked": true,
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' ' + row.unitCode_dictText; }",
"width": 46.96609529456407,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}
],
"paperNumberLeft": 151.5,
"paperNumberTop": 91,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
}
}
]
}

View File

@@ -12,7 +12,27 @@
</div>
<div class="search-area">
<el-input v-model="patientSearch" placeholder="搜索患者" clearable class="search-input" />
<el-input
v-model="queryParams.searchKey"
style="width: 45%; margin-bottom: 10px"
placeholder="搜索患者"
clearable
class="search-input"
@keydown.enter="getPatientList"
>
<template #append>
<el-button icon="Search" @click="getPatientList" />
</template>
</el-input>
<el-date-picker
v-model="receptionTime"
@change="getPatientList"
type="daterange"
style="width: 55%; margin-bottom: 10px"
placeholder="挂号时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
</div>
<el-table
:data="patientList"
@@ -46,11 +66,14 @@
<i class="el-icon-first-aid-kit"></i>
<h2>处置项目</h2>
<el-button type="primary" plain @click="printBottleLabel()">打印瓶签</el-button>
<el-button type="primary" plain @click="printBloodBarcode()">打印采血条码</el-button>
<el-button type="primary" plain @click="printPrescription()">打印处方</el-button>
<el-button type="primary" plain @click="printDisposal()">打印处置单</el-button>
</div>
</div>
<el-table
:data="activityList"
ref="activityListRef"
height="calc(100% - 60px)"
style="width: 100%"
border
@@ -76,6 +99,11 @@
}}
</template>
</el-table-column>
<el-table-column align="center" prop="size" label="数量" width="100">
<template #default="scope">
{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}
</template>
</el-table-column>
<el-table-column align="center" prop="size" label="规格" width="100" />
<el-table-column align="center" prop="executeNum" label="执行次数" width="90" />
<el-table-column align="center" label="已执行次数" width="90">
@@ -114,7 +142,11 @@
<el-table-column align="center" prop="serviceStatus_enumText" label="状态" width="100">
<template #default="{ row }">
<el-tag type="primary" size="small">
{{ row.serviceStatus_enumText }}
{{
row.serviceStatus_enumText
? row.serviceStatus_enumText
: row.chargeStatus_enumText
}}
</el-tag>
</template>
</el-table-column>
@@ -185,15 +217,33 @@
<script setup>
import { getCurrentInstance } from 'vue';
import { getList, getDisposalList, execute, cancel, getPerformRecord } from './components/api';
import {
getList,
getDisposalList,
execute,
cancel,
getPerformRecord,
listWesternmedicine,
printBloodCode,
} from './components/api';
import PerformRecordDialog from './components/performRecordDialog';
import templateJson from './components/template.json';
import prescriptionTemplate from './components/prescriptionTemplate.json';
import bloodTemplate from './components/bloodTemplate.json';
import disposalTemplate from './components/disposalTemplate.json';
import { formatDateStr } from '@/utils';
import { hiprint } from 'vue-plugin-hiprint';
import { advicePrint } from '@/api/public';
import useUserStore from '@/store/modules/user';
// 患者搜索
const patientSearch = ref('');
const queryParams = ref({
pageNo: 1,
pageSize: 10,
});
const receptionTime = ref([
formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),
]);
const total = ref(0);
// 患者数据
const patientList = ref([]);
@@ -201,12 +251,16 @@ const patientList = ref([]);
const activityList = ref([]);
// 耗材列表
const deviceList = ref([]);
// 诊疗项目 + 耗材 打印处置单用
const deviceActivityList = ref([]);
const userStore = useUserStore();
// 当前选中的患者
const currentPatient = ref({});
const recordList = ref([]);
const openDialog = ref(false);
const loading = ref(false);
const activityListRef = ref(null);
const { proxy } = getCurrentInstance();
@@ -225,6 +279,8 @@ const totalCost = computed(() => {
});
getPatientList();
function getPatientList() {
queryParams.value.receptionTimeSTime = receptionTime.value[0] + ' 00:00:00';
queryParams.value.receptionTimeETime = receptionTime.value[1] + ' 23:59:59';
getList(queryParams.value).then((res) => {
patientList.value = res.data.records;
total.value = res.data.total;
@@ -234,6 +290,7 @@ function getPatientList() {
function handlePatientSelect(row) {
console.log(row, 3456789);
loading.value = true;
currentPatient.value = row;
getDisposalList(row.encounterId).then((res) => {
deviceList.value = res.data.records.filter((item) => {
return item.requestTable == 'wor_device_request';
@@ -243,6 +300,9 @@ function handlePatientSelect(row) {
item.requestTable == 'wor_service_request' || item.requestTable == 'med_medication_request'
);
});
deviceActivityList.value = res.data.records.filter((item) => {
return item.deviceCategory == '7' || item.serviceCategory == '21';
});
loading.value = false;
console.log(activityList.value, 345678);
});
@@ -317,6 +377,77 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
return [1, 1];
}
function printPrescription() {
// 取出状态为已收费已发药的requestId
let requestIds = activityList.value
.filter((item) => {
return item.chargeStatus == 5 && item.dispenseStatus == 4;
})
.map((item) => {
return item.requestId;
})
.join(',');
advicePrint({ requestIds: requestIds, isPrescription: 1 }).then((res) => {
// 按 sortNumber 排序
const sortedList = res.data.adviceItemList.sort((a, b) => {
return (a.sortNumber || 0) - (b.sortNumber || 0);
});
// 为每个项目分配新的排序号,相同 groupId 的项目使用相同排序号
const groupIdToSortNumber = new Map();
let group = 1;
sortedList.forEach((item) => {
if (item.dispensePerDuration > 1) {
item.quantity = item.quantity / item.dispensePerDurations;
item.totalPrice = item.quantity * item.unitPrice;
}
item.contractName = res.data.contractName;
if (item.groupId) {
if (!groupIdToSortNumber.has(item.groupId)) {
groupIdToSortNumber.set(item.groupId, group++);
}
item.group = groupIdToSortNumber.get(item.groupId);
} else {
item.group = group++;
}
});
console.log('sortedList', sortedList);
const result = {
...res.data,
prescriptionList: sortedList,
};
// 将对象转换为 JSON 字符串
console.log(result, 'result');
// 模板对象获取
const printElements = prescriptionTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',
height: 210,
width: 148,
}); //开始打印
});
}
function printDisposal() {
let requestIds = deviceActivityList.value
.map((item) => {
return item.requestId;
})
.join(',');
advicePrint({ requestIds: requestIds }).then((res) => {
const result = res.data;
const printElements = disposalTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
width: 148,
});
});
}
// 判断是否为组内的第一行
function isFirstRowInGroup(rowIndex) {
const row = activityList.value[rowIndex];
@@ -338,6 +469,25 @@ function isFirstRowInGroup(rowIndex) {
return true;
}
function printBloodBarcode() {
const selectedRows = activityListRef.value.getSelectionRows();
if (selectedRows.length === 0) {
proxy.$modal.msgWarning('未选择要打印的项目');
} else if (selectedRows.length > 1) {
proxy.$modal.msgWarning('只能选择一个项目');
} else {
printBloodCode({ requestId: selectedRows[0].requestId }).then((res) => {
const result = res.data;
const printElements = bloodTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
width: 148,
});
});
}
}
function handleCancel(row) {
let data = {
requestId: row.requestId,
@@ -364,6 +514,92 @@ function handleCancel(row) {
}
});
}
function printBottleLabel() {
let result = [];
// 过滤出全部输液药品
let printLiist = activityList.value.filter((item) => {
return item.medCategory == '2';
});
// 按照groupId分组但将多天的项目展开为独立项目
let expandedList = [];
printLiist.forEach((item) => {
// 如果用药天数大于1则创建多个项目
if (item.dispensePerDuration && item.dispensePerDuration > 1) {
// 为每一天创建一个项目
for (let i = 0; i < item.dispensePerDuration; i++) {
// 克隆项目并调整数量
const clonedItem = {
...item,
// 数量除以天数
quantity: item.quantity ? item.quantity / item.dispensePerDuration : item.quantity,
// 可以添加一个字段表示是第几天
dayIndex: i + 1,
totalDays: item.dispensePerDuration,
data: item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText,
};
// 获取当前时间做执行日期如果用药天数大于1依次累加
const date = new Date();
date.setDate(date.getDate() + i);
clonedItem.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
// 将克隆的项目添加到展开列表中不按groupId分组
expandedList.push(clonedItem);
}
} else {
// 天数为1或没有设置天数直接使用原项目
item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
expandedList.push(item);
}
});
// 重新按groupId分组但每个展开的项目都是独立的
const groupedByGroupId = expandedList.reduce((acc, item) => {
// 为展开的项目生成新的唯一groupId
const groupId = item.dayIndex
? `${item.groupId || item.requestId}_day${item.dayIndex}`
: item.groupId || item.requestId;
if (!acc[groupId]) {
acc[groupId] = [];
}
acc[groupId].push(item);
return acc;
}, {});
const resultList = Object.values(groupedByGroupId);
console.log(resultList, '23456789');
result = resultList.map((item) => {
return {
patientName: currentPatient.value.patientName,
prepareName: userStore.nickName,
genderEnum_enumText: currentPatient.value.genderEnum_enumText,
age: currentPatient.value.age,
date: item[0].performDateTime,
infuseData: item,
};
});
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
console.log(result, '打印机列表');
hiprintTemplate.print2(result, {
printer: 'Xprinter XP-365B',
height: 210,
width: 148,
});
// 直接打印回调
// 发送任务到打印机成功
hiprintTemplate.on('printSuccess', function (e) {
console.log('打印成功');
});
// 发送任务到打印机失败
hiprintTemplate.on('printError', function (e) {
console.log('打印失败');
});
}
function getRecord(row) {
getPerformRecord({ reqId: row.requestId }).then((res) => {
recordList.value = res.data;