QueryPanel.js 4.7 KB

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