{ "panels": [ { "index": 1, "name": 3, "paperType": "A5", "height": 210, "width": 148, "paperList": { "type": "A5", "width": 148, "height": 210 }, "paperHeader": 0, "paperFooter": 592.4409448818898, "paperNumberDisabled": true, "paperNumberContinue": false, "expandCss": "", "panelAngle": 0, "overPrintOptions": { "content": "", "opacity": 0.7, "type": 1 }, "watermarkOptions": { "content": "", "fillStyle": "rgba(87, 13, 248, 0.5)", "fontSize": "36px", "rotate": 25, "width": 413, "height": 310, "timestamp": true, "format": "YYYY-MM-DD HH:mm" }, "panelLayoutOptions": { "layoutType": "column", "layoutRowGap": 0, "layoutColumnGap": 0 }, "printElements": [ { "options": { "left": 0, "top": 20, "height": 19.5, "width": 420, "title": "{{HOSPITAL_NAME}}", "coordinateSync": false, "widthHeightSync": false, "fontSize": 11.25, "qrCodeLevel": 0, "textAlign": "center", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 336, "top": 25.5, "height": 18, "width": 55.5, "title": "普通处方", "coordinateSync": false, "widthHeightSync": false, "fixed": true, "fontSize": 11.25, "textAlign": "center", "textContentVerticalAlign": "middle", "borderLeft": "solid", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 0, "top": 34.5, "height": 20, "width": 420, "title": "门 诊 处 方 笺", "coordinateSync": false, "widthHeightSync": false, "fontSize": 8.25, "textAlign": "center", "qrCodeLevel": 0, "fixed": true, "textDecoration": "underline" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 336.2461395263672, "top": 42.75, "height": 18, "width": 55.5, "title": "当日有效", "coordinateSync": false, "widthHeightSync": false, "fontSize": 11.25, "textAlign": "center", "textContentVerticalAlign": "middle", "borderLeft": "solid", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "qrCodeLevel": 0, "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 30.5, "top": 69, "height": 13.5, "width": 100, "title": "费别", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "contractName", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 236.5, "top": 69, "height": 13.5, "width": 117, "title": "门诊号", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "encounterNo", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 30.5, "top": 88.5, "height": 13.5, "width": 100, "title": "科室", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "departmentName", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 236.5, "top": 88.5, "height": 13.5, "width": 117, "title": "处方号", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "fixed": true, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[0].prescriptionNo的值\n let prescriptionNoValue = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[0] && \n templateData.prescriptionList[0].prescriptionNo !== undefined) {\n \n prescriptionNoValue = templateData.prescriptionList[0].prescriptionNo;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `处方号:   ${prescriptionNoValue || ''}`;\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 21, "top": 106.5, "height": 25, "width": 52, "title": "姓名", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 72, "top": 106.5, "height": 25, "width": 75, "title": "姓名", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "patientName", "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 147, "top": 106.5, "height": 25, "width": 52, "title": "性别", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 198, "top": 106.5, "height": 25, "width": 75, "title": "性别", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "genderEnum_enumText", "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 273, "top": 106.5, "height": 25, "width": 53, "title": "年龄", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 325.5, "top": 106.5, "height": 25, "width": 75, "title": "年龄", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderTop": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "age", "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 21, "top": 130.5, "height": 25, "width": 52, "title": "联系电话", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 72, "top": 130.5, "height": 25, "width": 96, "title": "联系电话", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "phone", "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 168, "top": 130.5, "height": 25, "width": 66, "title": "身份证号", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 234, "top": 130.5, "height": 25, "width": 167, "title": "身份证号", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "idCard", "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 21, "top": 154.5, "height": 25, "width": 52, "title": "诊断", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textAlign": "center", "textContentVerticalAlign": "middle", "borderRight": "solid", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 72, "top": 154.5, "height": 25, "width": 329, "title": "诊断", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "textContentVerticalAlign": "middle", "borderBottom": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "field": "conditionName", "hideTitle": true, "contentPaddingLeft": 15 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 28.5, "top": 198, "height": 19.5, "width": 120, "title": "Rp :", "coordinateSync": false, "widthHeightSync": false, "fixed": true, "fontSize": 13.5, "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 27, "top": 225, "height": 10, "width": 120, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[0].itemName的值\n let itemNameValue = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[0] && \n templateData.prescriptionList[0].itemName !== undefined) {\n \n itemNameValue = templateData.prescriptionList[0].itemName;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `${itemNameValue || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 168, "top": 225, "height": 10, "width": 230, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[0]) {\n \n // 获取需要的字段值\n const totalVolume = templateData.prescriptionList[0].totalVolume || ''; // 规格\n const quantity = templateData.prescriptionList[0].quantity || ''; // 数量,如1\n const unitCode_dictText= templateData.prescriptionList[0].unitCode_dictText || '';// 单位\n \n // 构建格式化的文本\n // 格式:浓度:总量/单位 ×数量 单位\n formattedText = `${totalVolume}/${unitCode_dictText}×${quantity}${unitCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 75, "top": 244.5, "height": 10, "width": 300, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[0]) {\n \n // 获取需要的字段值\n const dose = templateData.prescriptionList[0].dose || ''; // 规格\n const doseUnitCode_dictText = templateData.prescriptionList[0].doseUnitCode_dictText || ''; // 数量,如1\n const rateCode_dictText = templateData.prescriptionList[0].rateCode_dictText || ''; // 数量,如1\n const methodCode_dictText= templateData.prescriptionList[0].methodCode_dictText || '';// 单位\n \n // 格式\n formattedText = `用法:${dose}${doseUnitCode_dictText} ${rateCode_dictText} ${methodCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 139.5, "top": 261, "height": 10, "width": 261, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[0]) {\n \n // 获取需要的字段值\n const lotNumber = templateData.prescriptionList[0].lotNumber || ''; // 批次号\n const manufacturerText = templateData.prescriptionList[0].manufacturerText || ''; // 数量,如1\n \n \n // 格式\n formattedText = ` ${manufacturerText} `;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "textAlign": "right", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 46, "top": 270, "height": 9.75, "width": 120, "transform": -10, "title": " ", "coordinateSync": false, "widthHeightSync": false, "borderTop": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "styler": "function(value, options, target, templateData, paperNo) {\n // 检查templateData中是否存在adviceItemList,并且其长度等于4\n if (templateData && templateData.adviceItemList && templateData.prescriptionList.length === 1) {\n // 如果adviceItemList长度为4,正常显示\n return { color: 'red' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 27, "top": 281, "height": 10, "width": 120, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[1].itemName的值\n let itemNameValue = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[1] && \n templateData.prescriptionList[1].itemName !== undefined) {\n \n itemNameValue = templateData.prescriptionList[1].itemName;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `${itemNameValue || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 166.5, "top": 281, "height": 10, "width": 230, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[1]) {\n \n // 获取需要的字段值\n const totalVolume = templateData.prescriptionList[1].totalVolume || ''; // 规格\n const quantity = templateData.prescriptionList[1].quantity || ''; // 数量,如1\n const unitCode_dictText= templateData.prescriptionList[1].unitCode_dictText || '';// 单位\n \n // 构建格式化的文本\n // 格式:浓度:总量/单位 ×数量 单位\n formattedText = `${totalVolume}/${unitCode_dictText}×${quantity}${unitCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 75, "top": 299, "height": 10, "width": 300, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[1]) {\n \n // 获取需要的字段值\n const dose = templateData.prescriptionList[1].dose || ''; // 规格\n const doseUnitCode_dictText = templateData.prescriptionList[1].doseUnitCode_dictText || ''; // 数量,如1\n const rateCode_dictText = templateData.prescriptionList[1].rateCode_dictText || ''; // 数量,如1\n const methodCode_dictText= templateData.prescriptionList[1].methodCode_dictText || '';// 单位\n \n // 格式\n formattedText = `用法:${dose}${doseUnitCode_dictText} ${rateCode_dictText} ${methodCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 139.5, "top": 317, "height": 10, "width": 261, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[1]) {\n \n // 获取需要的字段值\n const lotNumber = templateData.prescriptionList[1].lotNumber || ''; // 批次号\n const manufacturerText = templateData.prescriptionList[1].manufacturerText || ''; // 数量,如1\n \n \n // 格式\n formattedText = ` ${manufacturerText} `;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "textAlign": "right", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 46, "top": 325, "height": 9.75, "width": 120, "transform": -10, "title": " ", "coordinateSync": false, "widthHeightSync": false, "borderTop": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "styler": "function(value, options, target, templateData, paperNo) {\n // 检查templateData中是否存在adviceItemList,并且其长度等于4\n if (templateData && templateData.adviceItemList && templateData.prescriptionList.length === 2) {\n // 如果adviceItemList长度为4,正常显示\n return { color: 'red' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 168, "top": 336, "height": 10, "width": 230, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[2]) {\n \n // 获取需要的字段值\n const totalVolume = templateData.prescriptionList[2].totalVolume || ''; // 规格\n const quantity = templateData.prescriptionList[2].quantity || ''; // 数量,如1\n const unitCode_dictText= templateData.prescriptionList[2].unitCode_dictText || '';// 单位\n \n // 构建格式化的文本\n // 格式:浓度:总量/单位 ×数量 单位\n formattedText = `${totalVolume}/${unitCode_dictText}×${quantity}${unitCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 27, "top": 337, "height": 10, "width": 120, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "fontSize": 9.75, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[2].itemName的值\n let itemNameValue = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[2] && \n templateData.prescriptionList[2].itemName !== undefined) {\n \n itemNameValue = templateData.prescriptionList[2].itemName;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `${itemNameValue || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 75, "top": 355, "height": 10, "width": 300, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[2]) {\n \n // 获取需要的字段值\n const dose = templateData.prescriptionList[2].dose || ''; // 规格\n const doseUnitCode_dictText = templateData.prescriptionList[2].doseUnitCode_dictText || ''; // 数量,如1\n const rateCode_dictText = templateData.prescriptionList[2].rateCode_dictText || ''; // 数量,如1\n const methodCode_dictText= templateData.prescriptionList[2].methodCode_dictText || '';// 单位\n \n // 格式\n formattedText = `用法:${dose}${doseUnitCode_dictText} ${rateCode_dictText} ${methodCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 139.5, "top": 373, "height": 10, "width": 261, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[2]) {\n \n // 获取需要的字段值\n const lotNumber = templateData.prescriptionList[2].lotNumber || ''; // 批次号\n const manufacturerText = templateData.prescriptionList[2].manufacturerText || ''; // 数量,如1\n \n \n // 格式\n formattedText = ` ${manufacturerText} `;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "textAlign": "right", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 47, "top": 382, "height": 9.75, "width": 120, "transform": -10, "title": " ", "coordinateSync": false, "widthHeightSync": false, "borderTop": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "styler": "function(value, options, target, templateData, paperNo) {\n // 检查templateData中是否存在adviceItemList,并且其长度等于4\n if (templateData && templateData.adviceItemList && templateData.prescriptionList.length === 3) {\n // 如果adviceItemList长度为4,正常显示\n return { color: 'red' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 27, "top": 393, "height": 10, "width": 120, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[3].itemName的值\n let itemNameValue = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[3] && \n templateData.prescriptionList[3].itemName !== undefined) {\n \n itemNameValue = templateData.prescriptionList[3].itemName;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `${itemNameValue || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 166.5, "top": 393, "height": 10, "width": 230, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[3]) {\n \n // 获取需要的字段值\n const totalVolume = templateData.prescriptionList[3].totalVolume || ''; // 规格\n const quantity = templateData.prescriptionList[3].quantity || ''; // 数量,如1\n const unitCode_dictText= templateData.prescriptionList[3].unitCode_dictText || '';// 单位\n \n // 构建格式化的文本\n // 格式:浓度:总量/单位 ×数量 单位\n formattedText = `${totalVolume}/${unitCode_dictText}×${quantity}${unitCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 75, "top": 411, "height": 10, "width": 300, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[3]) {\n \n // 获取需要的字段值\n const dose = templateData.prescriptionList[3].dose || ''; // 规格\n const doseUnitCode_dictText = templateData.prescriptionList[3].doseUnitCode_dictText || ''; // 数量,如1\n const rateCode_dictText = templateData.prescriptionList[3].rateCode_dictText || ''; // 数量,如1\n const methodCode_dictText= templateData.prescriptionList[3].methodCode_dictText || '';// 单位\n \n // 格式\n formattedText = `用法:${dose}${doseUnitCode_dictText} ${rateCode_dictText} ${methodCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 139.5, "top": 429, "height": 10, "width": 261, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[3]) {\n \n // 获取需要的字段值\n const lotNumber = templateData.prescriptionList[3].lotNumber || ''; // 批次号\n const manufacturerText = templateData.prescriptionList[3].manufacturerText || ''; // 数量,如1\n \n \n // 格式\n formattedText = ` ${manufacturerText} `;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "textAlign": "right", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 49, "top": 434.5, "height": 9.75, "width": 120, "transform": -10, "title": " ", "coordinateSync": false, "widthHeightSync": false, "borderTop": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "styler": "function(value, options, target, templateData, paperNo) {\n // 检查templateData中是否存在adviceItemList,并且其长度等于4\n if (templateData && templateData.adviceItemList && templateData.prescriptionList.length === 4) {\n // 如果adviceItemList长度为4,正常显示\n return { color: 'red' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 27, "top": 449, "height": 10, "width": 120, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取prescriptionList[4].itemName的值\n let itemNameValue = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[4] && \n templateData.prescriptionList[4].itemName !== undefined) {\n \n itemNameValue = templateData.prescriptionList[4].itemName;\n }\n } catch (error) {\n console.error('获取剂量值时出错:', error);\n }\n \n return `${itemNameValue || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 166.5, "top": 449, "height": 10, "width": 230, "title": "请输入标题", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n // 注意:根据截图,templateData本身就是包含prescriptionList的对象\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[4]) {\n \n // 获取需要的字段值\n const totalVolume = templateData.prescriptionList[4].totalVolume || ''; // 规格\n const quantity = templateData.prescriptionList[4].quantity || ''; // 数量,如1\n const unitCode_dictText= templateData.prescriptionList[4].unitCode_dictText || '';// 单位\n \n // 构建格式化的文本\n // 格式:浓度:总量/单位 ×数量 单位\n formattedText = `${totalVolume}/${unitCode_dictText}×${quantity}${unitCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 75, "top": 467, "height": 10, "width": 300, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[4]) {\n \n // 获取需要的字段值\n const dose = templateData.prescriptionList[4].dose || ''; // 规格\n const doseUnitCode_dictText = templateData.prescriptionList[4].doseUnitCode_dictText || ''; // 数量,如1\n const rateCode_dictText = templateData.prescriptionList[4].rateCode_dictText || ''; // 数量,如1\n const methodCode_dictText= templateData.prescriptionList[4].methodCode_dictText || '';// 单位\n \n // 格式\n formattedText = `用法:${dose}${doseUnitCode_dictText} ${rateCode_dictText} ${methodCode_dictText}`;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 139.5, "top": 485, "height": 10, "width": 261, "title": "", "field": "vcc", "coordinateSync": false, "widthHeightSync": false, "hideTitle": true, "qrCodeLevel": 0, "formatter": "function(title, value, options, templateData, target, paperNo) {\n // 安全获取并格式化药物规格信息\n let formattedText = '';\n \n try {\n if (templateData && templateData.prescriptionList && \n Array.isArray(templateData.prescriptionList) && \n templateData.prescriptionList[4]) {\n \n // 获取需要的字段值\n const lotNumber = templateData.prescriptionList[4].lotNumber || ''; // 批次号\n const manufacturerText = templateData.prescriptionList[4].manufacturerText || ''; // 数量,如1\n \n \n // 格式\n formattedText = ` ${manufacturerText} `;\n }\n } catch (error) {\n console.error('格式化药物规格信息时出错:', error);\n }\n \n return `${formattedText || ''}`;\n}", "textAlign": "right", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 50, "top": 496, "height": 9.75, "width": 120, "transform": -10, "title": " ", "coordinateSync": false, "widthHeightSync": false, "borderTop": "solid", "borderWidth": "1.5", "qrCodeLevel": 0, "styler": "function(value, options, target, templateData, paperNo) {\n // 检查templateData中是否存在adviceItemList,并且其长度等于4\n if (templateData && templateData.adviceItemList && templateData.prescriptionList.length === 5) {\n // 如果adviceItemList长度为4,正常显示\n return { color: 'red' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 306, "top": 501, "height": 20, "width": 45, "title": "undefined+beforeDragIn", "field": "doctorSignature", "fit": "", "coordinateSync": false, "widthHeightSync": false, "styler": "function(value, options, target, templateData, paperNo) {\n if (templateData.doctorSignature) {\n // 如果doctorSignature存在,正常显示\n return { border: '0px' };\n } else {\n // 否则隐藏元素\n return { display: 'none' };\n }\n}" }, "printElementType": { "title": "图片", "type": "image" } }, { "options": { "left": 19.5, "top": 505.5, "height": 13.5, "width": 186, "title": "药费", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "medTotalAmount", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 265.5, "top": 507, "height": 13.5, "width": 28.5, "title": "医师:", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 20, "top": 524.25, "height": 9, "width": 380, "borderWidth": "1.5", "coordinateSync": false, "widthHeightSync": false, "fixed": true }, "printElementType": { "title": "横线", "type": "hline" } }, { "options": { "left": 19.5, "top": 529.5, "height": 13.5, "width": 100, "title": "核对", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "nickNames", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 223.5, "top": 529.5, "height": 13.5, "width": 93, "title": "调配", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "nickNames", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 19.5, "top": 556.5, "height": 13.5, "width": 100, "title": "发药", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "loginUserName", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 186, "top": 556.5, "height": 13.5, "width": 210, "title": "开具日期", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "reqTime", "fixed": true, "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 20, "top": 574.5, "height": 9, "width": 380, "borderWidth": "1.5", "coordinateSync": false, "widthHeightSync": false, "fixed": true }, "printElementType": { "title": "横线", "type": "hline" } } ], "paperNumberLeft": 236, "paperNumberTop": 573 } ] }