FormPanel.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. width : 0,
  62. xtype : "numbercolumn"
  63. },
  64. {
  65. text : "关联ID",
  66. dataIndex : "bd_bomid",
  67. width : 120,
  68. xtype : "numbercolumn"
  69. },
  70. {
  71. text : "子件编号",
  72. editor : {
  73. xtype : "textfield"
  74. },
  75. dataIndex : "bd_soncode",
  76. width : 120.0
  77. },
  78. {
  79. text : "单位",
  80. editor : {
  81. xtype : "textfield"
  82. },
  83. dataIndex : "bd_unit",
  84. width : 120.0
  85. },
  86. {
  87. text : "单位用量",
  88. editor : {
  89. xtype : "textfield"
  90. },
  91. dataIndex : "bd_baseqty",
  92. width : 120.0
  93. },
  94. {
  95. text : "替代料",
  96. editor : {
  97. xtype : "textfield"
  98. },
  99. dataIndex : "bd_replace",
  100. width : 120.0
  101. }]
  102. }],
  103. auditTexts: {
  104. auditCode: 'OPEN',
  105. auditText: '已开启',
  106. unAuditCode: 'CLOSE',
  107. unAuditText: '已关闭',
  108. auditBtnText: '启用',
  109. unAuditBtnText: '禁用',
  110. },
  111. });