FormPanel.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Ext.define('saas.view.document.bom.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'document-bom-formpanel',
  4. controller: 'document-bom-formpanel',
  5. viewModel: 'document-bom-formpanel',
  6. caller:'Bom',
  7. //字段属性
  8. _title:'客户资料',
  9. _idField: 'id',
  10. _codeField: 'bo_mothercode',
  11. _statusField: 'bo_status',
  12. _statusCodeField: 'bo_statuscode',
  13. _readUrl:'/api/document/bom/read/',
  14. _saveUrl:'/api/document/bom/save',
  15. _openUrl:'/api/document/bom/open',
  16. _closeUrl:'/api/document/bom/close',
  17. _deleteUrl:'/api/document/bom/delete/',
  18. initId:0,
  19. defaultItems: [{
  20. xtype: 'hidden',
  21. name: 'id',
  22. fieldLabel: 'id',
  23. },{
  24. xtype: 'hidden',
  25. name: 'bo_motherid',
  26. fieldLabel: '母件id'
  27. },{
  28. xtype: 'textfield',
  29. name: 'bo_mothername',
  30. fieldLabel: 'BOM名称',
  31. allowBlank: false
  32. },{
  33. xtype: 'textfield',
  34. name: 'bo_mothercode',
  35. fieldLabel: 'BOM编号',
  36. allowBlank: true
  37. },{
  38. xtype: 'textfield',
  39. name: 'bo_status',
  40. fieldLabel: 'BOM状态'
  41. },{
  42. xtype: 'hidden',
  43. name: 'bo_statuscode',
  44. fieldLabel: '状态码'
  45. },{
  46. xtype : "datefield",
  47. name : "createTime",
  48. fieldLabel : "创建时间"
  49. },{
  50. xtype : "datefield",
  51. name : "updateTime",
  52. fieldLabel : "更新时间"
  53. }, {
  54. xtype : "detailGridField",
  55. storeModel:'saas.model.document.bomdetail',
  56. deleteDetailUrl:'/api/document/bom/deleteDetail/',
  57. columns : [
  58. {
  59. text : "ID",
  60. dataIndex : "id",
  61. hidden : true,
  62. xtype : "numbercolumn"
  63. },
  64. {
  65. text : "关联ID",
  66. dataIndex : "bd_bomid",
  67. hidden : true,
  68. xtype : "numbercolumn"
  69. },
  70. {
  71. text : "子件编号",
  72. editor : {
  73. xtype : "textfield"
  74. },
  75. dataIndex : "bd_soncode",
  76. },
  77. {
  78. text : "单位",
  79. editor : {
  80. xtype : "textfield"
  81. },
  82. dataIndex : "bd_unit",
  83. },
  84. {
  85. text : "单位用量",
  86. editor : {
  87. xtype : "textfield"
  88. },
  89. dataIndex : "bd_baseqty",
  90. },
  91. {
  92. text : "替代料",
  93. editor : {
  94. xtype : "textfield"
  95. },
  96. dataIndex : "bd_replace",
  97. }]
  98. }],
  99. auditTexts: {
  100. auditCode: 'OPEN',
  101. auditText: '已开启',
  102. unAuditCode: 'CLOSE',
  103. unAuditText: '已关闭',
  104. auditBtnText: '启用',
  105. unAuditBtnText: '禁用',
  106. },
  107. });