UnauditCheckIn.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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: 'creatorName',
  66. width: 110
  67. },{
  68. text: '审核人',
  69. dataIndex: 'pi_auditman',
  70. width: 110
  71. },{
  72. text: '备注',
  73. dataIndex: 'pi_remark',
  74. width: 250
  75. },{
  76. text: '序号',
  77. dataIndex: 'pd_pdno',
  78. hidden: true,
  79. width: 80
  80. }, {
  81. text: '相关单号',
  82. dataIndex: 'pd_ordercode',
  83. hidden: true,
  84. width: 150
  85. }, {
  86. text: '物料编号',
  87. dataIndex: 'pd_prodcode',
  88. hidden: true,
  89. width: 150
  90. }, {
  91. text: '物料名称',
  92. dataIndex: 'pr_detail',
  93. hidden: true,
  94. width: 200
  95. }, {
  96. text: '物料规格',
  97. dataIndex: 'pr_spec',
  98. hidden: true,
  99. width: 150
  100. }, {
  101. text: '单位',
  102. dataIndex: 'pr_unit',
  103. hidden: true,
  104. width: 80
  105. }, {
  106. text: '数量',
  107. // dataIndex: 'pd_inqty',
  108. dataIndex: 'qty',
  109. xtype: 'numbercolumn',
  110. width: 110,
  111. hidden: true,
  112. renderer: function (v) {
  113. var arr = (v + '.').split('.');
  114. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  115. var format = '0,000.' + xr.join('');
  116. return Ext.util.Format.number(v, format);
  117. },
  118. }, {
  119. text: '仓库',
  120. dataIndex: 'pd_whname',
  121. hidden: true,
  122. width: 150
  123. }, {
  124. text: '单价(元)',
  125. dataIndex: 'pd_orderprice',
  126. hidden: true,
  127. xtype: 'numbercolumn',
  128. renderer: function (v) {
  129. var arr = (v + '.').split('.');
  130. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  131. var format = '0,000.' + xr.join('');
  132. return Ext.util.Format.number(v, format);
  133. },
  134. width: 110
  135. }, {
  136. text: '税率',
  137. dataIndex: 'pd_taxrate',
  138. xtype: 'numbercolumn',
  139. hidden: true,
  140. width: 80,
  141. renderer: function (v) {
  142. return Ext.util.Format.number(v, '0');
  143. },
  144. }, {
  145. text: '金额(元)',
  146. dataIndex: 'pd_total',
  147. xtype: 'numbercolumn',
  148. hidden: true,
  149. width: 110,
  150. renderer: function (v) {
  151. var arr = (v + '.').split('.');
  152. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  153. var format = '0,000.' + xr.join('');
  154. return Ext.util.Format.number(v, format);
  155. },
  156. }],
  157. listeners: {
  158. beforeopendetail: function(grid, record) {
  159. var pi_class = record.get('pi_class'),
  160. detailTitle = '采购验收单',
  161. detailXType = 'purchase-purchasein-formpanel';
  162. if(pi_class == '采购验退单') {
  163. detailTitle = '采购验退单';
  164. detailXType = 'purchase-purchaseout-formpanel';
  165. }
  166. grid.detailTitle = detailTitle;
  167. grid.detailXType = detailXType;
  168. return true;
  169. }
  170. }
  171. });