Index: ssts-web/src/main/webapp/js/common.js =================================================================== diff -u -r33245 -r33259 --- ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 33245) +++ ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 33259) @@ -3042,6 +3042,144 @@ } /** + * 根据配置项替换名称 + */ +function replaceName(configureName) { + var newArray; + var obj = {}; + if (configureName == 'aliasNameOfForeignTousseApplicationForm') { + newArray = sstsConfig.aliasNameOfForeignTousseApplicationForm; + obj = { + applicant: '申请人', + applicationTime: '申请时间', + serialNumber: '流水号', + isInterfacePush: '接口推送', + depart: '申请科室', + settleAccountsDepart: '结算科室', + handleDepart: '处理科室', + processType: '处理方式', + hospitalNumber: '住院号', + clinicNumber: '诊疗号', + patient: '病人姓名', + patientArea: '病区', + roomNumber: '病室', + bedNumber: '床位', + patientAge: '年龄', + patientSex: '性别', + ascriptionDepartment: '病人所属科室', + surgery: '手术名称', + operationTime: '手术时间', + doctor: '医生', + operationRoom: '手术间', + supplierContactName: '供应商联系人', + supplierPhoneNumber: '联系电话', + returnContactName: '归还联系人', + returnContactPhoneNumber: '归还联系人电话', + sterilizationMethod: '灭菌方法', + sterilizationTemp: '灭菌温度(°C)', + sterilizationTime: '灭菌时间(分钟)', + dryTime: '干燥时间(分钟)', + explain: '清洗消毒的特别要求和说明', + remark: '备注', + returneeOfSupplier: '厂家归还人', + returnMan: '供应室归还人' + } + } else if (configureName == 'aliasNameOfUseRecordFields') { + newArray = sstsConfig.aliasNameOfUseRecordFields; + obj = { + hospitalNumber: '住院号', + treatmentNum: '诊疗号', + washHandNurse: '巡回护士', + circuitNurse: '巡回护士', + operationRoom: '手术间', + patientName: '姓名', + patientAge: '年龄', + patientSex: '性别', + patientArea: '病区', + departNameOfpatient: '病人所在科室', + roomNumber: '病室', + bedNumber: '床位', + patientIDCard: '身份证', + doctorName: '手术医生', + surgeon: '主刀医生', + anesthetist: '麻醉医生', + anesthesiaMode: '麻醉方式', + operation: '手术名称', + operationScheduleId: '手术单号', + operationTime: '手术时间', + visitId: '住院次数', + specialInfection: '特殊感染类型', + doctorAccountDepart: '主刀医生核算科室', + remark: '备注' + } + } + + if (newArray && typeof newArray == 'object') { + if (newArray.length > 0) { + for (var i = 0; i < newArray.length; i++) { + var fieldName = newArray[i].fieldName; + var displayText = newArray[i].displayText; + if (obj[fieldName]) { + obj[fieldName] = displayText; + } + } + } + } + + return obj; +} + +/** + * 根据配置项判断表单字段是否允许空白 + */ +function returnFieldAllowBlankObj(configureName) { + var newArray; + var obj = {}; + if (configureName == 'notAllowBlankFieldsOnUseRecordPage') { + newArray = sstsConfig.notAllowBlankFieldsOnUseRecordPage; + obj = { + hospitalNumber: true, + treatmentNum: true, + washHandNurse: true, + circuitNurse: true, + operationRoom: true, + patientName: true, + patientAge: true, + patientSex: true, + patientArea: true, + departNameOfpatient: true, + roomNumber: true, + bedNumber: true, + patientIDCard: true, + doctorName: true, + surgeon: true, + anesthetist: true, + anesthesiaMode: true, + operation: true, + operationScheduleId: true, + operationTime: true, + visitId: true, + specialInfection: true, + doctorAccountDepart: true, + remark: true + } + } + + if (newArray && typeof newArray == 'object') { + if (newArray.length > 0) { + for (var i = 0; i < newArray.length; i++) { + var fieldName = newArray[i].fieldName; + if (obj[fieldName]) { + obj[fieldName] = false; + } + } + } + } + + return obj; +} + +/** * 验证ext的form表单(暂时没有地方调用) * 仅验证表单内的可见元素(文本框、数字筐、文本域、日历控件、下拉筐等)是否有效(是否符合不允许为空、是否超出最小值与最大值的范围内) * @param formPanel @@ -4403,26 +4541,26 @@ * LZString.js */ function exportReportExcel(data, thisID, is2Column, widthArr) { - var fileName = data.fileName + data.fileType; - if (isIE()) { - var tableHtml = '
'; - tableHtml += data.html; - tableHtml += ''; - tableHtml = Base64.encode(encodeURI(tableHtml)); - var htmlTable = LZString.compressToEncodedURIComponent(tableHtml) - var jsFileName = "\\disinfectsystem\\reportforms\\js\\LZString.js"; - document.getElementById('thisIframe').contentWindow.document.getElementById('htmlFileName').value = fileName; - document.getElementById('thisIframe').contentWindow.document.getElementById('jsFileName').value = jsFileName; - document.getElementById('thisIframe').contentWindow.document.getElementById('htmlTable').value = htmlTable; - document.getElementById('thisIframe').contentWindow.document.getElementById('submitForm').click(); - exportMask.hide(); - } else { - XSExport.excelExport( - thisID, - data.fileName, - is2Column || false, - widthArr || [] - ); - exportMask.hide(); - } + var fileName = data.fileName + data.fileType; + if (isIE()) { + var tableHtml = ''; + tableHtml += data.html; + tableHtml += ''; + tableHtml = Base64.encode(encodeURI(tableHtml)); + var htmlTable = LZString.compressToEncodedURIComponent(tableHtml) + var jsFileName = "\\disinfectsystem\\reportforms\\js\\LZString.js"; + document.getElementById('thisIframe').contentWindow.document.getElementById('htmlFileName').value = fileName; + document.getElementById('thisIframe').contentWindow.document.getElementById('jsFileName').value = jsFileName; + document.getElementById('thisIframe').contentWindow.document.getElementById('htmlTable').value = htmlTable; + document.getElementById('thisIframe').contentWindow.document.getElementById('submitForm').click(); + exportMask.hide(); + } else { + XSExport.excelExport( + thisID, + data.fileName, + is2Column || false, + widthArr || [] + ); + exportMask.hide(); + } } \ No newline at end of file