Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r37761 -r37813 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 37761) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 37813) @@ -6,206 +6,206 @@ // 删除 function deleteForeignTousseApplication(grid) { var records = grid.getSelectionModel().getSelections(); - + if (records.length == 0) { - showResult("请选择要删除的"+entityName+"!"); + showResult("请选择要删除的" + entityName + "!"); return false; } var ids = ""; - for ( var i = 0, len = records.length; i < len; i++) { - + for (var i = 0, len = records.length; i < len; i++) { + var packageStatus = records[i].data['packageStatus']; - if(packageStatus != '待接收'){ + if (packageStatus != '待接收') { showResult("已接收的外来器械包申请单不能删除。"); return false; } - + if (ids == "") { ids = records[i].data['id']; } else { ids = ids + ';' + records[i].data['id']; } } - Ext.MessageBox.confirm("请确认","是否确定要删除选中的"+entityName+"信息?", - function(button, text) { - if ("yes" == button){ - Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!deleteForeignTousseApplication.do', - params : { - ids : ids - },success : function(response, options) { - var result = Ext.decode(response.responseText); - var success = result.success; - if (true != success) { - MsgTip.msg('提示', result.cause,true,3); - return; - } else { - MsgTip.msg('提示','删除成功',true,3); - grid.dwrReload(); + Ext.MessageBox.confirm("请确认", "是否确定要删除选中的" + entityName + "信息?", + function (button, text) { + if ("yes" == button) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!deleteForeignTousseApplication.do', + params: { + ids: ids + }, success: function (response, options) { + var result = Ext.decode(response.responseText); + var success = result.success; + if (true != success) { + MsgTip.msg('提示', result.cause, true, 3); + return; + } else { + MsgTip.msg('提示', '删除成功', true, 3); + grid.dwrReload(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + MsgTip.msg('提示', result.cause, true, 3); } - }, - failure : function(response, options) { - var result = Ext.decode(response.responseText); - MsgTip.msg('提示', result.cause,true,3); - } - }); + }); + } } - } ); } -function loadFormData(grid,ismodify){ +function loadFormData(grid, ismodify) { var records = grid.getSelectionModel().getSelections(); if (records.length == 0) { - showResult("请选择要修改的"+entityName+"!"); + showResult("请选择要修改的" + entityName + "!"); return false; - }else if(records.length != 1){ - showResult("一次只能修改一个"+entityName+"!"); + } else if (records.length != 1) { + showResult("一次只能修改一个" + entityName + "!"); return false; } - openForeignTousseForm(records[0].data.id,"apply",ismodify,records[0].data.recyclingStatus); + openForeignTousseForm(records[0].data.id, "apply", ismodify, records[0].data.recyclingStatus); } /** * 修改记录 * modifyRecord函数 触发modify函数调用,并传入当前列的值以及record.data对象 * 页面中需要定义 modify(v,data) 函数 */ -function modify(v,data){ - loadFormData(grid,true); +function modify(v, data) { + loadFormData(grid, true); } -function renderModifyFun(v, p, record){ +function renderModifyFun(v, p, record) { var cell; - var dataArrStr= Ext.util.JSON.encode(record.data); - dataArrStr = dataArrStr.replace(/\"/g,""");// 双引号转义处理 - if(sstsConfig.enableUrgentFunction && record.json.urgentLevel != ""){//有背景色,白色图标加急级别 + var dataArrStr = Ext.util.JSON.encode(record.data); + dataArrStr = dataArrStr.replace(/\"/g, """);// 双引号转义处理 + if (sstsConfig.enableUrgentFunction && record.json.urgentLevel != "") {//有背景色,白色图标加急级别 var colorCode = record.json.urgentLevel.colorCode; - cell = "
" + v + "
"; - }else if(sstsConfig.enableUrgentFunction && record.json.urgent =="是" && record.json.urgentLevel == ""){//无背景色,只有黑色加急图标 - cell = "" + v + ""; - }else{ - cell = "" + v + ""; + cell = "
" + v + "
"; + } else if (sstsConfig.enableUrgentFunction && record.json.urgent == "是" && record.json.urgentLevel == "") {//无背景色,只有黑色加急图标 + cell = "" + v + ""; + } else { + cell = "" + v + ""; } return cell; //return "" + v + ""; } //NFYY-29:收费状态背景颜色 -function renderChargeStatusColor(v, p, record){ +function renderChargeStatusColor(v, p, record) { var chargeStatus = record.data['chargeStatus']; var color = ''; - if(chargeStatus == '待确认'){ + if (chargeStatus == '待确认') { color = '#FFFF00';//黄色 - }else if(chargeStatus == '已确认'){ + } else if (chargeStatus == '已确认') { color = '#fff';//白色 } - return "

" + v + "

"; + return "

" + v + "

"; } //GDSZYY-229:回收状态背景颜色 -function renderRecyclingStatusColor(v, p, record){ +function renderRecyclingStatusColor(v, p, record) { var recyclingStatus = record.data['recyclingStatus']; var color = ""; var fontColor = ""; - if(recyclingStatus == '已终止'){ + if (recyclingStatus == '已终止') { color = "red"; fontColor = '#fff'; - }else if(recyclingStatus == '待接收' || recyclingStatus == '部分接收'){ + } else if (recyclingStatus == '待接收' || recyclingStatus == '部分接收') { color = '#ffff00';//黄色 - }else if(recyclingStatus == '已接收'){ + } else if (recyclingStatus == '已接收') { color = '#fff';//白色 - }else if(recyclingStatus == '待回收' || recyclingStatus == '部分回收'){ + } else if (recyclingStatus == '待回收' || recyclingStatus == '部分回收') { color = '#a52a2a';//棕色 fontColor = '#fff'; - }else if(recyclingStatus == '二次回收' || recyclingStatus == '已回收' || recyclingStatus == '已提前归还'){ + } else if (recyclingStatus == '二次回收' || recyclingStatus == '已回收' || recyclingStatus == '已提前归还') { color = '#ffa500';//橙色 } //GDSZYY-238:不需要二次回收时字段调整相应的状态显示 - if(foreignTousseIsSecondRecycle == '否'){ - if(recyclingStatus == '待回收' || recyclingStatus == '部分回收' || recyclingStatus == '二次回收'){ + if (foreignTousseIsSecondRecycle == '否') { + if (recyclingStatus == '待回收' || recyclingStatus == '部分回收' || recyclingStatus == '二次回收') { v = '已接收'; color = '#fff'; fontColor = ""; } } - return "

" + v + "

"; + return "

" + v + "

"; } //KSDQDYRMYY-24:审核状态背景颜色 -function renderReviewStatusColor(v, p, record){ +function renderReviewStatusColor(v, p, record) { var reviewStatus = record.data['reviewStatus']; var color = ""; var fontColor = ""; - if(reviewStatus == '待审核' ){ + if (reviewStatus == '待审核') { color = '#ffff00';//黄色 fontColor = '#000'; - }else if(reviewStatus == '已通过'){ + } else if (reviewStatus == '已通过') { color = '#00b050';//绿色 fontColor = '#fff'; - }else if(reviewStatus == '已否决'){ + } else if (reviewStatus == '已否决') { color = 'red';//红色 fontColor = '#fff'; } - return "

" + v + "

"; + return "

" + v + "

"; } //ZSYY-330:装配状态背景颜色 -function renderPackingStateColor(v, p, record){ +function renderPackingStateColor(v, p, record) { var color = ''; var fontColor = ''; - if(v == '待装配'){ + if (v == '待装配') { color = "#00b0f0";//蓝色 fontColor = '#fff'; - }else if(v == '部分装配'){ + } else if (v == '部分装配') { color = "#ffa500";//橙色 fontColor = '#000'; - }else if(v == '已装配'){ + } else if (v == '已装配') { color = "#00b050";//绿色 fontColor = '#fff'; - }else if(v == '已终止'){ + } else if (v == '已终止') { color = "red";//红色 fontColor = '#fff'; } - return "

" + v + "

"; + return "

" + v + "

"; } //ZSYY-330:灭菌状态背景颜色 -function renderSterilizationStateColor(v, p, record){ +function renderSterilizationStateColor(v, p, record) { var color = ''; var fontColor = ''; - if(v == '待灭菌'){ + if (v == '待灭菌') { color = "#00b0f0";//蓝色 fontColor = '#fff'; - }else if(v == '部分灭菌'){ + } else if (v == '部分灭菌') { color = "#ffa500";//橙色 fontColor = '#000'; - }else if(v == '已灭菌'){ + } else if (v == '已灭菌') { color = "#00b050";//绿色 fontColor = '#fff'; - }else if(v == '已终止'){ + } else if (v == '已终止') { color = "red";//红色 fontColor = '#fff'; } - return "

" + v + "

"; + return "

" + v + "

"; } //GDSZYY-229:发货状态背景颜色 -function renderDeliverStatusColor(v, p, record){ +function renderDeliverStatusColor(v, p, record) { var deliverStatus = record.data['deliverStatus']; var color = ""; var fontColor = ''; - if(deliverStatus == '已终止'){ + if (deliverStatus == '已终止') { color = "red"; fontColor = '#fff'; - }else if(deliverStatus == '待发货'){ + } else if (deliverStatus == '待发货') { color = "#fff";//白色 - }else if(deliverStatus == '已发货' || deliverStatus == '部分发货'){ + } else if (deliverStatus == '已发货' || deliverStatus == '部分发货') { color = "#00b050";//绿色 fontColor = '#fff'; } - return "

" + v + "

"; + return "

" + v + "

"; } /** @@ -221,7 +221,7 @@ return false; } var ids = null; - for (var i = 0, len = records.length; i < len; i ++) { + for (var i = 0, len = records.length; i < len; i++) { if (ids == null) { ids = records[i].data['id']; } else { @@ -230,54 +230,54 @@ } var returneeOfSupplier = ''; var returnMan = ''; - if(top.Ext4.getCmp('returneeOfSupplier1')){ + if (top.Ext4.getCmp('returneeOfSupplier1')) { returneeOfSupplier = top.Ext4.getCmp('returneeOfSupplier1').getValue() || ''; } - if(top.Ext4.getCmp('returnMan1')){ + if (top.Ext4.getCmp('returnMan1')) { returnMan = top.Ext4.getCmp('returnMan1').getValue() || ''; } - if(sstsConfig.enableReturneeOfForeignTousseSupplier){ + if (sstsConfig.enableReturneeOfForeignTousseSupplier) { Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do', - params : {ids : ids,returnType : returnType,returneeOfSupplier1:returneeOfSupplier,returnMan1:returnMan}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do', + params: { ids: ids, returnType: returnType, returneeOfSupplier1: returneeOfSupplier, returnMan1: returnMan }, + success: function (response, options) { var result = Ext.decode(response.responseText); if (result.success) { grid.dwrReload(); - if(tmpWindow){ + if (tmpWindow) { tmpWindow.close(); } } showResult(result.message); }, - failure : function(response, options) { + failure: function (response, options) { showResult("服务器出错,请联系系统管理员!"); } }); - }else { - top.Ext.MessageBox.confirm = function(title, msg, fn) { + } else { + top.Ext.MessageBox.confirm = function (title, msg, fn) { this.show({ - title : title, - msg : msg, - buttons:{yes:'确认',no:'取消'}, - fn : fn, - icon : this.QUESTION + title: title, + msg: msg, + buttons: { yes: '确认', no: '取消' }, + fn: fn, + icon: this.QUESTION }); return this; } - top.Ext.MessageBox.confirm("请确认","是否确定要" + returnType + "选中的记录?", function(btn) { - if (btn == 'yes'){ + top.Ext.MessageBox.confirm("请确认", "是否确定要" + returnType + "选中的记录?", function (btn) { + if (btn == 'yes') { Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do', - params : {ids : ids,returnType : returnType,returneeOfSupplier1:returneeOfSupplier,returnMan1:returnMan}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do', + params: { ids: ids, returnType: returnType, returneeOfSupplier1: returneeOfSupplier, returnMan1: returnMan }, + success: function (response, options) { var result = Ext.decode(response.responseText); if (result.success) { grid.dwrReload(); } showResult(result.message); }, - failure : function(response, options) { + failure: function (response, options) { showResult("服务器出错,请联系系统管理员!"); } }); @@ -286,29 +286,29 @@ } } -Ext.onReady(function(){ +Ext.onReady(function () { Ext.QuickTips.init(); Ext.apply(Ext.QuickTips.getQuickTip(), { - showDelay : 0, - trackMouse : false, - hideDelay : true, - closable : false, - autoHide : false, - draggable : true, - dismissDelay : 0 + showDelay: 0, + trackMouse: false, + hideDelay: true, + closable: false, + autoHide: false, + draggable: true, + dismissDelay: 0 }); Ext4.tip.QuickTipManager.init(); Ext4.apply(Ext4.tip.QuickTipManager.getQuickTip(), { maxWidth: 1200, minWidth: 100, dismissDelay: 0, - showDelay: 0 + showDelay: 0 }); - top.Ext4.tip.QuickTipManager.init(); + top.Ext4.tip.QuickTipManager.init(); var isShowInterfacePush = false; - if(sstsConfig.expandFieldsOfForeignTousseApplicationForm && sstsConfig.expandFieldsOfForeignTousseApplicationForm.length > 0){ + if (sstsConfig.expandFieldsOfForeignTousseApplicationForm && sstsConfig.expandFieldsOfForeignTousseApplicationForm.length > 0) { var expandFieldsOfForeignTousseApplicationForm = sstsConfig.expandFieldsOfForeignTousseApplicationForm; - if(expandFieldsOfForeignTousseApplicationForm.indexOf("isInterfacePush") >= 0){ + if (expandFieldsOfForeignTousseApplicationForm.indexOf("isInterfacePush") >= 0) { isShowInterfacePush = true; } } @@ -330,214 +330,218 @@ var packingStateHidden = true; var sterilizationStateHidden = true; - if(sstsConfig.extendedColumnConfigOfForeignTousseApplicationForm){ + if (sstsConfig.extendedColumnConfigOfForeignTousseApplicationForm) { var extendedColumnConfigOfForeignTousseApplicationForm = sstsConfig.extendedColumnConfigOfForeignTousseApplicationForm; - if(extendedColumnConfigOfForeignTousseApplicationForm.indexOf('packingState') >= 0){ + if (extendedColumnConfigOfForeignTousseApplicationForm.indexOf('packingState') >= 0) { packingStateHidden = false; } - if(extendedColumnConfigOfForeignTousseApplicationForm.indexOf('sterilizationState') >= 0){ + if (extendedColumnConfigOfForeignTousseApplicationForm.indexOf('sterilizationState') >= 0) { sterilizationStateHidden = false; } } var recyclingStatusName = '回收状态'; - if(foreignTousseIsSecondRecycle == '否'){ + if (foreignTousseIsSecondRecycle == '否') { recyclingStatusName = '接收状态'; } var columns = [ - {header : "紧急度",width : 45,dataIndex : 'urgencyNum', renderer : urgencyIconRender1,hidden:true}, - {header : applicantName,width : 70,dataIndex : 'applicant', renderer : renderModifyFun}, - {header : applicationTimeName,width : (fontSize == 12)?120:140,dataIndex : 'applicationTime', renderer : myDateFormatByMinute}, - {header : departName,width : 100,dataIndex : 'depart'}, - {header : isInterfacePushName,width : 70,dataIndex : 'isInterfacePush',hidden:!isShowInterfacePush}, - {header : hospitalNumberName,width : 70,dataIndex : 'hospitalNumber'}, - {header : patientName,width : 70,dataIndex : 'patient'}, - {header : doctorName,width : 70,dataIndex : 'doctor'}, - {header : "外来器械包名称",width : 150,dataIndex : 'tousseName'}, - {header : "收费状态",width : 150,dataIndex : 'chargeStatus',renderer:renderChargeStatusColor,hidden:!SSTS_ShowForeignTousseApplication_ChargeSet}, - {header : "外来器械包条码",width : 150,dataIndex : 'barcodes', hidden:!sstsConfig.showForeignTousseApplicationBarcode,sortable:false}, - {header : "供应商",width : 150,dataIndex : 'supplierName'}, - {header : surgeryName,width : 150,dataIndex : 'surgery'}, - {header : "包状态",width : 100,dataIndex : 'packageStatus'}, - {header : "审核状态",width : 70,dataIndex : 'reviewStatus',renderer:renderReviewStatusColor,hidden : !sstsConfig.enableReviewOfForeignTousseApplicationFunction}, - {header : recyclingStatusName,width : 70,dataIndex : 'recyclingStatus',renderer:renderRecyclingStatusColor}, - {header : "装配状态",width : 70,dataIndex : 'packingState',renderer:renderPackingStateColor,sortable:false,hidden:packingStateHidden}, - {header : "灭菌状态",width : 70,dataIndex : 'sterilizationState',renderer:renderSterilizationStateColor,sortable:false,hidden:sterilizationStateHidden}, - {header : "发货状态",width : 70,dataIndex : 'deliverStatus',renderer:renderDeliverStatusColor}, - {header : "终止状态",width : 70,dataIndex : 'endStatus'}, - {header : "已打印统计表",width : 100,dataIndex : 'printedStatisticalTable',hidden:!sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse,renderer:function(v, p, record){ - var fontColor = '#000'; - var color = ''; - if(v == '是'){ - color = '#fff';//白色 - }else { - color = "red"; + { header: "紧急度", width: 45, dataIndex: 'urgencyNum', renderer: urgencyIconRender1, hidden: true }, + { header: applicantName, width: 70, dataIndex: 'applicant', renderer: renderModifyFun }, + { header: applicationTimeName, width: (fontSize == 12) ? 120 : 140, dataIndex: 'applicationTime', renderer: myDateFormatByMinute }, + { header: departName, width: 100, dataIndex: 'depart' }, + { header: isInterfacePushName, width: 70, dataIndex: 'isInterfacePush', hidden: !isShowInterfacePush }, + { header: hospitalNumberName, width: 70, dataIndex: 'hospitalNumber' }, + { header: patientName, width: 70, dataIndex: 'patient' }, + { header: doctorName, width: 70, dataIndex: 'doctor' }, + { header: "外来器械包名称", width: 150, dataIndex: 'tousseName' }, + { header: "收费状态", width: 150, dataIndex: 'chargeStatus', renderer: renderChargeStatusColor, hidden: !SSTS_ShowForeignTousseApplication_ChargeSet }, + { header: "外来器械包条码", width: 150, dataIndex: 'barcodes', hidden: !sstsConfig.showForeignTousseApplicationBarcode, sortable: false }, + { header: "供应商", width: 150, dataIndex: 'supplierName' }, + { header: surgeryName, width: 150, dataIndex: 'surgery' }, + { header: "包状态", width: 100, dataIndex: 'packageStatus' }, + { header: "审核状态", width: 70, dataIndex: 'reviewStatus', renderer: renderReviewStatusColor, hidden: !sstsConfig.enableReviewOfForeignTousseApplicationFunction }, + { header: recyclingStatusName, width: 70, dataIndex: 'recyclingStatus', renderer: renderRecyclingStatusColor }, + { header: "装配状态", width: 70, dataIndex: 'packingState', renderer: renderPackingStateColor, sortable: false, hidden: packingStateHidden }, + { header: "灭菌状态", width: 70, dataIndex: 'sterilizationState', renderer: renderSterilizationStateColor, sortable: false, hidden: sterilizationStateHidden }, + { header: "发货状态", width: 70, dataIndex: 'deliverStatus', renderer: renderDeliverStatusColor }, + { header: "终止状态", width: 70, dataIndex: 'endStatus' }, + { + header: "已打印统计表", width: 100, dataIndex: 'printedStatisticalTable', hidden: !sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse, renderer: function (v, p, record) { + var fontColor = '#000'; + var color = ''; + if (v == '是') { + color = '#fff';//白色 + } else { + color = "red"; + } + return "

" + v + "

"; } - return "

" + v + "

"; - }}, - {header : "查看发货单",hidden : true,width : 70,align :'center',renderer: function(v,p,record){ - var invoiceStatus = record.data.deliverStatus; - if(invoiceStatus == "已发货" || invoiceStatus == "部分发货"){ - return ""; - }else{ - return null; - } - }}, - {header : "接收人",width : 60,dataIndex : 'receiveMan'}, - {header : "接收时间",width : (fontSize == 12)?120:140,dataIndex : 'receiveTime', renderer : myDateFormatByMinute}, - {header : returnManName,width : 100,dataIndex : 'returnMan'}, - {header : returneeOfSupplierName,width : 70,dataIndex : 'returneeOfSupplier',hidden:!sstsConfig.enableReturneeOfForeignTousseSupplier}, - {header : "归还时间",width : (fontSize == 12)?120:140,dataIndex : 'returnTime', renderer : myDateFormatByMinute}, - {header: remarkName, width : 400, dataIndex: 'remark'} + }, + { + header: "查看发货单", hidden: true, width: 70, align: 'center', renderer: function (v, p, record) { + var invoiceStatus = record.data.deliverStatus; + if (invoiceStatus == "已发货" || invoiceStatus == "部分发货") { + return ""; + } else { + return null; + } + } + }, + { header: "接收人", width: 60, dataIndex: 'receiveMan' }, + { header: "接收时间", width: (fontSize == 12) ? 120 : 140, dataIndex: 'receiveTime', renderer: myDateFormatByMinute }, + { header: returnManName, width: 100, dataIndex: 'returnMan' }, + { header: returneeOfSupplierName, width: 70, dataIndex: 'returneeOfSupplier', hidden: !sstsConfig.enableReturneeOfForeignTousseSupplier }, + { header: "归还时间", width: (fontSize == 12) ? 120 : 140, dataIndex: 'returnTime', renderer: myDateFormatByMinute }, + { header: remarkName, width: 400, dataIndex: 'remark' } ]; var readerDetail = [ - {name : 'id'}, - {name : 'applicant'}, - {name : 'applicationTime'}, - {name : 'isInterfacePush'}, - {name : 'barcodes'}, - {name : 'depart'}, - {name : 'deliverStatus'}, - {name : 'reviewStatus'}, - {name : 'recyclingStatus'}, - {name : 'sterilizationState'}, - {name : 'packingState'}, - {name : 'packageStatus'}, - {name : 'hospitalNumber'}, - {name : 'chargeStatus'}, - {name : 'patient'}, - {name : 'doctor'}, - {name : 'tousseName'}, - {name : 'supplierName'}, - {name : 'surgery'}, - {name : 'endStatus'}, - {name : 'receiveMan'}, - {name : 'receiveTime'}, - {name : 'returnMan'}, - {name : 'returneeOfSupplier'}, - {name : 'returnTime'}, - {name : 'invoiceStatus'}, - {name : 'remark'}, - {name : 'urgencyNum'}, - {name : 'handleDepartCoding'}, - {name : 'printedStatisticalTable'}, - {name : 'handleDepart'}, - {name : 'supplierContactName'} + { name: 'id' }, + { name: 'applicant' }, + { name: 'applicationTime' }, + { name: 'isInterfacePush' }, + { name: 'barcodes' }, + { name: 'depart' }, + { name: 'deliverStatus' }, + { name: 'reviewStatus' }, + { name: 'recyclingStatus' }, + { name: 'sterilizationState' }, + { name: 'packingState' }, + { name: 'packageStatus' }, + { name: 'hospitalNumber' }, + { name: 'chargeStatus' }, + { name: 'patient' }, + { name: 'doctor' }, + { name: 'tousseName' }, + { name: 'supplierName' }, + { name: 'surgery' }, + { name: 'endStatus' }, + { name: 'receiveMan' }, + { name: 'receiveTime' }, + { name: 'returnMan' }, + { name: 'returneeOfSupplier' }, + { name: 'returnTime' }, + { name: 'invoiceStatus' }, + { name: 'remark' }, + { name: 'urgencyNum' }, + { name: 'handleDepartCoding' }, + { name: 'printedStatisticalTable' }, + { name: 'handleDepart' }, + { name: 'supplierContactName' } ]; - + var filters = new Ext.grid.GridFilters({ - filters:[ - {type: 'string', dataIndex: 'applicant'}, - {type: 'date', dataIndex: 'applicationTime'}, - {type: 'string', dataIndex: 'isInterfacePush'}, - {type: 'string', dataIndex: 'depart'}, - {type: 'string', dataIndex: 'deliverStatus'}, - {type: 'string', dataIndex: 'recyclingStatus'}, - {type: 'string', dataIndex: 'hospitalNumber'}, - {type: 'string', dataIndex: 'patient'}, - {type: 'string', dataIndex: 'chargeStatus'}, - {type: 'string', dataIndex: 'tousseName'}, - {type: 'string', dataIndex: 'supplierName'}, - {type: 'string', dataIndex: 'doctor'}, - {type: 'string', dataIndex: 'surgery'}, - {type: 'string', dataIndex: 'receiveMan'}, - {type: 'date', dataIndex: 'receiveTime'}, - {type: 'string', dataIndex: 'returnMan'}, - {type: 'string', dataIndex: 'returneeOfSupplier'}, - {type: 'date', dataIndex: 'returnTime'}, - {type: 'string', dataIndex: 'printedStatisticalTable'}, - {type: 'string', dataIndex: 'remark'} + filters: [ + { type: 'string', dataIndex: 'applicant' }, + { type: 'date', dataIndex: 'applicationTime' }, + { type: 'string', dataIndex: 'isInterfacePush' }, + { type: 'string', dataIndex: 'depart' }, + { type: 'string', dataIndex: 'deliverStatus' }, + { type: 'string', dataIndex: 'recyclingStatus' }, + { type: 'string', dataIndex: 'hospitalNumber' }, + { type: 'string', dataIndex: 'patient' }, + { type: 'string', dataIndex: 'chargeStatus' }, + { type: 'string', dataIndex: 'tousseName' }, + { type: 'string', dataIndex: 'supplierName' }, + { type: 'string', dataIndex: 'doctor' }, + { type: 'string', dataIndex: 'surgery' }, + { type: 'string', dataIndex: 'receiveMan' }, + { type: 'date', dataIndex: 'receiveTime' }, + { type: 'string', dataIndex: 'returnMan' }, + { type: 'string', dataIndex: 'returneeOfSupplier' }, + { type: 'date', dataIndex: 'returnTime' }, + { type: 'string', dataIndex: 'printedStatisticalTable' }, + { type: 'string', dataIndex: 'remark' } ] }); var tbar = [{ - text : '添加', - id : 'applyForeign', - iconCls : 'btn_ext_application_add', - hidden : SSTS_ForeignTousseApplication_Create, - handler : function() { + text: '添加', + id: 'applyForeign', + iconCls: 'btn_ext_application_add', + hidden: SSTS_ForeignTousseApplication_Create, + handler: function () { Ext.Ajax.request({ - url: WWWROOT + '/disinfectSystem/recyclingApplicationAction!verifyAddForeignTousse.do', - success: function(response, options) { + url: WWWROOT + '/disinfectSystem/recyclingApplicationAction!verifyAddForeignTousse.do', + success: function (response, options) { var result = Ext.decode(response.responseText); if (result.success) { - openForeignTousseForm("","apply"); + openForeignTousseForm("", "apply"); } else { showResult(result.message); } } }); } }, '-', { - text : '修改', - iconCls : 'btn_ext_application_edit', - id : 'editTbar', - hidden : SSTS_ForeignTousseApplication_Update, - handler : function() { - loadFormData(grid,false); + text: '修改', + iconCls: 'btn_ext_application_edit', + id: 'editTbar', + hidden: SSTS_ForeignTousseApplication_Update, + handler: function () { + loadFormData(grid, false); } }, '-', { - text : '删除', - iconCls : 'btn_ext_application_del', - hidden : SSTS_ForeignTousseApplication_Delete, - handler : function() { + text: '删除', + iconCls: 'btn_ext_application_del', + hidden: SSTS_ForeignTousseApplication_Delete, + handler: function () { deleteForeignTousseApplication(grid); } }, '-', { - text : '终止', - iconCls : 'btn_ext_application_del', - hidden : SSTS_ForeignTousseApplication_Terminate, - handler : function() { - terminateInvoicePlan(grid, foreignTousseApplicationForm); + text: '终止', + iconCls: 'btn_ext_application_del', + hidden: SSTS_ForeignTousseApplication_Terminate, + handler: function () { + terminateInvoicePlan(grid, foreignTousseApplicationForm); } }, '-', { - text : '批量确认归还', - iconCls : 'btn_ext_application_go', - hidden : SSTS_ForeignTousseApplication_Return, - handler : function() { + text: '批量确认归还', + iconCls: 'btn_ext_application_go', + hidden: SSTS_ForeignTousseApplication_Return, + handler: function () { var records = grid.getSelectionModel().getSelections(); if (records.length == 0) { showResult("请选择要确认归还的记录!"); return false; } - + var supplierNames = []; - for(var i=0;i 1){ + if (sstsConfig.enableReturneeOfForeignTousseSupplier) { + if (supplierNames.length > 1) { showResult('请选择同一供应商的外来器械进行归还!'); return } - returnFunction(2,'',records[0].data.handleDepartCoding,records[0].data.supplierContactName,records[0].data.supplierName); - }else { + returnFunction(2, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); + } else { comfirmReturnOrEarlyReturn(ACTION_TYPE_CONFIRM_RETURN); } } }, '-', { - text : '批量提前归还', - iconCls : 'btn_ext_application_go', - hidden : SSTS_ForeignTousseApplication_Return, - handler : function() { + text: '批量提前归还', + iconCls: 'btn_ext_application_go', + hidden: SSTS_ForeignTousseApplication_Return, + handler: function () { var records = grid.getSelectionModel().getSelections(); if (records.length == 0) { showResult("请选择要提前归还的记录!"); @@ -546,97 +550,98 @@ var supplierNames = []; - for(var i=0;i 1){ + if (sstsConfig.enableReturneeOfForeignTousseSupplier) { + if (supplierNames.length > 1) { showResult('请选择同一供应商的外来器械进行归还!'); return } - returnFunction(3,'',records[0].data.handleDepartCoding,records[0].data.supplierContactName,records[0].data.supplierName); - }else { + returnFunction(3, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); + } else { comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN); } } }, '-', { - text : '更改病人信息', - iconCls : 'btn_ext_application_edit', - id : 'editTbar', - hidden : SSTS_ForeignTousseApplication_Update, - handler : function() { + text: '更改病人信息', + iconCls: 'btn_ext_application_edit', + id: 'editTbar', + hidden: SSTS_ForeignTousseApplication_Update, + handler: function () { var records = grid.getSelectionModel().getSelections(); if (records.length == 0) { - showResult("请选择要修改的"+entityName+"!"); + showResult("请选择要修改的" + entityName + "!"); return false; - }else if(records.length != 1){ - showResult("一次只能修改一个"+entityName+"!"); + } else if (records.length != 1) { + showResult("一次只能修改一个" + entityName + "!"); return false; } modifyPatientInfo(records[0].data.id); } }, '-', { type: 'button', - text : '打印待处理外来器械统计表', - iconCls : 'icon_print', - id : 'printTbar', - hidden : !sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse, + text: '打印待处理外来器械统计表', + iconCls: 'icon_print', + id: 'printTbar', + hidden: !sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse, menu: new Ext.menu.Menu({ items: [ - { - text:'打印指定时间段内的待处理申请单', - handler: function(){ - openPrintForeignTousseWindow('待处理外来器械统计表'); - }}, - { - text:'打印选中的申请单', - handler:function(){ - var records = grid.getSelectionModel().getSelections(); - if (records.length == 0) { - showResult("请先选中需要打印的申请单!"); - return false; + { + text: '打印指定时间段内的待处理申请单', + handler: function () { + openPrintForeignTousseWindow('待处理外来器械统计表'); } - Ext.MessageBox.confirm("请确认","是否打印已选中的申请单?",function(button, text) { - if ("yes" == button){ - var idsArr = []; - for(var i=0;i