Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryForm.js (revision 35826) @@ -0,0 +1,276 @@ + +var disposableGoodsWin; +var disposableGoodsListStore; + +//删除选择的物品 +function removeDisposableGoodsItem(id) { + for (var i = 0; i < disposableGoodsListStore.getCount(); i++) { + var item = disposableGoodsListStore.data.items[i]; + if (item.data.id == id) { + disposableGoodsListStore.remove(item) + } + } +} + +//检查物品是否存在 +function isDisposableGoodsRepeat(name) { + if (name != null && name.length > 0) { + for (var i = 0; i < disposableGoodsListStore.getCount(); i++) { + var record = disposableGoodsListStore.getAt(i); + var tempName = record.get('name'); + if (name == tempName) { + return true; + } + } + } + return false; +} + +//添加物品 +function addDisposableGoodsItem(id, name, disposableGoodsName, specification) { + if (name == null || name == '') { + showResult('请选择物品!'); + return false; + } + var b = isDisposableGoodsRepeat(name); + if (b) { + showResult('物品:[' + name + '] 已存在!'); + top.Ext4.getCmp('disposableGoodsName').setValue(""); + return false; + } + var record = { + id: id, + name: name, + disposableGoodsName: disposableGoodsName, + specification: specification + }; + disposableGoodsListStore.add(record) + top.Ext4.getCmp("disposableGoodsName").setValue(""); +} + +//添加搜索结果的物品 +function addDisposableGoodsItems(id, name, disposableGoodsName, specification) { + var b = isDisposableGoodsRepeat(name); + if (b) { + return; + } + var record = { + id: id, + name: name, + disposableGoodsName: disposableGoodsName, + specification: specification + }; + disposableGoodsListStore.add(record) +} + +//保存选择的物品 +function saveDisposableGoodsName() { + var idArr = []; + + for (var i = 0; i < disposableGoodsListStore.getCount(); i++) { + var record = disposableGoodsListStore.getAt(i); + idArr[i] = record.get('id'); + } + + if (idArr.length == 0) { + showResult('请选择一个物品'); + return + } + + var ids = idArr.join(';'); + + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/diposableGoodsSummaryAction!saveDisposableGoodsSummary.do', + async: false, + params: { + disposableGoodsIds: ids + }, + success: function (response) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('添加成功'); + disposableGoodsWin.close(); + listStore.reload(); + } else { + showResult(result.msg); + } + } + }); +} + +//打开选择物品的窗口 +function openSelectDisposableGoods(names, ids) { + var disposableGoodsJsonStore = new top.Ext4.data.Store({ + pageSize: 9999, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsDataWithStock.do', + reader: { + type: 'json', + totalProperty: 'totalCount', + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' }, + { name: 'disposableGoodsName', mapping: 'disposableGoodsName' }, + { name: 'specification', mapping: 'specification' } + ] + }); + + disposableGoodsListStore = new top.Ext4.data.Store({ + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' }, + { name: 'disposableGoodsName', mapping: 'disposableGoodsName' }, + { name: 'specification', mapping: 'specification' } + ] + }); + + disposableGoodsJsonStore.load(); + + if (((names || '') !== '') && ((ids || '') !== '')) { + var nameArr = names.split(';'); + var idArr = ids.split(';'); + for (var i = 0; i < nameArr.length; i++) { + var record = { + name: nameArr[i], + id: idArr[i] + }; + disposableGoodsListStore.add(record) + } + } + + var tbar = [{ + text: '选择物品:' + }, { + xtype: 'combo', + id: 'disposableGoodsName', + name: 'disposableGoodsName', + queryParam: 'spell', + fieldLabel: '', + minChars: 0, + valueField: 'id', + displayField: 'name', + width: 320, + store: disposableGoodsJsonStore, + listeners: { + select: function (combo, record, index) { + var id = record[0].data.id; + var name = record[0].data.name; + var disposableGoodsName = record[0].data.disposableGoodsName; + var specification = record[0].data.specification; + addDisposableGoodsItem(id, name, disposableGoodsName, specification); + } + } + }, { + text: '添加物品', + iconCls: 'btn_ext_application_add', + handler: function () { + for (var i = 0; i < disposableGoodsJsonStore.getCount(); i++) { + var id = disposableGoodsJsonStore.getAt(i).get('id'); + var name = disposableGoodsJsonStore.getAt(i).get('name'); + var disposableGoodsName = disposableGoodsJsonStore.getAt(i).get('disposableGoodsName'); + var specification = disposableGoodsJsonStore.getAt(i).get('specification'); + addDisposableGoodsItems(id, name, disposableGoodsName, specification) + } + top.Ext4.getCmp("disposableGoodsName").setValue(""); + } + }, { + text: '添加所有', + iconCls: 'btn_ext_application_add', + handler: function () { + disposableGoodsJsonStore.load(); + top.Ext4.getCmp("disposableGoodsName").setValue(""); + setTimeout(function () { + for (var i = 0; i < disposableGoodsJsonStore.getCount(); i++) { + var id = disposableGoodsJsonStore.getAt(i).get('id'); + var name = disposableGoodsJsonStore.getAt(i).get('name'); + var disposableGoodsName = disposableGoodsJsonStore.getAt(i).get('disposableGoodsName'); + var specification = disposableGoodsJsonStore.getAt(i).get('specification'); + addDisposableGoodsItems(id, name, disposableGoodsName, specification) + } + }, 200); + } + }, { + text: '清空所有', + iconCls: 'btn_ext_application_del', + handler: function () { + disposableGoodsListStore.removeAll(); + } + }] + + var columns = [{ + header: "物品名称", + dataIndex: 'disposableGoodsName', + width: 385, + menuDisabled: true + }, { + header: "规格", + dataIndex: 'specification', + width: 200, + menuDisabled: true + }, { + id: 'deleteItem', + header: '操作', + width: 100, + menuDisabled: true, + dataIndex: 'button', + renderer: function (v, p, record, index) { + return ""; + } + }] + + var grid = new top.Ext4.grid.GridPanel({ + title: '', + id: 'girdID', + columns: columns, + frame: false, + width: 710, + height: 400, + store: disposableGoodsListStore, + tbar: tbar, + viewConfig: { + autoFill: true + } + }); + + disposableGoodsWin = new top.Ext4.window.Window({ + id: 'disposableGoodsWin', + layout: 'border', + title: '选择一次性物品', + width: 760, + height: 500, + border: 0, + modal: true, + defaults: { + bodyStyle: "background-color: none", + frame: true, + border: false + }, + style: 'padding:20px', + items: [{ + region: "west", + width: 720, + border: 0, + title: '', + items: [grid] + }], + buttonAlign: 'center', + buttons: [{ + id: 'confirmBtn', + text: '确定', + handler: function () { + saveDisposableGoodsName(); + } + }, { + text: '取消', + handler: function () { + disposableGoodsWin.close(); + } + }] + }); + + disposableGoodsWin.show(); +} \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menu.jsp =================================================================== diff -u -r35547 -r35826 --- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 35547) +++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 35826) @@ -1962,6 +1962,14 @@ } +var SSTS_DiposableGoodsSummary_manager = true; + + if (!notInWhiteList(sstsConfig, 'printDisposableGoodsInvoicePlanSummary')) { + SSTS_DiposableGoodsSummary_manager = false; + } + + + /** * 《任务组添加》权限 */ @@ -2559,7 +2567,7 @@ && SSTS_DiposableGoodsType_manager && SSTS_Container && SSTS_Supplier && SSTS_CleanMethod && SSTS_Rinser && SSTS_Sterilisation && SSTS_Sterilizer && SSTS_Bioreader && SSTS_Expiration && SSTS_SerialNumber_manager && SSTS_ImportBaseData_manager && SSTS_IPAndOrgUnitMapping && SSTS_GoodsBindingConfig && SSTS_GoodsFilterConfig && SSTS_Tousse && SSTS_Damage && SSTS_TousseGroup && SSTS_UrgentLevel_manager -&& SSTS_OperationRoom_manager && SSTS_equipment_manager; +&& SSTS_OperationRoom_manager && SSTS_equipment_manager && SSTS_DiposableGoodsSummary_manager; var enableSurgicalInstrumentsManagement = false; if (sstsConfig.enableSurgicalInstrumentsManagement) { Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.js (revision 35826) @@ -0,0 +1,107 @@ +var listStore; +var diposableGoodsSummaryGrid; + +function deleteConfig(grid) { + var selectedRecords = grid.getSelectionModel().getSelection(); + var ids = []; + if (selectedRecords.length < 1) { + showResult("请选择要删除的数据"); + } else { + for (var i = 0; i < selectedRecords.length; i++) { + ids[i] = selectedRecords[i].data['id']; + } + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/diposableGoodsSummaryAction!batchDeleteDisposableGoodsSummary.do', + params: { ids: ids.join(';') }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult(result.message); + return; + } else { + showResult('删除成功!'); + listStore.load(); + } + }, + failure: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + showResult(result.message); + } + }); + } + }); + } +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "一次性物品名称", dataIndex: 'name', width: 200 }, + { header: "规格", dataIndex: 'specification', width: 200 } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + openSelectDisposableGoods(); + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(diposableGoodsSummaryGrid); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/diposableGoodsSummaryAction!loadDisposableGoodsSummaryList.do', + reader: { + root: 'data', + totalProperty:'totalCount' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'name' }, + { name: 'specification' } + ] + }); + + listStore.loadPage(1); + + diposableGoodsSummaryGrid = new Ext4.grid.GridPanel({ + title: '一次性物品汇总打印设置', + columns: columns, + frame: false, + autoScroll: false, + store: listStore, + tbar: tbar, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: listStore, // same store GridPanel is using + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + }, + selModel: new Ext4.selection.CheckboxModel() + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [{ + region: 'center', + layout: 'fit', + items: [diposableGoodsSummaryGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r35334 -r35826 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 35334) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 35826) @@ -2268,17 +2268,6 @@ //打印一次性物品汇总 function printDisposableGoodsInvoicePlanSummary(printType){ - var inventorySerialNumber = printConfig.inventorySerialNumber || []; - if(parseInt(sstsConfig.printDisposableGoodsInvoicePlanSummaryUIVersion) !== 2){ - if(inventorySerialNumber.length == 0){ - showResult('请先在printConfig.js里面配置物资编码'); - return; - } - } - var inventorySerialNumberString = ''; - if(inventorySerialNumber.length > 0){ - inventorySerialNumberString = inventorySerialNumber.join(';'); - } var records = top.Ext.getCmp('recordListStoreGrid').getSelectionModel().getSelections(); var printRecordIds = []; if(records.length == 0){ @@ -2305,7 +2294,6 @@ Ext.Ajax.request({ url : WWWROOT + '/disinfectSystem/recyclingApplicationAction!printDisposableGoodsInvoicePlanSummary.do', params : { - inventorySerialNumber:inventorySerialNumberString, startDate:startDate, endDate:endDate, printRecordIds:printRecordIds.join(';') Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.jsp (revision 35826) @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@page import="com.forgon.disinfectsystem.common.CssdUtils"%> + + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +一次性物品汇总打印设置 + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r35744 -r35826 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35744) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35826) @@ -1025,6 +1025,7 @@ {hidden :SSTS_equipment_manager,text:"清洗方式设置",href:WWWROOT+'/disinfectsystem/basedatamanager/washMethod/washMethodView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_Tousse_Update,text:"器械包重量设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=tousseWeight&optionName=器械包重量设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_DiposableGoodsType_manager,text:"一次性物品类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=diposableGoodsType',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_DiposableGoodsSummary_manager,text:"一次性物品汇总打印设置",href:WWWROOT+'/disinfectsystem/basedatamanager/diposableGoodsSummary/diposableGoodsSummaryView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=expensiveGoodsType',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_Container,text:"容器管理",href:WWWROOT+'/disinfectsystem/basedatamanager/container/containerView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_Supplier,text:"供应商管理",href:WWWROOT+'/disinfectsystem/basedatamanager/supplier/supplierView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, Index: ssts-web/src/main/resources/systemset/operationDefine.xml =================================================================== diff -u -r35573 -r35826 --- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 35573) +++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 35826) @@ -751,6 +751,7 @@ +