column.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. import CONFIG from "@/config";
  2. export const TableColumns = [
  3. { item: { key: "puOrgName", title: "采购组织" }, attr: {} },
  4. { item: { key: "code", title: "合同编码" }, attr: {} },
  5. {
  6. item: { key: "status", title: "状态" },
  7. attr: { is: "el-dict-tag", dictName: "documents_status" },
  8. },
  9. {
  10. item: { key: "lastPuMoney", title: "上年度采购额" },
  11. attr: {
  12. is: "el-computed-input-v2",
  13. formatter: (prop) => {
  14. return (prop * 1).toFixed(CONFIG.precision);
  15. },
  16. isHidden: true,
  17. },
  18. },
  19. { item: { key: "buyerName", title: "采购员" }, attr: {} },
  20. { item: { key: "supplierName", title: "供应商" }, attr: {} },
  21. {
  22. item: { key: "contractType", title: "合同类型" },
  23. attr: {
  24. is: "el-dict-tag",
  25. dictName: "puarchase_contract_contract_type",
  26. isHidden: true,
  27. },
  28. },
  29. {
  30. item: { key: "puMoneyYear", title: "本年度采购额" },
  31. attr: {
  32. is: "el-computed-input-v2",
  33. formatter: (prop) => {
  34. return (prop * 1).toFixed(CONFIG.precision);
  35. },
  36. isHidden: true,
  37. },
  38. },
  39. { item: { key: "puDeptName", title: "采购部门" }, attr: {} },
  40. {
  41. item: { key: "supplierTier", title: "供应商层级" },
  42. attr: {
  43. is: "el-dict-tag",
  44. dictName: "puarchase_contract_supplier_tier",
  45. isHidden: true,
  46. },
  47. },
  48. {
  49. item: { key: "contractName", title: "合同名称" },
  50. attr: {},
  51. },
  52. {
  53. item: { key: "grossRateAverage", title: "平均毛利率 (%)" },
  54. attr: {
  55. is: "el-computed-input-v2",
  56. formatter: (prop) => {
  57. return (prop * 1).toFixed(CONFIG.precision);
  58. },
  59. isHidden: true,
  60. },
  61. },
  62. {
  63. item: { key: "approveFlow", title: "审批流程" },
  64. attr: {
  65. is: "el-dict-tag",
  66. dictName: "puarchase_contract_approve_flow",
  67. isHidden: true,
  68. },
  69. },
  70. {
  71. item: { key: "consumableClass", title: "耗材类别" },
  72. attr: {
  73. is: "el-dict-tag",
  74. dictName: "puarchase_contract_consumable_class",
  75. isHidden: true,
  76. },
  77. },
  78. {
  79. item: { key: "effectiveDate", title: "合同生效日期" },
  80. attr: {},
  81. },
  82. {
  83. item: { key: "brandGrossRate", title: "同类品牌及毛利率 (%)" },
  84. attr: {
  85. is: "el-computed-input-v2",
  86. formatter: (prop) => {
  87. return (prop * 1).toFixed(CONFIG.precision);
  88. },
  89. isHidden: true,
  90. },
  91. },
  92. {
  93. item: { key: "contractFormat", title: "合同格式" },
  94. attr: {
  95. is: "el-dict-tag",
  96. dictName: "puarchase_contract_contract_format",
  97. isHidden: true,
  98. },
  99. },
  100. {
  101. item: { key: "productName", title: "产品类别&名称" },
  102. attr: {},
  103. },
  104. { item: { key: "endDate", title: "合同终止日期" }, attr: {} },
  105. {
  106. item: { key: "invoiceTax", title: "发票税率 (%)" },
  107. attr: {
  108. is: "el-computed-input-v2",
  109. formatter: (prop) => {
  110. return (prop * 1).toFixed(CONFIG.precision);
  111. },
  112. isHidden: true,
  113. },
  114. },
  115. {
  116. item: { key: "emergencyDegree", title: "紧急程度" },
  117. attr: {
  118. is: "el-dict-tag",
  119. dictName: "puarchase_contract_emergency_degree",
  120. isHidden: true,
  121. },
  122. },
  123. { item: { key: "project", title: "项目医院" }, attr: {} },
  124. {
  125. item: { key: "deliveryType", title: "交货方式" },
  126. attr: {
  127. is: "el-dict-tag",
  128. dictName: "puarchase_contract_delivery_type",
  129. isHidden: true,
  130. },
  131. },
  132. { item: { key: "source", title: "合同来源" }, attr: {} },
  133. {
  134. item: { key: "contractPartycName", title: "合同丙方" },
  135. attr: {},
  136. },
  137. {
  138. item: { key: "guaranteePeriodEnd", title: "质保期限" },
  139. attr: {},
  140. },
  141. {
  142. item: { key: "freightMethods", title: "运费承担方式" },
  143. attr: {
  144. is: "el-dict-tag",
  145. dictName: "puarchase_contract_freight_methods",
  146. isHidden: true,
  147. },
  148. },
  149. {
  150. item: { key: "signDate", title: "合同创建时间" },
  151. attr: {},
  152. },
  153. {
  154. item: { key: "isTarget", title: "是否有指标" },
  155. attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  156. },
  157. {
  158. item: { key: "contractTarget", title: "合同指标" },
  159. attr: {},
  160. },
  161. {
  162. item: { key: "exemptionPostageCondtion", title: "包邮条件" },
  163. attr: {},
  164. },
  165. {
  166. item: { key: "isRebate", title: "是否有返利" },
  167. attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  168. },
  169. {
  170. item: { key: "rebatePolicy", title: "返利政策" },
  171. attr: {},
  172. },
  173. {
  174. item: { key: "externalContract", title: "外部合同号" },
  175. attr: {},
  176. },
  177. {
  178. item: { key: "rollbackPolicy", title: "退换货政策" },
  179. attr: {},
  180. },
  181. { item: { key: "enquiryCode", title: "询价单号" }, attr: {} },
  182. {
  183. item: { key: "contractContent", title: "合同主要内容" },
  184. attr: {},
  185. },
  186. {
  187. item: { key: "refusalReasons", title: "拒绝理由" },
  188. attr: {},
  189. },
  190. {
  191. item: { key: "pigeonhole", title: "是否归档" },
  192. attr: { is: "el-dict-tag", dictName: "sys_yes_no" },
  193. },
  194. {
  195. item: { key: "pigeonholeFile", title: "归档附件" },
  196. attr: { is: "el-file-preview" },
  197. },
  198. {
  199. item: { key: "externalFile", title: "对外附件" },
  200. attr: { is: "el-file-preview" },
  201. },
  202. {
  203. item: { key: "puFile", title: "采购商盖章合同附件" },
  204. attr: { is: "el-file-preview" },
  205. },
  206. {
  207. item: { key: "supplierFile", title: "供应商盖章合同附件" },
  208. attr: { is: "el-file-preview" },
  209. },
  210. { item: { key: "projectCode", title: "项目编号" }, attr: {} },
  211. { item: { key: "projectName", title: "项目名称" }, attr: {} },
  212. { item: { key: "area", title: "区域" }, attr: {} },
  213. {
  214. item: { key: "consigneePhone", title: "收货人联系方式" },
  215. attr: {},
  216. },
  217. {
  218. item: { key: "paymentAgreement", title: "付款协议" },
  219. attr: {},
  220. },
  221. {
  222. item: { key: "taxPrice", title: "价税合计" },
  223. attr: {
  224. is: "el-computed-input-v2",
  225. formatter: (prop) => {
  226. return prop ? (prop * 1).toFixed(CONFIG.precision) : "0.000000";
  227. },
  228. isHidden: true,
  229. },
  230. },
  231. { item: { key: "currencyName", title: "币种" }, attr: {} },
  232. {
  233. item: { key: "guaranteePeriod", title: "质保期" },
  234. attr: {},
  235. },
  236. ].map(({ item, attr }) => ({
  237. attr,
  238. item: { ...item, hidden: true, fixed: false },
  239. }));
  240. export const FormColumns = [
  241. {
  242. item: {
  243. key: "contractName",
  244. title: "合同名称",
  245. },
  246. attr: {
  247. is: "el-input",
  248. },
  249. },
  250. {
  251. item: { key: "status", title: "状态" },
  252. attr: {
  253. is: "el-select",
  254. dictName: "documents_status",
  255. },
  256. },
  257. {
  258. item: {
  259. key: "pigeonhole",
  260. title: "是否归档",
  261. },
  262. attr: {
  263. is: "el-select",
  264. dictName: "sys_yes_no",
  265. },
  266. },
  267. ];