Index: ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js =================================================================== diff -u -r41461 -r41463 --- ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 41461) +++ ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 41463) @@ -11,7 +11,7 @@ var urgentLevelData = {}; //加急急别的json键值对,key为加急急别的id,值为加载对象的json var urgentLevelDataMap = {}; - +var departJsonStore; Ext4.define('TousseInstance', { extend: 'Ext4.data.Model', fields: ['id', 'barcode', 'tousseDefinitionName', @@ -358,12 +358,25 @@ Ext4.getCmp('operationScheduleId').setValue(patientInfo.operationScheduleId); } if (patientInfo.ascriptionDepartment) { - Ext4.getCmp('departNameOfpatient').setValue(patientInfo.ascriptionDepartment); - Ext4.getCmp('departCodeOfpatient').setValue(patientInfo.ascriptionDepartCode); + departJsonStore.each(function (record) { + var name = record.get("name"); + if (name == patientInfo.ascriptionDepartment) { + Ext4.getCmp('departNameOfpatient').setRawValue(patientInfo.ascriptionDepartment); + Ext4.getCmp('departCodeOfpatient').setValue(record.get("id")); + return false; + } + }); } if (patientInfo.doctorAccountDepart) { - Ext4.getCmp('doctorAccountDepart').setValue(patientInfo.doctorAccountDepart); - Ext4.getCmp('doctorAccountDepartCode').setValue(patientInfo.doctorAccountDepartCode); + departJsonStore.each(function (record) { + var name = record.get("name"); + if (name == patientInfo.doctorAccountDepart) { + Ext4.getCmp('doctorAccountDepart').setRawValue(patientInfo.doctorAccountDepart); + //设置主刀医生核算科室的编码 + Ext4.getCmp('doctorAccountDepartCode').setValue(record.get("id")); + return false; + } + }); } if (patientInfo.patientArea) { Ext4.getCmp('patientArea').setRawValue(patientInfo.patientArea); @@ -645,7 +658,7 @@ data: patientAreaList }); - var departJsonStore = new Ext4.data.Store({ + departJsonStore = new Ext4.data.Store({ proxy: { type: 'ajax', url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do?related=false',