{ "panels": [ { "index": 1, "name": 3, "paperType": "自定义", "height": 271, "width": 80, "paperList": { "type": "自定义", "width": 80, "height": 271 }, "paperHeader": 0, "paperFooter": 766.5, "paperNumberDisabled": true, "paperNumberContinue": false, "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": 228, "title": "中药{{HOSPITAL_NAME}}", "coordinateSync": false, "widthHeightSync": false, "fontSize": 11.25, "qrCodeLevel": 0, "textAlign": "center", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 0, "top": 34.5, "height": 20, "width": 226.5, "title": "门 诊 处 方 笺", "coordinateSync": false, "widthHeightSync": false, "fontSize": 8.25, "textAlign": "center", "qrCodeLevel": 0, "fixed": true, "textDecoration": "underline" }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 175.5, "top": 37.5, "height": 14, "width": 40, "title": "普通处方", "coordinateSync": false, "widthHeightSync": false, "fixed": true, "fontSize": 8.25, "textAlign": "center", "textContentVerticalAlign": "middle", "borderLeft": "solid", "borderTop": "solid", "borderRight": "solid", "borderBottom": "solid", "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 175.5, "top": 51, "height": 14, "width": 40, "title": "当日有效", "coordinateSync": false, "widthHeightSync": false, "fontSize": 8.25, "textAlign": "center", "textContentVerticalAlign": "middle", "borderLeft": "solid", "borderRight": "solid", "borderBottom": "solid", "qrCodeLevel": 0, "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 3.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": 110.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": 3.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": 110.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": 6, "top": 105, "height": 25, "width": 30, "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": 34.5, "top": 105, "height": 25, "width": 50, "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": 84, "top": 105, "height": 25, "width": 30, "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": 114, "top": 105, "height": 25, "width": 40, "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": 153, "top": 105, "height": 25, "width": 30, "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": 182, "top": 105, "height": 25, "width": 40, "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": 6, "top": 129, "height": 25, "width": 30, "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": 36, "top": 129, "height": 25, "width": 69, "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": 103.5, "top": 129, "height": 25, "width": 40, "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": 142.5, "top": 129, "height": 25, "width": 79.5, "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": 6, "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": 57, "top": 154.5, "height": 25, "width": 165, "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": 4.5, "top": 187.5, "height": 19.5, "width": 120, "title": "Rp :", "coordinateSync": false, "widthHeightSync": false, "fixed": true, "fontSize": 13.5, "qrCodeLevel": 0 }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 9, "top": 216, "height": 10, "width": 82.5, "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": 103.5, "top": 216, "height": 10, "width": 121.5, "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": 45, "top": 234, "height": 10, "width": 180, "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": 21, "top": 249, "height": 10, "width": 169.5, "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": 9, "top": 262.5, "height": 10, "width": 81, "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": 103.5, "top": 262.5, "height": 10, "width": 121.5, "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": 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": 46.5, "top": 280.5, "height": 10, "width": 177, "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": 21, "top": 300, "height": 10, "width": 169.5, "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": 9, "top": 318, "height": 10, "width": 82.5, "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": 103.5, "top": 319.5, "height": 10, "width": 118.5, "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": 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": 46.5, "top": 337.5, "height": 10, "width": 180, "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": 21, "top": 358.5, "height": 10, "width": 169.5, "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": 9, "top": 376.5, "height": 10, "width": 82.5, "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": 103.5, "top": 376.5, "height": 10, "width": 121.5, "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": 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": 46.5, "top": 391.5, "height": 10, "width": 180, "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": 19.5, "top": 406.5, "height": 10, "width": 171, "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": 9, "top": 426, "height": 10, "width": 82.5, "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": 102, "top": 426, "height": 10, "width": 124.5, "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": 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": 46.5, "top": 441, "height": 10, "width": 178.5, "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": 19.5, "top": 462, "height": 10, "width": 169.5, "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": 165, "top": 499.5, "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": 81, "title": "药费", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "medTotalAmount", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 132, "top": 505.5, "height": 13.5, "width": 28.5, "title": "医师:", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 4.5, "top": 520.5, "height": 9, "width": 216, "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": 133.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": 79.5, "title": "发药", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "loginUserName", "fixed": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 108, "top": 556.5, "height": 13.5, "width": 117, "title": "开具日期", "coordinateSync": false, "widthHeightSync": false, "fontSize": 9, "qrCodeLevel": 0, "field": "reqTime", "fixed": true, "hideTitle": true }, "printElementType": { "title": "文本", "type": "text" } }, { "options": { "left": 6, "top": 579, "height": 9, "width": 214.5, "borderWidth": "1.5", "coordinateSync": false, "widthHeightSync": false, "fixed": true }, "printElementType": { "title": "横线", "type": "hline" } } ], "paperNumberLeft": 196, "paperNumberTop": 573 } ] }