Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js
===================================================================
diff -u -r37594 -r37870
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 37594)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 37870)
@@ -3463,7 +3463,17 @@
plain: false,
bufferResize: true,
deferredRender: false,
- items: items
+ items: items,
+ listeners:{
+ 'tabchange':function (t, n) {
+ if(n.title == '基本信息'){
+ configStore.removeAll();
+ loadTousseDefinition(id,hasVideo);
+ }else if(n.title == '追溯器械配置'){
+ IDCardInstanceInstrumentInstanceStore.load();
+ }
+ }
+ }
});
}
@@ -3651,7 +3661,7 @@
}
})
if (id != 0) {
- loadTousseDefinition(id,hasVideo);
+ //loadTousseDefinition(id,hasVideo);
} else {
packTypeStore.load();
top.Ext.getCmp('isApplyEntireTousse').disable(); //禁用“是否整包申请”下拉框,并默认赋值为“是”
Index: ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js
===================================================================
diff -u -r36709 -r37870
--- ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 36709)
+++ ssts-web/src/main/webapp/disinfectsystem/config/gyey/config.js (.../config.js) (revision 37870)
@@ -182,6 +182,8 @@
tousseStatusProgressBarConfig:{ "showPersonAndDateTime" : true, "colorOfPassedNode" : "#f00000", "colorOfUnpassedNode" : "#367f21"},
//启用器械包告警的排序功能
enableTousseGoodsWarningSortingFunction: false,
+ //追溯器械配置是否允许替换器械
+ enableAllowedChangesInstrumentOfInstrumentConfig:true,
//是否启用回收拍摄功能
showCameraPhotoInRecyclingModule:true
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js
===================================================================
diff -u -r35453 -r37870
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js (.../instrumentConfig.js) (revision 35453)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/instrumentConfig.js (.../instrumentConfig.js) (revision 37870)
@@ -1,11 +1,30 @@
var IDCardInstanceInstrumentInstanceStore;
var useRecordStore;
var instrumentWin;
+var supplier2 = '供货单位';
+
+var newSupplierStore = new top.Ext.data.Store({
+ autoLoad: true,
+ pageSize: 100,
+ proxy: new top.Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplierAction!getSupplierData.do?supplierType=' + encodeURI(supplier2),
+ method: 'POST'
+ }),
+ reader: new top.Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ])
+});
+
//显示绑定标识牌实例的器械窗口
-function showInstrumentWindow(oid, materialDefinitionId, idCardInstanceId) {
+function showInstrumentWindow(oid, materialDefinitionId, materialDefinitionName, idCardInstanceId) {
if (top.Ext.getCmp('pagesize')) {
top.Ext.getCmp('pagesize').setValue(10)
}
+
var InstrumentStore = new top.Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: WWWROOT + '/disinfectSystem/baseData/instrumentInstanceController/loadInstrumentInstancesByMaterialDefinitionID.mhtml',
@@ -30,9 +49,30 @@
if (top.Ext.getCmp('pagesize')) {
var pagesize = top.Ext.getCmp('pagesize').getValue();
thiz.baseParams["limit"] = pagesize;
- }else {
+ } else {
thiz.baseParams["limit"] = 10;
}
+ if (top.Ext.getCmp('materialEntryStartTime')) {
+ thiz.baseParams["materialEntryStartTime"] = top.Ext.getCmp('materialEntryStartTime').getRawValue();
+ }
+ if (top.Ext.getCmp('materialEntryEndTime')) {
+ thiz.baseParams["materialEntryEndTime"] = top.Ext.getCmp('materialEntryEndTime').getRawValue();
+ }
+ if (top.Ext.getCmp('receiveStatus')) {
+ thiz.baseParams["receiveStatus"] = top.Ext.getCmp('receiveStatus').getValue();
+ }
+ if (top.Ext.getCmp('UDICode')) {
+ thiz.baseParams["UDICode"] = top.Ext.getCmp('UDICode').getValue();
+ }
+ if (top.Ext.getCmp('materialEntryItemSupplier')) {
+ thiz.baseParams["materialEntryItemSupplier"] = top.Ext.getCmp('materialEntryItemSupplier').getValue();
+ }
+ if (top.Ext.getCmp('instrumentBarcode2')) {
+ thiz.baseParams["instrumentBarcode"] = top.Ext.getCmp('instrumentBarcode2').getValue();
+ }
+ if (top.Ext.getCmp('materialDefinitionId')) {
+ thiz.baseParams["materialDefinitionId"] = top.Ext.getCmp('materialDefinitionId').getValue();
+ }
}
}
});
@@ -68,6 +108,7 @@
var gridPanel = new top.Ext.grid.GridPanel({
id: 'InstrumentPanel',
store: InstrumentStore,
+ height: 400,
columns: [{
header: '名称',
dataIndex: 'materialDefinitionName',
@@ -93,10 +134,11 @@
width: 50,
renderer: function (v, p, record) {
var id = record.get('id') || '';
+ var newMaterialDefinitionName = record.get('materialDefinitionName') || '';
if (oid == 0 || oid == '0') {
return "添加";
} else {
- return "替换";
+ return "替换";
}
}
}],
@@ -117,16 +159,222 @@
anchor: '100%',
frame: false
});
+
+ var dt = new Date();
+ var month = dt.getMonth() + 1;
+ if (month < 10) {
+ month = "0" + (dt.getMonth() + 1);
+ }
+ var day = dt.getDate();
+ if (day < 10) {
+ day = "0" + dt.getDate();
+ }
+ var startDayofMonth = dt.getFullYear() + "/" + month + "/01 00:00";
+ var endDayofMonth = dt.getFullYear() + "/" + month + "/" + day + " 23:59";
+
+ var form = new top.Ext.FormPanel({
+ frame: true,
+ border: 0,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: 800,
+ labelAlign: 'right',
+ autoHeight: true,
+ items: [{
+ layout: 'column',
+ items: [{
+ xtype: 'hidden',
+ id: 'materialDefinitionId',
+ name: 'materialDefinitionId',
+ value: materialDefinitionId
+ }, {
+ columnWidth: .25,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: sstsConfig.enableAllowedChangesInstrumentOfInstrumentConfig ? 'combo' : 'textfield',
+ fieldLabel: '名称',
+ id: 'tousseName',
+ name: 'tousseName',
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ listWidth: 350,
+ value: materialDefinitionName,
+ store: new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getMaterialDefinitionData.do', //不包括外来器械材料的
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'spelling', mapping: 'spelling' },
+ { name: 'type', mapping: 'type' },
+ { name: 'name', mapping: 'name' },
+ { name: 'price', mapping: 'price' },
+ { name: 'cost', mapping: 'cost' },
+ { name: 'isImplant', mapping: 'isImplant' }
+ ])
+ }),
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: true,
+ anchor: '99%',
+ readOnly: sstsConfig.enableAllowedChangesInstrumentOfInstrumentConfig ? false : true,
+ cls: sstsConfig.enableAllowedChangesInstrumentOfInstrumentConfig ? '' : 'fieldReadOnlyNoRemove',
+ listeners: {
+ select: function (combo, record, index) {
+ combo.setValue(record.data.name);
+ top.Ext.getCmp('materialDefinitionId').setValue(record.data.id);
+ }
+ }
+ }]
+ }, {
+ columnWidth: .28,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: 'datefield',
+ fieldLabel: '入库日期',
+ id: 'materialEntryStartTime',
+ name: 'materialEntryStartTime',
+ format: 'Y-m-d H:i',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ anchor: '99%',
+ value: new Date(startDayofMonth)
+ }]
+ }, {
+ columnWidth: .22,
+ layout: 'form',
+ labelWidth: 30,
+ items: [{
+ xtype: 'datefield',
+ fieldLabel: '至',
+ id: 'materialEntryEndTime',
+ name: 'materialEntryEndTime',
+ format: 'Y-m-d H:i',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ anchor: '99%',
+ value: new Date(endDayofMonth)
+ }]
+ }, {
+ columnWidth: .25,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '是否已领用',
+ valueField: 'value',
+ displayField: 'value',
+ id: 'receiveStatus',
+ name: 'receiveStatus',
+ mode: 'local',
+ triggerAction: 'all',
+ forceSelection: true,
+ editable: false,
+ store: new top.Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [['全部'], ['已领用'], ['未领用']]
+ }),
+ value: '全部',
+ anchor: '99%'
+ }]
+ }, {
+ columnWidth: .25,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: 'UDI码',
+ id: 'UDICode',
+ name: 'UDICode',
+ allowBlank: true,
+ anchor: '99%'
+ }]
+ }, {
+ columnWidth: .5,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '供应商',
+ id: 'materialEntryItemSupplier',
+ name: 'materialEntryItemSupplier',
+ queryParam: 'supplierName',
+ minChars: 0,
+ listWidth: 280,
+ valueField: 'name',
+ displayField: 'name',
+ store: newSupplierStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: true,
+ anchor: '99%'
+ }]
+ }, {
+ columnWidth: .25,
+ layout: 'form',
+ labelWidth: 80,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '器械条码',
+ id: 'instrumentBarcode2',
+ name: 'instrumentBarcode2',
+ allowBlank: true,
+ anchor: '99%'
+ }]
+ }]
+ }],
+ buttons: [{
+ text: '查询',
+ iconCls: 'icon_search',
+ handler: function () {
+ var materialEntryStartTime = top.Ext.getCmp('materialEntryStartTime').getRawValue();
+ var materialEntryEndTime = top.Ext.getCmp('materialEntryEndTime').getRawValue();
+ if (materialEntryStartTime || materialEntryEndTime) {
+ if (!compareDate(materialEntryStartTime, materialEntryEndTime)) {
+ showResult("开始时间不能大于结束时间");
+ return;
+ }
+ }
+ InstrumentStore.load();
+ }
+ }, {
+ text: '重置',
+ iconCls: 'icon_set',
+ handler: function () {
+ top.Ext.getCmp('materialDefinitionId').setValue(materialDefinitionId);
+ top.Ext.getCmp('tousseName').setRawValue(materialDefinitionName);
+ top.Ext.getCmp('materialEntryStartTime').setValue(new Date(startDayofMonth));
+ top.Ext.getCmp('materialEntryEndTime').setValue(new Date(endDayofMonth));
+ top.Ext.getCmp('receiveStatus').setValue('全部');
+ top.Ext.getCmp('UDICode').setValue('');
+ top.Ext.getCmp('materialEntryItemSupplier').setValue('');
+ top.Ext.getCmp('instrumentBarcode2').setValue('');
+ }
+ }]
+ })
+
instrumentWin = new top.Ext.Window({
id: 'showInstrumentWin',
layout: 'fit',
title: '选择器械',
- width: 600,
- border: false,
+ width: 800,
modal: true,
- height: 300,
+ autoHeight: true,
+ border: false,
plain: true,
- items: [gridPanel]
+ items: [form, gridPanel]
})
instrumentWin.show();
}
@@ -169,7 +417,18 @@
}
//替换器械
-function replaceInstrument(newInstrumentInstanceId, oldInstrumentInstanceId, IDCardInstanceId) {
+function replaceInstrument(newInstrumentInstanceId, oldInstrumentInstanceId, IDCardInstanceId, materialDefinitionName, newMaterialDefinitionName, isConfirm) {
+ if (materialDefinitionName.indexOf(newMaterialDefinitionName) == -1 && !isConfirm) {
+ top.Ext.MessageBox.confirm("请确认", "替换后将同步更换包定义中的材料,是否继续?", function (btn) {
+ if (btn == 'yes') {
+ replaceInstrument(newInstrumentInstanceId, oldInstrumentInstanceId, IDCardInstanceId, materialDefinitionName, newMaterialDefinitionName, true)
+ } else {
+ return false;
+ }
+ });
+ return
+ }
+
Ext.Ajax.request({
url: WWWROOT + '/disinfectSystem/baseData/IDCardInstanceBindInstrumentController/IDCardInstanceReplaceInstrument.mhtml',
async: false,
@@ -385,9 +644,21 @@
}),
reader: new top.Ext.data.JsonReader({
fields: idCardFields
- })
+ }),
+ listeners: {
+ beforeload: function (thiz) {
+ thiz.baseParams['id'] = id;
+ thiz.baseParams['viewAll'] = false;
+ },
+ load: function () {
+ leftGridPanel.getSelectionModel().selectFirstRow();
+ }
+ }
+
});
+ idCardDefinitionStore2.load();
+
var leftGridPanel = new top.Ext.grid.GridPanel({
id: 'leftGridPanel',
title: '标识牌列表',
@@ -415,17 +686,6 @@
frame: false
});
- idCardDefinitionStore2.baseParams['id'] = id;
- idCardDefinitionStore2.baseParams['viewAll'] = false;
-
- idCardDefinitionStore2.load({
- callback: function (records, options, success) {
- if (success) {
- leftGridPanel.getSelectionModel().selectFirstRow();
- }
- }
- });
-
return leftGridPanel;
}
@@ -476,12 +736,13 @@
header: "操作", hidden: SSTS_InstrumentInstanceConfig_Update, width: 50, renderer: function (v, p, record) {
var instrumentBarcode = record.get('instrumentBarcode') || '';
var materialDefinitionId = record.get('materialDefinitionId') || '';
+ var materialDefinitionName = record.get('materialDefinitionName') || '';
var idCardInstanceId = record.get('idCardInstanceId') || '';
var id = record.get('id');
if (instrumentBarcode == '') {
- return "添加";
+ return "添加";
} else {
- return "替换 | 移除";
+ return "替换 | 移除";
}
}
}