ClassDetail.js 4.5 KB

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