Ext.define('school.view.basic.class.ClassDetail', { extend: 'school.view.core.form.FormPanel', xtype: 'classdetail', controller: 'classdetail', viewModel: 'classdetail', //字段属性 _title: '班级信息', _idField: 'clazz_id', _codeField: null, // _readUrl: 'http://10.1.80.47:9560/class/read', _readUrl: '/api/school/class/read', // _saveUrl: 'http://10.1.80.47:9560/class/save', _saveUrl: '/api/school/class/save', _deleteUrl: '/api/school/class/delete', initId: 0, initComponent: function () { Ext.apply(this, { defaultItems: [{ xtype: 'hidden', name: 'clazz_id', fieldLabel: 'id', group: '班级信息', }, { xtype: "textfield", name: "clazz_name", fieldLabel: "班级名称", columnWidth: 0.5, group: '班级信息', }, { // xtype: 'textfield', // name: 'code', // fieldLabel: '班级代码', // }, { xtype: 'textfield', name: 'clazz_grade', fieldLabel: '所属年级', columnWidth: 0.5, group: '班级信息', }, { xtype: "textfield", name: "clazz_adress", fieldLabel: "班级地址", columnWidth: 1, group: '班级信息', }, { xtype: "textfield", name: 'clazz_status', fieldLabel: "状态", columnWidth: 0.5, group: '班级信息', }, { xtype: "textfield", name: 'clazz_remarks', fieldLabel: '备注', columnWidth: 0.5, group: '班级信息', }, { name: "detail0", xtype: "detailGridField", detnoColumn: 'sd_detno', storeModel: 'school.model.basic.Student', allowEmpty: true, showCount: false, readOnly: true, group: '学生信息', columns: [{ text: 'id', dataIndex: 'stu_id', hidden: true }, { text: '编号', dataIndex: 'stu_number' }, { text: '姓名', dataIndex: 'stu_name' }, { text: '性别', dataIndex: 'stu_sex' }, { text: '出生日期', dataIndex: 'stu_birthday', xtype: 'datecolumn', format: 'Y-m-d' }, { text: '年龄', dataIndex: 'stu_age' }, { text: '家庭住址', dataIndex: 'stu_address' }, { text: '入学时间', dataIndex: 'stu_enroll_date', xtype: 'datecolumn', format: 'Y-m-d' }, { text: '毕业时间', dataIndex: 'stu_graduate_date', xtype: 'datecolumn', format: 'Y-m-d' }, { text: '备注', dataIndex: 'stu_remarks' }] }, { name: "detail1", xtype: "detailGridField", idColumn: 'teacher_clazz_id', detnoColumn: 'no', storeModel: 'school.model.basic.Subject', deleteDetailUrl: '/api/school/class/deleteDetail', allowEmpty: true, showCount: false, group: '学科信息', columns: [{ text: 'id', dataIndex: 'teacher_clazz_id', hidden: true }, { text: '学科id', dataIndex: 'subject_id', editor: { xtype: 'textfield' } }, { text: '学科', dataIndex: 'subject_name', xtype: 'subjectcolumn' }, { text: '任课教师id', dataIndex: 'teacher_id', editor: { xtype: 'textfield' } }, { text: '任课教师', dataIndex: 'teacher_name', editor: { xtype: 'textfield' } }] }] }); this.callParent(); }, });