StaffDetail.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Ext.define('school.view.basic.staff.StaffDetail', {
  2. extend: 'school.view.core.form.FormPanel',
  3. xtype: 'basic-staff-staffdetail',
  4. controller: 'basic-staff-staffdetail',
  5. //字段属性
  6. _title: '教职工信息',
  7. _idField: 'teacher_id',
  8. _codeField: 'teacher_number',
  9. _statusField: null,
  10. _statusCodeField: null,
  11. _auditmanField: null,
  12. _auditdateField: null,
  13. // _readUrl: 'http://10.1.80.90:9560/teacher/read',
  14. _readUrl: '/api/school/teacher/read',
  15. // _saveUrl: 'http://10.1.80.90:9560/teacher/save',
  16. _saveUrl: '/api/school/teacher/save',
  17. // _deleteUrl: 'http://10.1.80.90:9560/teacher/delete',
  18. _deleteUrl: '/api/school/teacher/delete',
  19. initId: 0,
  20. initComponent: function () {
  21. Ext.apply(this, {
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'teacher_id',
  25. fieldLabel: 'id',
  26. },{
  27. xtype: 'textfield',
  28. name: 'teacher_number',
  29. fieldLabel: '工号',
  30. allowBlank: false
  31. }, {
  32. xtype: 'textfield',
  33. name: 'teacher_cardNo',
  34. fieldLabel: '校园通卡号',
  35. allowBlank: false
  36. }, {
  37. xtype: 'textfield',
  38. name: 'teacher_name',
  39. fieldLabel: '姓名',
  40. allowBlank: false
  41. }, {
  42. xtype: 'gendercombo',
  43. name: 'teacher_sex',
  44. fieldLabel: '性别',
  45. allowBlank: false
  46. }, {
  47. xtype: 'textfield',
  48. name: 'teacher_phone',
  49. fieldLabel: '手机号',
  50. maxLength: 25,
  51. allowBlank: false
  52. }, {
  53. xtype: 'textfield',
  54. name: 'teacher_email',
  55. fieldLabel: '邮箱'
  56. }, {
  57. xtype: 'ethnicitycombobox',
  58. name: 'teacher_nation',
  59. fieldLabel: '民族',
  60. }, {
  61. xtype: "textfield",
  62. name: "teacher_native",
  63. fieldLabel: "籍贯"
  64. }, {
  65. xtype: 'datefield',
  66. name: 'teacher_birthday',
  67. fieldLabel: '出生日期',
  68. format: 'Y-m-d'
  69. }, {
  70. xtype: 'combobox',
  71. name: 'teacher_marriage',
  72. fieldLabel: '婚姻状态',
  73. displayField: 'name',
  74. valueField: 'value',
  75. editable: false,
  76. store: Ext.create('Ext.data.ArrayStore', {
  77. fields: ['name', 'value'],
  78. data: [['未婚', 0], ['已婚', 1]]
  79. }),
  80. minChars: 0,
  81. queryMode: 'local'
  82. }, {
  83. xtype: 'combobox',
  84. name: 'teacher_political',
  85. fieldLabel: '政治面貌',
  86. displayField: 'name',
  87. valueField: 'name',
  88. editable: true,
  89. store: Ext.create('Ext.data.ArrayStore', {
  90. fields: ['name'],
  91. data: [['中共党员'], ['中共预备党员'], ['共青团员'], ['群众']]
  92. }),
  93. minChars: 0,
  94. queryMode: 'local'
  95. }, {
  96. xtype: 'textfield',
  97. name: 'teacher_school',
  98. fieldLabel: '毕业学校'
  99. }, {
  100. xtype: 'combobox',
  101. name: 'teacher_education',
  102. fieldLabel: '学历',
  103. displayField: 'name',
  104. valueField: 'name',
  105. editable: true,
  106. store: Ext.create('Ext.data.ArrayStore', {
  107. fields: ['name'],
  108. data: [['博士后'], ['博士'], ['硕士'], ['研究生'], ['本科(统招)'], ['本科(成人高考)'], ['本科(专升本)'], ['大专'], ['高中'], ['职高'], ['初中'], ['小学']]
  109. }),
  110. minChars: 0,
  111. queryMode: 'local',
  112. allowBlank: false
  113. }, {
  114. xtype: 'textfield',
  115. name: 'teacher_major',
  116. fieldLabel: '专业',
  117. editable: true,
  118. allowBlank: false
  119. }, {
  120. xtype: 'textfield',
  121. name: 'teacher_address',
  122. fieldLabel: '现居住址',
  123. columnWidth: 0.5
  124. }, {
  125. name: "detailGridField",
  126. xtype: "detailGridField",
  127. idColumn: 'id',
  128. detnoColumn: 'sd_detno',
  129. storeModel: 'school.model.basic.staff.StaffDetail',
  130. deleteDetailUrl: '/api/sale/sale/deleteDetail',
  131. allowEmpty: true,
  132. showCount: false,
  133. readOnly: true,
  134. columns: [{
  135. text: '任课年级',
  136. dataIndex: 'grade',
  137. }, {
  138. text: '任课班级',
  139. dataIndex: 'classes'
  140. }, {
  141. text: '科目',
  142. dataIndex: 'subject'
  143. }]
  144. }]
  145. });
  146. this.callParent();
  147. },
  148. });