SchoolNotice.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * 学校通知
  3. */
  4. Ext.define('school.view.interaction.notice.SchoolNotice', {
  5. extend: 'school.view.core.form.FormPanel',
  6. xtype: 'interaction-notice-schoolnotice',
  7. // controller: 'purchase-purchase-formpanel',
  8. // viewModel: 'purchase-purchase-formpanel',
  9. //字段属性
  10. _title: '学校通知',
  11. _idField: 'id',
  12. _codeField: 'pu_code',
  13. _statusField: 'pu_status',
  14. _statusCodeField: 'pu_statuscode',
  15. _auditmanField: 'pu_auditman',
  16. _auditdateField: 'pu_auditdate',
  17. _relationColumn: 'pd_puid',
  18. _readUrl: '/api/purchase/purchase/read',
  19. _saveUrl: '/api/purchase/purchase/save',
  20. _auditUrl: '/api/purchase/purchase/audit',
  21. _unAuditUrl: '/api/purchase/purchase/unAudit',
  22. _deleteUrl: '/api/purchase/purchase/delete',
  23. _turnInUrl: '/api/purchase/purchase/turnProdin',
  24. initId: 0,
  25. initComponent: function () {
  26. Ext.apply(this, {
  27. defaultItems: [{
  28. xtype: 'hidden',
  29. name: 'id',
  30. fieldLabel: 'id'
  31. }, {
  32. xtype: "textfield",
  33. name: "Publisher",
  34. fieldLabel: "发布人",
  35. columnWidth: 0.5
  36. }, {
  37. xtype: 'textfield',
  38. name: 'time',
  39. fieldLabel: '发布时间',
  40. columnWidth: 0.5
  41. }, {
  42. xtype: 'combobox',
  43. name: 'Notifications',
  44. fieldLabel: '通知人',
  45. columnWidth: 0.5,
  46. queryMode: 'local',
  47. displayField: 'name',
  48. valueField: 'abbr',
  49. forceSelection: 'true',//阻止输入非列表内容
  50. store:Ext.create('Ext.data.Store', {
  51. fields: ['abbr', 'name'],
  52. data : [
  53. {"abbr":"AL", "name":"Alabama"},
  54. {"abbr":"AK", "name":"Alaska"},
  55. {"abbr":"AZ", "name":"Arizona"}
  56. ]
  57. })
  58. }, {
  59. xtype: "textfield",
  60. name: "title",
  61. fieldLabel: "标题",
  62. columnWidth: 1
  63. }, {
  64. xtype: "textareafield",//文本域
  65. name: 'content',
  66. fieldLabel: "内容",
  67. columnWidth: 1,
  68. }],
  69. toolBtns: [{
  70. xtype: 'button',
  71. text: '发布',
  72. }]
  73. });
  74. this.callParent();
  75. }
  76. });