Recment.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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: 250
  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. },{
  46. text: '收款状态',
  47. align: 'center',
  48. dataIndex: 'pi_prstatus',
  49. width: 90
  50. },{
  51. text: '录入人',
  52. dataIndex: 'creatorName',
  53. width :110
  54. },{
  55. text: '审核人',
  56. dataIndex: 'pi_auditman',
  57. width: 110
  58. }, {
  59. text: '备注',
  60. dataIndex: 'pi_remark',
  61. width: 250
  62. },{
  63. text: '明细序号',
  64. dataIndex: 'pd_pdno',
  65. xtype: 'numbercolumn',
  66. width: 100,
  67. hidden:true,
  68. renderer : function(v) {
  69. var format = '0'
  70. return Ext.util.Format.number(v, format);
  71. }
  72. }, {
  73. text: '关联销售单号',
  74. dataIndex: 'pd_ordercode',
  75. width: 150,
  76. hidden:true
  77. }, {
  78. text: '订单序号',
  79. dataIndex: 'pd_orderdetno',
  80. xtype:'numbercolumn',
  81. width: 100,
  82. hidden:true,
  83. renderer : function(v) {
  84. if (v == 0) {
  85. v= '';
  86. }
  87. var format = '0'
  88. return Ext.util.Format.number(v, format);
  89. }
  90. }, {
  91. text: '物料编号',
  92. dataIndex: 'pd_prodcode',
  93. hidden:true,
  94. width: 150
  95. }, {
  96. text: '物料名称',
  97. dataIndex: 'pr_detail',
  98. hidden:true,
  99. width: 150
  100. }, {
  101. text: '出货数量',
  102. // dataIndex: 'pd_outqty',
  103. dataIndex: 'qty',
  104. xtype:'numbercolumn',
  105. width: 110,
  106. hidden:true,
  107. renderer : function(v) {
  108. var arr = (v + '.').split('.');
  109. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  110. var format = '0.' + xr.join('');
  111. return Ext.util.Format.number(v, format);
  112. }
  113. }, {
  114. text: '销售单价(元)',
  115. dataIndex: 'pd_sendprice',
  116. xtype:'numbercolumn',
  117. hidden:true,
  118. width: 110,
  119. renderer : function(v) {
  120. var arr = (v + '.').split('.');
  121. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  122. var format = '0.' + xr.join('');
  123. return Ext.util.Format.number(v, format);
  124. }
  125. }, {
  126. text: '金额(元)',
  127. dataIndex: 'pd_ordertotal',
  128. xtype:'numbercolumn',
  129. width: 110,
  130. hidden:true,
  131. renderer : function(v) {
  132. var arr = (v + '.').split('.');
  133. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  134. var format = '0.' + xr.join('');
  135. return Ext.util.Format.number(v, format);
  136. }
  137. }, {
  138. text: '税率',
  139. dataIndex: 'pd_taxrate',
  140. xtype:'numbercolumn',
  141. width: 80,
  142. hidden:true,
  143. renderer : function(v) {
  144. return Ext.util.Format.number(v, '0');
  145. }
  146. }, {
  147. text: '成本单价(元)',
  148. dataIndex: 'pd_price',
  149. xtype:'numbercolumn',
  150. width: 110,
  151. hidden:true,
  152. renderer : function(v) {
  153. var arr = (v + '.').split('.');
  154. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  155. var format = '0.' + xr.join('');
  156. return Ext.util.Format.number(v, format);
  157. }
  158. }, {
  159. text: '备注',
  160. dataIndex: 'pd_remark',
  161. hidden:true,
  162. width: 250
  163. }],
  164. listeners: {
  165. beforeopendetail: function(grid, record) {
  166. var pi_class = record.get('pi_class'),
  167. detailTitle = '出货单',
  168. detailXType = 'sale-saleout-formpanel';
  169. if(pi_class == '销售退货单') {
  170. detailTitle = '销售退货单';
  171. detailXType = 'sale-salein-formpanel';
  172. }
  173. grid.detailTitle = detailTitle;
  174. grid.detailXType = detailXType;
  175. return true;
  176. }
  177. }
  178. });