QueryPanel.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. Ext.define('saas.view.sale.saleIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-salein-querypanel',
  4. controller: 'sale-salein-querypanel',
  5. viewModel: 'sale-salein-querypanel',
  6. viewName: 'sale-salein-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'id',
  10. fieldLabel: 'ID'
  11. }, {
  12. xtype: 'textfield',
  13. name: 'pi_inoutno',
  14. fieldLabel: '单据编号'
  15. }, {
  16. xtype: 'condatefield',
  17. name: 'pi_date',
  18. fieldLabel: '单据日期',
  19. columnWidth: 0.5
  20. }, {
  21. xtype: 'hidden',
  22. name: 'pi_custcode',
  23. fieldLabel: '客户编号'
  24. }, {
  25. xtype: 'textfield',
  26. name: 'pi_custname',
  27. fieldLabel: '客户名称'
  28. }, {
  29. xtype: 'dbfindtrigger',
  30. name: 'pd_prodcode',
  31. fieldLabel: '物料编号'
  32. }, {
  33. xtype: 'textfield',
  34. name: 'pr_detail',
  35. fieldLabel: '物料名称'
  36. }, {
  37. xtype: 'combobox',
  38. name: 'pi_statuscode',
  39. fieldLabel: '审核状态',
  40. allowBlank: true,
  41. columnWidth: 0.25,
  42. queryMode: 'local',
  43. displayField: 'pi_status',
  44. valueField: 'pi_statuscode',
  45. store: Ext.create('Ext.data.ArrayStore', {
  46. fields: ['pi_statuscode', 'pi_status'],
  47. data: [
  48. ["ALL", "全部"],
  49. ["AUDITED", "已审核"],
  50. ["UNAUDITED", "未审核"]
  51. ]
  52. }),
  53. getCondition: function(value) {
  54. if(value == 'ALL') {
  55. return '1=1';
  56. }else {
  57. return 'pi_statuscode=\'' + value + '\'';
  58. }
  59. }
  60. }],
  61. moreQueryFormItems: [],
  62. queryGridConfig: {
  63. idField:'id',
  64. codeField:'pi_inoutno',
  65. addTitle:'销售退货单',
  66. addXtype:'sale-salein-formpanel',
  67. defaultCondition:' pi_class = \'销售退货单\'',
  68. baseVastUrl: '/api/sale/prodinout/',
  69. baseColumn: [{
  70. text: 'id',
  71. dataIndex: 'id',
  72. width: 0,
  73. xtype: 'numbercolumn'
  74. }, {
  75. text: '单据编号',
  76. dataIndex: 'pi_inoutno',
  77. width: 120
  78. }, {
  79. text: '单据状态',
  80. dataIndex: 'pi_status',
  81. width: 120
  82. }, {
  83. text: '单据类型',
  84. dataIndex: 'pi_class',
  85. width: 120
  86. }, {
  87. text: '下单日期',
  88. dataIndex: 'pi_date',
  89. xtype:'datecolumn',
  90. width: 200
  91. },{
  92. text: '销售单号',
  93. dataIndex: 'pi_pucode',
  94. width: 200
  95. },{
  96. text: '客户名称',
  97. dataIndex: 'pi_custname',
  98. width: 120
  99. },{
  100. text: '含税金额',
  101. dataIndex: 'pi_total',
  102. xtype:'numbercolumn',
  103. width: 120
  104. },{
  105. text: '不含税金额',
  106. dataIndex: 'pi_nettotal',
  107. xtype:'numbercolumn',
  108. width: 120,
  109. flex: 1
  110. }],
  111. relativeColumn: [{
  112. text: 'id',
  113. dataIndex: 'pu_id',
  114. width: 0,
  115. xtype: 'numbercolumn'
  116. }, {
  117. text: '单据编号',
  118. dataIndex: 'pd_inoutno',
  119. width: 120
  120. }, {
  121. text: '单据状态',
  122. dataIndex: 'pi_status',
  123. width: 120
  124. }, {
  125. text: '单据日期',
  126. dataIndex: 'pi_date',
  127. xtype:'datecolumn',
  128. width: 200
  129. },{
  130. text: '客户名称',
  131. dataIndex: 'pi_custname',
  132. width: 120
  133. },{
  134. text: '销售单号',
  135. dataIndex: 'pd_ordercode',
  136. width: 120
  137. },{
  138. text: '销售序号',
  139. dataIndex: 'pd_orderdetno',
  140. xtype:'numbercolumn',
  141. width: 120
  142. },{
  143. text: '物料编号',
  144. dataIndex: 'pd_prodcode',
  145. width: 120
  146. },{
  147. text: '验收数量',
  148. dataIndex: 'pd_inqty',
  149. xtype:'numbercolumn',
  150. width: 120
  151. },{
  152. text: '销售单价',
  153. dataIndex: 'pd_sendprice',
  154. xtype:'numbercolumn',
  155. width: 120
  156. },{
  157. text: '金额',
  158. dataIndex: 'pd_total',
  159. xtype:'numbercolumn',
  160. width: 120
  161. },{
  162. text: '税率',
  163. dataIndex: 'pd_taxrate',
  164. xtype:'numbercolumn',
  165. width: 120
  166. },{
  167. text: '成本单价',
  168. dataIndex: 'pd_price',
  169. xtype:'numbercolumn',
  170. width: 120,
  171. flex: 1
  172. }]
  173. }
  174. });