columns.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. import CONFIG from "@/config";
  2. export default function useColumns() {
  3. const TableColumns = [
  4. {
  5. item: { width:100,key: "priceCode", title: "价格编码" },
  6. attr: {},
  7. },
  8. {
  9. item: { width:100,key: "supplierName", title: "供应商" },
  10. attr: {},
  11. },
  12. {
  13. item: { width:100,key: "puOrgName", title: "采购组织" },
  14. attr: {},
  15. },
  16. {
  17. item: { width:100,key: "currencyName", title: "币种" },
  18. attr: {},
  19. },
  20. {
  21. item: { width:100,key: "explainStr", title: "价格合理性说明" },
  22. attr: {},
  23. },
  24. {
  25. item: { width:100,key: "buyerName", title: "采购员" },
  26. attr: {},
  27. },
  28. {
  29. item: { width:100,key: "puDeptName", title: "采购部门" },
  30. attr: {},
  31. },
  32. {
  33. item: { width:100,key: "createByName", title: "创建人" },
  34. attr: {},
  35. },
  36. {
  37. item: { width:100,key: "source", title: "来源单据号" },
  38. attr: {},
  39. },
  40. {
  41. item: { width:100,key: "isEffective", title: "是否已推价格" },
  42. attr: {
  43. is: "el-dict-tag",
  44. dictName: "is_effective",
  45. },
  46. },
  47. {
  48. item: { width:100,key: "effectiveDate", title: "生效日期" },
  49. attr: {},
  50. },
  51. {
  52. item: { width:100,key: "file", title: "附件" },
  53. attr: { is: "el-file-preview" },
  54. },
  55. {
  56. item: { width:100,key: "sourceType", title: "来源单据类型" },
  57. attr: {},
  58. },
  59. {
  60. item: { width:100,key: "status", title: "单据状态" },
  61. attr: {
  62. is: "el-dict-tag",
  63. dictName: "sys_status",
  64. },
  65. },
  66. ];
  67. const TabColumns = [
  68. {
  69. item: {
  70. title: "物料信息表",
  71. width:100,key: "priceApplyItems",
  72. },
  73. attr: {
  74. value: [],
  75. },
  76. TableColumns: [
  77. {
  78. item: { width:100,key: "materialName", title: "物料名称" },
  79. attr: {},
  80. },
  81. { item: { width:100,key: "materialCode", title: "物料编码" }, attr: {} },
  82. { item: { width:100,key: "manufacturerName", title: "生产厂家" }, attr: {} },
  83. { item: { width:100,key: "specification", title: "规格" }, attr: {} },
  84. { item: { width:100,key: "model", title: "型号" }, attr: {} },
  85. {
  86. item: { width:100,key: "unitName", title: "单位" },
  87. attr: {},
  88. },
  89. {
  90. item: { width:100,key: "puUnitName", title: "采购单位" },
  91. attr: {},
  92. },
  93. {
  94. item: { width:100,key: "conversionRate", title: "采购换算率" },
  95. attr: {
  96. is: "el-computed-input-v2",
  97. formatter: (prop) => {
  98. return (prop * 1).toFixed(CONFIG.precision);
  99. },
  100. },
  101. },
  102. {
  103. item: { width:100,key: "tax", title: "税率%" },
  104. attr: {
  105. is: "el-computed-input-v2",
  106. formatter: (prop) => {
  107. return (prop * 1).toFixed(CONFIG.precision);
  108. },
  109. },
  110. },
  111. {
  112. item: { width:100,key: "taxPrice", title: "含税单价" },
  113. attr: {
  114. is: "el-computed-input-v2",
  115. formatter: (prop) => {
  116. return (prop * 1).toFixed(CONFIG.precision);
  117. },
  118. },
  119. },
  120. {
  121. item: { width:100,key: "price", title: "无税单价" },
  122. attr: {
  123. is: "el-computed-input-v2",
  124. formatter: (prop) => {
  125. return (prop * 1).toFixed(CONFIG.precision);
  126. },
  127. },
  128. },
  129. {
  130. item: { width:100,key: "currencyName", title: "币种" },
  131. attr: {},
  132. },
  133. {
  134. item: { width:100,key: "periodBegin", title: "价格有效期(起)" },
  135. attr: {},
  136. },
  137. {
  138. item: { width:100,key: "periodEnd", title: "价格有效期(止)" },
  139. attr: {},
  140. },
  141. {
  142. item: { width:100,key: "customerName", title: "客户" },
  143. attr: {},
  144. },
  145. { item: { width:100,key: "recentlyPrice", title: "最近价格" }, attr: {} },
  146. {
  147. item: { width:100,key: "isApprovalFirst", title: "首次报批" },
  148. attr: {
  149. is: "el-dict-tag",
  150. dictName: "is_effective",
  151. },
  152. },
  153. {
  154. item: { width:100,key: "isPriceAdjustment", title: "价格调整" },
  155. attr: {
  156. is: "el-dict-tag",
  157. dictName: "is_effective",
  158. },
  159. },
  160. {
  161. item: { width:100,key: "priceType", title: "价格类型" },
  162. attr: {
  163. is: "el-dict-tag",
  164. dictName: "sys_price_type",
  165. },
  166. },
  167. {
  168. item: { width:100,key: "isDistributionPrice", title: "配送价" },
  169. attr: {
  170. is: "el-dict-tag",
  171. dictName: "is_effective",
  172. },
  173. },
  174. { item: { width:100,key: "createByName", title: "创建人名称" }, attr: {} },
  175. { item: { width:100,key: "updateByName", title: "更新人名称" }, attr: {} },
  176. ],
  177. },
  178. ];
  179. return { TableColumns, TabColumns };
  180. }