Sale.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. Ext.define('saas.view.sale.report.Sale', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'sale-report-sale',
  4. controller: 'sale-report-sale',
  5. viewModel: 'sale-report-sale',
  6. viewName: 'sale-report-sale',
  7. groupField: null,
  8. listUrl: '/api/sale/report/saleDetail',
  9. defaultCondition: null,
  10. reportTitle: '销售明细报表',
  11. QueryWidth:0.2,
  12. searchItems: [
  13. {
  14. xtype: 'customerDbfindTrigger',
  15. name: 'sa_custname',
  16. fieldLabel: '客户名称',
  17. columnWidth: 0.2
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'sa_date',
  21. fieldLabel: '单据日期',
  22. columnWidth: 0.4
  23. }, {
  24. xtype: 'multicombo',
  25. name: 'sa_sendstatuscode',
  26. fieldLabel: '业务状态',
  27. allowBlank: true,
  28. columnWidth: 0.2,
  29. datas: [
  30. ["TURNOUT", "已出库"],
  31. ["UNTURNOUT", "未出库"],
  32. ["PARTOUT", "部分出库"],
  33. ["CLOSE", "已关闭"]
  34. ]
  35. }],
  36. reportModel: 'saas.model.report.Sale',
  37. reportColumns: [
  38. {
  39. text: 'id',
  40. dataIndex: 'sa_id',
  41. hidden: true
  42. }, {
  43. text: '销售单号',
  44. dataIndex: 'sa_code',
  45. width: 150
  46. }, {
  47. text: '客户名称',
  48. dataIndex: 'sa_custname',
  49. width: 200
  50. }, {
  51. text: '业务状态',
  52. align: 'center',
  53. dataIndex: 'sa_sendstatus',
  54. width: 80
  55. }, {
  56. text: '业务员',
  57. dataIndex: 'sa_seller',
  58. width: 80
  59. }, {
  60. text: '单据日期',
  61. xtype: 'datecolumn',
  62. dataIndex: 'sa_date',
  63. width: 110
  64. }, {
  65. text: '物料编号',
  66. width: 150,
  67. dataIndex: 'sd_prodcode'
  68. }, {
  69. text: '品牌',
  70. dataIndex: 'pr_brand',
  71. width: 100
  72. }, {
  73. text: '名称',
  74. dataIndex: 'pr_detail',
  75. width: 150
  76. }, {
  77. text: '型号',
  78. dataIndex: 'pr_orispeccode',
  79. width: 200
  80. }, {
  81. text: '规格',
  82. dataIndex: 'pr_spec',
  83. width: 200
  84. }, {
  85. text: '销售数量',
  86. dataIndex: 'sd_qty',
  87. exportFormat: 'Quantity',
  88. xtype: 'numbercolumn',
  89. width: 110,
  90. renderer : function(v) {
  91. return saas.util.BaseUtil.numberFormat(v, 3, true);
  92. }
  93. }, {
  94. text: '单位',
  95. dataIndex: 'pr_unit',
  96. width: 65
  97. }, {
  98. text: '单价(元)',
  99. dataIndex: 'sd_netprice',
  100. exportFormat: 'Price',
  101. xtype: 'numbercolumn',
  102. width: 120,
  103. renderer : function(v) {
  104. return saas.util.BaseUtil.numberFormat(v, 4, true);
  105. }
  106. }, {
  107. text: '含税单价(元)',
  108. dataIndex: 'sd_price',
  109. exportFormat: 'Price',
  110. xtype: 'numbercolumn',
  111. width: 120,
  112. renderer : function(v) {
  113. return saas.util.BaseUtil.numberFormat(v, 4, true);
  114. }
  115. }, {
  116. text: '金额(元)',
  117. xtype: 'numbercolumn',
  118. exportFormat: 'Amount',
  119. width: 120,
  120. dataIndex: 'sd_nettotal',
  121. renderer : function(v) {
  122. return saas.util.BaseUtil.numberFormat(v, 2, true);
  123. },
  124. summaryType: 'sum',
  125. summaryLabel: '金额',
  126. summaryRenderer: function(v) {
  127. return saas.util.BaseUtil.numberFormat(v, 2, true);
  128. }
  129. }, {
  130. text: '税率(%)',
  131. dataIndex: 'sd_taxrate',
  132. exportFormat: 'Integer',
  133. width: 80,
  134. xtype: 'numbercolumn',
  135. renderer : function(v) {
  136. return Ext.util.Format.number(v, '0');
  137. }
  138. }, {
  139. text: '税额(元)',
  140. xtype: 'numbercolumn',
  141. exportFormat: 'Amount',
  142. dataIndex: 'sd_total - sd_nettotal',
  143. width: 120,
  144. renderer : function(v) {
  145. return saas.util.BaseUtil.numberFormat(v, 2, true);
  146. },
  147. summaryType: 'sum',
  148. summaryLabel: '税额',
  149. summaryRenderer: function(v) {
  150. return saas.util.BaseUtil.numberFormat(v, 2, true);
  151. }
  152. }, {
  153. text: '价税合计(元)',
  154. xtype: 'numbercolumn',
  155. exportFormat: 'Amount',
  156. dataIndex: 'sd_total',
  157. width: 120,
  158. renderer : function(v) {
  159. return saas.util.BaseUtil.numberFormat(v, 2, true);
  160. },
  161. summaryType: 'sum',
  162. summaryLabel: '价税合计',
  163. summaryRenderer: function(v) {
  164. return saas.util.BaseUtil.numberFormat(v, 2, true);
  165. }
  166. }, {
  167. text: '出货数量',
  168. dataIndex: 'sd_pdsendqty',
  169. exportFormat: 'Quantity',
  170. xtype: 'numbercolumn',
  171. width: 110,
  172. renderer : function(v) {
  173. return saas.util.BaseUtil.numberFormat(v, 3, true);
  174. }
  175. }, {
  176. text : "备注",
  177. dataIndex : "sd_remark",
  178. width : 250
  179. }]
  180. });