Sale.js 5.4 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. }, {
  105. text: '销售数量',
  106. dataIndex: 'sd_qty',
  107. exportFormat: 'Quantity',
  108. xtype: 'numbercolumn',
  109. width: 110,
  110. renderer : function(v, m, r) {
  111. return saas.util.BaseUtil.numberFormat(v, 3, false);
  112. }
  113. }, {
  114. text: '单位',
  115. dataIndex: 'pr_unit',
  116. width: 65
  117. }, {
  118. text: '单价(元)',
  119. dataIndex: 'sd_netprice',
  120. exportFormat: 'Price',
  121. xtype: 'numbercolumn',
  122. width: 120,
  123. renderer : function(v, m, r) {
  124. return saas.util.BaseUtil.numberFormat(v, 4, true);
  125. }
  126. }, {
  127. text: '含税单价(元)',
  128. dataIndex: 'sd_price',
  129. exportFormat: 'Price',
  130. xtype: 'numbercolumn',
  131. width: 120,
  132. renderer : function(v, m, r) {
  133. return saas.util.BaseUtil.numberFormat(v, 4, true);
  134. }
  135. }, {
  136. text: '金额(元)',
  137. xtype: 'numbercolumn',
  138. exportFormat: 'Amount',
  139. width: 120,
  140. dataIndex: 'sd_nettotal',
  141. renderer : function(v, m, r) {
  142. return saas.util.BaseUtil.numberFormat(v, 2, true);
  143. },
  144. summaryType: 'sum',
  145. summaryLabel: '金额',
  146. summaryRenderer: function(v) {
  147. return saas.util.BaseUtil.numberFormat(v, 2, true);
  148. }
  149. }, {
  150. text: '税率(%)',
  151. dataIndex: 'sd_taxrate',
  152. exportFormat: 'Integer',
  153. width: 80,
  154. xtype: 'numbercolumn',
  155. renderer: function(v, m, r) {
  156. return saas.util.BaseUtil.numberFormat(v, 2, false);
  157. },
  158. }, {
  159. text: '税额(元)',
  160. xtype: 'numbercolumn',
  161. exportFormat: 'Amount',
  162. dataIndex: 'sd_total - sd_nettotal',
  163. width: 120,
  164. renderer : function(v, m, r) {
  165. return saas.util.BaseUtil.numberFormat(v, 2, true);
  166. },
  167. summaryType: 'sum',
  168. summaryLabel: '税额',
  169. summaryRenderer: function(v) {
  170. return saas.util.BaseUtil.numberFormat(v, 2, true);
  171. }
  172. }, {
  173. text: '价税合计(元)',
  174. xtype: 'numbercolumn',
  175. exportFormat: 'Amount',
  176. dataIndex: 'sd_total',
  177. width: 120,
  178. renderer : function(v, m, r) {
  179. return saas.util.BaseUtil.numberFormat(v, 2, true);
  180. },
  181. summaryType: 'sum',
  182. summaryLabel: '价税合计',
  183. summaryRenderer: function(v) {
  184. return saas.util.BaseUtil.numberFormat(v, 2, true);
  185. }
  186. }, {
  187. text: '币别',
  188. dataIndex: 'sa_currency',
  189. align:'center',
  190. width: 65
  191. }, {
  192. text: '汇率',
  193. xtype: 'numbercolumn',
  194. dataIndex: 'sa_rate',
  195. width: 80
  196. }, {
  197. text : "备注",
  198. dataIndex : "sd_remark",
  199. width : 250
  200. }]
  201. });