FormPanel.js 3.1 KB

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