Sale.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. hidden:true,
  141. dataIndex: 'sd_nettotal',
  142. renderer : function(v, m, r) {
  143. return saas.util.BaseUtil.numberFormat(v, 2, true);
  144. }
  145. }, {
  146. text: '金额(元)',
  147. xtype: 'numbercolumn',
  148. exportFormat: 'Amount',
  149. width: 120,
  150. dataIndex: 'sd_nettotal*sa_rate',
  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. hidden:true,
  189. renderer : function(v, m, r) {
  190. return saas.util.BaseUtil.numberFormat(v, 2, true);
  191. }
  192. }, {
  193. text: '价税合计(元)',
  194. xtype: 'numbercolumn',
  195. exportFormat: 'Amount',
  196. dataIndex: 'sd_total*sa_rate',
  197. width: 120,
  198. renderer : function(v, m, r) {
  199. return saas.util.BaseUtil.numberFormat(v, 2, true);
  200. },
  201. summaryType: 'sum',
  202. summaryLabel: '价税合计(本位币)',
  203. summaryRenderer: function(v) {
  204. return saas.util.BaseUtil.numberFormat(v, 2, true);
  205. }
  206. }, {
  207. text: '币别',
  208. dataIndex: 'sa_currency',
  209. align:'center',
  210. width: 65
  211. }, {
  212. text: '汇率',
  213. xtype: 'numbercolumn',
  214. dataIndex: 'sa_rate',
  215. width: 80,
  216. renderer: function(v, m, r) {
  217. return saas.util.BaseUtil.numberFormat(v, 6, true);
  218. }
  219. }, {
  220. text : "备注",
  221. dataIndex : "sd_remark",
  222. width : 250
  223. }]
  224. });