Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js
===================================================================
diff -u -r40375 -r40418
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40375)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 40418)
@@ -574,19 +574,27 @@
store : returnManStore
}
},{
- columnWidth : 1,
+ columnWidth: .5,
layout : 'form',
- hidden:(supplierName == undefined || supplierName == 'undefined'),
- items : {
- xtype: 'textfield',
- fieldLabel : '供应商',
- id : 'supplierName1',
- name : 'supplierName1',
- allowBlank : true,
- value:supplierName,
- anchor : "100%",
- disabled:true
- }
+ hidden: !sstsConfig.enableTheReturnCleaningQualifiedFunction,
+ items : [{
+ xtype : 'combo',
+ fieldLabel : '清洗合格',
+ id : 'cleanQualified',
+ name : 'cleanQualified',
+ valueField : 'value',
+ displayField : 'value',
+ mode : 'local',
+ triggerAction : 'all',
+ forceSelection : true,
+ editable : false,
+ store : new top.Ext4.data.SimpleStore( {
+ fields : [ 'value' ],
+ data : [['是'],['否']]
+ }),
+ value:'是',
+ anchor : "100%"
+ }]
},{
columnWidth : .5,
layout : 'form',
@@ -612,6 +620,20 @@
},{
columnWidth : 1,
layout : 'form',
+ hidden:(supplierName == undefined || supplierName == 'undefined'),
+ items : {
+ xtype: 'textfield',
+ fieldLabel : '供应商',
+ id : 'supplierName1',
+ name : 'supplierName1',
+ allowBlank : true,
+ value:supplierName,
+ anchor : "100%",
+ disabled:true
+ }
+ },{
+ columnWidth : 1,
+ layout : 'form',
hidden:hideTousseDefinitionIds,
items : {
xtype: 'multiSelect',
@@ -718,6 +740,138 @@
tmpWindow.show();
}
+//QHRSGZZYY-13:统一归还的弹窗(确认归还:0,提前归还:1,批量确认归还:2,批量提前归还:3)
+function showReturnFunctionWin(actionType, params){
+ var msg = '';
+ var actionTypeName = '';
+ if(actionType == 0){
+ msg = '确认归还' + entityName + '信息?';
+ actionTypeName = ACTION_TYPE_CONFIRM_RETURN;
+ }else if(actionType == 1){
+ msg = '提前归还会终止申请单,并删除装配任务,是否要提前归还?';
+ actionTypeName = ACTION_TYPE_EARLY_RETURN;
+ }else if(actionType == 2){
+ msg = '是否确定要' + ACTION_TYPE_CONFIRM_RETURN + '选中的记录?';
+ actionTypeName = ACTION_TYPE_CONFIRM_RETURN;
+ }else if(actionType == 3){
+ msg = '是否确定要' + ACTION_TYPE_EARLY_RETURN + '选中的记录?';
+ actionTypeName = ACTION_TYPE_EARLY_RETURN;
+ }
+ var formPanel = new top.Ext4.form.Panel({
+ id: 'configForm',
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px;',
+ width: 350,
+ fieldDefaults: {
+ labelAlign: 'right',
+ labelWidth: 70
+ },
+ items: [{
+ layout: 'column',
+ border:0,
+ items: [{
+ columnWidth: 1,
+ layout: 'form',
+ border:0,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel : '',
+ id : 'text',
+ name : 'text',
+ labelSeparator: '',
+ allowBlank : true,
+ readOnly: true,
+ anchor : "100%",
+ border:0,
+ value: msg
+ }]
+ },{
+ columnWidth: 1,
+ layout: 'form',
+ border:0,
+ hidden: !sstsConfig.enableTheReturnCleaningQualifiedFunction,
+ items : [{
+ xtype : 'combo',
+ fieldLabel : '清洗合格',
+ id : 'cleanQualified',
+ name : 'cleanQualified',
+ valueField : 'value',
+ displayField : 'value',
+ mode : 'local',
+ triggerAction : 'all',
+ forceSelection : true,
+ editable : false,
+ store : new top.Ext4.data.SimpleStore( {
+ fields : [ 'value' ],
+ data : [['是'],['否']]
+ }),
+ value:'是',
+ anchor : "100%"
+ }]
+ }]
+ }]
+ });
+ var tmpWindow = new top.Ext4.window.Window({
+ title : '请确认',
+ modal : true,
+ border : true,
+ items: [{
+ region: 'center',
+ width: 350,
+ layout: 'fit',
+ border:0,
+ items: [formPanel]
+ }],
+ buttonAlign : 'center',
+ buttons:[{
+ text:'确认',
+ handler : function() {
+ var cleanQualified = top.Ext4.getCmp('cleanQualified').getValue();
+ if(actionType == 0 || actionType == 1){
+ var foreignTousseForm = top.Ext4.getCmp('foreignToussForm');
+ if(foreignTousseForm && !foreignTousseForm.getForm().isValid()){
+ showResult('请正确填写表单各值');
+ return false;
+ }
+ var success = getForeignTousseInfo();
+ if(success){
+ submintForeignTousseForm(actionTypeName, false);
+ tmpWindow.close();
+ }
+ }else {
+ //QHRSGZZYY-13:新增字段“清洗合格”
+ if(sstsConfig.enableTheReturnCleaningQualifiedFunction){
+ var cleanQualified = top.Ext4.getCmp('cleanQualified').getValue();
+ params.cleanQualified = cleanQualified;
+ }
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do',
+ params: params,
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ grid.dwrReload();
+ tmpWindow.close();
+ }
+ showResult(result.message);
+ },
+ failure: function (response, options) {
+ showResult("服务器出错,请联系系统管理员!");
+ }
+ });
+ }
+ }
+ },{
+ text:'取消',
+ handler : function() {
+ tmpWindow.close();
+ }
+ }]
+ });
+ tmpWindow.show();
+}
+
function getSupplierName(){
var nodes = foreignTousseStore.getRootNode().childNodes;
if(nodes.length > 0){
@@ -1358,6 +1512,16 @@
}else {
params.returnType = actionType;
}
+ //QHRSGZZYY-13:新增字段“清洗合格”
+ if(sstsConfig.enableTheReturnCleaningQualifiedFunction){
+ var cleanQualified = '';
+ if(top.Ext4.getCmp('cleanQualified')){
+ cleanQualified = top.Ext4.getCmp('cleanQualified').getValue();
+ }else if(top.Ext.getCmp('cleanQualified')){
+ cleanQualified = top.Ext.getCmp('cleanQualified').getValue();
+ }
+ params.cleanQualified = cleanQualified;
+ }
var oldVersion = top.Ext4.getCmp('oldVersion').getValue() || 0;
foreignTousseForm.form.submit({
url : WWWROOT + submitUrl,
@@ -2576,33 +2740,7 @@
var supplierContactName = top.Ext4.getCmp('supplierContactName').getValue() || '';
returnFunction(0,id,'',supplierContactName);
}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(ACTION_TYPE_CONFIRM_RETURN, false);
- }
- }
- },{
- text:'否',
- handler : function() {
- tmpWindow.close();
- }
- }]
- });
- tmpWindow.show();
+ showReturnFunctionWin(0);
}
}
},{
@@ -2613,34 +2751,7 @@
var supplierContactName = top.Ext4.getCmp('supplierContactName').getValue() || '';
returnFunction(1,id,'',supplierContactName);
}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(ACTION_TYPE_EARLY_RETURN, false);
- }
- }
- },{
- text:'否',
- handler : function() {
- tmpWindow.close();
- }
- }]
- });
-
- tmpWindow.show();
+ showReturnFunctionWin(1);
}
}
},{
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js
===================================================================
diff -u -r40374 -r40418
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 40374)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 40418)
@@ -266,21 +266,37 @@
}
var returneeOfSupplier = '';
var returnMan = '';
- var completeness = ''
if (top.Ext.getCmp('returneeOfSupplier1')) {
returneeOfSupplier = top.Ext.getCmp('returneeOfSupplier1').getValue() || '';
}
if (top.Ext.getCmp('returnMan1')) {
returnMan = top.Ext.getCmp('returnMan1').getValue() || '';
}
+ var params = {
+ ids: ids,
+ returnType: returnType,
+ returneeOfSupplier1: returneeOfSupplier,
+ returnMan1: returnMan
+ }
//DGSDBZXYY-239:新增字段“是否齐全”
if (top.Ext.getCmp('completeness')) {
- completeness = top.Ext.getCmp('completeness').getValue() || '';
+ var completeness = top.Ext.getCmp('completeness').getValue() || '';
+ params.completeness = completeness;
}
+ //QHRSGZZYY-13:新增字段“清洗合格”
+ if(sstsConfig.enableTheReturnCleaningQualifiedFunction){
+ var cleanQualified = '';
+ if(top.Ext4.getCmp('cleanQualified')){
+ cleanQualified = top.Ext4.getCmp('cleanQualified').getValue();
+ }else if(top.Ext.getCmp('cleanQualified')){
+ cleanQualified = top.Ext.getCmp('cleanQualified').getValue();
+ }
+ params.cleanQualified = cleanQualified;
+ }
if (sstsConfig.enableReturneeOfForeignTousseSupplier) {
Ext.Ajax.request({
url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!comfirmReturnOrEarlyReturn.do',
- params: { ids: ids, returnType: returnType, returneeOfSupplier1: returneeOfSupplier, returnMan1: returnMan, completeness: completeness },
+ params: params,
success: function (response, options) {
var result = Ext.decode(response.responseText);
if (result.success) {
@@ -296,34 +312,11 @@
}
});
} else {
- top.Ext.MessageBox.confirm = function (title, msg, fn) {
- this.show({
- title: title,
- msg: msg,
- buttons: { yes: '确认', no: '取消' },
- fn: fn,
- icon: this.QUESTION
- });
- return this;
+ if(returnType == ACTION_TYPE_CONFIRM_RETURN){
+ showReturnFunctionWin(2, params)
+ }else {
+ showReturnFunctionWin(3, params)
}
- 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, completeness: completeness },
- success: function (response, options) {
- var result = Ext.decode(response.responseText);
- if (result.success) {
- grid.dwrReload();
- }
- showResult(result.message);
- },
- failure: function (response, options) {
- showResult("服务器出错,请联系系统管理员!");
- }
- });
- }
- });
}
}