Index: ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js =================================================================== diff -u -r28069 -r28682 --- ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 28069) +++ ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 28682) @@ -103,7 +103,21 @@ invoicePlanStore.load({params:{start: 0, limit: 10}}); } +function add0(m){return m<10?'0'+m:m }; +function renderRecyclingTime(obj){ + if(obj){ + var time = new Date(obj.time); + var y = time.getFullYear(); + var m = time.getMonth()+1; + var d = time.getDate(); + var h = time.getHours(); + var mm = time.getMinutes(); + var s = time.getSeconds(); + return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm) + } +} + Ext.onReady(function() { /** @@ -434,63 +448,63 @@ } }] - },{ - columnWidth : .2, - layout : 'form', - labelWidth : 70, - //labelSeparator : '选择供应室:', - items : [{//20181225 - xtype : 'multiSelect', - fieldLabel : '选择供应室', - id : 'querySupplyRoom', - name : 'querySupplyRoom', - valueField : 'departCode', - displayField : 'name', - minChars : 0, - listWidth : 260, - allowBlank : true, - editable : false, - store : supplyRoomStore, - forceSelection : false, - mode : 'local', - triggerAction : 'all', - lazyInit : true, - typeAhead : false, - anchor : '95%', - listeners: { - select: function (combo, record, index) { - //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 - if (record.get('departCode') == ALL) { - if (record.get('checked')) { - combo.selectAll(); - } else { - combo.deselectAll(); - } - } - - //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 - var selectAll = true; - combo.store.each(function(record) { - if (record.get('departCode') != ALL && !record.get(this.checkField)) { - selectAll = false; - return; - } - }, combo); - - var all = combo.store.getAt(0); - if (selectAll) { - all.set(combo.checkField, true); - } else { - all.set(combo.checkField, false); - } - combo.setValue(combo.getCheckedValue()); - //taskGroupStore.reload(); - /* if(!combo.getValue()){ - taskGroupStore.removeAll(); - } */ - } - } - }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 70, + //labelSeparator : '选择供应室:', + items : [{//20181225 + xtype : 'multiSelect', + fieldLabel : '选择供应室', + id : 'querySupplyRoom', + name : 'querySupplyRoom', + valueField : 'departCode', + displayField : 'name', + minChars : 0, + listWidth : 260, + allowBlank : true, + editable : false, + store : supplyRoomStore, + forceSelection : false, + mode : 'local', + triggerAction : 'all', + lazyInit : true, + typeAhead : false, + anchor : '95%', + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('departCode') == ALL) { + if (record.get('checked')) { + combo.selectAll(); + } else { + combo.deselectAll(); + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('departCode') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue()); + //taskGroupStore.reload(); + /* if(!combo.getValue()){ + taskGroupStore.removeAll(); + } */ + } + } + }] }] }], buttonAlign :'center', @@ -532,14 +546,16 @@ var pendingBasketColumns = new Ext.grid.ColumnModel([ {header : "篮筐条码",width : 200,dataIndex : 'containerBarcode'}, {header : "名称",width : 120,dataIndex : 'containerName'}, - {header : "待清洗物品数量",width : 120,dataIndex : 'unWashAmount'} -// {header : "状态",width : 60,dataIndex : 'status'} + {header : "待清洗物品数量",width : 120,dataIndex : 'unWashAmount'}, + {header : "回收时间",width : 130,dataIndex : 'recyclingTime',renderer : renderRecyclingTime} ]); // 装配记录信息 var packingSm = new Ext.grid.CheckboxSelectionModel(); var packingColumns = new Ext.grid.ColumnModel([ packingSm, - {header : "器械包名称",width : 250,dataIndex : 'tousseDefinition.name'}, + {header : "物品名称",width : 250,dataIndex : 'tousseDefinition.name'}, + {header : "篮筐名称",width : 120,dataIndex : 'recyclingBasketName'}, + {header : "篮筐条码",width : 120,dataIndex : 'basketBarcode'}, {header : "任务组",width : 95,dataIndex : 'tousseDefinition.taskGroup'}, {header : "数量",width : 80,dataIndex : 'amount'}, {header : "待装配数量",width : 80,dataIndex : 'unPackAmount'}, @@ -550,11 +566,11 @@ var reviewSm = new Ext.grid.CheckboxSelectionModel(); var reviewColumns = new Ext.grid.ColumnModel([ reviewSm, - {header : "器械包名称",width : 130,dataIndex : 'tousseName',sortable:false}, + {header : "物品名称",width : 130,dataIndex : 'tousseName',sortable:false}, {header : "任务组",width : 95,dataIndex : 'tousseDefinition.taskGroup',sortable:false}, {header : "条码",width : 65,dataIndex : 'barcode',sortable:false}, - {header : "操作员",width : 50,dataIndex : 'operator',sortable:false}, - {header : "操作时间",width : 105,dataIndex : 'operationTime', renderer : myDateFormatByMinute,sortable:false}, + {header : "装配人",width : 50,dataIndex : 'operator',sortable:false}, + {header : "装配时间",width : 120,dataIndex : 'operationTime', renderer : myDateFormatByMinute,sortable:false}, {header : "灭菌程序",width : 100,dataIndex : 'sterilingType',sortable:false}, {header : "有效期至",width : 80,dataIndex : 'validUntil', renderer : myDateFormat,sortable:false}, {header : "状态",width : 50,dataIndex : 'status',sortable:false}, @@ -564,20 +580,26 @@ var SterilizationSm = new Ext.grid.CheckboxSelectionModel(); var SterilizationColumns = new Ext.grid.ColumnModel([ SterilizationSm, - {header : "器械包名称",width : 130,dataIndex : 'tousseName',sortable:false}, + {header : "物品名称",width : 130,dataIndex : 'tousseName',sortable:false}, {header : "条码",width : 65,dataIndex : 'barcode',sortable:false}, - {header : "操作员",width : 50,dataIndex : 'operator',sortable:false}, - {header : "操作时间",width : 105,dataIndex : 'operationTime', renderer : myDateFormatByMinute,sortable:false}, + {header : "审核人",width : 50,dataIndex : 'operator',sortable:false}, + {header : "审核时间",width : 120,dataIndex : 'operationTime', renderer : myDateFormatByMinute,sortable:false}, {header : "灭菌程序",width : 100,dataIndex : 'sterilingType',sortable:false}, {header : "有效期至",width : 80,dataIndex : 'validUntil', renderer : myDateFormat,sortable:false}, {header : "状态",width : 50,dataIndex : 'status',sortable:false}, {header : "包装类型",width : 60,dataIndex : 'packageType',sortable:false} ]); - //发货信息 + //发货信息 + var invoicePlanSm = new Ext.grid.CheckboxSelectionModel(); var invoicePlanColumns = new Ext.grid.ColumnModel([ - {header : "器械包名称",width : 200,dataIndex : 'tousseName'}, - {header : "数量",width : 80,dataIndex : 'applicationAmount'}, - {header : "申请科室",width : 150,dataIndex : 'depart'} + invoicePlanSm, + {header : "invoicePlanId",dataIndex : 'invoicePlanId',hidden : true}, + {header : "器械包名称",width : 200,dataIndex : 'tousseName'}, + {header : "数量",width : 80,dataIndex : 'applicationAmount'}, + {header : "申请科室",width : 150,dataIndex : 'depart'}, + {header : "申请单类型",width : 120,dataIndex : 'invoicePlanType'}, + {header : "申请单编号",width : 120,dataIndex : 'serialNumberOfInovicePlan'}, + {header : "申请时间",width : 130,dataIndex : 'applicationTime',sortable:true} ]); applicationStore = new Ext.data.Store({ @@ -622,8 +644,8 @@ },[ {name: 'containerBarcode'}, {name: 'containerName'}, - {name: 'unWashAmount'} -// {name: 'status'} + {name: 'unWashAmount'}, + {name: 'recyclingTime'} ]) }); @@ -644,7 +666,9 @@ root : 'data' },[ {name:'id'}, - {name: 'tousseDefinition.name'}, + {name: 'tousseDefinition.name'}, + {name: 'basketBarcode'}, + {name: 'recyclingBasketName'}, {name: 'startTime'}, {name: 'tousseDefinition.taskGroup'}, {name: 'amount'}, @@ -670,7 +694,7 @@ root : 'data' },[ {name: 'id'}, - {name: 'tousseName'}, + {name: 'tousseName'}, {name: 'tousseDefinition.taskGroup'}, {name: 'barcode'}, {name: 'operator'}, @@ -685,7 +709,7 @@ reviewStore.on("load",function(thiz,records,options){ var o = Ext.decode(reviewStore.reader.responseText); var totalReviewAmount = o.totalReviewAmount; - var newTitle = "待"+reviewViewText+"器械包列表"+"(待"+reviewViewText+"器械包总数量:" + totalReviewAmount + ")"; + var newTitle = "待"+reviewViewText+"物品列表"+"(待"+reviewViewText+"物品总数量:" + totalReviewAmount + ")"; Ext.getCmp('reviewGrid').setTitle(newTitle); }); @@ -713,23 +737,28 @@ sterilizationStore.on("load",function(thiz,records,options){ var o = Ext.decode(sterilizationStore.reader.responseText); var totalReviewAmount = o.totalReviewAmount; - var newTitle = "待灭菌器械包列表"+"(待灭菌器械包总数量:" + totalReviewAmount + ")"; + var newTitle = "待灭菌物品列表"+"(待灭菌物品总数量:" + totalReviewAmount + ")"; Ext.getCmp('sterilizationGrid').setTitle(newTitle); }); invoicePlanStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ + proxy : new Ext.data.HttpProxy({ url : WWWROOT + '/disinfectSystem/supplyRoomControlAction!searchUnInvoice.do', method : 'POST' }), - reader : new micJsonReader({ + reader:new micJsonReader({ totalProperty : 'totalCount', root : 'data' },[ - {name : 'tousseName'}, - {name : 'applicationAmount'}, - {name : 'depart'} - ]) + {name:'id'}, + {name : 'invoicePlanId'}, + {name : 'tousseName'}, + {name : 'applicationAmount'}, + {name : 'depart'}, + {name : 'invoicePlanType'}, + {name : 'serialNumberOfInovicePlan'}, + {name : 'applicationTime'} + ]) }); invoicePlanStore.on("load",function(thiz,records,options){ @@ -801,49 +830,32 @@ }]; applicationGrid = new Ext.grid.GridPanel({ title:'待回收申请单列表', - anchor:'100% 100%', + height:350, frame : false, autoScroll:true, -// selModel: { -//// injectCheckbox: 0 -//// mode: "SIMPLE", //"SINGLE"/"SIMPLE"/"MULTI" -//// checkOnly: true //只能通过checkbox选择 -// }, store : applicationStore, id : 'applicationGrid', cm : applicationColumns, sm : applicationSm, tbar : applicationTbar, bbar:applicationPageBbar, - bodyStyle: "overflow:auto;", - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); - } - } + bodyStyle: "overflow:auto;" }); var pendingBasketGrid = new Ext.grid.GridPanel({ title:'待清洗篮筐列表', - anchor:'100% 100%', + height:350, frame : false, autoScroll:true, store : pendingBasketStore, id : 'pendingBasketGrid', cm : pendingBasketColumns, bodyStyle: "overflow:auto;", - bbar:pendingBasketPageBbar, - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); - } - } + bbar:pendingBasketPageBbar }); var packingGrid = new Ext.grid.GridPanel({ title:'待装配器械包列表', - anchor:'100% 100%', + height:350, frame : false, autoScroll:true, store : packingStore, @@ -868,17 +880,11 @@ } deletePackingTask(ids); } - }], - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); - } - } + }] }); var reviewGrid = new Ext.grid.GridPanel({ - title:'待'+reviewViewText+'器械包列表', - anchor:'100% 100%', + title:'待'+reviewViewText+'物品列表', + height:350, frame : false, autoScroll:true, id:'reviewGrid', @@ -887,18 +893,12 @@ sm : reviewSm, bodyStyle: "overflow:auto;", bbar:reviewPageBbar, - tbar:[], - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); - } - } + tbar:[] }); addTousseDiscardTbar(reviewGrid); var sterilizationGrid = new Ext.grid.GridPanel({ - title:'待灭菌器械包列表', - anchor:'100% 100%', + title:'待灭菌物品列表', + height:350, frame : false, id : 'sterilizationGrid', autoScroll:true, @@ -907,33 +907,62 @@ sm : SterilizationSm, bodyStyle: "overflow:auto;", bbar:sterilizationPageBbar, - tbar:[], - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); + tbar:[] + }); + addTousseDiscardTbar(sterilizationGrid); + var filters = new Ext.grid.GridFilters({ + filters:[ + { + type: 'list', + dataIndex: 'invoicePlanType', + options: applyFormTypeArr } + ], + saveState:function(store, options){ + var value = filters.getMenuFilter().getValue(); + var goodNmae ="";// $Id('goodsSearch').value; + var tousseType = $Id('tousseType').value; + var department = $Id('department').value; + var orgUnitCoding = Ext.getCmp('querySupplyRoom').getValue(); + if(orgUnitCoding.indexOf(ALL) == 0){ + orgUnitCoding = ""; + } + var invoicePlanTypes = value.join(';'); + invoicePlanStore.baseParams['tousseName'] = goodNmae; + invoicePlanStore.baseParams['tousseType'] = tousseType; + invoicePlanStore.baseParams['department'] = department; + invoicePlanStore.baseParams['orgUnitCoding'] = orgUnitCoding; + invoicePlanStore.baseParams['invoicePlanTypes'] = invoicePlanTypes; + invoicePlanStore.load({params:{start: 0, limit: 10}}); } }); - addTousseDiscardTbar(sterilizationGrid); + //var value = filters.getMenuFilter().getValue(); var invoicePlanGrid = new Ext.grid.GridPanel({ title:'待发货器械包', - anchor:'100% 100%', + height:350, frame : false, autoScroll:true, id : 'invoicePlanGrid', store : invoicePlanStore, cm : invoicePlanColumns, + sm : invoicePlanSm, + plugins: filters, bodyStyle: "overflow:auto;", bbar:invoicePlanPageBbar, - listeners :{ - beforerender :function(thiz){ - var tempGrid = Ext.getCmp('reportFormID'); - thiz.setHeight(tempGrid.getInnerHeight()); + tbar:[{ + text: '终止物品', + iconCls: 'btn_ext_pause', + handler: function () { + termMoreinateInvoicePlan(invoicePlanGrid,null,function(){invoicePlanGrid.getStore().reload();}); } - } + }, '-', { + text: '终止所在的申请单', + iconCls: 'btn_ext_pause', + handler: function () { + terminateInvoicePlan(invoicePlanGrid,'invoicePlanGridId',function(){invoicePlanGrid.getStore().reload();}); + } + }] }); - var reportForm = new Ext.form.FormPanel({ id:'reportFormID', frame:false,//渲染面板 @@ -947,52 +976,44 @@ layout : 'column', columnWidth : 1, items:[{ - - columnWidth : 1, - layout : 'form', - items : [applicationGrid] - - }] + columnWidth : .5, + layout : 'form', + height: 350, + items : [applicationGrid] + },{ + columnWidth : .5, + layout : 'form', + height: 350, + items : [pendingBasketGrid] + }] },{ - layout : 'column', - columnWidth : 1, - items:[{ - columnWidth : 1, - layout : 'form', - items : [pendingBasketGrid] - }] + layout : 'column', + columnWidth : 1, + items:[{ + columnWidth : .5, + layout : 'form', + height: 350, + items : [packingGrid] + },{ + columnWidth : .5, + layout : 'form', + height: 350, + items : [reviewGrid] + }] },{ layout : 'column', - columnWidth : 1, - items:[{ - columnWidth : 1, - layout : 'form', - items : [packingGrid] - }] - },{ - layout : 'column', columnWidth : 1, items:[{ - columnWidth : 1, - layout : 'form', - items : [reviewGrid] - }] - },{ - layout : 'column', - columnWidth : 1, - items:[{ - columnWidth : 1, - layout : 'form', - items : [sterilizationGrid] - }] - },{ - layout : 'column', - columnWidth : 1, - items:[{ - columnWidth : 1, - layout : 'form', - items : [invoicePlanGrid] - }] + columnWidth : .5, + layout : 'form', + height: 350, + items : [sterilizationGrid] + },{ + columnWidth : .5, + layout : 'form', + height: 350, + items : [invoicePlanGrid] + }] }] });