Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseTraceabilityInquiry.js =================================================================== diff -u -r37259 -r37516 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseTraceabilityInquiry.js (.../tousseTraceabilityInquiry.js) (revision 37259) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseTraceabilityInquiry.js (.../tousseTraceabilityInquiry.js) (revision 37516) @@ -5,10 +5,10 @@ var title; //GDSRMYY-575:手术仪器追溯查询名称自定义 -if(sstsConfig.aliasNameOfSurgicalInstrumentsManagement){ +if (sstsConfig.aliasNameOfSurgicalInstrumentsManagement) { var aliasNameOfSurgicalInstrumentsManagement = sstsConfig.aliasNameOfSurgicalInstrumentsManagement || []; - for(var i=0;i"; html += ""; - html += getTableHeadHtml(isEnableTousseOpDestLocation,isEnableTousseOpRecipient,recipientColumnName); + html += getTableHeadHtml(isEnableTousseOpDestLocation, isEnableTousseOpRecipient, recipientColumnName); html += ""; html += ""; - html += getTableBodyHtml(result.data, isEnableTousseOpDestLocation,isEnableTousseOpRecipient); + html += getTableBodyHtml(result.data, isEnableTousseOpDestLocation, isEnableTousseOpRecipient); html += ""; html += ""; return html; } //获取表内容的html -function getTableBodyHtml(data, isEnableTousseOpDestLocation,isEnableTousseOpRecipient) { +function getTableBodyHtml(data, isEnableTousseOpDestLocation, isEnableTousseOpRecipient) { var html = ''; for (var i = 0; i < data.length; i++) { var dataItem = data[i]; - html+=getBodyTd(dataItem.signedDateStr, 1, 1); - html+=getBodyTd(dataItem.operationTimeStr, 1, 1); - html+=getBodyTd(dataItem.tousseName, 1, 1); - html+=getBodyTd(dataItem.amount, 1, 1); - if(isEnableTousseOpDestLocation){ - html+=getBodyTd(dataItem.destDepart, 1, 1); - html+=getBodyTd(dataItem.destLocation, 1, 1); + html += getBodyTd(dataItem.signedDateStr, 1, 1); + html += getBodyTd(dataItem.operationTimeStr, 1, 1); + html += getBodyTd(dataItem.tousseName, 1, 1); + html += getBodyTd(dataItem.amount, 1, 1); + if (isEnableTousseOpDestLocation) { + html += getBodyTd(dataItem.destDepart, 1, 1); + html += getBodyTd(dataItem.destLocation, 1, 1); } - html+=getBodyTd(dataItem.operator, 1, 1); - if(isEnableTousseOpRecipient){ - html+=getBodyTd(dataItem.recipient, 1, 1); + html += getBodyTd(dataItem.operator, 1, 1); + if (isEnableTousseOpRecipient) { + html += getBodyTd(dataItem.recipient, 1, 1); } - html+=getBodyTd(dataItem.handover, 1, 1); - html+=getBodyTd(dataItem.status, 1, 1); - html+=getBodyTd(dataItem.destLocationType, 1, 1); - html+=getBodyTd(dataItem.recyclingStatus, 1, 1); - html+=getBodyTd(dataItem.supplyRoomPosition, 1, 1); - - html+=getBodyTd(dataItem.idCardInstanceBarcode, 1, 1); - html+=getBodyTd(dataItem.barcode, 1, 1); + html += getBodyTd(dataItem.handover, 1, 1); + html += getBodyTd(dataItem.status, 1, 1); + html += getBodyTd(dataItem.destLocationType, 1, 1); + html += getBodyTd(dataItem.recyclingStatus, 1, 1); + html += getBodyTd(dataItem.supplyRoomPosition, 1, 1); + + html += getBodyTd(dataItem.idCardInstanceBarcode, 1, 1); + html += getBodyTd(dataItem.barcode, 1, 1); html += ''; } return html; } //获取表头html -function getTableHeadHtml(isEnableTousseOpDestLocation,isEnableTousseOpRecipient,recipientColumnName) { +function getTableHeadHtml(isEnableTousseOpDestLocation, isEnableTousseOpRecipient, recipientColumnName) { var html = ''; - var columnNameArray = getTableHeaderColumnArray(isEnableTousseOpDestLocation,isEnableTousseOpRecipient,recipientColumnName); + var columnNameArray = getTableHeaderColumnArray(isEnableTousseOpDestLocation, isEnableTousseOpRecipient, recipientColumnName); html += ''; for (var i = 0; i < columnNameArray.length; i++) { html += getHeadTd(columnNameArray[i].name, columnNameArray[i].width, 1, 1); @@ -79,14 +79,14 @@ return html; } //获取表头列 -function getTableHeaderColumnArray(isEnableTousseOpDestLocation,isEnableTousseOpRecipient,recipientColumnName) { +function getTableHeaderColumnArray(isEnableTousseOpDestLocation, isEnableTousseOpRecipient, recipientColumnName) { var columnNameArray = [{ name: '签收时间', width: 100 }, { name: '交接时间', width: 100 - },{ + }, { name: '仪器名称', width: 150 }, { @@ -97,7 +97,7 @@ columnNameArray.push({ name: "手术区号", width: 150 - },{ + }, { name: "目的位置", width: 120 }) @@ -118,7 +118,7 @@ }, { name: '状态', width: 50 - },{ + }, { name: '当前区间', width: 100 }, { @@ -148,33 +148,33 @@ var html = '' + value + ''; return html; } -function reloadReport(){ +function reloadReport() { if (!form.getForm().isValid()) { showResult('请正确填写表单各值'); return false; } - + var barcode = Ext.getCmp('barcode').getValue(); var tousseName = Ext.getCmp('tousse').getRawValue(); var destinationLocation = Ext.getCmp('destinationLocation').getValue(); var destinationLocationRaw = Ext.getCmp('destinationLocation').getRawValue(); if (!destinationLocationRaw) { destinationLocation = ''; } - + if (barcode && !isBarcodeValid(barcode, false)) { showResult('请扫描正确的条码'); return false; } - + var startTime = $Id('startTime').value; var endTime = $Id('endTime').value; var queryType = Ext.getCmp('queryType').getRawValue(); var handover = Ext.getCmp('handover').getRawValue(); var recipient = Ext.getCmp('recipient').getRawValue(); var mergeRawValue = Ext.getCmp('merge').getRawValue(); var merge = false; - if('是' == mergeRawValue){ + if ('是' == mergeRawValue) { merge = true; } myMask = new Ext.LoadMask(Ext.getBody(), { @@ -184,15 +184,15 @@ myMask.show(); var url = WWWROOT + '/jasperreports/jasperreportsAction!queryDataSourceList.do'; var params = { - barcode : barcode, - tousseName : tousseName, - destinationLocation : destinationLocation, - startTime:startTime, - endTime:endTime, - recipient:recipient, - queryType:queryType, - merge:merge, - handover:handover, + barcode: barcode, + tousseName: tousseName, + destinationLocation: destinationLocation, + startTime: startTime, + endTime: endTime, + recipient: recipient, + queryType: queryType, + merge: merge, + handover: handover, reportName: 'tousseTraceabilityInquiry' } Ext.Ajax.request({ @@ -214,7 +214,7 @@ } -Ext.onReady(function() { +Ext.onReady(function () { Ext.QuickTips.init(); var dt = new Date(); var fullYear = dt.getFullYear(); @@ -223,139 +223,139 @@ var endOfToday = new Date(Date.parse(currentDate + " 23:59:59")); //“器械包combo”的数据储存器 var tousseStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseByTypeArr.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseByTypeArr.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' }, [ - {name : 'id',mapping : 'id'}, - {name : 'name',mapping : 'name'}] + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' }] ) }); - // 查找某科室的人员的store - var userReader = new Ext.data.JsonReader({ + // 查找某科室的人员的store + var userReader = new Ext.data.JsonReader({ fields: [ { name: 'id' }, { name: 'fullName' }, { name: 'orgUnitName' } ] }); - var userReaderVo = Ext.data.Record.create([ - {name: 'fullName', type: 'string'} - ]); - // 查找某科室的人员的store + var userReaderVo = Ext.data.Record.create([ + { name: 'fullName', type: 'string' } + ]); + // 查找某科室的人员的store var departUsersStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ - url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do?departCode='+filterDepartCode, + url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do?departCode=' + filterDepartCode, method: 'POST' }), reader: userReader, - listeners : { - load :function (thiz,records,options ){ - if(departUsersStore.getCount() > 1){ - departUsersStore.insert(0 , new userReaderVo({'fullName':'全部'})); + listeners: { + load: function (thiz, records, options) { + if (departUsersStore.getCount() > 1) { + departUsersStore.insert(0, new userReaderVo({ 'fullName': '全部' })); } } } }); //目的位置的Store var destinationLocationJsonStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getPositionJson.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getPositionJson.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'id'}, - {name : 'type',mapping : 'type'}, - {name : 'name',mapping : 'name'}, - {name : 'orgUnitCoding',mapping : 'orgUnitCoding'}, - {name : 'orgUnitName',mapping : 'orgUnitName'}, - {name : 'displayStr',mapping : 'displayStr'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'id', mapping: 'id' }, + { name: 'type', mapping: 'type' }, + { name: 'name', mapping: 'name' }, + { name: 'orgUnitCoding', mapping: 'orgUnitCoding' }, + { name: 'orgUnitName', mapping: 'orgUnitName' }, + { name: 'displayStr', mapping: 'displayStr' } + ] ) }); - + form = new Ext.form.FormPanel({ - title : entityName, - region : 'north', - labelAlign : 'right', - buttonAlign : 'center', - collapsible : true, - collapseMode : 'mini', - split : true, - border : 0, - frame : true, - bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; - height : 160, - items : [{ - layout : 'column', - height : 90, - labelWidth : 70, - items : [{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'datefieldWithMin', - fieldLabel : '开始日期', - id : 'startTime', - name : 'startTime', - editable : false, - format : 'Y-m-d H:i', - altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', - allowBlank : false, - anchor : '95%', - value:new Date(startDayofMonth), - listeners : { - specialkey : function(field, e) { + title: entityName, + region: 'north', + labelAlign: 'right', + buttonAlign: 'center', + collapsible: true, + collapseMode: 'mini', + split: true, + border: 0, + frame: true, + bodyStyle: 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; + height: 160, + items: [{ + layout: 'column', + height: 90, + labelWidth: 70, + items: [{ + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'datefieldWithMin', + fieldLabel: '开始日期', + id: 'startTime', + name: 'startTime', + editable: false, + format: 'Y-m-d H:i', + altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + allowBlank: false, + anchor: '95%', + value: new Date(startDayofMonth), + listeners: { + specialkey: function (field, e) { if (e.getKey() == Ext.EventObject.ENTER) { var isOK = field.validate(); - if(isOK){ + if (isOK) { var value = field.getValue(); field.setValue(value); var endTime = Ext.getCmp('endTime'); endTime.setValue(''); endTime.focus(); } - + } } } }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'datefieldWithMin', - fieldLabel : '结束日期', - id : 'endTime', - name : 'endTime', - editable : false, - format : 'Y-m-d H:i', - altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', - allowBlank : false, - anchor : '95%', + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'datefieldWithMin', + fieldLabel: '结束日期', + id: 'endTime', + name: 'endTime', + editable: false, + format: 'Y-m-d H:i', + altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + allowBlank: false, + anchor: '95%', value: endOfToday, - theHours : 23, - theMinutes : 59, - listeners : { - specialkey : function(field, e) { + theHours: 23, + theMinutes: 59, + listeners: { + specialkey: function (field, e) { if (e.getKey() == Ext.EventObject.ENTER) { var isOK = field.validate(); - if(isOK){ + if (isOK) { var value = field.getValue(); field.setValue(value); } - + } } } }] - },{ + }, { layout: 'form', columnWidth: .25, items: [{ @@ -381,24 +381,24 @@ listWidth: 130, allowBlank: false }] - },{ + }, { columnWidth: .25, - layout : 'form', - labelSeparator : '器械包:', - items : [{ - xtype : 'combo', - id : 'tousse', - name : 'tousse', - valueField : 'id', - displayField : 'name', - store : tousseStore, - forceSelection : true, - triggerAction : 'all', - queryParam : 'spell', - minChars : 0, - anchor : '95%' + layout: 'form', + labelSeparator: '器械包:', + items: [{ + xtype: 'combo', + id: 'tousse', + name: 'tousse', + valueField: 'id', + displayField: 'name', + store: tousseStore, + forceSelection: true, + triggerAction: 'all', + queryParam: 'spell', + minChars: 0, + anchor: '95%' }] - },{ + }, { layout: 'form', columnWidth: .25, items: [{ @@ -412,7 +412,7 @@ value: '全部', store: new Ext.data.SimpleStore({ fields: ['value'], - data: [['全部'],['是'], ['否']] + data: [['全部'], ['是'], ['否']] }), mode: 'local', forceSelection: true, @@ -424,26 +424,26 @@ listWidth: 130, allowBlank: false }] - },{ + }, { columnWidth: .25, - layout : 'form', - labelSeparator : '领用人:', + layout: 'form', + labelSeparator: '领用人:', hidden: !isEnableTousseOpRecipient, - items : [{ - xtype : 'combo', - id : 'recipient', - name : 'recipient', - valueField : 'fullName', - displayField : 'fullName', - store : departUsersStore, - forceSelection : true, - triggerAction : 'all', - queryParam : 'spell', - minChars : 0, + items: [{ + xtype: 'combo', + id: 'recipient', + name: 'recipient', + valueField: 'fullName', + displayField: 'fullName', + store: departUsersStore, + forceSelection: true, + triggerAction: 'all', + queryParam: 'spell', + minChars: 0, value: '全部', - anchor : '95%' + anchor: '95%' }] - },{ + }, { layout: 'form', columnWidth: .25, items: [{ @@ -469,57 +469,57 @@ listWidth: 130, allowBlank: false }] - },{ + }, { columnWidth: .25, - layout : 'form', - labelSeparator : '扫描条码:', - items : [{ - xtype : 'textfield', - id : 'barcode', - name : 'barcode', - anchor : '95%', - listeners : { - specialkey : function(field, ee) { + layout: 'form', + labelSeparator: '扫描条码:', + items: [{ + xtype: 'textfield', + id: 'barcode', + name: 'barcode', + anchor: '95%', + listeners: { + specialkey: function (field, ee) { if (ee.getKey() == Ext.EventObject.ENTER) { reloadReport(); } } } }] - },{ + }, { columnWidth: 0.25, - layout : 'form', - labelSeparator : '目的位置:', + layout: 'form', + labelSeparator: '目的位置:', hidden: !isEnableTousseOpDestLocation, - items : [{ - xtype : 'combo', - id : 'destinationLocation', - name : 'destinationLocation', - valueField : 'name', - displayField : 'displayStr', - store : destinationLocationJsonStore, - forceSelection : true, - triggerAction : 'all', - queryParam : 'spell', - minChars : 0, - anchor : '95%' + items: [{ + xtype: 'combo', + id: 'destinationLocation', + name: 'destinationLocation', + valueField: 'name', + displayField: 'displayStr', + store: destinationLocationJsonStore, + forceSelection: true, + triggerAction: 'all', + queryParam: 'spell', + minChars: 0, + anchor: '95%' }] }] }], - buttons:[{ - xtype : 'button', - text : '查询', - minWidth : 70, - iconCls : 'icon_search', - handler : function() { + buttons: [{ + xtype: 'button', + text: '查询', + minWidth: 70, + iconCls: 'icon_search', + handler: function () { reloadReport(); } - },{ - xtype : 'button', - text : '重置', - minWidth : 70, - iconCls : 'icon_set', - handler : function() { + }, { + xtype: 'button', + text: '重置', + minWidth: 70, + iconCls: 'icon_set', + handler: function () { Ext.getCmp('barcode').setValue(''); Ext.getCmp('tousse').setValue(''); Ext.getCmp('destinationLocation').setValue(''); @@ -533,10 +533,10 @@ }] }); var reportForm = new Ext.Panel({ - frame:false,//渲染面板 - autoScroll:true,//自动显示滚动条 - collapsible:true,//允许展开和收缩 - bodyPadding:5, + frame: false,//渲染面板 + autoScroll: true,//自动显示滚动条 + collapsible: true,//允许展开和收缩 + bodyPadding: 5, tbar: [{ text: '导出', handler: function () { @@ -558,16 +558,16 @@ } } }], - html:'' + html: '' }); var viewport = new Ext.Viewport({ - layout : 'border', - items : [form, { - region : 'center', - margins : '0 0 0 0', - layout : 'fit', - items : reportForm + layout: 'border', + items: [form, { + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: reportForm }] }); - + }); \ No newline at end of file