QueryPanel.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. Ext.define('saas.view.stock.make.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-make-querypanel',
  4. controller: 'stock-make-querypanel',
  5. viewModel: 'stock-make-querypanel',
  6. viewName: 'stock-make-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'ma_code',
  10. emptyText :'请输入单号',
  11. }, {
  12. xtype: 'bomDbfindTrigger',
  13. name: 'ma_proddetail',
  14. emptyText :'请输入产品编号、名称或型号',
  15. margin:'0 0 0 20'
  16. }, {
  17. xtype: 'condatefield',
  18. name: 'createTime',
  19. fieldLabel: '日期',
  20. columnWidth: 0.5,
  21. operation: 'between'
  22. }, {
  23. xtype: 'combobox',
  24. name: 'ma_type',
  25. fieldLabel: '类型',
  26. allowBlank: true,
  27. editable:false,
  28. columnWidth: 0.25,
  29. emptyText :'全部',
  30. queryMode: 'local',
  31. displayField: 'name',
  32. valueField: 'value',
  33. store: Ext.create('Ext.data.ArrayStore', {
  34. fields: ['name', 'value'],
  35. data: [
  36. ["全部", "ALL"],
  37. ["组装", "组装"],
  38. ["拆件", "拆件"]
  39. ]
  40. }),
  41. getCondition: function(value) {
  42. if(value == 'ALL') {
  43. return '1=1';
  44. }else {
  45. return 'ma_type=\'' + value + '\'';
  46. }
  47. }
  48. }, {
  49. xtype: 'combobox',
  50. name: 'ma_statuscode',
  51. fieldLabel: '单据状态',
  52. queryMode: 'local',
  53. displayField: 'ma_status',
  54. valueField: 'ma_statuscode',
  55. emptyText :'全部',
  56. editable:false,
  57. store: Ext.create('Ext.data.ArrayStore', {
  58. fields: ['ma_statuscode', 'ma_status'],
  59. data: [
  60. ["ALL", "全部"],
  61. ["AUDITED", "已审核"],
  62. ["UNAUDITED", "未审核"]
  63. ]
  64. }),
  65. getCondition: function(value) {
  66. if(value == 'ALL') {
  67. return '1=1';
  68. }else {
  69. return 'ma_statuscode=\'' + value + '\'';
  70. }
  71. }
  72. }, {
  73. xtype: 'accountDbfindTrigger',
  74. name: 'creatorName',
  75. fieldLabel: '录入人',
  76. emptyText:'请输入账户名称或姓名',
  77. getCondition: function(value) {
  78. if(!value) {
  79. return '1=1';
  80. }else {
  81. return 'make.creatorName like\'%' + value + '%\'';
  82. }
  83. }
  84. }, {
  85. xtype: 'accountDbfindTrigger',
  86. name: 'ma_auditman',
  87. fieldLabel: '审核人',
  88. emptyText:'请输入账户名称或姓名'
  89. }],
  90. moreQueryFormItems: [],
  91. queryGridConfig: {
  92. idField: 'id',
  93. codeField: 'ma_code',
  94. addTitle: '制造单',
  95. addXtype: 'stock-make-formpanel',
  96. defaultCondition:'',
  97. baseVastUrl: '/api/storage/make/',
  98. caller:'Make',
  99. baseColumn: [{
  100. text: 'id',
  101. dataIndex: 'id',
  102. hidden:true,
  103. xtype: 'numbercolumn'
  104. }, {
  105. text: '制造单号',
  106. dataIndex: 'ma_code',
  107. width: 150
  108. }, {
  109. text: '类型',
  110. dataIndex: 'ma_type',
  111. width: 100
  112. }, {
  113. text: '产品编号',
  114. dataIndex: 'ma_prodcode',
  115. width: 150
  116. }, {
  117. text: '版本号',
  118. dataIndex: 'ma_version',
  119. width: 80
  120. }, {
  121. text: '产品名称',
  122. dataIndex: 'ma_proddetail',
  123. width: 150
  124. }, {
  125. text: '产品型号',
  126. dataIndex: 'ma_prodorispec',
  127. width: 200
  128. }, {
  129. text: '产品规格',
  130. dataIndex: 'ma_prodspec',
  131. width: 200
  132. }, {
  133. text: '数量',
  134. dataIndex: 'ma_qty',
  135. xtype: 'numbercolumn',
  136. width: 110,
  137. renderer : function(v) {
  138. return saas.util.BaseUtil.numberFormat(v, 3, false);
  139. },
  140. },{
  141. text: '单位',
  142. dataIndex: 'ma_produnit',
  143. width: 80,
  144. },{
  145. text: '审核状态',
  146. align: 'center',
  147. dataIndex: 'ma_status',
  148. width: 80,
  149. },{
  150. text: '单位成本',
  151. dataIndex: 'ma_total',
  152. xtype: 'numbercolumn',
  153. hidden: true,
  154. }],
  155. relativeColumn: []
  156. }
  157. });