FormPanel.js 3.1 KB

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