Index: ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js =================================================================== diff -u -r26799 -r35516 --- ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js (.../storageLocationLookView.js) (revision 26799) +++ ssts-web/src/main/webapp/disinfectsystem/storageLocationManage/storageLocationLookView.js (.../storageLocationLookView.js) (revision 35516) @@ -86,9 +86,66 @@ grid.dwrReload(); } +function compareDate(DateOne,DateTwo) { + var OneMonth = DateOne.substring(5,DateOne.lastIndexOf ("-")); + var OneDay = DateOne.substring(DateOne.length,DateOne.lastIndexOf ("-")+1); + var OneYear = DateOne.substring(0,DateOne.indexOf ("-")); + var TwoMonth = DateTwo.substring(5,DateTwo.lastIndexOf ("-")); + var TwoDay = DateTwo.substring(DateTwo.length,DateTwo.lastIndexOf ("-")+1); + var TwoYear = DateTwo.substring(0,DateTwo.indexOf ("-")); + if (Date.parse(OneMonth+"/"+OneDay+"/"+OneYear) >= Date.parse(TwoMonth+"/"+TwoDay+"/"+TwoYear)) { + return true;//dataone>datetwo + } else { + return false; + } +} + +//验证器械包预警期、失效期 +function getValidAndWarningStatus(record,p){ + console.log(serverDate) + var validUntil = record.data.validUntil; + var warningUntil = record.data.warningUntil; + + //由客户端时间改为和服务器时间进行比较 + var b = compareDate(myDateFormat(warningUntil,p,record),serverDate);//预警期 + var f = compareDate(myDateFormat(validUntil,p,record),serverDate);//失效期 + if(!f){ + return 2;//失效 + } + if(!b){ + return 1;//预警 + } + return 0; +} + +function checkDate(v, p, record,rowIndex,columnIndex,store){ + if(v == ''){ + return ""; + } + var color = '' + var fontColor = '' + var status = getValidAndWarningStatus(record,p); + if(status == 1){ + color = "yellow"; + fontColor = '#000'; + }else if(status == 2){ + color = "#FF7575"; + fontColor = '#fff'; + } + if(color !== ''){ + return "

" + myDateFormat(v) + "

"; + }else{ + return myDateFormat(v); + } +} + +var serverDate; + Ext.onReady(function(){ Ext.QuickTips.init(); - + getServerTime("yyyy-MM-dd",Ext,null,function(serverTime){ + serverDate = serverTime; + }); //所有grid之外的参数用这个方法传入,返回的是Map> Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function(){}; @@ -99,6 +156,8 @@ },{ name : 'validUntil' },{ + name : 'warningUntil' + },{ name : 'tousseBarcode' },{ name : 'storageLocationName' @@ -115,7 +174,7 @@ var columns = [{ header : "物品名称",width : 200,dataIndex : 'tousseName'}, {header : "灭菌日期",width :150,dataIndex : 'sterileEndTime' }, - {header : "失效日期",width : 150,dataIndex : 'validUntil'}, + {header : "失效日期",width : 150,dataIndex : 'validUntil',renderer : checkDate}, {header : "器械包条码",width : 120,dataIndex : 'tousseBarcode'}, {header : "抽屉名称",width : 100,dataIndex : 'storageLocationName'}, {header : "库位编码",width : 120,dataIndex : 'storageLocationCode'}, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js =================================================================== diff -u -r35420 -r35516 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 35420) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 35516) @@ -2421,6 +2421,39 @@ anchor: '100%' }] }] + }, { + xtype: "fieldset", + title: '库位管理参数设置', + layout: 'column', + width: itemWidth, + height: 70, + labelWidth: 100, + hidden:!sstsConfig.enableWarehousePositionModule, + items: [{ + layout: 'form', + labelWidth: fontSize == 12 ? 180 : 220, + labelAlign: "right", + columnWidth: .25, + items: [{ + xtype: 'combo', + fieldLabel: '入库启动签收', + id: 'autoSignAfterPutInStorage', + name: 'autoSignAfterPutInStorage', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + mode: 'local', + editable: false, + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + value:'否', + anchor: '100%' + }] + }] }] }) ] @@ -3440,6 +3473,11 @@ isEnableTousseUnReturnWarn = Ext.getCmp("isEnableTousseUnReturnWarn").getValue(); } + var autoSignAfterPutInStorage = '否'; + if(sstsConfig.enableWarehousePositionModule){ + autoSignAfterPutInStorage = Ext.getCmp("autoSignAfterPutInStorage").getValue(); + } + var foreignTousseAppEndTime = Ext.getCmp("foreignTousseAppEndTime").getValue(); var isFtOnlyImplantConvert = Ext.getCmp("isFtOnlyImplantConvert").getValue(); var unitName = Ext.getCmp("unitName").getValue(); @@ -3599,6 +3637,7 @@ isEnableTousseOpSign:isEnableTousseOpSign, isEnableTousseUnReturnWarn:isEnableTousseUnReturnWarn, dashboardsRefreshFrequency:dashboardsRefreshFrequency, + autoSignAfterPutInStorage:autoSignAfterPutInStorage, noOperationTime:noOperationTime, dashboardsQueryCycle:dashboardsQueryCycle, dashboardsScreenSaver:dashboardsScreenSaver, @@ -3907,6 +3946,9 @@ Ext.getCmp('isEnableTousseOpSign').setValue(isEnableTousseOpSign); Ext.getCmp('isEnableTousseUnReturnWarn').setValue(isEnableTousseUnReturnWarn); } + if(sstsConfig.enableWarehousePositionModule){ + Ext.getCmp('autoSignAfterPutInStorage').setValue(supplyRoomConfig.autoSignAfterPutInStorage); + } } }); Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js =================================================================== diff -u -r35444 -r35516 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js (.../tousseInstanceInfoTab.js) (revision 35444) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js (.../tousseInstanceInfoTab.js) (revision 35516) @@ -1740,6 +1740,45 @@ buttons : [this.cancelButton] })] }); + tabsItemArr.push({ + title: '库位记录', + layout : 'fit', + items:[ + new top.Ext.grid.GridPanel({ + id : 'storageLocationRecord', + store : new Ext.data.Store({ + reader : new Ext.data.JsonReader({ + fields : [ + {name : 'operator'}, + {name : 'time'}, + {name : 'status'}, + {name : 'wareHouseName'}, + {name : 'storageLocationName'}, + {name : 'storageLocationCode'}, + {name : 'remark'} + ] + }) + }), + cm : new Ext.grid.ColumnModel([ + {header : "操作人",dataIndex : 'operator',width : 80, menuDisabled: true}, + {header : "操作时间",dataIndex : 'time',width : 140, menuDisabled: true}, + {header : "操作类型",dataIndex : 'status',width : 80, menuDisabled: true}, + {header : "仓库",dataIndex : 'wareHouseName',width : 100, menuDisabled: true}, + {header : "抽屉名称",dataIndex : 'storageLocationName',width : 100, menuDisabled: true}, + {header : "库位编码",dataIndex : 'storageLocationCode',width : 100, menuDisabled: true}, + {header : "备注",dataIndex : 'remark',width : 130, menuDisabled: true} + ]), + enableHdMenu : false, + width : 900, + autoHeight : true, + autoExpandColumn : 'remark', + frame : false, + viewConfig: { + forceFit:true + } + }) + ] + }) // 流转记录 if (this.enableSurgicalInstrumentsManagement) { var autoExpandColumn = 'destDepart'; @@ -2560,8 +2599,26 @@ top.Ext.getCmp('foreignTousseApplicationReturnTime').setValue(foreignTousseApplicationJSON.returnTime);//灭菌记录_外来器械归还时间 } } + + //库位记录 + var storageRecordJsonArray = result.storageRecordJsonArray; + if(storageRecordJsonArray){ + for(var j = 0;j < storageRecordJsonArray.length ; j++){ + var storageRecordInfo = storageRecordJsonArray[j]; + var storageRecordData = new Ext.data.Record({ + id : storageRecordInfo.id, + operator : storageRecordInfo.operator, + remark : storageRecordInfo.remark, + status : storageRecordInfo.status, + storageLocationCode : storageRecordInfo.storageLocationCode, + storageLocationName : storageRecordInfo.storageLocationName, + time : storageRecordInfo.time, + wareHouseName : storageRecordInfo.wareHouseName + }); + top.Ext.getCmp('storageLocationRecord').getStore().add(storageRecordData); + } + } - //废弃记录 if(instance.operateUser != null && instance.operateUser.length > 0){ top.Ext.getCmp('operateUser').setValue(instance.operateUser); //废弃记录_操作人