UnauditSaleOut.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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: 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. hidden:true,
  71. width: 150
  72. }, {
  73. text: '订单序号',
  74. dataIndex: 'pd_orderdetno',
  75. xtype:'numbercolumn',
  76. width: 100,
  77. hidden:true,
  78. renderer : function(v) {
  79. var format = '0'
  80. return Ext.util.Format.number(v, format);
  81. }
  82. }, {
  83. text: '物料编号',
  84. dataIndex: 'pd_prodcode',
  85. hidden:true,
  86. width: 150
  87. }, {
  88. text: '物料名称',
  89. dataIndex: 'pr_detail',
  90. hidden:true,
  91. width: 150
  92. }, {
  93. text: '数量',
  94. // dataIndex: 'pd_outqty',
  95. dataIndex: 'qty',
  96. xtype:'numbercolumn',
  97. width: 110,
  98. hidden:true,
  99. renderer : function(v) {
  100. return saas.util.BaseUtil.numberFormat(v, 3, false);
  101. }
  102. }, {
  103. text: '销售单价(元)',
  104. dataIndex: 'pd_sendprice',
  105. xtype:'numbercolumn',
  106. width: 140,
  107. hidden:true,
  108. renderer : function(v) {
  109. return saas.util.BaseUtil.numberFormat(v, 4, true);
  110. }
  111. }, {
  112. text: '金额(元)',
  113. dataIndex: 'pd_ordertotal',
  114. xtype:'numbercolumn',
  115. width: 110,
  116. hidden:true,
  117. renderer : function(v) {
  118. return saas.util.BaseUtil.numberFormat(v, 2, true);
  119. }
  120. }, {
  121. text: '税率',
  122. dataIndex: 'pd_taxrate',
  123. xtype:'numbercolumn',
  124. width: 80,
  125. hidden:true,
  126. renderer : function(v) {
  127. return saas.util.BaseUtil.numberFormat(v, 2, false);
  128. }
  129. }, {
  130. text: '成本单价(元)',
  131. dataIndex: 'pd_price',
  132. xtype:'numbercolumn',
  133. width: 140,
  134. hidden:true,
  135. renderer : function(v) {
  136. return saas.util.BaseUtil.numberFormat(v, 4, true);
  137. }
  138. }, {
  139. text: '备注',
  140. dataIndex: 'pd_remark',
  141. hidden:true,
  142. width: 250
  143. }],
  144. listeners: {
  145. beforeopendetail: function(grid, record) {
  146. var pi_class = record.get('pi_class'),
  147. detailTitle = '出货单',
  148. detailXType = 'sale-saleout-formpanel';
  149. if(pi_class == '销售退货单') {
  150. detailTitle = '销售退货单';
  151. detailXType = 'sale-salein-formpanel';
  152. }
  153. grid.detailTitle = detailTitle;
  154. grid.detailXType = detailXType;
  155. return true;
  156. }
  157. }
  158. });