QueryPanel.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. Ext.define('saas.view.sale.saleout.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-saleout-querypanel',
  4. controller: 'sale-saleout-querypanel',
  5. viewModel: 'sale-saleout-querypanel',
  6. viewName: 'sale-saleout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'pi_id',
  10. fieldLabel: 'ID',
  11. columnWidth: 0
  12. }, {
  13. xtype: 'textfield',
  14. name: 'pi_inoutno',
  15. fieldLabel: '单据编号'
  16. }, {
  17. xtype: 'condatefield',
  18. name: 'pi_recorddate',
  19. fieldLabel: '单据日期',
  20. allowBlank: true,
  21. columnWidth: 0.5
  22. }, {
  23. xtype: 'hidden',
  24. name: 'pi_custcode',
  25. fieldLabel: '客户编号'
  26. }, {
  27. xtype: 'dbfindtrigger',
  28. name: 'pi_custname',
  29. fieldLabel: '客户名称'
  30. }, {
  31. xtype: 'hidden',
  32. name: 'pd_prodcode',
  33. fieldLabel: '物料编号',
  34. showDetail: true
  35. }, {
  36. xtype: 'dbfindtrigger',
  37. name: 'pr_detail',
  38. fieldLabel: '物料名称',
  39. showDetail: true
  40. }, {
  41. xtype: 'combobox',
  42. name: 'pi_statuscode',
  43. fieldLabel: '审核状态',
  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-saleout-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_recorddate',
  91. xtype:'datecolumn',
  92. width: 200
  93. },{
  94. text: '销售单号',
  95. dataIndex: 'pi_sacode',
  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: 'pi_id',
  116. width: 100,
  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_recorddate',
  129. xtype:'datecolumn',
  130. width: 200
  131. } ,{
  132. text: '客户名称',
  133. dataIndex: 'pi_custname',
  134. width: 120
  135. }, {
  136. text: '明细序号',
  137. dataIndex: 'pd_detno',
  138. xtype: 'numbercolumn',
  139. width: 120
  140. }, {
  141. text: '销售单号',
  142. dataIndex: 'pd_ordercode',
  143. width: 120
  144. }, {
  145. text: '订单序号',
  146. dataIndex: 'pd_orderdetno',
  147. xtype:'numbercolumn',
  148. width: 120
  149. }, {
  150. text: '物料编号',
  151. dataIndex: 'pd_prodcode',
  152. width: 120
  153. }, {
  154. text: '出货数量',
  155. dataIndex: 'pd_outqty',
  156. xtype:'numbercolumn',
  157. width: 120
  158. }, {
  159. text: '销售单价',
  160. dataIndex: 'pd_sendprice',
  161. xtype:'numbercolumn',
  162. width: 120
  163. }, {
  164. text: '金额',
  165. dataIndex: 'pd_total',
  166. xtype:'numbercolumn',
  167. width: 120
  168. }, {
  169. text: '税率',
  170. dataIndex: 'pd_taxrate',
  171. xtype:'numbercolumn',
  172. width: 120
  173. }, {
  174. text: '成本单价',
  175. dataIndex: 'pd_price',
  176. xtype:'numbercolumn',
  177. width: 120,
  178. flex: 1
  179. }]
  180. }
  181. });