Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js =================================================================== diff -u -r41206 -r41235 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 41206) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/departmentMonthlyDetailDSInvoiceItemView.js (.../departmentMonthlyDetailDSInvoiceItemView.js) (revision 41235) @@ -293,7 +293,7 @@ tableHtml += "数量"; tableHtml += "单价"; tableHtml += "总计(元)"; - tableHtml += "总价(元)"; + tableHtml += "总计(元)"; tableHtml += ""; tableHtml += ""; is2Column = false; @@ -385,14 +385,25 @@ isShowWeightScore = true; } } + //CDSLQYQYYY-138:更改汇总样式 + var singleDepartSum = false; + if (dataForPatternOfReport.length > 1) { + if (Ext.getCmp('patternOfReport') && Ext.getCmp('patternOfReport').getRawValue() == '按科室合计汇总样式') { + singleDepartSum = true; + } + } else if (dataForPatternOfReport.length == 1) { + if (dataForPatternOfReport[0][0] == 'singleDepartSum') { + singleDepartSum = true; + } + } var tableHtml = ''; var tableWidth = 'auto' var sumAmount = 0; var sumPrice = 0; var colspan1 = 1; var colspan2 = 1; var countTd = 12; - if (isShowTousseGroup) { + if (isShowTousseGroup && !singleDepartSum) { countTd += 1; } tableHtml += ""; @@ -406,82 +417,104 @@ tableHtml += ""; tableHtml += ""; tableHtml += ""; - if (isShowTousseGroup) { + if (isShowTousseGroup && !singleDepartSum) { tableHtml += ""; } tableHtml += ""; tableHtml += ""; tableHtml += ""; - if (sstsConfig.showSupplierNameInDetailedAccountingMonthlyReport) { + if (sstsConfig.showSupplierNameInDetailedAccountingMonthlyReport && !singleDepartSum) { tableHtml += ""; } tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - if (isShowTechnicalDifficulty) { + tableHtml += ""; + if (!singleDepartSum) { + tableHtml += ""; + } + if (isShowTechnicalDifficulty && !singleDepartSum) { tableHtml += ""; } - if (isShowWeightScore) { + if (isShowWeightScore && !singleDepartSum) { tableHtml += ""; } tableHtml += ""; tableHtml += ""; tableHtml += ""; for (var i = 0; i < data.length; i++) { var items = data[i].items; + var departHtml = ''; + if (singleDepartSum) { + colspan1 = 1; + sumAmount = 0; + colspan2 = 1; + sumPrice = 0; + } for (var j = 0; j < items.length; j++) { - tableHtml += ""; + departHtml += ""; if (j == 0) { - tableHtml += ""; - tableHtml += ""; + departHtml += ""; + departHtml += ""; } var goodsName = items[j].goodsName.split(" ").join(" "); - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; + departHtml += ""; + departHtml += ""; + departHtml += ""; colspan1 = 4; sumAmount += parseInt(items[j].amount); sumPrice += parseFloat(items[j].settlementPrice); - if (isShowTousseGroup) { - tableHtml += ""; + if (isShowTousseGroup && !singleDepartSum) { + departHtml += ""; colspan1++ } - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - if (sstsConfig.showSupplierNameInDetailedAccountingMonthlyReport) { - tableHtml += ""; + departHtml += ""; + departHtml += ""; + departHtml += ""; + if (sstsConfig.showSupplierNameInDetailedAccountingMonthlyReport && !singleDepartSum) { + departHtml += ""; colspan2 = 5; } else { colspan2 = 4; } - tableHtml += ""; - tableHtml += ""; - if (j == 0) { - tableHtml += ""; + departHtml += ""; + departHtml += ""; + if (j == 0 && !singleDepartSum) { + departHtml += ""; } - if (isShowTechnicalDifficulty) { - tableHtml += ""; + if (isShowTechnicalDifficulty && !singleDepartSum) { + departHtml += ""; } - if (isShowWeightScore) { - tableHtml += ""; + if (isShowWeightScore && !singleDepartSum) { + departHtml += ""; } + departHtml += ""; + } + tableHtml += departHtml; + if (singleDepartSum) { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; tableHtml += ""; } } - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - tableHtml += ""; - if (isShowTechnicalDifficulty) { - tableHtml += ""; + if (!singleDepartSum) { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + if (isShowTechnicalDifficulty) { + tableHtml += ""; + } + if (isShowWeightScore) { + tableHtml += ""; + } + tableHtml += ""; } - if (isShowWeightScore) { - tableHtml += ""; - } - tableHtml += ""; + tableHtml += ""; tableHtml += "
类型外部编码物品名称器械包分组数量批次单价(元)生产厂家失效日期总价(元)总价(元)总计(元)总计(元)技术难度权重分
" + data[i].applicationDepart + "" + data[i].depart + "" + data[i].applicationDepart + "" + data[i].depart + "" + items[j].type + "" + items[j].externalCode + "" + goodsName + "" + items[j].type + "" + items[j].externalCode + "" + goodsName + "" + items[j].tousseGroupName + "" + items[j].tousseGroupName + "" + items[j].amount + "" + items[j].batchNumber + "" + parseFloat(items[j].price).toFixed(moneyDigitCount) + "" + items[j].supplierName + "" + items[j].amount + "" + items[j].batchNumber + "" + parseFloat(items[j].price).toFixed(moneyDigitCount) + "" + items[j].supplierName + "" + items[j].expDate + "" + parseFloat(items[j].settlementPrice).toFixed(moneyDigitCount) + "" + parseFloat(data[i].totalPrice).toFixed(moneyDigitCount) + "" + items[j].expDate + "" + parseFloat(items[j].settlementPrice).toFixed(moneyDigitCount) + "" + parseFloat(data[i].totalPrice).toFixed(moneyDigitCount) + "" + (items[j].technicalDifficulty || '') + "" + (items[j].technicalDifficulty || '') + "" + (items[j].weightScore || '') + "" + (items[j].weightScore || '') + "
合计" + sumAmount + "" + parseFloat(sumPrice).toFixed(moneyDigitCount) + "
合计" + sumAmount + "" + parseFloat(sumPrice).toFixed(moneyDigitCount) + "
合计" + sumAmount + "" + parseFloat(sumPrice).toFixed(moneyDigitCount) + "
"; return tableHtml; @@ -522,6 +555,8 @@ reportType = 'singleDepart'; } else if (reportName == '详细日期明细核算月报') { reportType = 'detailedDate'; + } else if (reportName == '按科室合计汇总样式') { + reportType = 'singleDepartSum'; } else { continue; } @@ -1867,9 +1902,7 @@ var departSearch = Ext.getCmp('invoicePlanDepartSearch'); departSearch.setValue(orgUnitName); } - //reloadReport(); - if (dataForPatternOfReport.length < 1) { Ext.getCmp("patternOfReportLable").setVisible(false); if (urgentLevelBox) {