ClassDetail.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. }, {
  30. // xtype: 'textfield',
  31. // name: 'code',
  32. // fieldLabel: '班级代码',
  33. // }, {
  34. xtype: 'textfield',
  35. name: 'clazz_grade',
  36. fieldLabel: '所属年级',
  37. columnWidth: 0.5,
  38. group: '班级信息',
  39. }, {
  40. xtype: "textfield",
  41. name: "clazz_adress",
  42. fieldLabel: "班级地址",
  43. columnWidth: 1,
  44. group: '班级信息',
  45. }, {
  46. xtype: "textfield",
  47. name: 'clazz_status',
  48. fieldLabel: "状态",
  49. columnWidth: 0.5,
  50. group: '班级信息',
  51. }, {
  52. xtype: "textfield",
  53. name: 'clazz_remarks',
  54. fieldLabel: '备注',
  55. columnWidth: 0.5,
  56. group: '班级信息',
  57. }, {
  58. name: "detail0",
  59. xtype: "detailGridField",
  60. detnoColumn: 'sd_detno',
  61. storeModel: 'school.model.basic.Student',
  62. allowEmpty: true,
  63. showCount: false,
  64. readOnly: true,
  65. group: '学生信息',
  66. columns: [{
  67. text: 'id',
  68. dataIndex: 'stu_id',
  69. hidden: true
  70. }, {
  71. text: '编号',
  72. dataIndex: 'stu_number'
  73. }, {
  74. text: '姓名',
  75. dataIndex: 'stu_name'
  76. }, {
  77. text: '性别',
  78. dataIndex: 'stu_sex'
  79. }, {
  80. text: '出生日期',
  81. dataIndex: 'stu_birthday',
  82. xtype: 'datecolumn',
  83. format: 'Y-m-d'
  84. }, {
  85. text: '年龄',
  86. dataIndex: 'stu_age'
  87. }, {
  88. text: '家庭住址',
  89. dataIndex: 'stu_address'
  90. }, {
  91. text: '入学时间',
  92. dataIndex: 'stu_enroll_date',
  93. xtype: 'datecolumn',
  94. format: 'Y-m-d'
  95. }, {
  96. text: '毕业时间',
  97. dataIndex: 'stu_graduate_date',
  98. xtype: 'datecolumn',
  99. format: 'Y-m-d'
  100. }, {
  101. text: '备注',
  102. dataIndex: 'stu_remarks'
  103. }]
  104. }, {
  105. name: "detail1",
  106. xtype: "detailGridField",
  107. idColumn: 'teacher_clazz_id',
  108. detnoColumn: 'no',
  109. storeModel: 'school.model.basic.Subject',
  110. deleteDetailUrl: '/api/school/class/deleteDetail',
  111. allowEmpty: true,
  112. showCount: false,
  113. group: '学科信息',
  114. columns: [{
  115. text: 'id',
  116. dataIndex: 'teacher_clazz_id',
  117. hidden: true
  118. }, {
  119. text: '学科id',
  120. dataIndex: 'subject_id',
  121. editor: {
  122. xtype: 'textfield'
  123. }
  124. }, {
  125. text: '学科',
  126. dataIndex: 'subject_name',
  127. xtype: 'subjectcolumn'
  128. }, {
  129. text: '任课教师id',
  130. dataIndex: 'teacher_id',
  131. editor: {
  132. xtype: 'textfield'
  133. }
  134. }, {
  135. text: '任课教师',
  136. dataIndex: 'teacher_name',
  137. editor: {
  138. xtype: 'textfield'
  139. }
  140. }]
  141. }]
  142. });
  143. this.callParent();
  144. },
  145. });