UnauditSaleOut.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /**
  2. * 未审核出货
  3. */
  4. Ext.define('saas.view.home.infoCardList.UnauditSaleOut', {
  5. extend: 'saas.view.home.infoCardList.InfoList',
  6. xtype: 'home-infocardlist-unauditsaleout',
  7. listUrl: '/api/sale/prodinout/homepageList',
  8. idField: 'id',
  9. codeField: 'pi_inoutno',
  10. // detailTitle: '出货单',
  11. // detailXType: 'sale-saleout-formpanel',
  12. condition: 'pi_statuscode<>\'AUDITED\' and pi_class in (\'出货单\',\'销售退货单\') and prodinout.companyId=#{companyId}',
  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: 'pi_remark',
  53. width: 250
  54. },{
  55. text: '明细序号',
  56. dataIndex: 'pd_pdno',
  57. xtype: 'numbercolumn',
  58. width: 100,
  59. hidden:true,
  60. renderer : function(v) {
  61. var format = '0'
  62. return Ext.util.Format.number(v, format);
  63. }
  64. }, {
  65. text: '关联销售单号',
  66. dataIndex: 'pd_ordercode',
  67. hidden:true,
  68. width: 150
  69. }, {
  70. text: '订单序号',
  71. dataIndex: 'pd_orderdetno',
  72. xtype:'numbercolumn',
  73. width: 100,
  74. hidden:true,
  75. renderer : function(v) {
  76. var format = '0'
  77. return Ext.util.Format.number(v, format);
  78. }
  79. }, {
  80. text: '物料编号',
  81. dataIndex: 'pd_prodcode',
  82. hidden:true,
  83. width: 150
  84. }, {
  85. text: '物料名称',
  86. dataIndex: 'pr_detail',
  87. hidden:true,
  88. width: 150
  89. }, {
  90. text: '数量',
  91. // dataIndex: 'pd_outqty',
  92. dataIndex: 'qty',
  93. xtype:'numbercolumn',
  94. width: 110,
  95. hidden:true,
  96. renderer : function(v) {
  97. var arr = (v + '.').split('.');
  98. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  99. var format = '0.' + xr.join('');
  100. return Ext.util.Format.number(v, format);
  101. }
  102. }, {
  103. text: '销售单价(元)',
  104. dataIndex: 'pd_sendprice',
  105. xtype:'numbercolumn',
  106. width: 140,
  107. hidden:true,
  108. renderer : function(v) {
  109. var arr = (v + '.').split('.');
  110. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  111. var format = '0.' + xr.join('');
  112. return Ext.util.Format.number(v, format);
  113. }
  114. }, {
  115. text: '金额(元)',
  116. dataIndex: 'pd_ordertotal',
  117. xtype:'numbercolumn',
  118. width: 110,
  119. hidden:true,
  120. renderer : function(v) {
  121. var arr = (v + '.').split('.');
  122. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  123. var format = '0.' + xr.join('');
  124. return Ext.util.Format.number(v, format);
  125. }
  126. }, {
  127. text: '税率',
  128. dataIndex: 'pd_taxrate',
  129. xtype:'numbercolumn',
  130. width: 80,
  131. hidden:true,
  132. renderer : function(v) {
  133. return Ext.util.Format.number(v, '0');
  134. }
  135. }, {
  136. text: '成本单价(元)',
  137. dataIndex: 'pd_price',
  138. xtype:'numbercolumn',
  139. width: 140,
  140. hidden:true,
  141. renderer : function(v) {
  142. var arr = (v + '.').split('.');
  143. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  144. var format = '0.' + xr.join('');
  145. return Ext.util.Format.number(v, format);
  146. }
  147. }, {
  148. text: '备注',
  149. dataIndex: 'pd_remark',
  150. hidden:true,
  151. width: 250
  152. }],
  153. listeners: {
  154. beforeopendetail: function(grid, record) {
  155. var pi_class = record.get('pi_class'),
  156. detailTitle = '出货单',
  157. detailXType = 'sale-saleout-formpanel';
  158. if(pi_class == '销售退货单') {
  159. detailTitle = '销售退货单';
  160. detailXType = 'sale-salein-formpanel';
  161. }
  162. grid.detailTitle = detailTitle;
  163. grid.detailXType = detailXType;
  164. return true;
  165. }
  166. }
  167. });