Sale.js 5.5 KB

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