UnauditCheckIn.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /**
  2. * 未审核验收
  3. */
  4. Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
  5. extend: 'saas.view.home.infoCardList.InfoList',
  6. xtype: 'home-infocardlist-unauditcheckin',
  7. listUrl: '/api/purchase/prodinout/homepageList',
  8. idField: 'id',
  9. codeField: 'pi_inoutno',
  10. // detailTitle: '采购验收单',
  11. // detailXType: 'purchase-purchasein-formpanel',
  12. condition: 'pi_statuscode<>\'AUDITED\' and pi_class in (\'采购验收单\',\'采购验退单\') and prodinout.companyId=#{companyId}',
  13. listColumns: [{
  14. text: 'id',
  15. dataIndex: 'pu_id',
  16. xtype: 'numbercolumn',
  17. hidden: true
  18. }, {
  19. text: '单据编号',
  20. dataIndex: 'pi_inoutno',
  21. width: 150
  22. }, {
  23. text: '单据类型',
  24. dataIndex: 'pd_piclass',
  25. width: 0
  26. }, {
  27. text: '单据日期',
  28. dataIndex: 'pi_date',
  29. xtype: 'datecolumn',
  30. width: 110
  31. }, {
  32. text: '供应商编号',
  33. dataIndex: 'pi_vendcode',
  34. width: 0
  35. }, {
  36. text: '供应商名称',
  37. dataIndex: 'pi_vendname',
  38. width: 250
  39. }, {
  40. text: '审核状态',
  41. align: 'center',
  42. dataIndex: 'pi_status',
  43. width: 90
  44. },{
  45. text: '关联单号',
  46. dataIndex: 'pi_pucode',
  47. width: 110
  48. },{
  49. text: '总额',
  50. dataIndex: 'pi_total',
  51. width: 80,
  52. renderer: function (v) {
  53. var arr = (v + '.').split('.');
  54. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  55. var format = '0,000.' + xr.join('');
  56. return Ext.util.Format.number(v, format);
  57. },
  58. },{
  59. text: '付款状态',
  60. align: 'center',
  61. dataIndex: 'pi_prstatus',
  62. width: 90
  63. },{
  64. text: '备注',
  65. dataIndex: 'pi_remark',
  66. width: 250
  67. },{
  68. text: '序号',
  69. dataIndex: 'pd_pdno',
  70. hidden: true,
  71. width: 80
  72. }, {
  73. text: '相关单号',
  74. dataIndex: 'pd_ordercode',
  75. hidden: true,
  76. width: 150
  77. }, {
  78. text: '物料编号',
  79. dataIndex: 'pd_prodcode',
  80. hidden: true,
  81. width: 150
  82. }, {
  83. text: '物料名称',
  84. dataIndex: 'pr_detail',
  85. hidden: true,
  86. width: 200
  87. }, {
  88. text: '物料规格',
  89. dataIndex: 'pr_spec',
  90. hidden: true,
  91. width: 150
  92. }, {
  93. text: '单位',
  94. dataIndex: 'pr_unit',
  95. hidden: true,
  96. width: 80
  97. }, {
  98. text: '数量',
  99. // dataIndex: 'pd_inqty',
  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,000.' + xr.join('');
  108. return Ext.util.Format.number(v, format);
  109. },
  110. }, {
  111. text: '仓库',
  112. dataIndex: 'pd_whname',
  113. hidden: true,
  114. width: 150
  115. }, {
  116. text: '单价(元)',
  117. dataIndex: 'pd_orderprice',
  118. hidden: true,
  119. xtype: 'numbercolumn',
  120. renderer: function (v) {
  121. var arr = (v + '.').split('.');
  122. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  123. var format = '0,000.' + xr.join('');
  124. return Ext.util.Format.number(v, format);
  125. },
  126. width: 110
  127. }, {
  128. text: '税率',
  129. dataIndex: 'pd_taxrate',
  130. xtype: 'numbercolumn',
  131. hidden: true,
  132. width: 80,
  133. renderer: function (v) {
  134. return Ext.util.Format.number(v, '0');
  135. },
  136. }, {
  137. text: '金额(元)',
  138. dataIndex: 'pd_total',
  139. xtype: 'numbercolumn',
  140. hidden: true,
  141. width: 110,
  142. renderer: function (v) {
  143. var arr = (v + '.').split('.');
  144. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  145. var format = '0,000.' + xr.join('');
  146. return Ext.util.Format.number(v, format);
  147. },
  148. }],
  149. listeners: {
  150. beforeopendetail: function(grid, record) {
  151. var pi_class = record.get('pi_class'),
  152. detailTitle = '采购验收单',
  153. detailXType = 'purchase-purchasein-formpanel';
  154. if(pi_class == '采购验退单') {
  155. detailTitle = '采购验退单';
  156. detailXType = 'purchase-purchaseout-formpanel';
  157. }
  158. grid.detailTitle = detailTitle;
  159. grid.detailXType = detailXType;
  160. return true;
  161. }
  162. }
  163. });