UnauditSaleOut.js 4.9 KB

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