FormPanel.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Ext.define('saas.view.document.employee.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'document-employee-formpanel',
  4. controller: 'document-employee-formpanel',
  5. viewModel: 'document-employee-formpanel',
  6. caller:'Employee',
  7. //字段属性
  8. _title:'物料资料',
  9. _idField: 'id',
  10. _codeField: 'em_code',
  11. _readUrl:'/api/document/employee/read/',
  12. _saveUrl:'/api/document/employee/save',
  13. _deleteUrl:'/api/document/employee/delete/',
  14. _deleteMsg:'删除的人员资料将不能恢复,请确认是否删除?',
  15. initId:0,
  16. codeInHeader: false,
  17. defaultItems: [{
  18. xtype: 'hidden',
  19. name: 'id',
  20. fieldLabel: 'id',
  21. allowBlank: true,
  22. columnWidth: 0.25
  23. },{
  24. xtype: 'textfield',
  25. name: 'em_code',
  26. fieldLabel: '账号',
  27. allowBlank: false,
  28. columnWidth: 0.25
  29. },{
  30. xtype: 'textfield',
  31. name: 'em_name',
  32. fieldLabel: '姓名',
  33. allowBlank: false,
  34. columnWidth: 0.25
  35. },{
  36. xtype: 'textfield',
  37. name: 'em_password',
  38. fieldLabel: '密码',
  39. allowBlank: false,
  40. columnWidth: 0.25
  41. },{
  42. xtype: 'combobox',
  43. name: 'em_class',
  44. columnWidth: 0.25,
  45. fieldLabel: '类型',
  46. queryMode: 'local',
  47. displayField: 'name',
  48. valueField: 'value',
  49. editable:false,
  50. store: Ext.create('Ext.data.ArrayStore', {
  51. fields: ['name', 'value'],
  52. data: [
  53. ["正式", "正式"],
  54. ["离职", "离职"],
  55. ]
  56. })
  57. },{
  58. xtype: 'textfield',
  59. name: 'em_mobile',
  60. fieldLabel: '电话',
  61. allowBlank: false,
  62. columnWidth: 0.25
  63. },{
  64. xtype: 'textfield',
  65. name: 'em_email',
  66. fieldLabel: '邮箱',
  67. // allowBlank: false,
  68. columnWidth: 0.25
  69. }],
  70. auditTexts: {
  71. }
  72. });