Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js
===================================================================
diff -u -r36510 -r36581
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36510)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 36581)
@@ -9,738 +9,739 @@
grid.dwrReload();
}
-function setQueryValues(){
- $Id('parm_s_committedStatus').value = $Id('query_committedStatus').value;
- $Id('parm_s_invoiceStatus').value = $Id('query_invoiceStatus').value;
- $Id('parm_s_operatingRoom').value = $Id('query_operatingRoom').value;
- $Id('parm_s_operationTime_start').value = $Id('query_operationTime_start').value;
- $Id('parm_s_operationTime_end').value = $Id('query_operationTime_end').value;
+function setQueryValues() {
+ $Id('parm_s_committedStatus').value = $Id('query_committedStatus').value;
+ $Id('parm_s_invoiceStatus').value = $Id('query_invoiceStatus').value;
+ $Id('parm_s_operatingRoom').value = $Id('query_operatingRoom').value;
+ $Id('parm_s_operationTime_start').value = $Id('query_operationTime_start').value;
+ $Id('parm_s_operationTime_end').value = $Id('query_operationTime_end').value;
}
//明细grid删除按钮
-function renderDeleteButton(v,p,record,rowIndex){
- return "";
+function renderDeleteButton(v, p, record, rowIndex) {
+ return "
";
}
//删除grid明细
-function deleteItem(tousseDefinitionId){
+function deleteItem(tousseDefinitionId) {
var gridStore = top.Ext.getCmp('operationReservationGrid').getStore();
- for(var i = 0;i < gridStore.getCount();i++){
+ for (var i = 0; i < gridStore.getCount(); i++) {
var record = gridStore.getAt(i);
- if(record.data.tousseDefinitionId == tousseDefinitionId){
+ if (record.data.tousseDefinitionId == tousseDefinitionId) {
gridStore.remove(record);
break;
}
}
}
//Ext.form.DateField在IE8下显示不全
Ext.override(top.Ext.menu.Menu, {
- autoWidth: function() {
- this.width += "px";
- }
+ autoWidth: function () {
+ this.width += "px";
+ }
});
var goodsItemRecord = Ext.data.Record.create([
- {name : 'itemId'},
- {name : 'tousseDefinitionId'},
- {name : 'name'},
- {name : 'amount'}
+ { name: 'itemId' },
+ { name: 'tousseDefinitionId' },
+ { name: 'name' },
+ { name: 'amount' }
]);
-function saveOrSubmitForm(id,isCommit){
+function saveOrSubmitForm(id, isCommit) {
var form = top.Ext.getCmp("materialInvoiceForm");
if (!form.getForm().isValid()) {
showResult('请正确填写表单各值');
return false;
}
var operationName = top.Ext.getCmp("operationName").getValue()
- if(operationName == ''){
+ if (operationName == '') {
showResult('手术名称不能为空!');
return false;
}
var store = top.Ext.getCmp('operationReservationGrid').getStore();
- if(store.getCount() <= 0){
+ if (store.getCount() <= 0) {
showResult('请添加物品项!');
return false;
}
var jsonArray = new Array();
- for(var i = 0;i < store.getCount();i++){
+ for (var i = 0; i < store.getCount(); i++) {
var record = store.getAt(i);
jsonArray.push({
- itemId : record.data.itemId,
- tousseDefinitionId : record.data.tousseDefinitionId,
- name : record.data.name,
- amount : record.data.amount
+ itemId: record.data.itemId,
+ tousseDefinitionId: record.data.tousseDefinitionId,
+ name: record.data.name,
+ amount: record.data.amount
});
}
-
+
var params = {
- id : id,
- operationName : top.Ext.getCmp("operationName").getValue(),
- operatingRoom : top.Ext.getCmp("operatingRoom").getValue(),
- doctors : top.Ext.getCmp("doctors").getValue(),
- operationTime : top.Ext.getCmp("operationTime").getRawValue(),
- depart : top.Ext.getCmp("depart").getValue(),
- departCoding : top.Ext.getCmp("departCoding").getValue(),
- settleAccountsDepart : top.Ext.getCmp("depart").getValue(),
- settleAccountsDepartCoding : top.Ext.getCmp("departCoding").getValue(),
- handleDepart : top.Ext.getCmp("handleDepart").getRawValue(),
- handleDepartCoding : top.Ext.getCmp("handleDepartCoding").getValue(),
- consoleName : top.Ext.getCmp("consoleName").getValue(),
- patientAge : top.Ext.getCmp("patientAge").getValue(),
- scheduleId : top.Ext.getCmp("scheduleId").getValue(),
- deptName : top.Ext.getCmp("deptName").getValue(),
- patientName : top.Ext.getCmp("patientName").getValue(),
- hospitalNumber : top.Ext.getCmp("hospitalNumber").getValue(),
- remark : top.Ext.getCmp("remark").getValue(),
- committedStatus : isCommit,
- items : jsonArray
+ id: id,
+ operationName: top.Ext.getCmp("operationName").getValue(),
+ operatingRoom: top.Ext.getCmp("operatingRoom").getValue(),
+ doctors: top.Ext.getCmp("doctors").getValue(),
+ operationTime: top.Ext.getCmp("operationTime").getRawValue(),
+ depart: top.Ext.getCmp("depart").getValue(),
+ departCoding: top.Ext.getCmp("departCoding").getValue(),
+ settleAccountsDepart: top.Ext.getCmp("depart").getValue(),
+ settleAccountsDepartCoding: top.Ext.getCmp("departCoding").getValue(),
+ handleDepart: top.Ext.getCmp("handleDepart").getRawValue(),
+ handleDepartCoding: top.Ext.getCmp("handleDepartCoding").getValue(),
+ consoleName: top.Ext.getCmp("consoleName").getValue(),
+ patientAge: top.Ext.getCmp("patientAge").getValue(),
+ scheduleId: top.Ext.getCmp("scheduleId").getValue(),
+ deptName: top.Ext.getCmp("deptName").getValue(),
+ patientName: top.Ext.getCmp("patientName").getValue(),
+ hospitalNumber: top.Ext.getCmp("hospitalNumber").getValue(),
+ remark: top.Ext.getCmp("remark").getValue(),
+ committedStatus: isCommit,
+ items: jsonArray
};
var operationReservationWindow = top.Ext.getCmp("operationReservationWin");
form.form.submit({
- url : WWWROOT + '/disinfectsystem/operationReservationAction!saveOperationReservation.do',
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- params : {data : JSON.stringify(params)},
- success : function(form, action) {
+ url: WWWROOT + '/disinfectsystem/operationReservationAction!saveOperationReservation.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ params: { data: JSON.stringify(params) },
+ success: function (form, action) {
showResult(action.result.message);
grid.dwrReload();
operationReservationWindow.close();
},
- failure : function(form, action) {
+ failure: function (form, action) {
showResult(action.result.message);
}
});
}
-function editOperationReservation(id,committedStatus) {
+function editOperationReservation(id, committedStatus) {
var operationRoomAllowBlank = true;
var operationTimeAllowBlank = true;
var consoleNameAllowBlank = true;
if (sstsConfig.notAllowBlankFieldsOnUseRecordPage && typeof sstsConfig.notAllowBlankFieldsOnUseRecordPage == 'object') {
var allowBlankObj = returnFieldAllowBlankObj('notAllowBlankFieldsOnUseRecordPage');
operationRoomAllowBlank = allowBlankObj.operationRoom;
}
- if(sstsConfig.notAllowBlankFieldsOfOperationReservationForm && typeof sstsConfig.notAllowBlankFieldsOfOperationReservationForm == 'object') {
+ if (sstsConfig.notAllowBlankFieldsOfOperationReservationForm && typeof sstsConfig.notAllowBlankFieldsOfOperationReservationForm == 'object') {
var allowBlankObj = returnFieldAllowBlankObj('notAllowBlankFieldsOfOperationReservationForm');
operationRoomAllowBlank = allowBlankObj.operationRoom;
operationTimeAllowBlank = allowBlankObj.operationTime;
consoleNameAllowBlank = allowBlankObj.consoleName;
}
var handleDepartStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- root : 'data'
- },[
- {name : 'cssdOrgUnitCode',mapping : 'cssdOrgUnitCode'},
- {name : 'name',mapping : 'cssdOrgUnitName'}
- ]
+ reader: new Ext.data.JsonReader({
+ root: 'data'
+ }, [
+ { name: 'cssdOrgUnitCode', mapping: 'cssdOrgUnitCode' },
+ { name: 'name', mapping: 'cssdOrgUnitName' }
+ ]
),
- listeners:{
- load:function(thiz, records, options){
- if (records.length == 1){
+ listeners: {
+ load: function (thiz, records, options) {
+ if (records.length == 1) {
top.Ext.getCmp("handleDepartCoding").setValue(records[0].data.cssdOrgUnitCode);
top.Ext.getCmp('handleDepart').setValue(records[0].data.name);
- }else{
+ } else {
top.Ext.getCmp("handleDepartCoding").setValue();
top.Ext.getCmp('handleDepart').setValue();
}
}
}
});
-
+
handleDepartStore.on('beforeload', function (store, options) {
- if(top.Ext.getCmp("depart").getRawValue() == ""){
+ if (top.Ext.getCmp("depart").getRawValue() == "") {
showResult("请选择申请科室!");
}
var orgUnitCoding = top.Ext.getCmp("departCoding").getValue();
- var new_params = {applyDepartCode : orgUnitCoding, tousseType : ""};
- Ext.apply(store.baseParams, new_params);
+ var new_params = { applyDepartCode: orgUnitCoding, tousseType: "" };
+ Ext.apply(store.baseParams, new_params);
});
-
+
//科室数据
var departJsonStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- root : 'data'
- },[
- {name : 'id',mapping : 'id'},
- {name : 'name',mapping : 'name'}
- ]
+ reader: new Ext.data.JsonReader({
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
)
});
-
+
var tousseAndDiposableGoodsStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseAndDressing.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseAndDressing.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'spelling',mapping : 'spelling'},
- {name : 'name',mapping : 'name'},
- {name : 'displayName',mapping : 'displayName'},
- {name : 'amount',mapping : 'amount'}]
+ { name: 'id', mapping: 'id' },
+ { name: 'spelling', mapping: 'spelling' },
+ { name: 'name', mapping: 'name' },
+ { name: 'displayName', mapping: 'displayName' },
+ { name: 'amount', mapping: 'amount' }]
)
});
-
+
var operationNameStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectsystem/basedatamanager/operationOrgAction!findOrgUnitOperationName.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectsystem/basedatamanager/operationOrgAction!findOrgUnitOperationName.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'operationName',mapping : 'operationName'},
- {name : 'items',mapping : 'items'}]
+ { name: 'id', mapping: 'id' },
+ { name: 'operationName', mapping: 'operationName' },
+ { name: 'items', mapping: 'items' }]
)
});
-
+
operationNameStore.on('beforeload', function (store, options) {
- if(top.Ext.getCmp("depart").getRawValue() == ""){
+ if (top.Ext.getCmp("depart").getRawValue() == "") {
showResult("请选择申请科室!");
}
var orgUnitCoding = top.Ext.getCmp("departCoding").getValue();
- var new_params = {orgUnitCoding:orgUnitCoding};
- Ext.apply(store.baseParams, new_params);
+ var new_params = { orgUnitCoding: orgUnitCoding };
+ Ext.apply(store.baseParams, new_params);
});
-
+
//手术间的store
var operationRoomJsonStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByOrgUnitCode.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByOrgUnitCode.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
- },[
- {name : 'id',mapping : 'id'},
- {name : 'operationRoomName',mapping : 'operationRoomName'},
- {name : 'orgUnitCoding',mapping : 'orgUnitCoding'}
- ]
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'operationRoomName', mapping: 'operationRoomName' },
+ { name: 'orgUnitCoding', mapping: 'orgUnitCoding' }
+ ]
),
listeners: {
- beforeload: function(s,options){
+ beforeload: function (s, options) {
//s.baseParams.orgUnitCode = top.Ext.getCmp('departCoding').getValue();
}
}
});
//添加明细
- function addItems(itemId,tousseDefinitionId,name,amount){
- if(name == null || name == ''){
+ function addItems(itemId, tousseDefinitionId, name, amount) {
+ if (name == null || name == '') {
showResult("请填写物品名称!");
return false;
}
- if(amount == null || amount == ''){
+ if (amount == null || amount == '') {
showResult("请填写数量!");
return false;
}
var store = top.Ext.getCmp('operationReservationGrid').getStore();
var isExist = false;
var count = store.getCount();
- for(var i = 0 ; i < count ; i++){
+ for (var i = 0; i < count; i++) {
var record = store.getAt(i);
- if(record.get("name") == name){
+ if (record.get("name") == name) {
isExist = true;
break;
}
}
- if(!isExist){
+ if (!isExist) {
//添加操作
var materialInvoiceItem = new goodsItemRecord({
- itemId : itemId,
- tousseDefinitionId : tousseDefinitionId,
- name : name,
- amount : amount
+ itemId: itemId,
+ tousseDefinitionId: tousseDefinitionId,
+ name: name,
+ amount: amount
});
store.add(materialInvoiceItem);
top.Ext.getCmp('goodsName').setValue('');
top.Ext.getCmp('amount').setValue('');
top.Ext.getCmp('goodsName').focus();
- }else{
+ } else {
showResult(name + ",已添加!");
}
}
-
+
var form = new top.Ext.FormPanel({
- id : 'materialInvoiceForm',
- frame : true,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 660,
- autoHeight : true,
- autoScroll : true,
- labelAlign : 'right',
- labelWidth:60,
- items:[{
- layout : 'column',
- items : [{
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'handleDepartCoding',
- id : 'handleDepartCoding'
- },{
- xtype : 'hidden',
- name : 'departCoding',
- id : 'departCoding'
- },{
- columnWidth : 1,
- layout : 'form',
- items : [{
- xtype:'textarea',
- height : 20,
- fieldLabel : '手术名称',
- maxLength :100,
- id : 'operationName',
- name : 'operationName',
- cls : 'fieldReadOnlyNoRemove',
- allowBlank : true,
- readOnly : true,
- anchor : '100%'
+ id: 'materialInvoiceForm',
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: 660,
+ autoHeight: true,
+ autoScroll: true,
+ labelAlign: 'right',
+ labelWidth: 60,
+ items: [{
+ layout: 'column',
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
+ }, {
+ xtype: 'hidden',
+ name: 'handleDepartCoding',
+ id: 'handleDepartCoding'
+ }, {
+ xtype: 'hidden',
+ name: 'departCoding',
+ id: 'departCoding'
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textarea',
+ height: 20,
+ fieldLabel: '手术名称',
+ maxLength: 100,
+ id: 'operationName',
+ name: 'operationName',
+ cls: 'fieldReadOnlyNoRemove',
+ allowBlank: true,
+ readOnly: true,
+ anchor: '100%'
}]
- },{
- id:'serialNum',
- columnWidth : .33,
- layout : 'form',
- hidden : (id == ""?true:false),
- items : [{
- xtype : 'textfield',
- fieldLabel : '单号',
- maxLength : '41',
- id : 'serialNumber',
- name : 'serialNumber',
- cls : 'fieldReadOnlyNoRemove',
- allowBlank : true,
- readOnly : true,
- anchor : '95%'
+ }, {
+ id: 'serialNum',
+ columnWidth: .33,
+ layout: 'form',
+ hidden: (id == "" ? true : false),
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '单号',
+ maxLength: '41',
+ id: 'serialNumber',
+ name: 'serialNumber',
+ cls: 'fieldReadOnlyNoRemove',
+ allowBlank: true,
+ readOnly: true,
+ anchor: '95%'
}]
}, {
- columnWidth : .33,
- hidden : true,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '操作员',
- maxLength : '60',
- id : 'applicant',
- name : 'applicant',
- allowBlank : true,
- readOnly : true,
- cls : 'fieldReadOnlyNoRemove',
- value : $Id('userName').value,
- anchor : '100%'
+ columnWidth: .33,
+ hidden: true,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '操作员',
+ maxLength: '60',
+ id: 'applicant',
+ name: 'applicant',
+ allowBlank: true,
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove',
+ value: $Id('userName').value,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'combo',
- id : 'depart',
- name : 'depart',
- queryParam : 'spell',
- fieldLabel : '申请科室',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- store : departJsonStore,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- allowBlank : false,
- anchor : '100%',
- listeners : {
- select : function(combo , record , index){
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'combo',
+ id: 'depart',
+ name: 'depart',
+ queryParam: 'spell',
+ fieldLabel: '申请科室',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: departJsonStore,
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ allowBlank: false,
+ anchor: '100%',
+ listeners: {
+ select: function (combo, record, index) {
top.Ext.getCmp('departCoding').setValue(record.data.id);
top.Ext.getCmp('depart').setValue(record.data.name);
operationNameStore.load();
handleDepartStore.load();
- if(saveOrgUnitCode != null && saveOrgUnitCode != record.data.id){
+ if (saveOrgUnitCode != null && saveOrgUnitCode != record.data.id) {
top.Ext.getCmp('operatingRoom').setValue("");
saveOrgUnitCode = null;
}
-
+
operationRoomJsonStore.baseParams.orgUnitCode = record.data.id;
operationRoomJsonStore.load();
-
+
},
- blur : function(){
+ blur: function () {
var departVal = top.Ext.getCmp("depart").getRawValue();
- if(departVal == "" || departVal == null || departVal == undefined){
+ if (departVal == "" || departVal == null || departVal == undefined) {
top.Ext.getCmp('departCoding').setValue("");
operationRoomJsonStore.baseParams.orgUnitCode = "";
operationRoomJsonStore.load();
- }
+ }
}
}
}]
}, {
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'combo',
- fieldLabel : '处理科室',
- id : 'handleDepart',
- name : 'handleDepart',
- editable:false,
- valueField : 'name',
- displayField : 'name',
- store : handleDepartStore,
- forceSelection : true,
- allowBlank : false,
- triggerAction : 'all',
- anchor : '100%',
- listeners : {
- select : function(combo , record , index){
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '处理科室',
+ id: 'handleDepart',
+ name: 'handleDepart',
+ editable: false,
+ valueField: 'name',
+ displayField: 'name',
+ store: handleDepartStore,
+ forceSelection: true,
+ allowBlank: false,
+ triggerAction: 'all',
+ anchor: '100%',
+ listeners: {
+ select: function (combo, record, index) {
top.Ext.getCmp('handleDepartCoding').setValue(record.data.cssdOrgUnitCode);
}
}
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : sstsConfig.onlySelectExistedOperationRoom ? 'combo' :'textfield',
- fieldLabel : '手术间',
- id : 'operatingRoom',
- name : 'operatingRoom',
- minChars : 0,
- maxLength:10,
- maxLengthText :'长度超过限制,不能保存!',
- allowBlank : operationRoomAllowBlank,
- anchor : '100%',
- valueField : 'operationRoomName',
- displayField : 'operationRoomName',
- listConfig: {width : 193},
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: sstsConfig.onlySelectExistedOperationRoom ? 'combo' : 'textfield',
+ fieldLabel: '手术间',
+ id: 'operatingRoom',
+ name: 'operatingRoom',
+ minChars: 0,
+ maxLength: 10,
+ maxLengthText: '长度超过限制,不能保存!',
+ allowBlank: operationRoomAllowBlank,
+ anchor: '100%',
+ valueField: 'operationRoomName',
+ displayField: 'operationRoomName',
+ listConfig: { width: 193 },
matchFieldWidth: false,
- store : sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "",
- lazyInit : true,
- triggerAction : sstsConfig.onlySelectExistedOperationRoom ? 'all' : "",
- hideTrigger : sstsConfig.onlySelectExistedOperationRoom ? false: true,//隐藏向下箭头
- typeAhead : false,
+ store: sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "",
+ lazyInit: true,
+ triggerAction: sstsConfig.onlySelectExistedOperationRoom ? 'all' : "",
+ hideTrigger: sstsConfig.onlySelectExistedOperationRoom ? false : true,//隐藏向下箭头
+ typeAhead: false,
editable: sstsConfig.onlySelectExistedOperationRoom ? false : true,
- forceSelection : sstsConfig.onlySelectExistedOperationRoom ? true: false,
- listeners :{
- select:function(combo, record, index ){
+ forceSelection: sstsConfig.onlySelectExistedOperationRoom ? true : false,
+ listeners: {
+ select: function (combo, record, index) {
saveOrgUnitCode = record.data.orgUnitCoding;
}
}
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '手术时间',
- id : 'operationTime',
- name : 'operationTime',
- 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',
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'datefieldWithMin',
+ fieldLabel: '手术时间',
+ id: 'operationTime',
+ name: 'operationTime',
+ 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',
editable: false,
- allowBlank : operationTimeAllowBlank,
- anchor : '100%'
+ allowBlank: operationTimeAllowBlank,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '医生',
- maxLength : '41',
- id : 'doctors',
- name : 'doctors',
- allowBlank : true,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '医生',
+ maxLength: '41',
+ id: 'doctors',
+ name: 'doctors',
+ allowBlank: true,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '住院号',
- maxLength : '41',
- id : 'hospitalNumber',
- name : 'hospitalNumber',
- allowBlank : true,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '住院号',
+ maxLength: '41',
+ id: 'hospitalNumber',
+ name: 'hospitalNumber',
+ allowBlank: true,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '病人姓名',
- maxLength : '41',
- id : 'patientName',
- name : 'patientName',
- allowBlank : true,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '病人姓名',
+ maxLength: '41',
+ id: 'patientName',
+ name: 'patientName',
+ allowBlank: true,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '病区',
- maxLength : '41',
- id : 'deptName',
- name : 'deptName',
- allowBlank : true,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '病区',
+ maxLength: '41',
+ id: 'deptName',
+ name: 'deptName',
+ allowBlank: true,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术台次',
- maxLength : '41',
- id : 'consoleName',
- name : 'consoleName',
- allowBlank : consoleNameAllowBlank,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术台次',
+ maxLength: '41',
+ id: 'consoleName',
+ name: 'consoleName',
+ allowBlank: consoleNameAllowBlank,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- items : [{
- xtype : 'textfield',
- fieldLabel : '病人年龄',
- maxLength : '41',
- id : 'patientAge',
- name : 'patientAge',
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '病人年龄',
+ maxLength: '41',
+ id: 'patientAge',
+ name: 'patientAge',
regex: /^\d+$/,
- regexText:'只能输入数字',
- allowBlank : true,
- anchor : '100%'
+ regexText: '只能输入数字',
+ allowBlank: true,
+ anchor: '100%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- hidden:true,
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术编号',
- maxLength : '41',
- id : 'scheduleId',
- name : 'scheduleId',
- allowBlank : true,
- anchor : '100%'
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ hidden: true,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术编号',
+ maxLength: '41',
+ id: 'scheduleId',
+ name: 'scheduleId',
+ allowBlank: true,
+ anchor: '100%'
}]
}, {
- columnWidth : 1,
- layout : 'form',
- items : [{
- xtype : 'textarea',
- fieldLabel : '备注',
- height : 50,
- id : 'remark',
- name : 'remark',
- maxLength : 665,
- allowBlank : true,
- anchor : '100%'
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textarea',
+ fieldLabel: '备注',
+ height: 50,
+ id: 'remark',
+ name: 'remark',
+ maxLength: 665,
+ allowBlank: true,
+ anchor: '100%'
}]
}]
- },new top.Ext.grid.EditorGridPanel({
- id : 'operationReservationGrid',
- bodyStyle : 'border:1px solid #afd7af',
- frame :false,
+ }, new top.Ext.grid.EditorGridPanel({
+ id: 'operationReservationGrid',
+ bodyStyle: 'border:1px solid #afd7af',
+ frame: false,
viewConfig: {
- forceFit:true
+ forceFit: true
},
- store : new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/materialInvoiceAction!getMaterialInvoiceItemsByMaterialInvoiceId.do',
- method : 'POST'
+ store: new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/materialInvoiceAction!getMaterialInvoiceItemsByMaterialInvoiceId.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'id'},
- {name : 'materialDefinitionId'},
- {name : 'materialName'},
- {name : 'userecordId'},
- {name : 'userecordName'},
- {name : 'userecordDepartCoding'},
- {name : 'amount'},
- {name : 'deleteButton'}
- ]
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'materialDefinitionId' },
+ { name: 'materialName' },
+ { name: 'userecordId' },
+ { name: 'userecordName' },
+ { name: 'userecordDepartCoding' },
+ { name: 'amount' },
+ { name: 'deleteButton' }
+ ]
})
}),
- cm : new Ext.grid.ColumnModel([new Ext.grid.RowNumberer({header:"序号",width:40}),
- {header : "itemId",dataIndex : 'itemId',hidden : true},
- {header : "tousseDefinitionId",dataIndex : 'tousseDefinitionId',hidden : true},
- {header : "物品名称",dataIndex : 'name',width : 170,menuDisabled : true},
- {header : " 数量",dataIndex : 'amount',width : 80,menuDisabled : true,
- editor : new Ext.form.TextField({
- regex: /^\d+$/,
- regexText:'只能输入数字',
- allowBlank : false
- })
- },
- {header : "删除",width : 80,menuDisabled : true,dataIndex : 'deleteButton', id:'expandColumn', renderer:renderDeleteButton}
- ]),
- width:(document.body.clientWidth > 700)?665:(document.body.clientWidth - 80),
- height :(document.body.clientHeight > 600)?350:(document.body.clientHeight-300),
- autoExpandColumn : 'expandColumn',
- clicksToEdit : 1,// 设置点击几次才可编辑
- selModel : new top.Ext.grid.RowSelectionModel({
- singleSelect : false
+ cm: new Ext.grid.ColumnModel([new Ext.grid.RowNumberer({ header: "序号", width: 40 }),
+ { header: "itemId", dataIndex: 'itemId', hidden: true },
+ { header: "tousseDefinitionId", dataIndex: 'tousseDefinitionId', hidden: true },
+ { header: "物品名称", dataIndex: 'name', width: 170, menuDisabled: true },
+ {
+ header: " 数量", dataIndex: 'amount', width: 80, menuDisabled: true,
+ editor: new Ext.form.TextField({
+ regex: /^\d+$/,
+ regexText: '只能输入数字',
+ allowBlank: false
+ })
+ },
+ { header: "删除", width: 80, menuDisabled: true, dataIndex: 'deleteButton', id: 'expandColumn', renderer: renderDeleteButton }
+ ]),
+ width: (document.body.clientWidth > 700) ? 665 : (document.body.clientWidth - 80),
+ height: (document.body.clientHeight > 600) ? 350 : (document.body.clientHeight - 300),
+ autoExpandColumn: 'expandColumn',
+ clicksToEdit: 1,// 设置点击几次才可编辑
+ selModel: new top.Ext.grid.RowSelectionModel({
+ singleSelect: false
}),
- tbar : [{
- text : '手术名称:'
- },{
- xtype : 'combo',
- queryParam : 'spell',
- minChars : 0,
- valueField : 'id',
- displayField : 'operationName',
- store : operationNameStore,
- forceSelection : false,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- editable : true,
- width:300,
- name : "operation",
- id : "operation",
- anchor : '98%',
- listeners : {
- select : function(combo, record, index){
-
- top.Ext.getCmp("operationName").setValue(combo.getRawValue());
- var store = top.Ext.getCmp('operationReservationGrid').getStore();
- store.removeAll();
-
- var items = record.get("items");
- if(items != null){
- for(var i = 0 ; i < items.length ; i++){
- addItems("",items[i].tousseDefinitionId,items[i].name,items[i].amount);
- }
+ tbar: [{
+ text: '手术名称:'
+ }, {
+ xtype: 'combo',
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'operationName',
+ store: operationNameStore,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ editable: true,
+ width: 300,
+ name: "operation",
+ id: "operation",
+ anchor: '98%',
+ listeners: {
+ select: function (combo, record, index) {
+
+ top.Ext.getCmp("operationName").setValue(combo.getRawValue());
+ var store = top.Ext.getCmp('operationReservationGrid').getStore();
+ store.removeAll();
+
+ var items = record.get("items");
+ if (items != null) {
+ for (var i = 0; i < items.length; i++) {
+ addItems("", items[i].tousseDefinitionId, items[i].name, items[i].amount);
}
}
}
}
- ],
- listeners: {
- render : function() {
- var tbar = new top.Ext.Toolbar ({
- items : [{
- text : '物品名称:'
- },{
- xtype : 'combo',
- id : 'goodsName',
- name : 'goodsName',
- queryParam : 'spell',
- fieldLabel : '物品名称',
- minChars : 0,
- valueField : 'id',
- displayField : 'displayName',
- anchor : '100%',
- width:(document.body.clientWidth > 700)?300:200,
- store : tousseAndDiposableGoodsStore,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- forceSelection : true,
- allowBlank : true
- },{
- text : ' 数量:'
- },{
- xtype : 'textfield',
- maxLength : '16',
- id : 'amount',
- name : 'amount',
- width : 70,
- regex: /^\d+$/,
- regexText:'只能输入数字',
- anchor : '100%',
- listeners : {
- specialkey : function(field, e) {
- if (e.getKey() == Ext.EventObject.ENTER) {
- var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
- var name = top.Ext.getCmp('goodsName').getRawValue()
- var amount = top.Ext.getCmp('amount').getValue();
- addItems("",tousseDefinitionId,name,amount);
- }
+ }
+ ],
+ listeners: {
+ render: function () {
+ var tbar = new top.Ext.Toolbar({
+ items: [{
+ text: '物品名称:'
+ }, {
+ xtype: 'combo',
+ id: 'goodsName',
+ name: 'goodsName',
+ queryParam: 'spell',
+ fieldLabel: '物品名称',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'displayName',
+ anchor: '100%',
+ width: (document.body.clientWidth > 700) ? 300 : 200,
+ store: tousseAndDiposableGoodsStore,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ forceSelection: true,
+ allowBlank: true
+ }, {
+ text: ' 数量:'
+ }, {
+ xtype: 'textfield',
+ maxLength: '16',
+ id: 'amount',
+ name: 'amount',
+ width: 70,
+ regex: /^\d+$/,
+ regexText: '只能输入数字',
+ anchor: '100%',
+ listeners: {
+ specialkey: function (field, e) {
+ if (e.getKey() == Ext.EventObject.ENTER) {
+ var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
+ var name = top.Ext.getCmp('goodsName').getRawValue()
+ var amount = top.Ext.getCmp('amount').getValue();
+ addItems("", tousseDefinitionId, name, amount);
}
}
- },{
- text : '添加',
- iconCls : 'btn_ext_add',
- handler : function() {
- var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
- var name = top.Ext.getCmp('goodsName').getRawValue()
- var amount = top.Ext.getCmp('amount').getValue();
- addItems("",tousseDefinitionId,name,amount);
- }
- }
- ]
+ }
+ }, {
+ text: '添加',
+ iconCls: 'btn_ext_add',
+ handler: function () {
+ var tousseDefinitionId = top.Ext.getCmp('goodsName').getValue();
+ var name = top.Ext.getCmp('goodsName').getRawValue()
+ var amount = top.Ext.getCmp('amount').getValue();
+ addItems("", tousseDefinitionId, name, amount);
+ }
+ }
+ ]
});
tbar.render(top.Ext.getCmp('operationReservationGrid').tbar);
}
- }
+ }
})],
- buttons : [{
- text : '暂存',
- hidden : (committedStatus == 1 ? true : false),
- handler : function() {
- saveOrSubmitForm(id,false);
+ buttons: [{
+ text: '暂存',
+ hidden: (committedStatus == 1 ? true : false),
+ handler: function () {
+ saveOrSubmitForm(id, false);
}
- },{
- text : '提交',
- handler : function() {
- saveOrSubmitForm(id,true);
+ }, {
+ text: '提交',
+ handler: function () {
+ saveOrSubmitForm(id, true);
}
- },{
- text : '取消',
- handler : function() {
+ }, {
+ text: '取消',
+ handler: function () {
operationReservationWindow.close();
}
}]
});
- operationReservationWindow = new top.Ext.Window( {
- id : 'operationReservationWin',
- layout : 'fit',
- title : '手术预约单信息',
- width : (document.body.clientWidth > 700)?700:(document.body.clientWidth - 50) ,
- modal : true,
- autoHeight : true,
- border :false,
- plain : true,
- items : [ form ]
+ operationReservationWindow = new top.Ext.Window({
+ id: 'operationReservationWin',
+ layout: 'fit',
+ title: '手术预约单信息',
+ width: (document.body.clientWidth > 700) ? 700 : (document.body.clientWidth - 50),
+ modal: true,
+ autoHeight: true,
+ border: false,
+ plain: true,
+ items: [form]
});
operationReservationWindow.show();
-
- if(id != ""){
+
+ if (id != "") {
Ext.Ajax.request({
- url:WWWROOT + "/disinfectsystem/operationReservationAction!loadOperationReservation.do",
- params:{id : id},
- success:function(result){
- if(result != null){
+ url: WWWROOT + "/disinfectsystem/operationReservationAction!loadOperationReservation.do",
+ params: { id: id },
+ success: function (result) {
+ if (result != null) {
var data = JSON.parse(result.responseText);
- if(data.success){
+ if (data.success) {
top.Ext.getCmp("serialNumber").setValue(data.serialNumber);
top.Ext.getCmp("applicant").setValue(data.applicant);
top.Ext.getCmp("operationName").setValue(data.operationName);
@@ -759,15 +760,15 @@
top.Ext.getCmp("hospitalNumber").setValue(data.hospitalNumber);
top.Ext.getCmp("remark").setValue(data.remark);
var tousseItems = data.items;
- for(var i = 0 ; i < tousseItems.length ; i++){
- addItems(tousseItems[i].itemId,tousseItems[i].tousseDefinitionId,tousseItems[i].name,tousseItems[i].amount);
+ for (var i = 0; i < tousseItems.length; i++) {
+ addItems(tousseItems[i].itemId, tousseItems[i].tousseDefinitionId, tousseItems[i].name, tousseItems[i].amount);
}
- }else{
+ } else {
showResult("该单已不存在!");
}
}
},
- failure:function(){
+ failure: function () {
showResult("加载失败,请联系管理员!");
}
});
@@ -782,33 +783,33 @@
showResult("请选择要删除的单据!");
return false;
}
- var ids = "";
- for ( var i = 0, len = records.length; i < len; i++) {
+ var ids = "";
+ for (var i = 0, len = records.length; i < len; i++) {
if (ids != "") {
ids += ";";
}
ids += records[i].data['id'];
}
- top.Ext.MessageBox.confirm("请确认","是否确定要删除选中的手术预约单信息?",
- function(button, text) {
- if ("yes" == button){
+ top.Ext.MessageBox.confirm("请确认", "是否确定要删除选中的手术预约单信息?",
+ function (button, text) {
+ if ("yes" == button) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectsystem/operationReservationAction!deleteOperationReservation.do',
- params : {ids : ids},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectsystem/operationReservationAction!deleteOperationReservation.do',
+ params: { ids: ids },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
showResult(result.message);
grid.dwrReload();
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult(response.responseText);
}
});
}
}
);
}
-function batchPrintOperationReservation(grid){
+function batchPrintOperationReservation(grid) {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
@@ -817,45 +818,45 @@
}
var ids = "";
var firstDate = null;
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
if (ids != "") {
ids += ";";
}
ids += records[i].data['id'];
- var operationDate = records[i].data.operationTime.substr(0,10);
- if(!firstDate){
+ var operationDate = records[i].data.operationTime.substr(0, 10);
+ if (!firstDate) {
//未设置第一个时间值,用当前的时间值来设置第一个时间值,后面的单,手术时间必须与这个相等
- if(operationDate){
+ if (operationDate) {
firstDate = operationDate;
}
}
- if(firstDate){
+ if (firstDate) {
var currentDate = firstDate;
- if(operationDate){
+ if (operationDate) {
currentDate = operationDate;
}
-
- if(!dateEquals(currentDate,firstDate)){
+
+ if (!dateEquals(currentDate, firstDate)) {
showResult("请选择手术日期相同的单据!");
return false;
}
}
}
- top.Ext.MessageBox.confirm("请确认","是否确定要打印选中的手术预约单信息?",
- function(button, text) {
- if ("yes" == button){
+ top.Ext.MessageBox.confirm("请确认", "是否确定要打印选中的手术预约单信息?",
+ function (button, text) {
+ if ("yes" == button) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectsystem/operationReservationAction!batchPrintOperationReservation.do',
- params : {ids : ids},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectsystem/operationReservationAction!batchPrintOperationReservation.do',
+ params: { ids: ids },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(!result.success){
+ if (!result.success) {
showResult(result.message);
- }else{
+ } else {
printOperationReservations(result);
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult("打印失败");
}
});
@@ -874,28 +875,28 @@
return false;
}
var ids = "";
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
var committedStatus = records[i].data['committedStatus'];
- if(committedStatus){
+ if (committedStatus) {
continue;
}
if (ids != "") {
ids += ";";
}
ids += records[i].data['id'];
}
- top.Ext.MessageBox.confirm("请确认","是否确定要提交选中的手术预约单信息?",
- function(button, text) {
- if ("yes" == button){
+ top.Ext.MessageBox.confirm("请确认", "是否确定要提交选中的手术预约单信息?",
+ function (button, text) {
+ if ("yes" == button) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectsystem/operationReservationAction!batchSubmitOperationReservation.do',
- params : {ids : ids},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectsystem/operationReservationAction!batchSubmitOperationReservation.do',
+ params: { ids: ids },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
showResult(result.message);
grid.dwrReload();
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult(response.responseText);
}
});
@@ -904,177 +905,177 @@
);
}
-function editRecord(id,committedStatus){
+function editRecord(id, committedStatus) {
lastSelIdArray = [id];
- editOperationReservation(id,committedStatus);
+ editOperationReservation(id, committedStatus);
}
-function modify(v,data){
- editRecord(data['id'],data['committedStatus']);
+function modify(v, data) {
+ editRecord(data['id'], data['committedStatus']);
}
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
Ext4.tip.QuickTipManager.init();
Ext4.apply(Ext4.tip.QuickTipManager.getQuickTip(), {
- dismissDelay: 0,
- showDelay: 0
+ dismissDelay: 0,
+ showDelay: 0
});
- function renderColor(v, p, record){
+ function renderColor(v, p, record) {
var status = record.data['deliverStatus'];
var color = "";
- if("待发货" == status){//待发货 黄色
+ if ("待发货" == status) {//待发货 黄色
color = "yellow";
- }else if("部分发货" == status){ //部分发货 粉红色
+ } else if ("部分发货" == status) { //部分发货 粉红色
color = "#F5A7FA";
}
- return "
" + v + "
"; + return "" + v + "
"; } - - function renderCommittedStatus(v, p, record){ + + function renderCommittedStatus(v, p, record) { var color = ""; var status = '否'; //器械包申请单状态 - - if(v == true || v == 'true'){ + + if (v == true || v == 'true') { status = "是"; - }else{ + } else { color = "yellow"; } - return "" + status + "
"; + return "" + status + "
"; } - + var form = new Ext.form.FormPanel({ - title : '', - region : 'north', - labelAlign : 'right', - buttonAlign : 'center', - collapsible : true, - collapseMode : 'mini', - split : true, - border : 0, - frame : true, - bodyStyle : 'padding:0px auto;margin:0px', - height : 100, - items : [{ - layout : 'column', - items:[{ - columnWidth : .33, - layout : 'form', - labelWidth : 85, - labelAlign:"right", - items : [{ - xtype : 'combo', - id : 'query_committedStatus', - name : 'query_committedStatus', - valueField : 'value', - displayField : 'value', - anchor : '95%', - fieldLabel : '提交状态', - mode : 'local', - readOnly : true, - value : '未提交', - triggerAction : 'all', - forceSelection : true, - store : new Ext.data.SimpleStore({ - fields : ['value'], - data : [['全部'],['已提交'],['未提交']] - }) + title: '', + region: 'north', + labelAlign: 'right', + buttonAlign: 'center', + collapsible: true, + collapseMode: 'mini', + split: true, + border: 0, + frame: true, + bodyStyle: 'padding:0px auto;margin:0px', + height: 100, + items: [{ + layout: 'column', + items: [{ + columnWidth: .33, + layout: 'form', + labelWidth: 85, + labelAlign: "right", + items: [{ + xtype: 'combo', + id: 'query_committedStatus', + name: 'query_committedStatus', + valueField: 'value', + displayField: 'value', + anchor: '95%', + fieldLabel: '提交状态', + mode: 'local', + readOnly: true, + value: '未提交', + triggerAction: 'all', + forceSelection: true, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['全部'], ['已提交'], ['未提交']] + }) }] - },{ - columnWidth : .33, - layout : 'form', - labelWidth : 85, - labelAlign:"right", - items : [{ - xtype : 'combo', - id : 'query_invoiceStatus', - name : 'query_invoiceStatus', - valueField : 'value', - displayField : 'value', - anchor : '95%', - fieldLabel : '发货状态', - mode : 'local', - readOnly : true, - value : '全部', - triggerAction : 'all', - forceSelection : true, - store : new Ext.data.SimpleStore({ - fields : ['value'], - data : [['全部'],['已发货'],['部分发货'],['待发货']] - }) + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 85, + labelAlign: "right", + items: [{ + xtype: 'combo', + id: 'query_invoiceStatus', + name: 'query_invoiceStatus', + valueField: 'value', + displayField: 'value', + anchor: '95%', + fieldLabel: '发货状态', + mode: 'local', + readOnly: true, + value: '全部', + triggerAction: 'all', + forceSelection: true, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['全部'], ['已发货'], ['部分发货'], ['待发货']] + }) }] - },{ - columnWidth : .33, - layout : 'form', - labelWidth : 85, - labelAlign:"right", - items : [{ - xtype : 'textfield', - fieldLabel : '手术间', - name : 'query_operatingRoom', - id : 'query_operatingRoom', - anchor : '95%', - listeners : { - specialkey : function(field, ee) { + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 85, + labelAlign: "right", + items: [{ + xtype: 'textfield', + fieldLabel: '手术间', + name: 'query_operatingRoom', + id: 'query_operatingRoom', + anchor: '95%', + listeners: { + specialkey: function (field, ee) { if (ee.getKey() == Ext.EventObject.ENTER) { -// initQueryValueAndReload(); + // initQueryValueAndReload(); } } } }] - },{ - columnWidth : .33, - layout : 'form', - labelWidth : 85, - labelAlign:"right", - items : [{ - xtype : 'datefield', - fieldLabel : '手术开始日期', - name : 'query_operationTime_start', - id : 'query_operationTime_start', - readOnly : true, + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 85, + labelAlign: "right", + items: [{ + xtype: 'datefield', + fieldLabel: '手术开始日期', + name: 'query_operationTime_start', + id: 'query_operationTime_start', + readOnly: true, value: tomorrow, - 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', - editable : false, - format : 'Y-m-d', - anchor : '95%' + 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', + editable: false, + format: 'Y-m-d', + anchor: '95%' }] - },{ - columnWidth : .33, - layout : 'form', - labelWidth : 85, - labelAlign:"right", - items : [{ - xtype : 'datefield', - fieldLabel : '手术结束日期', - name : 'query_operationTime_end', - id : 'query_operationTime_end', - readOnly : true, + }, { + columnWidth: .33, + layout: 'form', + labelWidth: 85, + labelAlign: "right", + items: [{ + xtype: 'datefield', + fieldLabel: '手术结束日期', + name: 'query_operationTime_end', + id: 'query_operationTime_end', + readOnly: true, value: tomorrow, - 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', - editable : false, - format : 'Y-m-d', - anchor : '95%' + 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', + editable: false, + format: 'Y-m-d', + anchor: '95%' }] }] }], - buttons : [ + buttons: [ { - xtype : 'button', - text : '查询', - minWidth : 70, - iconCls : 'icon_search', - handler : function() { + xtype: 'button', + text: '查询', + minWidth: 70, + iconCls: 'icon_search', + handler: function () { lastSelIdArray = []; initQueryValueAndReload(); } - },{ - xtype : 'button', - text : '重置', - minWidth : 70, - iconCls : 'icon_set', - handler : function() { + }, { + xtype: 'button', + text: '重置', + minWidth: 70, + iconCls: 'icon_set', + handler: function () { $Id('query_committedStatus').value = "未提交"; $Id('query_invoiceStatus').value = "全部"; $Id('query_operatingRoom').value = ""; @@ -1084,134 +1085,135 @@ } ] }); - + var columns = [ - //{header : "流水号",width : 80,dataIndex : 'serialNumber', renderer : modifyRecord}, - {header : "手术台次",width : 120,dataIndex : 'consoleName'}, - {header : "手术名称",width : 180,dataIndex : 'operationName', renderer : modifyRecord}, - /* {header : "申请科室",width : 120,dataIndex : 'depart'}, - {header : "申请人",width : 60,dataIndex : 'applicant'}, - {header : "申请时间",width : 120,dataIndex : 'applicationTime', renderer : myDateFormatByMinute}, */ - {header : "已提交",width : 60,dataIndex : 'committedStatus',renderer : renderCommittedStatus}, - {header : "医生",width : 70,dataIndex : 'doctors'}, - {header : "手术间",width : 80,dataIndex : 'operatingRoom'}, - {header : "住院号",width : 80,dataIndex : 'hospitalNumber'}, - {header : "病人姓名",width : 70,dataIndex : 'patientName'}, - {header : "病区",width : 100,dataIndex : 'deptName'}, - {header : "病人年龄",width : 100,dataIndex : 'patientAge'}, - {header : "手术时间",width : 120,dataIndex : 'operationTime', renderer : myDateFormatByMinute}, - //{header : "手术编号",width : 120,dataIndex : 'scheduleId'}, - {header : "发货状态",width : 65,dataIndex : 'deliverStatus', renderer : renderColor}, - {id:'remark',header: "备注", dataIndex: 'remark'} - ]; + //{header : "流水号",width : 80,dataIndex : 'serialNumber', renderer : modifyRecord}, + { header: "手术台次", width: 120, dataIndex: 'consoleName' }, + { header: "手术名称", width: 180, dataIndex: 'operationName', renderer: modifyRecord }, + /* {header : "申请科室",width : 120,dataIndex : 'depart'}, + {header : "申请人",width : 60,dataIndex : 'applicant'}, + {header : "申请时间",width : 120,dataIndex : 'applicationTime', renderer : myDateFormatByMinute}, */ + { header: "已提交", width: 60, dataIndex: 'committedStatus', renderer: renderCommittedStatus }, + { header: "医生", width: 70, dataIndex: 'doctors' }, + { header: "手术间", width: 80, dataIndex: 'operatingRoom' }, + { header: "住院号", width: 80, dataIndex: 'hospitalNumber' }, + { header: "病人姓名", width: 70, dataIndex: 'patientName' }, + { header: "病区", width: 100, dataIndex: 'deptName' }, + { header: "病人年龄", width: 100, dataIndex: 'patientAge' }, + { header: "手术时间", width: 120, dataIndex: 'operationTime', renderer: myDateFormatByMinute }, + //{header : "手术编号",width : 120,dataIndex : 'scheduleId'}, + { header: "发货状态", width: 65, dataIndex: 'deliverStatus', renderer: renderColor }, + { id: 'remark', header: "备注", dataIndex: 'remark' } + ]; var readerDetail = [ - {name : 'id'}, - {name : 'serialNumber'}, - {name : 'depart'}, - {name : 'operationName'}, - {name : 'operationTime'}, - {name : 'applicant'}, - {name : 'applicationTime'}, - {name : 'doctors'}, - {name : 'operatingRoom'}, - {name : 'scheduleId'}, - {name : 'hospitalNumber'}, - {name : 'patientName'}, - {name : 'deptName'}, - {name : 'consoleName'}, - {name : 'patientAge'}, - {name : 'deliverStatus'}, - {name : 'committedStatus'}, - {name : 'remark'} + { name: 'id' }, + { name: 'serialNumber' }, + { name: 'depart' }, + { name: 'operationName' }, + { name: 'operationTime' }, + { name: 'applicant' }, + { name: 'applicationTime' }, + { name: 'doctors' }, + { name: 'operatingRoom' }, + { name: 'scheduleId' }, + { name: 'hospitalNumber' }, + { name: 'patientName' }, + { name: 'deptName' }, + { name: 'consoleName' }, + { name: 'patientAge' }, + { name: 'deliverStatus' }, + { name: 'committedStatus' }, + { name: 'remark' } ]; - + var filters = new Ext.grid.GridFilters({ - filters:[ - {type: 'string', dataIndex: 'serialNumber'}, - {type: 'string', dataIndex: 'depart'}, - {type: 'string', dataIndex: 'operationName'}, - {type: 'boolean', dataIndex: 'committedStatus'}, - {type: 'string', dataIndex: 'applicant'}, - {type: 'string', dataIndex: 'doctors'}, - {type: 'string', dataIndex: 'operatingRoom'}, - {type: 'string', dataIndex: 'deliverStatus'}, - {type: 'string', dataIndex: 'hospitalNumber'}, - {type: 'string', dataIndex: 'patientName'}, - {type: 'string', dataIndex: 'deptName'}, - {type: 'string', dataIndex: 'remark'} - ]} + filters: [ + { type: 'string', dataIndex: 'serialNumber' }, + { type: 'string', dataIndex: 'depart' }, + { type: 'string', dataIndex: 'operationName' }, + { type: 'boolean', dataIndex: 'committedStatus' }, + { type: 'string', dataIndex: 'applicant' }, + { type: 'string', dataIndex: 'doctors' }, + { type: 'string', dataIndex: 'operatingRoom' }, + { type: 'string', dataIndex: 'deliverStatus' }, + { type: 'string', dataIndex: 'hospitalNumber' }, + { type: 'string', dataIndex: 'patientName' }, + { type: 'string', dataIndex: 'deptName' }, + { type: 'string', dataIndex: 'remark' } + ] + } ); var sign = true; var tbar = [{ - text : '添加', - hidden : SSTS_OR_Create, - iconCls : 'btn_ext_application_add', - handler : function() { - editOperationReservation("",0); + text: '添加', + hidden: SSTS_OR_Create, + iconCls: 'btn_ext_application_add', + handler: function () { + editOperationReservation("", 0); } - },'-', { - text : '删除', - hidden : SSTS_OR_Delete, - iconCls : 'btn_ext_application_del', - handler : function() { + }, '-', { + text: '删除', + hidden: SSTS_OR_Delete, + iconCls: 'btn_ext_application_del', + handler: function () { deleteOperationReservation(grid); } - },'-', { - text : '刷新列表', - iconCls : 'btn_ext_refresh1', - handler : function() { + }, '-', { + text: '刷新列表', + iconCls: 'btn_ext_refresh1', + handler: function () { lastSelIdArray = []; grid.dwrReload(); } - },'-', { - text : '提交', - hidden : SSTS_OR_Create, - iconCls : 'btn_ext_cog_go', - handler : function() { + }, '-', { + text: '提交', + hidden: SSTS_OR_Create, + iconCls: 'btn_ext_cog_go', + handler: function () { batchSubmintOperationReservation(grid); } - },'-',{ - text : '打印', - hidden : SSTS_OR_Create || (hideButton == false || hideButton == 'false'), - iconCls : 'icon_print', - handler : function() { + }, '-', { + text: '打印', + hidden: SSTS_OR_Create || (hideButton == false || hideButton == 'false'), + iconCls: 'icon_print', + handler: function () { batchPrintOperationReservation(grid); } - },'-',{ - text : '同步手术预约单', - iconCls : 'btn_ext_add_tousse', - hidden : !sstsConfig.enableSyncOperationReservation || SSTS_OR_Create, - handler : function() { + }, '-', { + text: '同步手术预约单', + iconCls: 'btn_ext_add_tousse', + hidden: !sstsConfig.enableSyncOperationReservation || SSTS_OR_Create, + handler: function () { synOperationReservation(); } }]; - grid = new Ext.ux.ForgonPageGrid( { - tbar : tbar, - pageSize : 20, - defaultSortField : 'consoleName', - title : entityName + '列表', - defaultSortDirection : 'ASC', - isCheckboxSelectionModel : true, - rememberSelected : false, - showLoadMask:true, - userOnLoad : function(store, records, options){ - selectRowsByIdsArray(store, records,lastSelIdArray); + grid = new Ext.ux.ForgonPageGrid({ + tbar: tbar, + pageSize: 20, + defaultSortField: 'consoleName', + title: entityName + '列表', + defaultSortDirection: 'ASC', + isCheckboxSelectionModel: true, + rememberSelected: false, + showLoadMask: true, + userOnLoad: function (store, records, options) { + selectRowsByIdsArray(store, records, lastSelIdArray); }, - isShowSearchField : true, - columns : columns, + isShowSearchField: true, + columns: columns, plugins: filters, - autoExpandColumn : 'remark', - renderTo : 'gridDiv', - frame : false + autoExpandColumn: 'remark', + renderTo: 'gridDiv', + frame: false }, readerDetail, OperationReservationTableManager.findOperationReservationTableList, - null + null ); - - grid.on('mouseover',function(e) {// 添加mouseover事件 + + grid.on('mouseover', function (e) {// 添加mouseover事件 var index = grid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置 if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false) var record = this.getStore().getAt(index); @@ -1220,46 +1222,46 @@ if (!tableContent) { var content = ""; Ext.Ajax.request({ - url : WWWROOT + '/disinfectsystem/operationReservationAction!getOperationReservationById.do', - params : { - id : recordId + url: WWWROOT + '/disinfectsystem/operationReservationAction!getOperationReservationById.do', + params: { + id: recordId }, - success : function(response, options) { + success: function (response, options) { var invoiceItems = eval(response.responseText); if (invoiceItems != null) { - for ( var i = 0; i < invoiceItems.length; i++) { + for (var i = 0; i < invoiceItems.length; i++) { content += "物品名称 | 数量 | ");
tableContent += "