QueryPanel.js 5.2 KB

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