Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r29809 -r30244 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 29809) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 30244) @@ -110,39 +110,44 @@ var recyclingStatus = record.data['recyclingStatus']; var packageStatus = record.data['packageStatus']; var color = ""; - var fontSizeColor = ""; + var fontColor = ""; if(packageStatus == '已归还'){ color = '#fff';//白色 }else { if(recyclingStatus == '已终止'){ color = "red"; + fontColor = '#fff'; }else if(recyclingStatus == '待回收'){ color = '#a52a2a';//棕色 - fontSizeColor = '#fff'; + fontColor = '#fff'; }else if(recyclingStatus == '二次回收'){ color = '#ffa500';//橙色 } } - return "

" + v + "

"; + return "

" + v + "

"; } function renderDeliverStatusColor(v, p, record){//发货状态 var deliverStatus = record.data['deliverStatus']; var packageStatus = record.data['packageStatus']; var recyclingStatus = record.data['recyclingStatus']; var color = ""; + var fontColor = ''; if(recyclingStatus == '待回收'){ color = '#fff';//白色 }else { if(deliverStatus == '已终止'){ color = "red"; + fontColor = '#fff'; }else if(packageStatus == '已接收' && deliverStatus == '待发货'){ color = "#00b0f0";//蓝色 + fontColor = '#fff'; }else if(packageStatus == '已接收' && (deliverStatus == '已发货' || deliverStatus == '部分发货')){ color = "#00b050";//绿色 + fontColor = '#fff'; } } - return "

" + v + "

"; + return "

" + v + "

"; } /** @@ -192,9 +197,18 @@ } }); }else { - top.Ext.MessageBox.confirm("请确认","是否确定要" + returnType + "选中的记录?", - function(button, text) { - if ("yes" == button){ + top.Ext.MessageBox.confirm = function(title, msg, fn) { + this.show({ + title : title, + msg : msg, + buttons:{yes:'确认',no:'取消'}, + fn : fn, + icon : this.QUESTION + }); + return this; + } + 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}, @@ -272,7 +286,9 @@ {name : 'returnTime'}, {name : 'invoiceStatus'}, {name : 'remark'}, - {name : 'urgencyNum'} + {name : 'urgencyNum'}, + {name : 'handleDepartCoding'}, + {name : 'handleDepart'} ]; var filters = new Ext.grid.GridFilters({ @@ -338,9 +354,23 @@ showResult("请选择要确认归还的记录!"); return false; } + + var supplierNames = []; + for(var i=0;i 1){ + showResult('您选择了多家外来器械供应室的申请单,只能选择一家供应商的申请单进行批量归还'); + return + } + if(sstsConfig.enableReturneeOfForeignTousseSupplier){ - returnFunction(3); + returnFunction(3,'',records[0].data.handleDepartCoding); }else { comfirmReturnOrEarlyReturn(actionType_confirmReturn); } @@ -356,8 +386,23 @@ showResult("请选择要提前归还的记录!"); return false; } + + var supplierNames = []; + + for(var i=0;i 1){ + showResult('您选择了多家外来器械供应室的申请单,只能选择一家供应商的申请单进行批量归还'); + return + } + if(sstsConfig.enableReturneeOfForeignTousseSupplier){ - returnFunction(3); + returnFunction(3,'',records[0].data.handleDepartCoding); }else { comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN); } Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp =================================================================== diff -u -r29762 -r30244 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 29762) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 30244) @@ -12,8 +12,11 @@ <%@ page import="com.forgon.disinfectsystem.entity.invoicemanager.InvoicePlan" %> <%@page import="com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseDefinition"%> <% - String userName = AcegiHelper.getLoginUser().getUserFullName(); - request.setAttribute("userName",userName); + String userName = AcegiHelper.getLoginUser().getUserFullName(); + String userCode = AcegiHelper.getLoginUser().getUserName(); + Long userId = AcegiHelper.getLoginUser().getUserId(); + request.setAttribute("userName",userName); + request.setAttribute("userCode",userCode); request.setAttribute("depart",AcegiHelper.getLoginUser().getCurrentOrgUnitName()); request.setAttribute("departCoding",AcegiHelper.getLoginUser().getCurrentOrgUnitCode()); request.setAttribute("fontSize",AcegiHelper.getLoginUser().getFontSize() == null?"12":AcegiHelper.getLoginUser().getFontSize()); @@ -45,7 +48,6 @@ .getBean("operationManager"); boolean has = operationManager.isCurrentUserHaveAnyOperation("SSTS_ForeignTousseApplication_ShowAll"); request.setAttribute("showAllForeignTousseApplicationPermission", has); - %> @@ -88,6 +90,7 @@ var today = '<%=request.getAttribute("today")%>'; var curUserName = '<%=request.getAttribute("userName")%>'; + var curUserCode = '<%=request.getAttribute("userCode")%>'; var TYPE_SUPPLIER = encodeURIComponent('<%=Supplier.SUPPLIER_TYPE_RENTTOUSSE%>'); var supplyRoomCoding = '<%=request.getAttribute("supplyRoomCoding")%>'; Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r29787 -r30244 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 29787) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 30244) @@ -191,7 +191,10 @@ } //确认归还:0,提前归还:1,批量确认归还:2,批量提前归还:3 -function returnFunction(actionType,id){ +function returnFunction(actionType,id,handleDepartCoding){ + if(top.Ext4.getCmp("handleDepartCoding")) { + handleDepartCoding = top.Ext4.getCmp("handleDepartCoding").getValue() || ''; + } /**** 厂家归还人 store ****/ var supplierContactStore = new Ext4.data.Store({ proxy : { @@ -206,6 +209,26 @@ {name : 'contactName',mapping : 'contactName'} ] }); + /**** 供应室归还人 store ****/ + var returnManStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/systemmanage/user/loadUserByOrgId!loadUserByDepartmentCode.do', + reader : { + root : 'data' + }, + extraParams : { + departmentCode : handleDepartCoding + } + }, + fields : [ + {name : 'id',mapping : 'id'}, + {name : 'contactName',mapping : 'name'} + ] + }); + + returnManStore.load() + var returnForm = new top.Ext4.form.Panel({ id : 'returnForm', frame : true, @@ -277,7 +300,7 @@ } },{ columnWidth : .5, - defaultType : 'textfield', + defaultType : 'combo', border : false, layout : 'form', anchor : "90%", @@ -286,7 +309,37 @@ fieldLabel : '供应室归还人', id : 'returnMan1', name : 'returnMan1', - allowBlank : true + allowBlank : true, + queryParam : 'spell', + minChars : 0, + displayField : 'contactName', + valueField:'contactName', + pageSize : 0, + listConfig: {width: 300}, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : true, + forceSelection:false, + store : returnManStore, + listeners:{ + render:function(params,records) { + setTimeout(function () { + var userName = ''; + if(returnManStore.data.items.length > 0){ + var items = returnManStore.data.items; + for(var i=0;i