Index: ssts-web/src/main/webapp/disinfectsystem/config/zjyy/config.js =================================================================== diff -u -r36685 -r36753 --- ssts-web/src/main/webapp/disinfectsystem/config/zjyy/config.js (.../config.js) (revision 36685) +++ ssts-web/src/main/webapp/disinfectsystem/config/zjyy/config.js (.../config.js) (revision 36753) @@ -310,6 +310,8 @@ enableWarehousePositionModule:true, //一次性物品入库单核对模式 godownEntryAddCheckMode:2, +//材料入库核对功能模式 +materialEntryAddCheckMode:1, //开启质量监测记录审核功能 enableQualityMonitoringReview:true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js =================================================================== diff -u -r22052 -r36753 --- ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js (.../materialEntryView.js) (revision 22052) +++ ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js (.../materialEntryView.js) (revision 36753) @@ -169,6 +169,34 @@ } }); +/** + * 扫描核对人条码 + */ + function loadUserVerifierByBarcode(){ + var barcode = top.Ext.getCmp('verifierBarcode').getValue(); + top.Ext.getCmp('verifierBarcode').setValue('');// 清除条码 + Ext.Ajax.request({ + url : WWWROOT + '/systemmanage/user/userAction!loadUserByBarcode.do', + params : { + barcode : barcode + }, + success : function(response, options) { + var result = response.responseText; + if (result != null && result != "null") { + var resultObj = Ext.util.JSON.decode(result); + if(resultObj.success){ + top.Ext.getCmp('verifierUserId').setValue(resultObj.data.id); + top.Ext.getCmp('verifierUserName').setValue(resultObj.data.fullName); + }else { + showResult(resultObj.message); + } + }else{ + showResult('输入的条码无效!'); + } + } + }); +} + function addGodownEntry(id) { var wareHouseStore = new Ext.data.JsonStore({ @@ -188,6 +216,20 @@ } } }); + + var verifierStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) + }); var form = new top.Ext.FormPanel({ id : 'godownEntryForm', @@ -287,6 +329,45 @@ triggerAction : 'all', anchor : '95%' }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 80, + hidden:!(sstsConfig.materialEntryAddCheckMode == 1 && id !== ''), + items :[{ + xtype : 'textfield', + fieldLabel :'核对人条码', + id : 'verifierBarcode', + name : 'verifierBarcode', + enableKeyEvents : true, + anchor : '95%', + listeners : { + render : function(c) { + c.getEl().on('keypress',function(e) { + if (e.getKey() == 13) {// 输入;号键,grid重新加载 + loadUserVerifierByBarcode(); + } + }); + } + } + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 60, + hidden:!(sstsConfig.materialEntryAddCheckMode == 1 && id !== ''), + items:[{ + xtype:'hidden', + id:'verifierUserId', + name:'verifierUserId' + },{ + xtype : 'textfield', + fieldLabel :'核对人', + id : 'verifierUserName', + name : 'verifierUserName', + disabled:true, + anchor : '95%' + }] }, { columnWidth : 1, layout : 'form', @@ -660,6 +741,18 @@ } })], buttons : [{ + text : '保存核对人', + id:'saveVerifier', + hidden:!(!SSTS_MaterialGodownVerifier_Manager && id !== ''), + handler : function() { + var verifierUserName = top.Ext.getCmp('verifierUserName').getValue(); + if(verifierUserName == ''){ + showResult('未填写核对人,无法保存!'); + return + } + saveMaterialEntryVerifier(id); + } + },{ id : 'btnSave', text : '保存', handler : function() { @@ -736,6 +829,81 @@ wareHouseStore.load(); } +//保存核对人 +function saveMaterialEntryVerifier(ids){ + var verifierUserId = top.Ext.getCmp('verifierUserId').getValue(); + var verifierUserName = top.Ext.getCmp('verifierUserName').getValue(); + + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/MaterialEntryAction!saveMaterialEntryVerifier.do', + params : { + ids : ids, + verifierUserId:verifierUserId, + verifierUserName:verifierUserName + }, + success : function(response, options) { + var result = Ext.decode(response.responseText); + var success = result.success; + if (success) { + grid.dwrReload(); + showResult(result.message); + }else{ + showResult(result.message); + } + }, + failure : function(response, options) { + showResult(response.responseText); + } + }); +} + +//批量核对人 +function batchSaveMaterialEntryVerifier(grid){ + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请勾选需要核对的记录后再操作。"); + return false; + } + var ids = []; + var isHasVerifier = '否' + for(var i=0;i'+v+''; + } + }}, + {header : "核对人",width : 100,dataIndex : 'verifierUserName',sortable:false,hidden:sstsConfig.materialEntryAddCheckMode !== 1}, + {header : "核对时间",width : 200,dataIndex : 'verifierTime', renderer : myDateFormatByMinute,hidden:sstsConfig.materialEntryAddCheckMode !== 1}, {id : 'operationRemark',header : "备注",width : 200,dataIndex : 'remark'} ]; @@ -862,6 +1046,9 @@ {name : 'serialNumber'}, {name : 'operator'}, {name : 'time'}, + {name : 'isHasVerifier'}, + {name : 'verifierUserName'}, + {name : 'verifierTime'}, {name : 'remark'}, {name : 'totalPrice'} ]; @@ -870,7 +1057,9 @@ filters:[ {type: 'string', dataIndex: 'serialNumber'}, {type: 'string', dataIndex: 'operator'}, + {type: 'string', dataIndex: 'verifierUserName'}, {type: 'date', dataIndex: 'time'}, + {type: 'date', dataIndex: 'verifierTime'}, {type: 'string', dataIndex: 'remark'} ]} ); @@ -883,39 +1072,28 @@ handler : function() { addGodownEntry(""); } - },'-',{ - + },'-', { text : '打印', -// hidden : SSTS_WarehouseEntry_Delete, iconCls : 'icon_print', handler : function() { materialEntry.onPrintEntryDetail(grid,'入库单'); } - }/*, '-', { - text : '修改', - hidden : SSTS_WarehouseEntry_Update, + },'-', { + text : '设为已核对', + hidden : SSTS_MaterialGodownVerifier_Manager, iconCls : 'btn_ext_application_edit', - id : 'editTbar', handler : function() { - loadFormData(grid); + batchSaveMaterialEntryVerifier(grid) } - }, '-'*/, { + },'-', { text : '删除', hidden : SSTS_WarehouseEntry_Delete, iconCls : 'btn_ext_application_del', handler : function() { deleteGodownEntry(grid); } - }/*, '-', { - text : '导入材料入库单EXCEL', - hidden : true, - iconCls : 'btn_ext_upload', - handler : function() { - location.href = WWWROOT - + "/disinfectsystem/basedatamanager/importbasedata/importSingleStorage.mhtml?type=material"; - } - }*/]; + }]; grid = new Ext.ux.ForgonPageGrid( { tbar : tbar, Index: ssts-web/src/main/resources/systemset/operationDefine.xml =================================================================== diff -u -r36712 -r36753 --- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 36712) +++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 36753) @@ -269,6 +269,7 @@ + Index: ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.jsp =================================================================== diff -u -r29513 -r36753 --- ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.jsp (.../materialEntryView.jsp) (revision 29513) +++ ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.jsp (.../materialEntryView.jsp) (revision 36753) @@ -61,6 +61,13 @@ SSTS_WarehouseEntry_Import = false; + var SSTS_MaterialGodownVerifier_Manager = true; + + SSTS_MaterialGodownVerifier_Manager = false; + + if(sstsConfig.materialEntryAddCheckMode !== 1){ + SSTS_MaterialGodownVerifier_Manager = true; + }