ClassDetail.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. Ext.define('school.view.basic.class.ClassDetail', {
  2. extend: 'school.view.core.form.FormPanel',
  3. xtype: 'classdetail',
  4. controller: 'classdetail',
  5. viewModel: 'classdetail',
  6. //字段属性
  7. _title: '班级信息',
  8. _idField: 'clazz_id',
  9. _codeField: null,
  10. // _readUrl: 'http://10.1.80.47:9560/class/read',
  11. _readUrl: '/api/school/class/read',
  12. // _saveUrl: 'http://10.1.80.47:9560/class/save',
  13. _saveUrl: '/api/school/class/save',
  14. _deleteUrl: '/api/school/class/delete',
  15. initId: 0,
  16. initComponent: function () {
  17. Ext.apply(this, {
  18. defaultItems: [{
  19. xtype: 'hidden',
  20. name: 'clazz_id',
  21. fieldLabel: 'id',
  22. group: '班级信息',
  23. }, {
  24. xtype: "textfield",
  25. name: "clazz_name",
  26. fieldLabel: "班级名称",
  27. columnWidth: 0.5,
  28. group: '班级信息',
  29. allowBlank: false
  30. }, {
  31. // xtype: 'textfield',
  32. // name: 'code',
  33. // fieldLabel: '班级代码',
  34. // }, {
  35. xtype: 'gradecombo',
  36. name: 'clazz_grade',
  37. fieldLabel: '所属年级',
  38. columnWidth: 0.5,
  39. group: '班级信息',
  40. allowBlank: false
  41. }, {
  42. xtype: "textfield",
  43. name: "clazz_adress",
  44. fieldLabel: "班级地址",
  45. columnWidth: 1,
  46. group: '班级信息',
  47. }, {
  48. xtype: "textfield",
  49. name: 'clazz_status',
  50. fieldLabel: "状态",
  51. columnWidth: 0.5,
  52. group: '班级信息',
  53. }, {
  54. xtype: "textfield",
  55. name: 'clazz_remarks',
  56. fieldLabel: '备注',
  57. columnWidth: 0.5,
  58. group: '班级信息',
  59. }, {
  60. name: "detail0",
  61. xtype: "detailGridField",
  62. detnoColumn: 'sd_detno',
  63. storeModel: 'school.model.basic.Student',
  64. allowEmpty: true,
  65. showCount: false,
  66. readOnly: true,
  67. group: '学生信息',
  68. columns: [{
  69. text: 'id',
  70. dataIndex: 'stu_id',
  71. hidden: true
  72. }, {
  73. text: '编号',
  74. dataIndex: 'stu_number'
  75. }, {
  76. text: '姓名',
  77. dataIndex: 'stu_name'
  78. }, {
  79. text: '性别',
  80. dataIndex: 'stu_sex'
  81. }, {
  82. text: '出生日期',
  83. dataIndex: 'stu_birthday',
  84. xtype: 'datecolumn',
  85. format: 'Y-m-d'
  86. }, {
  87. text: '年龄',
  88. dataIndex: 'stu_age'
  89. }, {
  90. text: '家庭住址',
  91. dataIndex: 'stu_address'
  92. }, {
  93. text: '入学时间',
  94. dataIndex: 'stu_enroll_date',
  95. xtype: 'datecolumn',
  96. format: 'Y-m-d'
  97. }, {
  98. text: '毕业时间',
  99. dataIndex: 'stu_graduate_date',
  100. xtype: 'datecolumn',
  101. format: 'Y-m-d'
  102. }, {
  103. text: '备注',
  104. dataIndex: 'stu_remarks'
  105. }]
  106. }, {
  107. name: "detail1",
  108. xtype: "detailGridField",
  109. idColumn: 'teacher_clazz_id',
  110. detnoColumn: 'no',
  111. storeModel: 'school.model.basic.Subject',
  112. deleteDetailUrl: '/api/school/class/deleteDetail',
  113. allowEmpty: true,
  114. showCount: false,
  115. group: '学科信息',
  116. columns: [{
  117. text: 'id',
  118. dataIndex: 'teacher_clazz_id',
  119. hidden: true
  120. }, {
  121. text: '学科id',
  122. dataIndex: 'subject_id',
  123. editor: {
  124. xtype: 'textfield'
  125. }
  126. }, {
  127. text: '学科',
  128. dataIndex: 'subject_name',
  129. xtype: 'subjectcolumn'
  130. }, {
  131. text: '任课教师id',
  132. dataIndex: 'teacher_id',
  133. editor: {
  134. xtype: 'textfield'
  135. }
  136. }, {
  137. text: '任课教师',
  138. dataIndex: 'teacher_name',
  139. editor: {
  140. xtype: 'textfield'
  141. }
  142. }]
  143. }]
  144. });
  145. this.callParent();
  146. },
  147. });