BasePanel.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Ext.define('saas.view.document.product.BasePanel', {
  2. extend: 'saas.view.core.base.BasePanel',
  3. xtype: 'document-product-basepanel',
  4. controller: 'document-product-basepanel',
  5. viewModel: 'document-product-basepanel',
  6. searchField:[{
  7. xtype : "remotecombo",
  8. storeUrl: basePath + 'document/producttype/getCombo',
  9. name : "pr_type",
  10. emptyText : "请选择物料类型",
  11. allowBlank : true,
  12. queryMode: 'local',
  13. displayField: 'display',
  14. valueField: 'value',
  15. columnWidth : 0.25,
  16. etc:{
  17. producttype:{
  18. keyField:'id',
  19. dataField:'pr_name',
  20. reqUrl:basePath + 'document/producttype/save',
  21. delUrl:basePath + 'document/producttype/delete'
  22. }
  23. },
  24. addHandler:function(b){
  25. var form = this.ownerCmp.ownerCt.ownerCt;
  26. this.dialog = form.getController().getView().add({
  27. xtype: 'document-kind-childwin',
  28. bind: {
  29. title: '新增物料类型'
  30. },
  31. dataKind:'producttype',
  32. belong:this.ownerCmp.etc['producttype'],
  33. _parent:form,
  34. record:null,
  35. session: true
  36. });
  37. this.dialog.show();
  38. }
  39. }],
  40. //字段属性
  41. _formXtype:'document-product-formpanel',
  42. _title:'物料资料',
  43. // _dataUrl:'http://192.168.253.31:9480/product/list',
  44. _batchOpenUrl:basePath + 'document/product/batchOpen',
  45. _batchCloseUrl:basePath + 'document/product/batchClose',
  46. _batchDeleteUrl:basePath + 'document/product/batchDelete',
  47. gridConfig: {
  48. idField: 'id',
  49. codeField: 'pr_code',
  50. dataUrl: basePath + 'document/product/list',
  51. columns : [{
  52. text : "id",
  53. width : 0,
  54. dataIndex : "id",
  55. xtype : "numbercolumn",
  56. },{
  57. text : "物料编号",
  58. width : 200.0,
  59. dataIndex : "pr_code",
  60. xtype : "",
  61. },
  62. {
  63. text : "物料名称",
  64. dataIndex : "pr_detail",
  65. width : 120.0,
  66. xtype : "",
  67. },
  68. {
  69. text : "状态",
  70. dataIndex : "pr_status",
  71. width : 120.0,
  72. xtype : ""
  73. },
  74. {
  75. text : "物料种类",
  76. dataIndex : "pr_type",
  77. width : 120.0,
  78. xtype : "",
  79. }]
  80. },
  81. });