Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r14384 -r14398 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14384) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14398) @@ -12,6 +12,20 @@ if (sstsConfig.invoicePlanPrintButtonName != undefined){ invoicePlanPrintButtonName = sstsConfig.invoicePlanPrintButtonName; } +/** + * 打开对应的表单 + * @param form 对应的表单 + * @param tousseType 对应的机械包类型 + */ +function openApplication(tousseType,form) { + //新打开申请对话框时,相关参数调整及清除 + handleDepartStore.proxy.extraParams.tousseType = tousseType; + handleDepartStore.proxy.extraParams.applyDepartCode = ""; + comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = ""; + if (!isUndefinedOrNullOrEmpty(form)){ + comboApplication(0, "true",false,false,true,form, false); + } +} function reloadGoodsComboStore(){ var deptName = top.Ext4.getCmp("handleDepart").getValue(); var deptCoding = getHandleDepartCoding(handleDepartStore,deptName); @@ -1099,7 +1113,8 @@ id : 'commitBtn', text : '提交', hidden : hiddenCommitButton, - handler : function() { + //commitNew:提交后是否需要重新打开模板 + handler : function(commitNew) { if (!form.getForm().isValid()) { showResult('请正确填写表单各值'); return false; @@ -1122,6 +1137,7 @@ return; } } + var flag = commitNew; function submitRecyclingApplication(autoReturnTheBorrowingTousse){ form.form.submit({ @@ -1136,6 +1152,9 @@ var msg = action.result.message; if (msg.length <= 6){ showResult(action.result.message); + if (flag == true){ + openApplication("",comboApplicationForm); + } } else{ top.Ext4.Msg.show({ @@ -1234,6 +1253,13 @@ } } } + },{ + id : 'commitNewBtn', + text : '提交并新建', + handler : function() { + var cmp = top.Ext4.getCmp("commitBtn"); + cmp.handler(true); + } }, { id : 'tempSaveBtn', @@ -3051,11 +3077,11 @@ hidden : SSTS_RecycApplication_Create || sstsConfig.applicationFormType != 1, handler : function() { //新打开申请对话框时,相关参数调整及清除 - handleDepartStore.proxy.extraParams.applyDepartCode = ""; + /* handleDepartStore.proxy.extraParams.applyDepartCode = ""; handleDepartStore.proxy.extraParams.tousseType = ""; - comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = ""; - comboApplication(0, "true",false,false,true,comboApplicationForm, false); + comboApplication(0, "true",false,false,true,comboApplicationForm, false);*/ + openApplication("",comboApplicationForm); } },{ text : '申请器械包', @@ -3067,7 +3093,7 @@ //新打开申请对话框时,相关参数调整及清除 handleDepartStore.proxy.extraParams.applyDepartCode = ""; handleDepartStore.proxy.extraParams.tousseType = invoicePlanForTousseType; - + comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = ""; comboApplication(0, "true",false,false,true,tousseApplicationForm, false);//待发货 }