Recment.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /**
  2. * 待收款
  3. */
  4. Ext.define('saas.view.home.infoCardList.Recment', {
  5. extend: 'saas.view.home.infoCardList.InfoList',
  6. xtype: 'home-infocardlist-recment',
  7. listUrl: '/api/sale/prodinout/homepageList/',
  8. idField: 'id',
  9. codeField: 'pi_inoutno',
  10. // detailTitle: '出货单',
  11. // detailXType: 'sale-saleout-formpanel',
  12. condition: 'pi_class in (\'出货单\',\'销售退货单\') and prodinout.companyId=#{companyId} and (TO_DAYS(pi_date) + ifnull(cu_promisedays,0) - TO_DAYS(now())) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=#{companyId} and ifnull(sl_namount,0)<>0)',
  13. listColumns: [{
  14. text: 'id',
  15. dataIndex: 'id',
  16. hidden:true,
  17. xtype: 'numbercolumn'
  18. }, {
  19. text: '出货单号',
  20. dataIndex: 'pi_inoutno',
  21. width: 150
  22. }, {
  23. text: '单据日期',
  24. dataIndex: 'pi_date',
  25. xtype:'datecolumn',
  26. width: 110
  27. },{
  28. text: '客户名称',
  29. dataIndex: 'pi_custname',
  30. width: 200
  31. }, {
  32. text: '单据状态',
  33. align: 'center',
  34. dataIndex: 'pi_status',
  35. width: 90
  36. },{
  37. text: '关联单号',
  38. dataIndex: 'pi_sacode',
  39. width: 150
  40. },{
  41. text: '总金额(元)',
  42. dataIndex: 'pi_total',
  43. xtype:'numbercolumn',
  44. width: 110,
  45. renderer : function(v) {
  46. return saas.util.BaseUtil.numberFormat(v, 2, true);
  47. },
  48. },{
  49. text: '收款状态',
  50. align: 'center',
  51. dataIndex: 'pi_prstatus',
  52. width: 90
  53. }, {
  54. text: '备注',
  55. dataIndex: 'pi_remark',
  56. width: 250
  57. },{
  58. text: '明细序号',
  59. dataIndex: 'pd_pdno',
  60. xtype: 'numbercolumn',
  61. width: 100,
  62. hidden:true,
  63. renderer : function(v) {
  64. var format = '0'
  65. return Ext.util.Format.number(v, format);
  66. }
  67. }, {
  68. text: '关联销售单号',
  69. dataIndex: 'pd_ordercode',
  70. width: 150,
  71. hidden:true
  72. }, {
  73. text: '订单序号',
  74. dataIndex: 'pd_orderdetno',
  75. xtype:'numbercolumn',
  76. width: 100,
  77. hidden:true,
  78. renderer : function(v) {
  79. if (v == 0) {
  80. v= '';
  81. }
  82. var format = '0'
  83. return Ext.util.Format.number(v, format);
  84. }
  85. }, {
  86. text: '物料编号',
  87. dataIndex: 'pd_prodcode',
  88. hidden:true,
  89. width: 150
  90. }, {
  91. text: '物料名称',
  92. dataIndex: 'pr_detail',
  93. hidden:true,
  94. width: 150
  95. }, {
  96. text: '出货数量',
  97. // dataIndex: 'pd_outqty',
  98. dataIndex: 'qty',
  99. xtype:'numbercolumn',
  100. width: 110,
  101. hidden:true,
  102. renderer : function(v) {
  103. return saas.util.BaseUtil.numberFormat(v, 3, false);
  104. }
  105. }, {
  106. text: '销售单价(元)',
  107. dataIndex: 'pd_sendprice',
  108. xtype:'numbercolumn',
  109. hidden:true,
  110. width: 140,
  111. renderer : function(v) {
  112. return saas.util.BaseUtil.numberFormat(v, 4, true);
  113. }
  114. }, {
  115. text: '金额(元)',
  116. dataIndex: 'pd_ordertotal',
  117. xtype:'numbercolumn',
  118. width: 110,
  119. hidden:true,
  120. renderer : function(v) {
  121. return saas.util.BaseUtil.numberFormat(v, 2, true);
  122. }
  123. }, {
  124. text: '税率',
  125. dataIndex: 'pd_taxrate',
  126. xtype:'numbercolumn',
  127. width: 80,
  128. hidden:true,
  129. renderer : function(v) {
  130. return saas.util.BaseUtil.numberFormat(v, 2, false);
  131. }
  132. }, {
  133. text: '成本单价(元)',
  134. dataIndex: 'pd_price',
  135. xtype:'numbercolumn',
  136. width: 140,
  137. hidden:true,
  138. renderer : function(v) {
  139. return saas.util.BaseUtil.numberFormat(v, 4, true);
  140. }
  141. }, {
  142. text: '备注',
  143. dataIndex: 'pd_remark',
  144. hidden:true,
  145. width: 250
  146. }],
  147. listeners: {
  148. beforeopendetail: function(grid, record) {
  149. var pi_class = record.get('pi_class'),
  150. detailTitle = '出货单',
  151. detailXType = 'sale-saleout-formpanel';
  152. if(pi_class == '销售退货单') {
  153. detailTitle = '销售退货单';
  154. detailXType = 'sale-salein-formpanel';
  155. }
  156. grid.detailTitle = detailTitle;
  157. grid.detailXType = detailXType;
  158. return true;
  159. }
  160. }
  161. });