PurchaseIn.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /**
  2. * 待入库采购
  3. */
  4. Ext.define('saas.view.home.infoCardList.PurchaseIn', {
  5. extend: 'saas.view.home.infoCardList.InfoList',
  6. xtype: 'home-infocardlist-purchasein',
  7. listUrl: '/api/purchase/purchase/list',
  8. idField: 'pu_id',
  9. codeField: 'pu_code',
  10. detailTitle: '采购订单',
  11. detailXType: 'purchase-purchase-formpanel',
  12. condition: 'purchase.companyId=#{companyId} and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pu_acceptstatus,\' \') <> \'已入库\')',
  13. listColumns: [{
  14. text: 'id',
  15. dataIndex: 'pu_id',
  16. width: 0,
  17. hidden: true
  18. }, {
  19. text: '采购单号',
  20. dataIndex: 'pu_code',
  21. width: 150
  22. }, {
  23. text: '单据日期',
  24. dataIndex: 'pu_date',
  25. xtype: 'datecolumn',
  26. width: 110
  27. }, {
  28. text: '供应商名称',
  29. dataIndex: 'pu_vendname',
  30. width: 150
  31. }, {
  32. text: '审核状态',
  33. align: 'center',
  34. dataIndex: 'pu_status',
  35. width: 90
  36. }, {
  37. text: '业务状态',
  38. align: 'center',
  39. dataIndex: 'pu_acceptstatus',
  40. width: 90
  41. }, {
  42. text: '序号',
  43. dataIndex: 'pd_detno',
  44. xtype: 'numbercolumn',
  45. width: 80,
  46. renderer: function (v) {
  47. return Ext.util.Format.number(v, '0');
  48. }
  49. }, {
  50. text: '物料编号',
  51. dataIndex: 'pd_prodcode',
  52. width: 150
  53. }, {
  54. text: '物料名称',
  55. dataIndex: 'pr_detail',
  56. width: 200
  57. }, {
  58. text: '物料规格',
  59. dataIndex: 'pr_spec',
  60. width: 150
  61. }, {
  62. text: '单位',
  63. dataIndex: 'pr_unit',
  64. width: 80
  65. }, {
  66. text: '采购数量',
  67. dataIndex: 'pd_qty',
  68. xtype: 'numbercolumn',
  69. width: 110,
  70. renderer: function (v) {
  71. var arr = (v + '.').split('.');
  72. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  73. var format = '0,000.' + xr.join('');
  74. return Ext.util.Format.number(v, format);
  75. },
  76. }, {
  77. text: '需求日期',
  78. dataIndex: 'pd_delivery',
  79. xtype: 'datecolumn',
  80. width: 110
  81. }, {
  82. text: '单价',
  83. dataIndex: 'pd_price',
  84. xtype: 'numbercolumn',
  85. width: 110,
  86. renderer: function (v) {
  87. var arr = (v + '.').split('.');
  88. var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
  89. var format = '0,000.' + xr.join('');
  90. return Ext.util.Format.number(v, format);
  91. }
  92. }, {
  93. text: '税率',
  94. dataIndex: 'pd_taxrate',
  95. xtype: 'numbercolumn',
  96. width: 80,
  97. renderer: function (v) {
  98. return Ext.util.Format.number(v, '0');
  99. },
  100. }, {
  101. text: '金额',
  102. dataIndex: 'pd_total',
  103. xtype: 'numbercolumn',
  104. width: 110,
  105. renderer: function (v) {
  106. var arr = (v + '.').split('.');
  107. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  108. var format = '0,000.' + xr.join('');
  109. return Ext.util.Format.number(v, format);
  110. }
  111. }, {
  112. text: '备注',
  113. dataIndex: 'pd_remark',
  114. width: 250
  115. }]
  116. });