Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js
===================================================================
diff -u -r31253 -r32171
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 31253)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringView.js (.../qualityMonitoringView.js) (revision 32171)
@@ -112,11 +112,14 @@
}
var fixedColumnIndex = 0;
if (tableHeader.indexOf('日期') >= 0) {
- fixedColumnIndex = fixedColumnIndex + 1;
+ fixedColumnIndex += 1;
}
- if (tableHeader.indexOf('物品名称') >= 0 || tableHeader.indexOf('器械包名称')) {
- fixedColumnIndex = fixedColumnIndex + 2;
+ if (tableHeader.indexOf('物品名称') >= 0 || tableHeader.indexOf('器械包名称') >= 0) {
+ fixedColumnIndex += 2;
}
+ if (tableHeader.indexOf('器械包材料总件数') >= 0) {
+ fixedColumnIndex += 2;
+ }
var columnWidthSum = widthSum + (tableHeader.length + fixedColumnIndex) * columnWidth;
tableHeader1 = arraySort(tableHeader1)
var newTableHeader = tableHeader.concat(tableHeader1)
@@ -174,6 +177,8 @@
width = columnWidth * 3;
}else if (name == '材料名称') {
width = 80;
+ }else if (name == '器械包材料总件数') {
+ width = columnWidth * 3;
}
if (rowspan > 1 || (rowspan == 1 && Object.keys(tableHeaderMap).length == 0)) {
tableHtml += "
" + name + " | ";
@@ -284,7 +289,14 @@
}
if (dateTime !== '材料数量汇总' && dateTime !== '汇总') {
- var name = goodsName.split('%&').length == 1 ? goodsName : goodsName.split('%&')[0];
+ var name = '';
+ var sumAmount = 0
+ if(goodsName.split('%&').length == 1){
+ name = goodsName;
+ }else {
+ name = goodsName.split('%&')[0] || '';
+ sumAmount = goodsName.split('%&')[2] || 0;
+ }
name = (name == '空') ? '' : name;
tableHtml += "";
if (dateTimeIndex == 1) {
@@ -293,6 +305,9 @@
if (index == 1) {
tableHtml += "" + name + " | ";
}
+ if (result.fixedColumnNames.indexOf('器械包材料总件数') >= 0) {
+ tableHtml += ""+sumAmount+" | ";
+ }
tableHtml += trHtml;
tableHtml += "
";
}
@@ -309,6 +324,9 @@
if (result.scope == "材料和器械包") {
tableHtml += " | ";
}
+ if (result.fixedColumnNames.indexOf('器械包材料总件数') >= 0) {
+ tableHtml += " | ";
+ }
tableHtml += tdHtml;
tableHtml += "";
}
@@ -501,6 +519,7 @@
var monitoringTypeId = $Id('monitoringType').RawValue;
var inspectItemId = Ext.getCmp('inspectItem').getValue();
var formName = Ext.getCmp('inspectItem').getRawValue();
+ var isShowTousseMaerialSumAmount = Ext.getCmp('isShowTousseMaerialSumAmount').getValue() || false;
if (formName == "") {
showResult("请选择监测项");
return;
@@ -535,6 +554,7 @@
materialName: materialName,
tousseName: tousseName,
inspectItemId: inspectItemId,
+ isShowTousseMaerialSumAmount:isShowTousseMaerialSumAmount,
reportName: 'QualityMonitoring'
}
Ext.Ajax.request({
@@ -621,7 +641,8 @@
root: 'data'
}, [
{ name: 'id' },
- { name: 'name' }
+ { name: 'name' },
+ { name: 'scope'}
]
)
});
@@ -683,11 +704,11 @@
// bodyStyle : 'padding: 10px 10px 0px 10px;',
frame: true,
bodyStyle: 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px;
- height: 140,
+ height: 150,
labelWidth: 90,
items: [{
layout: 'column',
- height: 60,
+ height: 70,
items: [{
columnWidth: .2,
layout: 'form',
@@ -809,7 +830,16 @@
triggerAction: 'all',
hideTrigger: false,
typeAhead: false,
- allowBlank: false
+ allowBlank: false,
+ listeners: {
+ select: function (combo, record, index) {
+ if(record.data.scope == '材料和器械包'){
+ Ext.getCmp('showCheckBox').show();
+ }else {
+ Ext.getCmp('showCheckBox').hide();
+ }
+ }
+ }
}]
}, {
layout: 'form',
@@ -855,6 +885,19 @@
typeAhead: false,
allowBlank: true
}]
+ }, {
+ layout: 'form',
+ columnWidth: .2,
+ id:'showCheckBox',
+ hidden:true,
+ items: [new Ext.form.Checkbox({
+ boxLabel: '显示器械包材料总件数',
+ id: 'isShowTousseMaerialSumAmount',
+ name: 'isShowTousseMaerialSumAmount',
+ style:'vertical-align: middle;margin-top: -1px;',
+ itemCls:'float-left',
+ clearCls:'stop-float'
+ })]
}]
}],
buttons: [{