Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js
===================================================================
diff -u -r29777 -r29779
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 29777)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 29779)
@@ -1750,13 +1750,74 @@
id : 'returnBtn',
disabled : disableReturn,
handler : function(){
- returnFunction(0,id);
+ if(sstsConfig.enableReturneeOfForeignTousseSupplier){
+ returnFunction(0,id);
+ }else {
+ var tmpWindow = new top.Ext4.window.Window({
+ title : '请确认',
+ modal : true,
+ border : true,
+ html : '
  确认归还' + entityName + '信息?  
',
+ buttonAlign : 'center',
+ buttons:[{
+ text:'是',
+ handler : function() {
+ tmpWindow.close();
+ if(!foreignTousseForm.getForm().isValid()){
+ showResult('请正确填写表单各值');
+ return false;
+ }
+ var success = getForeignTousseInfo();
+ if(success){
+ submintForeignTousseForm(actionType_confirmReturn, false);
+ }
+ }
+ },{
+ text:'否',
+ handler : function() {
+ tmpWindow.close();
+ }
+ }]
+ });
+ tmpWindow.show();
+ }
}
},{
text : '提前归还',
disabled:disableEarlyReturn,
handler : function(){
- returnFunction(1,id);
+ if(sstsConfig.enableReturneeOfForeignTousseSupplier){
+ returnFunction(1,id);
+ }else {
+ var tmpWindow = new top.Ext4.window.Window({
+ title : '请确认',
+ modal : true,
+ border : true,
+ html : '
  提前归还会终止申请单,并删除装配任务,是否要提前归还?  
',
+ buttonAlign : 'center',
+ buttons:[{
+ text:'是',
+ handler : function() {
+ tmpWindow.close();
+ if(!foreignTousseForm.getForm().isValid()){
+ showResult('请正确填写表单各值');
+ return false;
+ }
+ var success = getForeignTousseInfo();
+ if(success){
+ submintForeignTousseForm(actionType_confirmReturn, false);
+ }
+ }
+ },{
+ text:'否',
+ handler : function() {
+ tmpWindow.close();
+ }
+ }]
+ });
+
+ tmpWindow.show();
+ }
}
},{
text : '查看清洗分类类型',
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js
===================================================================
diff -u -r29778 -r29779
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 29778)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 29779)
@@ -165,23 +165,53 @@
ids = ids + ';' + records[i].data['id'];
}
}
- var returneeOfSupplier = top.Ext4.getCmp('returneeOfSupplier1').getValue() || '';
- var returnMan = top.Ext4.getCmp('returnMan1').getValue() || '';
- Ext.Ajax.request({
- 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();
- tmpWindow.close();
+ var returneeOfSupplier = '';
+ var returnMan = '';
+ if(top.Ext4.getCmp('returneeOfSupplier1')){
+ returneeOfSupplier = top.Ext4.getCmp('returneeOfSupplier1').getValue() || '';
+ }
+ if(top.Ext4.getCmp('returnMan1')){
+ returneeOfreturnManSupplier = top.Ext4.getCmp('returnMan1').getValue() || '';
+ }
+ 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) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ grid.dwrReload();
+ if(tmpWindow){
+ tmpWindow.close();
+ }
+ }
+ showResult(result.message);
+ },
+ failure : function(response, options) {
+ showResult("服务器出错,请联系系统管理员!");
}
- showResult(result.message);
- },
- failure : function(response, options) {
- showResult("服务器出错,请联系系统管理员!");
- }
- });
+ });
+ }else {
+ top.Ext.MessageBox.confirm("请确认","是否确定要" + returnType + "选中的记录?",
+ function(button, text) {
+ if ("yes" == button){
+ Ext.Ajax.request({
+ 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) {
+ showResult("服务器出错,请联系系统管理员!");
+ }
+ });
+ }
+ });
+ }
}
Ext.onReady(function(){
@@ -308,7 +338,12 @@
showResult("请选择要确认归还的记录!");
return false;
}
- returnFunction(2);
+
+ if(sstsConfig.enableReturneeOfForeignTousseSupplier){
+ returnFunction(3);
+ }else {
+ comfirmReturnOrEarlyReturn(actionType_confirmReturn);
+ }
}
}, '-', {
text : '批量提前归还',
@@ -321,7 +356,11 @@
showResult("请选择要提前归还的记录!");
return false;
}
- returnFunction(3);
+ if(sstsConfig.enableReturneeOfForeignTousseSupplier){
+ returnFunction(3);
+ }else {
+ comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN);
+ }
}
}, '-', {
text : '更改病人信息',