columns.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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 == null ? 0 : (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 == null ? 0 :(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 == null ? 0 :(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 == null ? 0 :(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. {
  175. item: { width:100,key: "isChannel", title: "是否渠道变更" },
  176. attr: {
  177. is: "el-dict-tag",
  178. dictName: "is_effective",
  179. },
  180. },
  181. {
  182. item: { width:100,key: "brandReplacement", title: "是否品牌替换" },
  183. attr: {
  184. is: "el-dict-tag",
  185. dictName: "is_effective",
  186. },
  187. },{
  188. item: { width:100,key: "priceDiffer", title: "单价差" },
  189. attr: {
  190. is: "el-computed-input-v2",
  191. formatter: (prop) => {
  192. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  193. },
  194. },
  195. },
  196. {
  197. item: { width:100,key: "increase", title: "涨幅" },
  198. attr: {
  199. is: "el-computed-input-v2",
  200. formatter: (prop) => {
  201. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  202. },
  203. },
  204. },
  205. {
  206. item: { width:100,key: "yPurchaseQuantity", title: "预计年采购量" },
  207. attr: {
  208. is: "el-computed-input-v2",
  209. formatter: (prop) => {
  210. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  211. },
  212. },
  213. },
  214. {
  215. item: { width:100,key: "yAffectedAmount", title: "预计年影响量" },
  216. attr: {
  217. is: "el-computed-input-v2",
  218. formatter: (prop) => {
  219. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  220. },
  221. },
  222. },
  223. {
  224. item: { width:100,key: "supplierName", title: "供应商名称" },
  225. attr: {},
  226. },{
  227. item: { width:100,key: "bidPrice", title: "中标价" },
  228. attr: {
  229. is: "el-computed-input-v2",
  230. formatter: (prop) => {
  231. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  232. },
  233. },
  234. },{
  235. item: { width:100,key: "unitPrice", title: "单价" },
  236. attr: {
  237. is: "el-computed-input-v2",
  238. formatter: (prop) => {
  239. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  240. },
  241. },
  242. },{
  243. item: { width:100,key: "profit", title: "利润比" },
  244. attr: {
  245. is: "el-computed-input-v2",
  246. formatter: (prop) => {
  247. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  248. },
  249. },
  250. },
  251. {
  252. item: { width:100,key: "supplierName1", title: "供应商名称1" },
  253. attr: {},
  254. },{
  255. item: { width:100,key: "bidPrice1", title: "中标价1" },
  256. attr: {
  257. is: "el-computed-input-v2",
  258. formatter: (prop) => {
  259. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  260. },
  261. },
  262. },{
  263. item: { width:100,key: "unitPrice1", title: "单价1" },
  264. attr: {
  265. is: "el-computed-input-v2",
  266. formatter: (prop) => {
  267. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  268. },
  269. },
  270. },{
  271. item: { width:100,key: "profit1", title: "利润比1" },
  272. attr: {
  273. is: "el-computed-input-v2",
  274. formatter: (prop) => {
  275. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  276. },
  277. },
  278. },
  279. {
  280. item: { width:100,key: "supplierName2", title: "供应商名称2" },
  281. attr: {},
  282. },{
  283. item: { width:100,key: "bidPrice2", title: "中标价2" },
  284. attr: {
  285. is: "el-computed-input-v2",
  286. formatter: (prop) => {
  287. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  288. },
  289. },
  290. },{
  291. item: { width:100,key: "unitPrice2", title: "单价2" },
  292. attr: {
  293. is: "el-computed-input-v2",
  294. formatter: (prop) => {
  295. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  296. },
  297. },
  298. },{
  299. item: { width:100,key: "profit2", title: "利润比2" },
  300. attr: {
  301. is: "el-computed-input-v2",
  302. formatter: (prop) => {
  303. return prop == null ? 0 :(prop * 1).toFixed(CONFIG.precision);
  304. },
  305. },
  306. },
  307. { item: { width:100,key: "createByName", title: "创建人名称" }, attr: {} },
  308. { item: { width:100,key: "updateByName", title: "更新人名称" }, attr: {} },
  309. ],
  310. },
  311. ];
  312. return { TableColumns, TabColumns };
  313. }