PurchaseIn.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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_brand',
  56. width: 200
  57. }, {
  58. text: '名称',
  59. dataIndex: 'pr_detail',
  60. width: 200
  61. }, {
  62. text: '型号',
  63. dataIndex: 'pr_orispeccode',
  64. width: 200
  65. }, {
  66. text: '规格',
  67. dataIndex: 'pr_spec',
  68. width: 150
  69. }, {
  70. text: '采购数量',
  71. dataIndex: 'pd_qty',
  72. xtype: 'numbercolumn',
  73. width: 110,
  74. renderer: function (v) {
  75. var arr = (v + '.').split('.');
  76. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  77. var format = '0,000.' + xr.join('');
  78. return Ext.util.Format.number(v, format);
  79. },
  80. }, {
  81. text: '单位',
  82. dataIndex: 'pr_unit',
  83. width: 80
  84. }, {
  85. text: '需求日期',
  86. dataIndex: 'pd_delivery',
  87. xtype: 'datecolumn',
  88. width: 110
  89. }, {
  90. text: '单价(元)',
  91. dataIndex: 'pd_price',
  92. xtype: 'numbercolumn',
  93. width: 110,
  94. renderer: function (v) {
  95. var arr = (v + '.').split('.');
  96. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  97. var format = '0,000.' + xr.join('');
  98. return Ext.util.Format.number(v, format);
  99. }
  100. }, {
  101. text: '税率',
  102. dataIndex: 'pd_taxrate',
  103. xtype: 'numbercolumn',
  104. width: 80,
  105. renderer: function (v) {
  106. return Ext.util.Format.number(v, '0');
  107. },
  108. }, {
  109. text: '金额(元)',
  110. dataIndex: 'pd_total',
  111. xtype: 'numbercolumn',
  112. width: 110,
  113. renderer: function (v) {
  114. var arr = (v + '.').split('.');
  115. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  116. var format = '0,000.' + xr.join('');
  117. return Ext.util.Format.number(v, format);
  118. }
  119. }, {
  120. text: '备注',
  121. dataIndex: 'pd_remark',
  122. width: 250
  123. }]
  124. });