SaleOut.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /**
  2. * 待出货销售
  3. */
  4. Ext.define('saas.view.home.infoCardList.SaleOut', {
  5. extend: 'saas.view.home.infoCardList.InfoList',
  6. xtype: 'home-infocardlist-saleout',
  7. listUrl: '/api/sale/sale/list',
  8. idField: 'sa_id',
  9. codeField: 'sa_code',
  10. detailTitle: '销售订单',
  11. detailXType: 'sale-sale-formpanel',
  12. condition: 'sale.companyid=#{companyId} and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now())<= 7)',
  13. listColumns: [{
  14. text: 'id',
  15. dataIndex: 'sa_id',
  16. hidden: true,
  17. xtype: 'numbercolumn'
  18. }, {
  19. text: '单据编号',
  20. dataIndex: 'sa_code',
  21. width: 150
  22. }, {
  23. text: '单据状态',
  24. align: 'center',
  25. dataIndex: 'sa_status',
  26. width: 90
  27. }, {
  28. text: '业务状态',
  29. align: 'center',
  30. dataIndex: 'sa_sendstatus',
  31. width: 90
  32. }, {
  33. text: '单据日期',
  34. dataIndex: 'sa_date',
  35. xtype: 'datecolumn',
  36. width: 110
  37. }, {
  38. text: '客户名称',
  39. dataIndex: 'sa_custname',
  40. width: 250
  41. }, {
  42. text: '明细序号',
  43. dataIndex: 'sd_detno',
  44. xtype: 'numbercolumn',
  45. width: 100,
  46. renderer: function (v) {
  47. return Ext.util.Format.number(v, '0');
  48. }
  49. }, {
  50. text: '物料编号',
  51. dataIndex: 'sd_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: 'sd_qty',
  64. xtype: 'numbercolumn',
  65. width: 110,
  66. renderer: function (v) {
  67. var arr = (v + '.').split('.');
  68. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  69. var format = '0.' + xr.join('');
  70. return Ext.util.Format.number(v, format);
  71. },
  72. }, {
  73. text: '单价(元)',
  74. dataIndex: 'sd_price',
  75. xtype: 'numbercolumn',
  76. width: 110,
  77. renderer: function (v) {
  78. var arr = (v + '.').split('.');
  79. var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
  80. var format = '0,000.' + xr.join('');
  81. return Ext.util.Format.number(v, format);
  82. },
  83. }, {
  84. text: '已出货数',
  85. dataIndex: 'sd_sendqty',
  86. xtype: 'numbercolumn',
  87. width: 110,
  88. renderer: function (v) {
  89. var arr = (v + '.').split('.');
  90. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  91. var format = '0.' + xr.join('');
  92. return Ext.util.Format.number(v, format);
  93. },
  94. }, {
  95. text: '备注',
  96. dataIndex: 'sd_remark',
  97. width: 250
  98. }],
  99. });