Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp (revision 34037)
@@ -0,0 +1,26 @@
+<%@page import="java.util.Date"%>
+<%@page import="java.text.SimpleDateFormat"%>
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="/common/taglibs.jsp"%>
+
+
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+<%@ include file="/common/includeExtJs4_2.jsp"%>
+
+清洗耗材容器管理
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js
===================================================================
diff -u -r33977 -r34037
--- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 33977)
+++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34037)
@@ -865,6 +865,9 @@
// pendingWashAndDisinfectColumnTree.loader.load(pendingWashAndDisinfectColumnTree.root,function(){});
fieldsetHeight = (!!window.ActiveXObject || "ActiveXObject" in window || window.navigator.userAgent.indexOf("MSIE") >= 1) ? 185 : 210;
+ if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){
+ fieldsetHeight += 40;
+ }
formObj = new top.Ext.FormPanel({
id: 'washForm',
@@ -1146,70 +1149,38 @@
}
});
DWREngine.setAsync(true);
+ if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadRinserBindConsumptiveMaterialContainer.do',
+ params: {
+ rinserName: value
+ },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || '';
+ if(consumptiveMaterialVolumes !== ''){
+ top.Ext.getCmp('totalAmount').setValue(consumptiveMaterialVolumes);
+ top.Ext.getCmp('hiddenBox1').show();
+ }else {
+ top.Ext.getCmp('hiddenBox1').hide();
+ }
+ }else {
+ top.Ext.getCmp('hiddenBox1').hide();
+ }
+ },
+ failure: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ showResult("系统加载失败,请稍候再试");
+ }
+ })
+ }
// }
}
},
anchor: '99%'
}]
},
- // {
- // id : 'programInputTextField',
- // columnWidth : .5,
- // layout : 'form',
- // items : [{
- // xtype : 'textfield',
- // fieldLabel : "清洗程序条码",
- // allowBlank : true,
- // blankText : '请输入!',
- // name : "programInputText",
- // id : "programInputText",
- // anchor : '99%',
- // listeners : {
- // specialkey : function(field, ee) {
- // if (ee.getKey() == Ext.EventObject.ENTER) {
- // var barcode = top.Ext.getCmp('programInputText').getValue();
- // var setComBoVal = '';
- // var cleanMinutes = 0;
- // if(barcode!=''){
- // var count = washingMachineStore.getCount();
- // for(var i=0;i 0){
- // top.Ext.getCmp('cleanParameter').setValue(result);
- // }
- // });
- // }
- // }
- // }
- //
- // }
- // }]
- // },
{
columnWidth: .5,
layout: 'form',
@@ -1229,7 +1200,7 @@
var oldStr = Ext.util.Format.date(oldValue, 'Y-m-d H:i');
buildLogInfo("PC修改清洗时间,将开始时间" + oldStr + "改为" + newStr);
},
- select: function () {
+ select: function (thiz, record, index) {
clearInterval(endDateTimerHandle);
}
}
@@ -1262,7 +1233,32 @@
top.Ext.getCmp('cleanParameter').setValue(result);
}
});
-
+ if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!getCleanMethodConsumptionVolume.do',
+ params: {
+ id: record.data.id
+ },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || '';
+ if(consumptiveMaterialVolumes !== ''){
+ top.Ext.getCmp('consumptiveMaterialVolumes').setValue(consumptiveMaterialVolumes);
+ top.Ext.getCmp('hiddenBox2').show();
+ }else {
+ top.Ext.getCmp('hiddenBox2').hide();
+ }
+ }else {
+ top.Ext.getCmp('hiddenBox2').hide();
+ }
+ },
+ failure: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ showResult("系统加载失败,请稍候再试");
+ }
+ })
+ }
}
},
anchor: '99%'
@@ -1309,7 +1305,35 @@
}, {
columnWidth: 1,
layout: 'form',
+ hidden:true,
+ id:'hiddenBox1',
items: [{
+ xtype: 'textfield',
+ fieldLabel: "设备耗材余量",
+ name: "totalAmount",
+ id: "totalAmount",
+ readOnly: true,
+ cls : 'fieldReadOnlyNoRemove',
+ anchor: '99%'
+ }]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ hidden:true,
+ id:'hiddenBox2',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "本次耗材消耗",
+ name: "consumptiveMaterialVolumes",
+ id: "consumptiveMaterialVolumes",
+ readOnly: true,
+ cls : 'fieldReadOnlyNoRemove',
+ anchor: '99%'
+ }]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
xtype: 'textarea',
fieldLabel: "清洗程序参数",
name: "cleanParameter",
Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r34015 -r34037
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34015)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34037)
@@ -628,6 +628,16 @@
}
]
},{
+ text:"设备耗材管理",
+ singleClickExpand:singleClickExpandTree,
+ hidden:!sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction,
+ children:[
+ {hidden : false,text:"清洗耗材种类管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden : false,text:"清洗耗材容器管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden : false,text:"清洗耗材使用记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden : false,text:"清洗耗材补充记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialAddRecord/view.jsp',hrefTarget:linkTarget,leaf:true}
+ ]
+},{
text:"不良事件管理",
singleClickExpand:singleClickExpandTree,
hidden:!sstsConfig.enableAdverseEventManagement,
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (revision 34037)
@@ -0,0 +1,87 @@
+var listStore;
+var listGrid;
+
+Ext4.onReady(function () {
+ Ext4.QuickTips.init();
+ var columns = [
+ { header: "id", dataIndex: 'id', hidden: true },
+ { header: "容器名称", dataIndex: 'name', width: 150 },
+ { header: "已绑定清洗机", dataIndex: 'rinserNames', width: 150 },
+ { header: "已绑定清洗耗材容量", dataIndex: 'consumptiveMaterialVolumeStr', width: document.body.clientWidth - 350, sortable: false }
+ ];
+ var tbar = [{
+ text: '添加',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ showAddOrEditWindow();
+ }
+ }, '-', {
+ text: '修改',
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
+ var selectedRecords = listGrid.getSelectionModel().getSelection();
+ var selectedCount = listGrid.getSelectionModel().getCount();
+ if (selectedCount < 1) {
+ showResult("请选择要修改的数据");
+ } else if (selectedCount > 1) {
+ showResult("只能修改一条数据");
+ } else {
+ editConfig(selectedRecords[0].data.id);
+ }
+ }
+ }, '-', {
+ text: '删除',
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
+ deleteConfig(listGrid);
+ }
+ }];
+
+ listStore = new Ext4.data.JsonStore({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadConsumptiveMaterialContainer.do',
+ reader: {
+ root: 'data'
+ },
+ extraParams: {}
+ },
+ fields: [
+ { name: 'id' },
+ { name: 'rinserNames' },
+ { name: 'name' },
+ { name: 'consumptiveMaterialVolumeStr' }
+ ]
+ });
+
+ listStore.loadPage(1);
+
+ listGrid = 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: [listGrid]
+ }]
+ });
+
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (revision 34037)
@@ -0,0 +1,437 @@
+var treeStore;
+
+function reloadGird(pageNowReal) {
+ var startDate = Ext4.getCmp('startDate').getRawValue();
+ var endDate = Ext4.getCmp('endDate').getRawValue();
+ var userId = Ext4.getCmp('userId').getValue();
+ var consumptiveMaterialTypeId = Ext4.getCmp('consumptiveMaterialTypeId').getValue();
+ var rinserId = Ext4.getCmp('rinserId').getValue();
+ var washDisinfectRecordSerialNum = Ext4.getCmp('washDisinfectRecordSerialNum').getValue();
+ treeStore.proxy.extraParams = {
+ startDate: startDate,
+ endDate: endDate,
+ userId: userId || '',
+ consumptiveMaterialTypeId: consumptiveMaterialTypeId || '',
+ rinserId: rinserId || '',
+ washDisinfectRecordSerialNum: washDisinfectRecordSerialNum || '',
+ pageNow: pageNowReal || 1
+ };
+ treeStore.reload();
+}
+
+function handlePagingButtonRequest(_this, e, eOpts) {
+ var pagCountInfo = Ext4.getCmp('pagCountInfo').text;
+ var pageNowReal = parseInt(Ext4.getCmp('pageNowReal').getValue());
+ var pageCountReal = parseInt(Ext4.getCmp('pageCountReal').getValue());
+ var buttonText = _this.text;
+
+ if (!pagCountInfo) {
+ showResult("没数据");
+ return false;
+ }
+
+ if (buttonText == '第一页') {
+ if (pageNowReal == 1) {
+ showResult("已经是第一页了");
+ return false;
+ }
+ pageNowReal = 1;
+ } else if (buttonText == '上一页') {
+ --pageNowReal;
+ if (pageNowReal < 1) {
+ showResult("已经是第一页了");
+ return false;
+ }
+ } else if (buttonText == '下一页') {
+ ++pageNowReal;
+ if (pageNowReal > pageCountReal) {
+ showResult("已经是最后一页了");
+ return false;
+ }
+ } else if (buttonText == '最后一页') {
+ if (pageNowReal == pageCountReal) {
+ showResult("已经是最后一页了");
+ return false;
+ }
+ pageNowReal = pageCountReal
+ }
+
+ reloadGird(pageNowReal);
+}
+
+Ext4.onReady(function () {
+ Ext4.QuickTips.init();
+ Ext4.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif';
+ //耗材种类
+ var typeStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+ typeStore.load();
+ //操作员
+ var userJsonStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+ //清洗机
+ var rinserStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/rinserAction!getAllRinserInfo.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+ var width = Ext4.getBody().dom.clientWidth;
+ var form = new Ext4.form.Panel({
+ region: 'north',
+ frame: true,
+ border: 0,
+ title: '清洗耗材使用记录',
+ bodyPadding: '5 5 0',
+ autoScroll: true,
+ buttonAlign: 'center',
+ fieldDefaults: {
+ labelAlign: 'right',
+ labelWidth: 70
+ },
+ width: width,
+ items: [{
+ height: 60,
+ width: '100%',
+ layout: 'column',
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'datefield',
+ border: 0,
+ fieldLabel: '开始时间',
+ id: 'startDate',
+ name: 'startDate',
+ format: 'Y-m-d',
+ allowBlank: false,
+ editable: false,
+ anchor: '95%',
+ value: new Date(startDate)
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'datefield',
+ border: 0,
+ fieldLabel: '结束时间',
+ id: 'endDate',
+ name: 'endDate',
+ format: 'Y-m-d',
+ allowBlank: false,
+ editable: false,
+ anchor: '95%',
+ value: new Date(startDate)
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '耗材种类',
+ id: 'consumptiveMaterialTypeId',
+ name: 'consumptiveMaterialTypeId',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: typeStore,
+ forceSelection: true,
+ lazyInit: false,
+ editable: false,
+ triggerAction: 'all',
+ typeAhead: false,
+ allowBlank: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'combo',
+ id: 'userId',
+ name: 'userId',
+ queryParam: 'spell',
+ fieldLabel: '操作员',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: userJsonStore,
+ pageSize: 50,
+ forceSelection: true,
+ lazyInit: true,
+ anchor: '95%',
+ listWidth: 300,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '清洗机',
+ id: 'rinserId',
+ name: 'rinserId',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: rinserStore,
+ forceSelection: true,
+ lazyInit: false,
+ editable: false,
+ triggerAction: 'all',
+ typeAhead: false,
+ allowBlank: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .25,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'textfield',
+ border: 0,
+ fieldLabel: '流水号',
+ allowBlank: true,
+ anchor: '100%',
+ name: "washDisinfectRecordSerialNum",
+ id: "washDisinfectRecordSerialNum"
+ }]
+ }],
+ }],
+ buttons: [{
+ text: '查询',
+ handler: function () {
+ reloadGird();
+ }
+ }, {
+ text: '重置',
+ handler: function () {
+ Ext4.getCmp('userId').setValue('');
+ Ext4.getCmp('consumptiveMaterialTypeId').setValue('');
+ Ext4.getCmp('rinserId').setValue('');
+ Ext4.getCmp('washDisinfectRecordSerialNum').setValue('');
+ Ext4.getCmp('startDate').setRawValue(startDate);
+ Ext4.getCmp('endDate').setRawValue(startDate);
+ }
+ }]
+ });
+
+ Ext4.define('columnTreeGrid', {
+ extend: 'Ext4.tree.Panel',
+ xtype: 'tree-grid',
+ useArrows: true,
+ rootVisible: false,
+ multiSelect: false,
+ columnLines: true,
+ rowLines: true,
+ cls: 'no-leaf-icons',
+ initComponent: function () {
+ Ext4.apply(this, {
+ columns: [{
+ header: '流水号',
+ width: 120,
+ sortable: true,
+ xtype: 'treecolumn', // 必须有此定义,否则不能显示文件夹图标
+ dataIndex: 'washDisinfectRecordSerialNum'
+ }, {
+ header: '清洗机',
+ width: 100,
+ dataIndex: 'rinserName'
+ }, {
+ header: '清洗程序',
+ width: 100,
+ dataIndex: 'cleanMethod'
+ }, {
+ header: '操作员',
+ width: 80,
+ dataIndex: 'operator'
+ }, {
+ header: '耗材种类',
+ width: 100,
+ dataIndex: 'consumptiveMaterialTypeName'
+ }, {
+ header: '消耗数量',
+ width: 80,
+ dataIndex: 'useAmount'
+ }, {
+ header: '消耗剩余容量',
+ width: 100,
+ dataIndex: 'consumptiveMaterialVolumn'
+ }, {
+ header: '容量单位',
+ width: 80,
+ dataIndex: 'consumptiveMaterialTypeUnit'
+ }, {
+ header: '操作时间',
+ width: 160,
+ dataIndex: 'operationDateTime'
+ }, {
+ header: '备注',
+ width: 200,
+ dataIndex: 'remark'
+ }]
+ });
+ this.superclass.initComponent.call(this);
+ }
+ });
+
+ Ext4.define('cModel', {
+ extend: 'Ext4.data.Model',
+ fields: [
+ { name: 'washDisinfectRecordSerialNum' },
+ { name: 'rinserName' },
+ { name: 'cleanMethod' },
+ { name: 'operator' },
+ { name: 'consumptiveMaterialTypeName' },
+ { name: 'useAmount' },
+ { name: 'consumptiveMaterialVolumn' },
+ { name: 'consumptiveMaterialTypeUnit' },
+ { name: 'pageCount' },
+ { name: 'pageNow' },
+ { name: 'rowCount' },
+ { name: 'operationDateTime' },
+ { name: 'remark' }
+ ]
+ });
+
+ treeStore = new Ext4.data.TreeStore({
+ model: cModel,
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadConsumptiveMaterialUseRecord.do'
+ },
+ folderSort: true,
+ listeners: {
+ beforeload: function (thiz) {
+ var startDate = Ext4.getCmp('startDate').getRawValue();
+ var endDate = Ext4.getCmp('endDate').getRawValue();
+ treeStore.proxy.extraParams.startDate = startDate;
+ treeStore.proxy.extraParams.endDate = endDate;
+ },
+ load: function (_this, node, records, successful, eOpts) {
+ var temp = records[0];
+ if (temp) {
+ var pageNow = temp.data.pageNow;
+ var pageCount = temp.data.pageCount;
+ var rowCount = temp.data.rowCount;
+ var fristIndex = ((pageNow - 1) * 20) + 1;
+ var endIndex = (pageNow * 20 > rowCount) ? rowCount : pageNow * 20;
+
+ Ext4.getCmp('pageNow').setValue(pageNow);
+ Ext4.getCmp('pagCountInfo').setText('共有' + pageCount + '页');
+ Ext4.getCmp('pagingInfo').setText('显示' + fristIndex + '-' + endIndex + ',共有' + rowCount + '条');
+ Ext4.getCmp('pageNowReal').setValue(pageNow);
+ Ext4.getCmp('pageCountReal').setValue(pageCount);
+ } else {
+ Ext4.getCmp('pagCountInfo').setText('');
+ Ext4.getCmp('pagingInfo').setText('没数据');
+ }
+ }
+ }
+ });
+
+ useRecordGrid = Ext4.create('columnTreeGrid', {
+ id: 'useRecordGrid',
+ flex: 1,
+ border: false,
+ viewConfig: { loadMask: { msg: '正在加载,请稍候...' } },
+ store: treeStore,
+ bbar: [{
+ text: '第一页',
+ handler: handlePagingButtonRequest
+ }, {
+ text: '上一页',
+ handler: handlePagingButtonRequest
+ }, {
+ xtype: 'label',
+ text: '第'
+ }, {
+ xtype: 'numberfield',
+ hideTrigger: true,
+ id: 'pageNow',
+ value: 1,
+ minValue: 1,
+ width: 30,
+ enableKeyEvents: true,
+ listeners: {
+ keypress: function (_this, e, eOpts) {
+ if (e.getKey() == 13) {
+ var pagCountInfo = Ext4.getCmp('pagCountInfo').text
+ if (pagCountInfo) {
+ reloadGird();
+ } else {
+ showResult("没数据");
+ return false;
+ }
+ }
+ }
+ }
+ }, {
+ xtype: 'label',
+ id: 'pagCountInfo'
+ }, {
+ text: '下一页',
+ handler: handlePagingButtonRequest
+ }, {
+ text: '最后一页',
+ handler: handlePagingButtonRequest
+ }, '->', {
+ xtype: 'label',
+ id: 'pagingInfo'
+ }, {
+ xtype: 'hiddenfield',
+ id: 'pageNowReal'
+ }, {
+ xtype: 'hiddenfield',
+ id: 'pageCountReal'
+ }]
+ });
+
+ new Ext4.container.Viewport({
+ layout: 'border',
+ items: [form, {
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: [useRecordGrid]
+ }]
+ });
+
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js
===================================================================
diff -u -r33570 -r34037
--- ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js (.../interferewashAndDisinfectForm.js) (revision 33570)
+++ ssts-web/src/main/webapp/disinfectsystem/interfere/interferewashAndDisinfectForm.js (.../interferewashAndDisinfectForm.js) (revision 34037)
@@ -649,9 +649,13 @@
}
var washBasketTreePanelTitle = '清洗篮筐';
+var oldRinserName = '';
+var oldDisinfectProgram = '';
function addAndEditWashAndDisinfectRecord(id,isWashAgain) {
personInChargeAllowBlank = getBoolValueFromJs('sstsConfig.washAndDisinfectRecordPersonInChargeAllowBlank',true);
this.id = id;
+ oldRinserName = '';
+ oldDisinfectProgram = '';
materialStore.removeAll();
var basketTreePanel = new top.Ext.tree.ColumnTree({
id : 'basketTreePanel',
@@ -1356,6 +1360,8 @@
if(rinserName == "人工清洗"){
setFieldsHide(true);
}
+ oldRinserName = rinserName;
+ oldDisinfectProgram = action.result.data.disinfectProgram;
// 判断要不要显示循环次数输入框
WashAndDisinfectRecordTableManager.isDefineDeviceInterface(rinserName,function(result){
if( result == false)
@@ -1630,7 +1636,7 @@
var washRecordMsg = top.Ext.getCmp('washRecordMsg').getValue();
formObj.form.submit({
url : WWWROOT + '/disinfectSystem/washAndDisinfect/washAndDisinfectRecordAction!interfereWashAndDisinfectRecord.do',
- params : {conCurrent :conCurrent, orgWashStartTime : orgWashStartTime, orgWashEndTime : orgWashEndTime,washRecordMsg : washRecordMsg, washPersonInCharge : washPersonInCharge, washPersonInChargeCode : washPersonInChargeCode,skipNewBasketVerification:false},
+ params : {conCurrent :conCurrent, orgWashStartTime : orgWashStartTime, orgWashEndTime : orgWashEndTime,washRecordMsg : washRecordMsg, washPersonInCharge : washPersonInCharge, washPersonInChargeCode : washPersonInChargeCode,skipNewBasketVerification:false,oldRinserName:oldRinserName,oldDisinfectProgram:oldDisinfectProgram},
method : 'POST',
waitMsg : '正在保存数据,请稍候',
waitTitle : '提交表单',
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.js (revision 34037)
@@ -0,0 +1,96 @@
+var listStore;
+var listGrid;
+
+Ext4.onReady(function () {
+ Ext4.QuickTips.init();
+ var columns = [
+ { header: "id", dataIndex: 'id', hidden: true },
+ {
+ header: "序号", width: 100, renderer: function (v, p, record) {
+ return (p.rowIndex + 1)
+ }
+ },
+ { header: "名称", dataIndex: 'name', width: 150 },
+ { header: "单位", dataIndex: 'unit', width: 150 },
+ { header: "备注", dataIndex: 'remark', width: document.body.clientWidth - 450, sortable: false }
+ ];
+ var tbar = [{
+ text: '添加',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ showAddOrEditWindow();
+ }
+ }, '-', {
+ text: '修改',
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
+ var selectedRecords = listGrid.getSelectionModel().getSelection();
+ var selectedCount = listGrid.getSelectionModel().getCount();
+ if (selectedCount < 1) {
+ showResult("请选择要修改的数据");
+ } else if (selectedCount > 1) {
+ showResult("只能修改一条数据");
+ } else {
+ var id = selectedRecords[0].data['id'];
+ var name = selectedRecords[0].data['name'];
+ var unit = selectedRecords[0].data['unit'];
+ var remark = selectedRecords[0].data['remark'];
+ editConfig(id, name, unit, remark);
+ }
+ }
+ }, '-', {
+ text: '删除',
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
+ deleteConfig(listGrid);
+ }
+ }];
+
+ listStore = new Ext4.data.JsonStore({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do',
+ reader: {
+ root: 'data'
+ },
+ extraParams: {}
+ },
+ fields: [
+ { name: 'id' },
+ { name: 'name' },
+ { name: 'unit' },
+ { name: 'remark' }
+ ]
+ });
+
+ listStore.loadPage(1);
+
+ listGrid = 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: [listGrid]
+ }]
+ });
+
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js
===================================================================
diff -u -r32837 -r34037
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 32837)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 34037)
@@ -1,188 +1,343 @@
var id;
var formObj;
var cleanMethodWin;
+var listStore;
+function renderDeleteButton(v, p, record) {
+ return "
";
+}
+
+function deleteItem(id){
+ for(var i=0;i', {
+ text: '耗材种类:'
+ },{
+ xtype:'hidden',
+ id:'consumptiveMaterialTypeId',
+ name:'consumptiveMaterialTypeId'
+ },{
+ xtype:'hidden',
+ id:'consumptiveMaterialTypeUnit',
+ name:'consumptiveMaterialTypeUnit'
}, {
- layout : 'column',
- items : [ {
- columnWidth : 0.5,
- layout : 'form',
- items : [ {
- xtype : 'textfield',
- fieldLabel : "条形码",
- name : "barcode",
- id : "barcode",
- cls : 'fieldReadOnlyNoRemove',
- allowBlank : true,
- readOnly : true,
- anchor : '90%'
- } ]
+ xtype: 'combo',
+ fieldLabel: '',
+ id: 'consumptiveMaterialType',
+ name: 'consumptiveMaterialType',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: typeStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ typeAhead: false,
+ allowBlank: true,
+ listeners:{
+ select:function(v,record){
+ top.Ext.getCmp('consumptiveMaterialTypeId').setValue(record.data.id);
+ top.Ext.getCmp('consumptiveMaterialTypeUnit').setValue(record.data.unit);
+ }
+ }
+ }, {
+ text: '添加',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ var id = top.Ext.getCmp('consumptiveMaterialTypeId').getValue();
+ var name = top.Ext.getCmp('consumptiveMaterialType').getRawValue();
+ var unit = top.Ext.getCmp('consumptiveMaterialTypeUnit').getValue();
+ if(id == '' || name == ''){
+ showResult('请选择耗材种类');
+ return;
+ }
+ var isHas = false;
+ for(var i=0;i
+<%@page import="java.text.SimpleDateFormat"%>
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="/common/taglibs.jsp"%>
+
+
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+<%@ include file="/common/includeExtJs4_2.jsp"%>
+
+清洗耗材种类管理
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js
===================================================================
diff -u -r33653 -r34037
--- ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 33653)
+++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 34037)
@@ -73,6 +73,28 @@
fields : [ 'value'],
data : [[STR_YES],[STR_NO]]
});
+ //耗材用途
+ var consumptiveMaterialUseStore = new Ext.data.SimpleStore( {
+ fields : [ 'value'],
+ data : [['清洗耗材']]
+ });
+
+ var consumptiveMaterialTypesStore = new top.Ext.data.Store({
+ proxy : new top.Ext.data.HttpProxy({
+ url : WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do',
+ method : 'POST'
+ }),
+ reader : new top.Ext.data.JsonReader({
+ root : 'data'
+ },[
+ {name : 'id'},
+ {name : 'name'},
+ {name : 'remark'},
+ {name : 'unit'}
+ ])
+ });
+
+ consumptiveMaterialTypesStore.load();
var godownEntryItemStore = new top.Ext.data.Store({
proxy : new top.Ext.data.HttpProxy({
@@ -669,8 +691,130 @@
columnWidth : 1,
layout : 'form',
labelWidth : 110,
+ hidden:!sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction,
items : [{
+ xtype : 'combo',
+ fieldLabel : '是否设备耗材',
+ valueField : 'value',
+ displayField : 'value',
+ store : yesNoStore,
+ forceSelection : true,
+ allowBlank : true,
+ editable : false,
+ mode : 'local',
+ triggerAction : 'all',
+ name : "isConsumptiveMaterial",
+ id : "isConsumptiveMaterial",
+ anchor : '95%',
+ value:'否',
+ listeners:{
+ select : function(combo , record , index){
+ if(record.data.value == '是'){
+ top.Ext.getCmp('consumptiveMaterialUseBox').show();
+ top.Ext.getCmp('consumptiveMaterialTypeBox').show();
+ top.Ext.getCmp('consumptiveMaterialVolumeBox').show();
+ top.Ext.getCmp('volumeUnitBox').show();
+ top.Ext.getCmp('consumptiveMaterialUse').setValue('清洗耗材');
+ }else {
+ top.Ext.getCmp('consumptiveMaterialUseBox').hide();
+ top.Ext.getCmp('consumptiveMaterialTypeBox').hide();
+ top.Ext.getCmp('consumptiveMaterialVolumeBox').hide();
+ top.Ext.getCmp('volumeUnitBox').hide();
+ top.Ext.getCmp('consumptiveMaterialUse').setValue('');
+ top.Ext.getCmp('consumptiveMaterialTypeId').setValue('');
+ top.Ext.getCmp('consumptiveMaterialType').setValue('');
+ top.Ext.getCmp('consumptiveMaterialVolume').setValue('');
+ top.Ext.getCmp('volumeUnit').setValue('');
+ }
+ }
+ }
+ }]
+ },{
+ columnWidth : 1,
+ layout : 'form',
+ labelWidth : 110,
+ id:'consumptiveMaterialUseBox',
+ items : [{
+ xtype : 'combo',
+ fieldLabel : '耗材用途',
+ valueField : 'value',
+ displayField : 'value',
+ store : consumptiveMaterialUseStore,
+ forceSelection : true,
+ allowBlank : true,
+ editable : false,
+ mode : 'local',
+ triggerAction : 'all',
+ name : "consumptiveMaterialUse",
+ id : "consumptiveMaterialUse",
+ anchor : '95%'
+ }]
+ },{
+ columnWidth : 1,
+ layout : 'form',
+ labelWidth : 110,
+ id:'consumptiveMaterialTypeBox',
+ items : [{
+ xtype:'hidden',
+ id:'consumptiveMaterialTypeId',
+ name:'consumptiveMaterialTypeId'
+ },{
+ xtype : 'combo',
+ fieldLabel : '耗材种类',
+ valueField : 'name',
+ displayField : 'name',
+ store : consumptiveMaterialTypesStore,
+ forceSelection : true,
+ allowBlank : true,
+ editable : false,
+ mode : 'local',
+ triggerAction : 'all',
+ name : "consumptiveMaterialType",
+ id : "consumptiveMaterialType",
+ anchor : '95%',
+ listeners:{
+ select : function(combo , record , index){
+ top.Ext.getCmp('volumeUnit').setValue(record.data.unit);
+ top.Ext.getCmp('consumptiveMaterialTypeId').setValue(record.data.id);
+ }
+ }
+ }]
+ },{
+ columnWidth : 1,
+ layout : 'form',
+ labelWidth : 110,
+ id:'consumptiveMaterialVolumeBox',
+ items : [{
xtype : 'numberfield',
+ fieldLabel : '耗材容量',
+ id : 'consumptiveMaterialVolume',
+ name : 'consumptiveMaterialVolume',
+ allowDecimals : true,
+ allowBlank : true,
+ minValue:0.1,
+ anchor : '95%'
+ }]
+ },{
+ columnWidth : 1,
+ layout : 'form',
+ labelWidth : 110,
+ id:'volumeUnitBox',
+ items : [{
+ xtype : 'textfield',
+ fieldLabel : '容量单位',
+ id : 'volumeUnit',
+ name : 'volumeUnit',
+ allowDecimals : true,
+ allowBlank : true,
+ readOnly:true,
+ anchor : '95%'
+ }]
+ },{
+ columnWidth : 1,
+ layout : 'form',
+ labelWidth : 110,
+ items : [{
+ xtype : 'numberfield',
fieldLabel : '顺序号',
maxLength : '16',
id : 'sequence',
@@ -1354,6 +1498,28 @@
top.Ext.getCmp("orginalApplicationSpecification").setValue(disposableGoods.applicationSpecification);
top.Ext.getCmp("orginalTransferScale").setValue(disposableGoods.transferScale);
top.Ext.getCmp("orginalMiddlePackageUnit").setValue(disposableGoods.middlePackageUnit);
+ if((disposableGoods.consumptiveMaterialUse || '') !== ''){
+ top.Ext.getCmp("isConsumptiveMaterial").setValue('是');
+ top.Ext.getCmp("consumptiveMaterialUse").setValue(disposableGoods.consumptiveMaterialUse);
+ top.Ext.getCmp("consumptiveMaterialUseBox").show();
+ if(disposableGoods.consumptiveMaterialType && disposableGoods.consumptiveMaterialType !== ''){
+ var id = disposableGoods.consumptiveMaterialType.id;
+ var name = disposableGoods.consumptiveMaterialType.name;
+ var unit = disposableGoods.consumptiveMaterialType.unit;
+ top.Ext.getCmp("consumptiveMaterialTypeId").setValue(id);
+ top.Ext.getCmp("consumptiveMaterialType").setValue(name);
+ top.Ext.getCmp("volumeUnit").setValue(unit);
+ }
+ }else {
+ if(top.Ext.getCmp('isConsumptiveMaterial')){
+ top.Ext.getCmp("isConsumptiveMaterial").setValue('否');
+ }
+ top.Ext.getCmp("consumptiveMaterialUseBox").hide();
+ top.Ext.getCmp("consumptiveMaterialTypeBox").hide();
+ top.Ext.getCmp("consumptiveMaterialVolumeBox").hide();
+ top.Ext.getCmp("volumeUnitBox").hide();
+ }
+
},
failure : function(form, action) {
}
Index: ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js
===================================================================
diff -u -r33632 -r34037
--- ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 33632)
+++ ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 34037)
@@ -123,6 +123,8 @@
enableDisposableGoodsFullCaseApplicationAmount:true,
//在器械包信息模块显示预计灭菌完成时间
displayTheEstimatedSterilizationCompletionTimeInTheTousseInformationModule:true,
+ //启用清洗机耗材使用管理功能
+ enableRinserConsumptiveMaterialConsumptionFunction:true,
//消毒供应中心年度工作量统计报表的数据指标配置
dataIndexConfigurationOfYearWorkloadReport:[
{ "dataIndexNameForDisplay": "处理器械总件数", "dataIndexSource": "处理器械总件数" },
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (revision 34037)
@@ -0,0 +1,829 @@
+var configWin;
+var formPanel;
+var leftGridStore;
+var rightGridStore;
+var receiveRecordItems = [];
+
+function cancel() {
+ configWin.close();
+}
+
+//修改
+function editConfig(id, name, unit, remark) {
+ showAddOrEditWindow(id);
+}
+
+//删除
+function deleteConfig(grid) {
+ var selectedRecords = grid.getSelectionModel().getSelection();
+ var selectedCount = grid.getSelectionModel().getCount();
+ var ids = [];
+ if (selectedCount < 1) {
+ showResult("请选择要删除的数据");
+ } else {
+ for (var i = 0, len = selectedRecords.length; i < len; i++) {
+ ids[i] = selectedRecords[i].data['id'];
+ }
+ Ext4.MessageBox.confirm("请确认", "删除后将解绑所有的设备和清洗耗材,是否确认?", function (button, text) {
+ if ("yes" == button) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!deleteConsumptiveMaterialContainer.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.loadPage(1);
+ }
+ },
+ failure: function (response, options) {
+ var result = Ext4.JSON.decode(response.responseText);
+ showResult(result.message);
+ }
+ });
+ }
+ });
+ }
+}
+
+//保存
+function saveConfig() {
+ var name = top.Ext4.getCmp('name').getValue();
+ if (name == '') {
+ showResult('容器名称不能为空!');
+ return;
+ }
+ var parentId = top.Ext4.getCmp('parentId').getValue();
+ var rinserIds = '';
+ var ids = [];
+ for (var i = 0; i < leftGridStore.getCount(); i++) {
+ var id = leftGridStore.getAt(i).data.id;
+ ids.push(id);
+ }
+ if (ids.length > 0) {
+ rinserIds = ids.join(';');
+ }
+ var consumptiveMaterialVolumes = [];
+ for (var i = 0; i < rightGridStore.getCount(); i++) {
+ var item = rightGridStore.getAt(i);
+ consumptiveMaterialVolumes.push({
+ id: item.data.id || '',
+ consumptiveMaterialTypeId: item.data.consumptiveMaterialTypeId,
+ volume: item.data.volume
+ });
+ }
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!saveConsumptiveMaterialContainer.do',
+ params: {
+ id: parentId,
+ name: name,
+ rinserIds: rinserIds,
+ consumptiveMaterialVolumes: (consumptiveMaterialVolumes.length == 0) ? '' : JSON.stringify(consumptiveMaterialVolumes),
+ receiveRecordItems: (receiveRecordItems.length == 0) ? '' : JSON.stringify(receiveRecordItems)
+ },
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ if (result.success) {
+ showResult(result.msg);
+ listStore.loadPage(1);
+ configWin.close();
+ } else {
+ showResult(result.msg);
+ }
+ }
+ })
+}
+
+//解绑
+function unbind(id, gridType) {
+ if (gridType == 'left') {
+ top.Ext4.MessageBox.confirm("请确认", "解绑后设备清洗时不会产生耗材消耗记录,是否解绑?", function (btn) {
+ if (btn == 'yes') {
+ var count = leftGridStore.getCount();
+ for (var i = 0; i < count; i++) {
+ var item = leftGridStore.getAt(i);
+ if (item.data.id == id) {
+ leftGridStore.remove(item);
+ }
+ }
+ }
+ });
+ } else {
+ top.Ext4.MessageBox.confirm("请确认", "解绑后可能会影响清洗程序的使用,且清洗耗材余量将被清零,是否解绑?", function (btn) {
+ if (btn == 'yes') {
+ var count = rightGridStore.getCount();
+ for (var i = 0; i < count; i++) {
+ var item = rightGridStore.getAt(i);
+ if (item.data.id == id) {
+ rightGridStore.remove(item);
+ }
+ }
+ }
+ });
+ }
+}
+
+//补充
+function supplementary(consumptiveMaterialTypeId) {
+ //领用仓库
+ var cssdWareHouseStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/wareHouseAction!getWareHouseData.do?isCssd=yes',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' },
+ { name: 'orgUnitCode', mapping: 'orgUnitCode' }
+ ],
+ listeners: {
+ load: function (store, records) {
+ if (records.length > 0) {
+ if (top.Ext4.getCmp('cssdWareHouse')) {
+ top.Ext4.getCmp('cssdWareHouse').setValue(records[0].data.id);
+ }
+ }
+ }
+ }
+ });
+ cssdWareHouseStore.load();
+ //耗材名称
+ var disposableGoodsStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsData.do?consumptiveMaterialUse=' + encodeURIComponent('清洗耗材'),
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'showName', mapping: 'showName' },
+ { name: 'displayName', mapping: 'displayName' }
+ ],
+ listeners: {
+ beforeload: function (store, option) {
+ disposableGoodsStore.proxy.extraParams.wareHouseId = top.Ext4.getCmp('cssdWareHouse').getValue();
+ }
+ }
+ });
+ //批次
+ var diposableGoodsBatchNumStore = new top.Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getBatchsByDiposableGoodsIdAndWarehouseId.do?selectAll=true',
+ reader: {
+ type: 'json',
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id' },
+ { name: 'disposableGoodsId' },
+ { name: 'disposableGoodsStockId' },
+ { name: 'disposableGoodsBatchId' },
+ { name: 'disposableGoodsBatchStockId' },
+ { name: 'storage' },
+ { name: 'batchNumber' },
+ { name: 'identificationAmount' },
+ { name: 'cost' },
+ { name: 'expDate' },
+ { name: 'supplierName' }
+ ],
+ listeners: {
+ beforeload: function (store, option) {
+ diposableGoodsBatchNumStore.proxy.extraParams.warehouseId = top.Ext4.getCmp('cssdWareHouse').getValue();
+ diposableGoodsBatchNumStore.proxy.extraParams.disposableGoodsId = top.Ext4.getCmp('diposableGoodsID').getValue();
+ },
+ load: function (store, records) {
+ if (records.length > 0) {
+ var combo = top.Ext4.getCmp("batchNumber");
+ combo.setValue(records[0].data.disposableGoodsBatchStockId);
+
+ // 触发选中事件
+ combo.fireEvent('select', combo, diposableGoodsBatchNumStore.getAt(0), 0);
+ }
+ }
+ }
+ });
+ var panel = top.Ext4.create('top.Ext4.form.Panel', {
+ layout: 'vbox',
+ frame: true,
+ border: 0,
+ labelSeparator: ': ',
+ bodyPadding: '5 5 0',
+ autoScroll: true,
+ buttonAlign: 'center',
+ fieldDefaults: {
+ labelAlign: 'right',
+ labelWidth: 70
+ },
+ items: [{
+ height: 200,
+ width: '100%',
+ layout: 'column',
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ layout: 'form',
+ columnWidth: .6,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'numberfield',
+ border: 0,
+ fieldLabel: '数量',
+ allowBlank: false,
+ allowDecimals: false,
+ minValue: 0,
+ anchor: '95%',
+ name: "amount",
+ id: "amount",
+ value: 1
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .4,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'displayfield',
+ labelWidth: 120,
+ labelSeparator: '',
+ labelAlign: 'left',
+ fieldLabel: ' 瓶=5000ml'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '领用仓库',
+ id: 'cssdWareHouse',
+ name: 'cssdWareHouse',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: cssdWareHouseStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'hidden',
+ id: 'diposableGoodsID',
+ name: 'diposableGoodsID'
+ }, {
+ xtype: 'combo',
+ fieldLabel: '耗材名称',
+ id: 'diposableGoodsName',
+ name: 'diposableGoodsName',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'displayName',
+ store: disposableGoodsStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ typeAhead: false,
+ allowBlank: true,
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext4.getCmp('diposableGoodsName').setRawValue(record[0].data.showName);
+ top.Ext4.getCmp('diposableGoodsID').setValue(record[0].data.id);
+
+ diposableGoodsBatchNumStore.load();
+ }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'hidden',
+ id: 'disposableGoodsBatchStockId',
+ name: 'disposableGoodsBatchStockId'
+ }, {
+ xtype: 'combo',
+ fieldLabel: '批次',
+ id: 'batchNumber',
+ name: 'batchNumber',
+ minChars: 0,
+ valueField: 'disposableGoodsBatchStockId',
+ displayField: 'batchNumber',
+ store: diposableGoodsBatchNumStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ typeAhead: true,
+ allowBlank: true,
+ listeners: {
+ select: function (combo, record, index) {
+ var item = record[0] || record;
+ var storage = item.data.storage;
+ top.Ext4.getCmp('disposableGoodsBatchStockId').setValue(item.data.id);
+ top.Ext4.getCmp('dispalyLabelBox').show();
+ top.Ext4.getCmp('dispalyLabel').el.dom.innerText = '(当前批次号库存剩余 ' + storage + ' 瓶)';
+ }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ bodyStyle: { background: '#EBF5EC', border: 0, textAlign: 'center' },
+ id: 'dispalyLabelBox',
+ hidden: true,
+ items: [{
+ xtype: 'displayfield',
+ labelWidth: 350,
+ labelSeparator: '',
+ id: 'dispalyLabel',
+ labelAlign: 'center',
+ fieldLabel: '(当前批次号库存剩余瓶)'
+ }]
+ }]
+ }],
+ buttons: [{
+ text: '确认',
+ handler: function () {
+ var warehouseId = top.Ext4.getCmp('cssdWareHouse').getValue();
+ var warehouseName = top.Ext4.getCmp('cssdWareHouse').getRawValue();
+ var amount = top.Ext4.getCmp('amount').getValue();
+ var diposableGoodsID = top.Ext4.getCmp('diposableGoodsID').getValue();
+ var disposableGoodsBatchStockId = top.Ext4.getCmp('disposableGoodsBatchStockId').getValue();
+ var item = {
+ warehouseId: warehouseId,
+ warehouseName: warehouseName,
+ amount: amount,
+ consumptiveMaterialTypeId: consumptiveMaterialTypeId,
+ diposableGoodsID: diposableGoodsID,
+ disposableGoodsBatchStockId: disposableGoodsBatchStockId
+ }
+ if(receiveRecordItems.length > 0){
+ for(var i=0;i 0){
+ for(var i=0;i解绑";
+ }
+ }],
+ height: 380,
+ autoHeight: true,
+ bodyStyle: 'border:1px solid #afd7af',
+ tbar: [{
+ text: '绑定清洗机'
+ }, '->', {
+ text: '绑定',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ showBindRinserWindow();
+ }
+ }]
+ });
+ return leftGrid;
+}
+
+//显示绑定清洗机的窗口
+function showBindRinserWindow() {
+ var rinserGridStore = new Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/baseData/rinserAction!getAllRinserInfo.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+ rinserGridStore.load();
+ var rinserGrid = new top.Ext4.grid.Panel({
+ id: 'rinserGrid',
+ store: rinserGridStore,
+ columns: [{
+ text: '名称',
+ width: 340,
+ menuDisabled: true,
+ dataIndex: 'name'
+ }],
+ height: 280,
+ autoHeight: true,
+ hideHeaders: true,
+ tbar: [{
+ text: '请选择要绑定的清洗机:'
+ }],
+ selModel: new Ext4.selection.CheckboxModel(),
+ bodyStyle: 'border:1px solid #afd7af'
+ });
+ var win = top.Ext4.create('top.Ext4.window.Window', {
+ layout: 'fit',
+ title: '绑定清洗机',
+ width: 400,
+ height: 300,
+ resizable: false,
+ modal: true,
+ border: false,
+ plain: true,
+ buttonAlign: 'center',
+ items: [rinserGrid],
+ buttons: [{
+ text: '确认',
+ handler: function () {
+ var selectedRecords = rinserGrid.getSelectionModel().getSelection();
+ var arr = [];
+ for (var i = 0; i < selectedRecords.length; i++) {
+ var id = selectedRecords[i].data.id;
+ var name = selectedRecords[i].data.name;
+ if (leftGridStore.getCount() > 0) {
+ var isHasName = false;
+ for (var j = 0; j < leftGridStore.getCount(); j++) {
+ if (leftGridStore.getAt(j).data.id == id) {
+ isHasName = true;
+ continue;
+ }
+ }
+ if (!isHasName) {
+ arr.push({
+ name: name,
+ id: id
+ })
+ }
+ } else {
+ arr.push({
+ name: name,
+ id: id
+ })
+ }
+ }
+ leftGridStore.add(arr);
+ win.close();
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ win.close();
+ }
+ }]
+ });
+
+ win.show();
+}
+
+//获取绑定清洗耗材种类的表格
+function getRightGrid() {
+ rightGridStore = new Ext4.data.Store({
+ data: [],
+ fields: [
+ { name: 'consumptiveMaterialTypeId', mapping: 'consumptiveMaterialTypeId' },
+ { name: 'consumptiveMaterialTypeName', mapping: 'consumptiveMaterialTypeName' },
+ { name: 'volume', mapping: 'volume' }
+ ]
+ });
+ var rightGrid = new top.Ext4.grid.Panel({
+ id: 'rightGrid',
+ store: rightGridStore,
+ columns: [{
+ text: '名称',
+ width: 140,
+ menuDisabled: true,
+ dataIndex: 'consumptiveMaterialTypeName'
+ }, {
+ text: '余量',
+ width: 100,
+ menuDisabled: true,
+ dataIndex: 'volume'
+ }, {
+ text: '操作',
+ menuDisabled: true,
+ width: 100,
+ renderer: function (v, p, record) {
+ var id = record.data.id;
+ var consumptiveMaterialTypeId = record.data.consumptiveMaterialTypeId;
+ return "";
+ }
+ }],
+ height: 380,
+ autoHeight: true,
+ bodyStyle: 'border:1px solid #afd7af',
+ tbar: [{
+ text: '绑定清洗耗材种类'
+ }, '->', {
+ text: '绑定',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ showBindTypeWindow();
+ }
+ }]
+ });
+ return rightGrid;
+}
+
+//显示绑定清洗耗材种类的窗口
+function showBindTypeWindow() {
+ var typeGridStore = new Ext4.data.Store({
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do',
+ reader: {
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+ typeGridStore.load();
+ var typeGrid = new top.Ext4.grid.Panel({
+ id: 'typeGrid',
+ store: typeGridStore,
+ columns: [{
+ text: '名称',
+ width: 340,
+ menuDisabled: true,
+ dataIndex: 'name'
+ }],
+ height: 280,
+ autoHeight: true,
+ hideHeaders: true,
+ tbar: [{
+ text: '请选择耗材种类:'
+ }],
+ selModel: new Ext4.selection.CheckboxModel(),
+ bodyStyle: 'border:1px solid #afd7af'
+ });
+ var win = top.Ext4.create('top.Ext4.window.Window', {
+ layout: 'fit',
+ title: '绑定清洗耗材种类',
+ width: 400,
+ height: 300,
+ resizable: false,
+ modal: true,
+ border: false,
+ plain: true,
+ buttonAlign: 'center',
+ items: [typeGrid],
+ buttons: [{
+ text: '确认',
+ handler: function () {
+ var selectedRecords = typeGrid.getSelectionModel().getSelection();
+ var arr = [];
+ for (var i = 0; i < selectedRecords.length; i++) {
+ var id = selectedRecords[i].data.id;
+ var name = selectedRecords[i].data.name;
+ if (rightGridStore.getCount() > 0) {
+ var isHasName = false;
+ for (var j = 0; j < rightGridStore.getCount(); j++) {
+ if (rightGridStore.getAt(j).data.consumptiveMaterialTypeName == name) {
+ isHasName = true;
+ continue;
+ }
+ }
+ if (!isHasName) {
+ arr.push({
+ consumptiveMaterialTypeName: name,
+ consumptiveMaterialTypeId: id
+ })
+ }
+ } else {
+ arr.push({
+ consumptiveMaterialTypeName: name,
+ consumptiveMaterialTypeId: id
+ })
+ }
+ }
+ rightGridStore.add(arr);
+ win.close();
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ win.close();
+ }
+ }]
+ });
+
+ win.show();
+}
+
+//显示添加修改的窗口
+function showAddOrEditWindow(id) {
+ var leftGrid = getLeftGrid();
+ var rightGrid = getRightGrid();
+ receiveRecordItems = [];
+ formPanel = top.Ext4.create('top.Ext4.form.Panel', {
+ layout: 'vbox',
+ frame: true,
+ border: 0,
+ labelSeparator: ': ',
+ bodyPadding: '5 5 0',
+ autoScroll: true,
+ buttonAlign: 'center',
+ fieldDefaults: {
+ labelAlign: 'left',
+ labelWidth: 70
+ },
+ items: [{
+ height: 420,
+ width: '100%',
+ layout: 'column',
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ layout: 'form',
+ columnWidth: 1,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'hidden',
+ name: 'parentId',
+ id: 'parentId',
+ value: id || ''
+ }, {
+ xtype: 'textfield',
+ border: 0,
+ fieldLabel: '容器名称',
+ allowBlank: false,
+ anchor: '100%',
+ name: "name",
+ emptyText: '点击此处输入名称',
+ id: "name"
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .48,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [leftGrid]
+ }, {
+ layout: 'form',
+ columnWidth: .04,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'displayfield'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .48,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [rightGrid]
+ }]
+ }],
+ buttons: [{
+ text: '确认',
+ handler: function () {
+ saveConfig();
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ configWin.close();
+ }
+ }]
+ });
+
+ var title = '添加清洗耗材容器';
+ if (id) {
+ title = '修改清洗耗材容器';
+ }
+
+ configWin = top.Ext4.create('top.Ext4.window.Window', {
+ layout: 'fit',
+ title: title,
+ width: 800,
+ height: 500,
+ resizable: false,
+ modal: true,
+ border: false,
+ plain: true,
+ items: formPanel
+ });
+
+ configWin.show();
+
+ if (id) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadConsumptiveMaterialContainerById.do',
+ params: {
+ id: id
+ },
+ success: function (response, options) {
+ var result = Ext4.decode(response.responseText);
+ if (result.success) {
+ var rinserList = result.data[0].rinserList;
+ for (var i = 0; i < rinserList.length; i++) {
+ leftGridStore.add(rinserList[i]);
+ }
+ var consumptiveMaterialVolumeList = result.data[0].consumptiveMaterialVolumeList;
+ for (var i = 0; i < consumptiveMaterialVolumeList.length; i++) {
+ rightGridStore.add(consumptiveMaterialVolumeList[i]);
+ }
+ top.Ext4.getCmp('name').setValue(result.data[0].name);
+ } else {
+ showResult(result.msg);
+ }
+ }
+ })
+ }
+}
+
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/form.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/form.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/form.js (revision 34037)
@@ -0,0 +1,173 @@
+var configWin;
+var departWin;
+var formPanel;
+
+function cancel() {
+ configWin.close();
+}
+
+//修改
+function editConfig(id, name, unit, remark) {
+ showAddOrEditWindow(id, name, unit, remark);
+}
+
+//删除
+function deleteConfig(grid) {
+ var selectedRecords = grid.getSelectionModel().getSelection();
+ var selectedCount = grid.getSelectionModel().getCount();
+ var ids = [];
+ if (selectedCount < 1) {
+ showResult("请选择要删除的数据");
+ } else {
+ for (var i = 0, len = selectedRecords.length; i < len; i++) {
+ ids[i] = selectedRecords[i].data['id'];
+ }
+ Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) {
+ if ("yes" == button) {
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!deleteConsumptiveMaterialType.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);
+ }
+ });
+ }
+ });
+ }
+}
+
+//保存
+function saveConfig() {
+ formPanel.form.submit({
+ url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!saveConsumptiveMaterialType.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ timeout: 600000,
+ waitTitle: '提交表单',
+ success: function (form, action) {
+ configWin.close();
+ listStore.load();
+ showResult('保存成功');
+ },
+ failure: function (form, action) {
+ if (action.result.msg) {
+ showResult(action.result.msg);
+ } else if (action.result.message) {
+ showResult(action.result.message);
+ } else {
+ showResult('保存失败');
+ }
+ }
+ });
+}
+
+//显示院区设置的窗口
+function showAddOrEditWindow(id, name, unit, remark) {
+ formPanel = top.Ext4.create('top.Ext4.form.Panel', {
+ layout: 'vbox',
+ frame: true,
+ border: 0,
+ labelSeparator: ': ',
+ bodyPadding: '5 5 0',
+ autoScroll: true,
+ buttonAlign: 'center',
+ fieldDefaults: {
+ labelAlign: 'right',
+ labelWidth: 50
+ },
+ items: [{
+ height: 150,
+ width: '100%',
+ layout: 'column',
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ layout: 'form',
+ columnWidth: .9,
+ bodyStyle: { background: '#EBF5EC', border: 0 },
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id',
+ value: id || ''
+ }, {
+ xtype: 'textfield',
+ border: 0,
+ fieldLabel: '名称',
+ allowBlank: false,
+ anchor: '95%',
+ name: "name",
+ id: "name",
+ value: name || ''
+ }, {
+ xtype: 'textfield',
+ border: 0,
+ fieldLabel: '单位',
+ allowBlank: false,
+ anchor: '95%',
+ name: "unit",
+ id: "unit",
+ value: unit || ''
+ }, {
+ xtype: 'textarea',
+ border: 0,
+ fieldLabel: '备注',
+ allowBlank: true,
+ anchor: '95%',
+ name: "remark",
+ id: "remark",
+ value: remark || ''
+ }]
+ }]
+ }],
+ buttons: [{
+ id: 'save',
+ name: 'save',
+ text: '保存',
+ handler: function () {
+ if (formPanel.getForm().isValid()) {
+ saveConfig();
+ } else {
+ showResult('请填写表单!');
+ return false;
+ }
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ configWin.close();
+ }
+ }]
+ });
+
+ var title = '添加清洗耗材';
+ if (id) {
+ title = '修改清洗耗材';
+ }
+
+ configWin = top.Ext4.create('top.Ext4.window.Window', {
+ layout: 'fit',
+ title: title,
+ width: 500,
+ height: 230,
+ resizable: false,
+ modal: true,
+ border: false,
+ plain: true,
+ items: formPanel
+ });
+
+ configWin.show();
+}
+
Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp (revision 34037)
@@ -0,0 +1,29 @@
+<%@page import="java.util.Date"%>
+<%@page import="java.text.SimpleDateFormat"%>
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@page import="java.text.SimpleDateFormat"%>
+<%@ include file="/common/taglibs.jsp"%>
+
+
+<%
+ SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd");
+ request.setAttribute("newDate", dateFormat.format(new Date()));
+%>
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+<%@ include file="/common/includeExtJs4_2.jsp"%>
+
+清洗耗材使用记录
+
+
+
+
+
+
+
+
\ No newline at end of file