column.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import CONFIG from "@/config";
  2. export const TableColumns = [
  3. {
  4. item: { key: "supplierName", title: "供应商" },
  5. attr: {},
  6. },
  7. {
  8. item: { key: "puOrgName", title: "采购组织" },
  9. attr: {},
  10. },
  11. {
  12. item: { key: "customerName", title: "客户" },
  13. attr: {},
  14. },
  15. {
  16. item: { key: "priceType", title: "价格类型" },
  17. attr: { component: "el-dict-tag", dictName: "sys_price_type" },
  18. },
  19. {
  20. item: { key: "effectiveDate", title: "价格生效日期" },
  21. attr: {},
  22. },
  23. {
  24. item: { key: "endDate", title: "价格失效日期" },
  25. attr: {},
  26. },
  27. {
  28. item: { key: "tax", title: "税率 (%)" },
  29. attr: {
  30. component: "el-computed-input-v2",
  31. formatter: (prop) => {
  32. return (prop.tax * 1).toFixed(CONFIG.precision);
  33. },
  34. },
  35. },
  36. {
  37. item: { key: "taxFreePrice", title: "无税单价" },
  38. attr: {
  39. component: "el-computed-input-v2",
  40. formatter: (prop = 0) => {
  41. return (prop.tax * 1).toFixed(CONFIG.precision);
  42. },
  43. },
  44. },
  45. {
  46. item: { key: "taxPrice", title: "主含税单价" },
  47. attr: {
  48. component: "el-computed-input-v2",
  49. formatter: (prop = 0) => {
  50. return (prop.tax * 1).toFixed(CONFIG.precision);
  51. },
  52. },
  53. },
  54. {
  55. item: { key: "purchaseQuantity", title: "本次采购数量" },
  56. attr: {
  57. component: "el-input-number",
  58. min: () => 0,
  59. max: (prop) => {
  60. const { puQty = 0, executeQty = 0 } = prop;
  61. return puQty - executeQty;
  62. },
  63. controlsPosition: "right",
  64. },
  65. },
  66. {
  67. item: { key: "arrivalDatePlan", title: "计划到货日期" },
  68. attr: {
  69. component: "el-date-picker",
  70. valueFormat: "yyyy-MM-dd",
  71. pickerOptions: {
  72. disabledDate(time) {
  73. return time.getTime() < Date.now();
  74. },
  75. },
  76. },
  77. },
  78. {
  79. item: { key: "note", title: "备注" },
  80. attr: {
  81. component: "el-input",
  82. autosize: true,
  83. type: "textarea",
  84. },
  85. },
  86. ];