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 = "
";
- }else if(sstsConfig.enableUrgentFunction && record.json.urgent =="是" && record.json.urgentLevel == ""){//无背景色,只有黑色加急图标
- cell = "
" + v + "";
- }else{
- cell = "" + v + "";
+ cell = "";
+ } 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',
+ html: '',
buttons: [{
id: 'confirmBtn',
text: '保存',
handler: function () {
- top.window.frames["thisTable"].save(chargeSetWin,grid);
+ top.window.frames["thisTable"].save(chargeSetWin, grid);
}
}, {
text: '取消',
@@ -677,28 +682,28 @@
chargeSetWin.show();
}
}, '-', {
- text : '外来器械处理汇总单',
- iconCls : 'icon_print',
- hidden : !sstsConfig.enableForeignTousseProcessingSummaryReports,
- handler : function() {
+ text: '外来器械处理汇总单',
+ iconCls: 'icon_print',
+ hidden: !sstsConfig.enableForeignTousseProcessingSummaryReports,
+ handler: function () {
openPrintForeignTousseWindow('外来器械处理汇总单');
}
}, '-', {
- text : '审核',
- iconCls : 'icon_set',
- hidden : !SSTS_ForeignTousseApplication_Review,
- handler : function() {
+ text: '审核',
+ iconCls: 'icon_set',
+ hidden: !SSTS_ForeignTousseApplication_Review,
+ 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;
}
- if(records[0].data.reviewStatus == '' || records[0].data.reviewStatus == '已通过' || records[0].data.reviewStatus == '已否决'){
+ if (records[0].data.reviewStatus == '' || records[0].data.reviewStatus == '已通过' || records[0].data.reviewStatus == '已否决') {
showResult('该申请单的状态为通过或否决,不能审核!');
return
}
@@ -709,25 +714,25 @@
var defaultSortField = 'applicationTime';
- if(SSTS_ForeignTousseApplication_Review){
+ if (SSTS_ForeignTousseApplication_Review) {
defaultSortField = "expression case when reviewStatus = '待审核' then 0 when reviewStatus = '已通过' then 1 when reviewStatus = '已否决' then 2 else 1 end, applicationTime desc ";
}
grid = new Ext.ux.ForgonPageGrid({
- title : entityName + '列表',
- tbar : tbar,
- pageSize : 20,
- defaultSortField : defaultSortField,
- defaultSortDirection : 'DESC',
- isCheckboxSelectionModel : true,
- searchDisableIndexes : ['remark','packingState','sterilizationState'],
- rememberSelected : false,
- isShowSearchField : true,
- columns : columns,
+ title: entityName + '列表',
+ tbar: tbar,
+ pageSize: 20,
+ defaultSortField: defaultSortField,
+ defaultSortDirection: 'DESC',
+ isCheckboxSelectionModel: true,
+ searchDisableIndexes: ['remark', 'packingState', 'sterilizationState'],
+ rememberSelected: false,
+ isShowSearchField: true,
+ columns: columns,
plugins: filters,
- renderTo : 'gridDiv',
- pageSizeDateStore:[['10'],['15'],['20'],['30'],['50'],['100']],
- frame : false
+ renderTo: 'gridDiv',
+ pageSizeDateStore: [['10'], ['15'], ['20'], ['30'], ['50'], ['100']],
+ frame: false
},
readerDetail,
ForeignTousseApplicationTableManager.findForeignTousseApplicationTableList,
@@ -736,7 +741,7 @@
var tableContent;
if (mouseHoverEventOfApply != '否') {
- grid.on('mouseover', function(e) {// 添加mouseover事件
+ grid.on('mouseover', function (e) {// 添加mouseover事件
var index = grid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到行的位置
if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false)
var record = this.getStore().getAt(index);
@@ -747,177 +752,177 @@
//3、装配数量和灭菌数量
var PackAndSterileName = '';
var PackAndSterileContent = '';
-
+
var urgentAmount = "";
- var urgentLevel = "";
- if(!tableContent){
+ var urgentLevel = "";
+ if (!tableContent) {
var content = "";
DWREngine.setAsync(false);
- InvoicePlanTableManager.findApplicationItemVOListByInvoicePlanId(record.data['id'],function(voItems){
- for(var i=0;i包状态
" +
"医生名称 | " +
"拆包数量 | ";
- ForeignContent =
- "" + voItems[i].supplierName+" | " +
- "" + packageStatus+" | " +
- "" + voItems[i].doctor+" | " +
- "" + voItems[i].splitAmount+" | ";
-
-
- PackAndSterileName =
+ ForeignContent =
+ "" + voItems[i].supplierName + " | " +
+ "" + packageStatus + " | " +
+ "" + voItems[i].doctor + " | " +
+ "" + voItems[i].splitAmount + " | ";
+
+
+ PackAndSterileName =
"装配数量 | " +
"灭菌数量 | ";
- PackAndSterileContent =
- "" + packedAmount+" | " +
- "" + sterilizationAmount+" | ";
-
- if(sstsConfig.enableUrgentFunction){//加急级别
- urgentAmount =
+ PackAndSterileContent =
+ "" + packedAmount + " | " +
+ "" + sterilizationAmount + " | ";
+
+ if (sstsConfig.enableUrgentFunction) {//加急级别
+ urgentAmount =
"加急数量 | " +
"加急级别 | ";
- if(urgentAmountData !="" && urgentAmountData != null){
+ if (urgentAmountData != "" && urgentAmountData != null) {
urgentAmountData = urgentAmountData;
- }else{
+ } else {
urgentAmountData = 0;
}
-
- if(urgentLevelData !="" && urgentLevelData != null){
+
+ if (urgentLevelData != "" && urgentLevelData != null) {
urgentLevelData = urgentLevelData;
- }else{
+ } else {
urgentLevelData = "无";
}
- urgentLevel =
- "" + urgentAmountData+" | " +
- "" + urgentLevelData+" | ";
+ urgentLevel =
+ "" + urgentAmountData + " | " +
+ "" + urgentLevelData + " | ";
}
content += "" : ">"; //如果是未完全发货的话背景色显示为红色
content +=
- ForeignContent +
- " " + tousseName +" | " +
- "" + voItems[i].amountDisplay+" | " +
- "" + recyclingAmount+" | " +
- PackAndSterileContent + urgentLevel+
- "" + invoiceAmount+" | "
- content +="
";
+ ForeignContent +
+ " " + tousseName + " | " +
+ "" + voItems[i].amountDisplay + " | " +
+ "" + recyclingAmount + " | " +
+ PackAndSterileContent + urgentLevel +
+ "" + invoiceAmount + " | "
+ content += "";
}
});
DWREngine.setAsync(true);
tableContent = ("" +
- "" +
- ForeignName +
- "物品名称 | " +
- "申请数量 | " +
- "回收数量 | " +
- PackAndSterileName + urgentAmount +
- "发货数量 | ");
+ "
" +
+ ForeignName +
+ "物品名称 | " +
+ "申请数量 | " +
+ "回收数量 | " +
+ PackAndSterileName + urgentAmount +
+ "发货数量 | ");
tableContent += "
" + content + "
";
- record.set("htmlContent",tableContent);
+ record.set("htmlContent", tableContent);
}
e.getTarget().setAttribute('data-qtip', tableContent);
-// e.getTarget().setAttribute('data-qwidth', 1000);
+ // e.getTarget().setAttribute('data-qwidth', 1000);
e.getTarget().setAttribute('data-qtitle', ' 申请物品列表:');
}
});
}
-
+
new Ext.Viewport({
- layout : 'border',
- items : [{
- region : 'center',
- margins : '0 0 0 0',
- layout : 'fit',
- items : grid
+ layout: 'border',
+ items: [{
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: grid
}]
});
});
//KSDQDYRMYY-24:添加审核功能
-function foreignTousseApplicationReview(item,isCloseInfo) {
+function foreignTousseApplicationReview(item, isCloseInfo) {
var reviewFormWin;
var bbars = [{
text: '确定',
handler: function () {
var reviewResult = top.Ext4.getCmp('reviewResult').getValue();
var reviewCause2 = top.Ext4.getCmp('reviewCause2').getValue();
var reviewStatus = '';
- if(reviewResult == '否决'){
+ if (reviewResult == '否决') {
reviewStatus = '已否决';
- }else {
+ } else {
reviewStatus = '已通过';
}
- if(reviewStatus == '已否决'){
- if(reviewCause2 == ''){
+ if (reviewStatus == '已否决') {
+ if (reviewCause2 == '') {
showResult('提交失败,请填写审核原因。');
return
}
- top.Ext4.MessageBox.confirm('提示框', '否决后,将终止当前申请单,是否继续操作?', function(btn) {
+ top.Ext4.MessageBox.confirm('提示框', '否决后,将终止当前申请单,是否继续操作?', function (btn) {
if (btn == 'yes') {
Ext4.Ajax.request({
url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!reviewForeignTousseApplication.do',
- method:'post',
+ method: 'post',
params: {
- foreignTousseApplicationId:item.id,
- reviewer:$Id('userName')?$Id('userName').value:'',
- reviewStatus:reviewStatus,
- reviewCause:reviewCause2
- },
- success : function(response, options) {
+ foreignTousseApplicationId: item.id,
+ reviewer: $Id('userName') ? $Id('userName').value : '',
+ reviewStatus: reviewStatus,
+ reviewCause: reviewCause2
+ },
+ success: function (response, options) {
var result = Ext4.decode(response.responseText);
if (result.success) {
showResult('审核成功');
grid.dwrReload();
reviewFormWin.close();
- if(isCloseInfo){
+ if (isCloseInfo) {
foreignTousseApplyWindow.close();
}
- }else {
+ } else {
showResult(result.message);
}
- }
- });
+ }
+ });
}
});
return
}
Ext4.Ajax.request({
url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!reviewForeignTousseApplication.do',
- method:'post',
+ method: 'post',
params: {
- foreignTousseApplicationId:item.id,
- reviewer:$Id('userName')?$Id('userName').value:'',
- reviewStatus:reviewStatus,
- reviewCause:reviewCause2
- },
- success : function(response, options) {
+ foreignTousseApplicationId: item.id,
+ reviewer: $Id('userName') ? $Id('userName').value : '',
+ reviewStatus: reviewStatus,
+ reviewCause: reviewCause2
+ },
+ success: function (response, options) {
var result = Ext4.decode(response.responseText);
if (result.success) {
showResult('审核成功');
grid.dwrReload();
reviewFormWin.close();
- if(isCloseInfo){
+ if (isCloseInfo) {
foreignTousseApplyWindow.close();
}
- }else {
+ } else {
showResult(result.message);
}
- }
- });
+ }
+ });
}
}, {
text: '取消',
@@ -956,8 +961,8 @@
id: 'applicantName',
name: 'applicantName',
readOnly: true,
- cls : 'fieldReadOnlyNoRemove',
- value:item.applicant || '',
+ cls: 'fieldReadOnlyNoRemove',
+ value: item.applicant || '',
anchor: '96%'
}]
}, {
@@ -969,8 +974,8 @@
id: 'surgeryName',
name: 'surgeryName',
readOnly: true,
- cls : 'fieldReadOnlyNoRemove',
- value:item.surgery || '',
+ cls: 'fieldReadOnlyNoRemove',
+ value: item.surgery || '',
anchor: '96%'
}]
}, {
@@ -982,8 +987,8 @@
id: 'patientName',
name: 'patientName',
readOnly: true,
- cls : 'fieldReadOnlyNoRemove',
- value:item.patient || '',
+ cls: 'fieldReadOnlyNoRemove',
+ value: item.patient || '',
anchor: '96%'
}]
}, {
@@ -995,8 +1000,8 @@
id: 'doctorName',
name: 'doctorName',
readOnly: true,
- cls : 'fieldReadOnlyNoRemove',
- value:item.doctor || '',
+ cls: 'fieldReadOnlyNoRemove',
+ value: item.doctor || '',
anchor: '96%'
}]
}, {
@@ -1008,27 +1013,27 @@
id: 'reviewerName',
name: 'reviewerName',
readOnly: true,
- cls : 'fieldReadOnlyNoRemove',
- value : $Id('userName')?$Id('userName').value:'',
+ cls: 'fieldReadOnlyNoRemove',
+ value: $Id('userName') ? $Id('userName').value : '',
anchor: '96%'
}]
}, {
layout: 'form',
columnWidth: 1,
items: [{
- xtype : 'combo',
+ xtype: 'combo',
fieldLabel: '审核结果',
id: 'reviewResult',
name: 'reviewResult',
- valueField : 'value',
- displayField : 'value',
- store : new top.Ext4.data.SimpleStore({
- fields : [ 'value' ],
- data : [['通过'],['否决']]
+ valueField: 'value',
+ displayField: 'value',
+ store: new top.Ext4.data.SimpleStore({
+ fields: ['value'],
+ data: [['通过'], ['否决']]
}),
- value:'通过',
- editable : false,
- forceSelection : true
+ value: '通过',
+ editable: false,
+ forceSelection: true
}]
}, {
layout: 'form',