column.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. export const FormColumns = [
  2. {
  3. key: "puOrgName",
  4. title: "采购组织",
  5. inputType: "PopoverSelect",
  6. referName: "ORG_PARAM",
  7. dataMapping: {
  8. puOrg: "code",
  9. puOrgName: "name",
  10. },
  11. require: true,
  12. },
  13. { key: "code", title: "合同编码", inputType: "Input" },
  14. {
  15. key: "lastPuMoney",
  16. title: "上年度采购额",
  17. inputType: "Input",
  18. require: true,
  19. },
  20. {
  21. key: "buyerName",
  22. title: "采购员",
  23. inputType: "PopoverSelect",
  24. referName: "CONTACTS_PARAM",
  25. dataMapping: {
  26. buyer: "code",
  27. buyerName: "name",
  28. puDept: "deptId",
  29. puDeptName: "deptName",
  30. },
  31. require: true,
  32. },
  33. {
  34. key: "supplierName",
  35. title: "供应商",
  36. inputType: "PopoverSelect",
  37. referName: "SUPPLIER_PARAM",
  38. dataMapping: {
  39. supplier: "code",
  40. supplierName: "name",
  41. },
  42. require: true,
  43. },
  44. {
  45. key: "contractType",
  46. title: "合同类型",
  47. inputType: "Select",
  48. require: true,
  49. referName: "puarchase_contract_contract_type",
  50. },
  51. {
  52. key: "puMoneyYear",
  53. title: "本年度采购额",
  54. inputType: "InputNumber",
  55. require: true,
  56. },
  57. {
  58. key: "puDeptName",
  59. title: "采购部门",
  60. inputType: "PopoverSelect",
  61. referName: "DEPT_PARAM",
  62. dataMapping: {
  63. puDept: "code",
  64. puDeptName: "name",
  65. },
  66. require: true,
  67. },
  68. {
  69. key: "supplierTier",
  70. title: "供应商层级",
  71. inputType: "Select",
  72. require: true,
  73. referName: "puarchase_contract_supplier_tier",
  74. },
  75. { key: "contractName", title: "合同名称", inputType: "Input", require: true },
  76. {
  77. key: "grossRateAverage",
  78. title: "平均毛利率",
  79. inputType: "InputNumber",
  80. require: true,
  81. },
  82. {
  83. key: "approveFlow",
  84. title: "审批流程",
  85. inputType: "Select",
  86. require: true,
  87. referName: "puarchase_contract_approve_flow",
  88. },
  89. {
  90. key: "consumableClass",
  91. title: "耗材类别",
  92. inputType: "Select",
  93. require: true,
  94. referName: "puarchase_contract_consumable_class",
  95. },
  96. {
  97. key: "effectiveDate",
  98. title: "合同生效日期",
  99. inputType: "DatePicker",
  100. require: true,
  101. valueFormat: "yyyy-MM-dd",
  102. },
  103. {
  104. key: "brandGrossRate",
  105. title: "同类品牌及毛利率",
  106. inputType: "InputNumber",
  107. require: true,
  108. },
  109. {
  110. key: "contractFormat",
  111. title: "合同格式",
  112. inputType: "Select",
  113. require: true,
  114. referName: "puarchase_contract_contract_format",
  115. },
  116. {
  117. key: "productName",
  118. title: "产品类别&名称",
  119. inputType: "Input",
  120. require: true,
  121. },
  122. {
  123. key: "endDate",
  124. title: "合同终止日期",
  125. inputType: "DatePicker",
  126. require: true,
  127. valueFormat: "yyyy-MM-dd",
  128. },
  129. {
  130. key: "invoiceTax",
  131. title: "发票税率",
  132. inputType: "PopoverSelect",
  133. referName: "TAX_RATE_PARAM",
  134. dataMapping: {
  135. invoiceTax: "ntaxrate",
  136. },
  137. require: true,
  138. },
  139. {
  140. key: "emergencyDegree",
  141. title: "紧急程度",
  142. inputType: "Select",
  143. require: true,
  144. referName: "puarchase_contract_emergency_degree",
  145. },
  146. { key: "project", title: "项目医院", inputType: "Input", require: true },
  147. {
  148. key: "signDate",
  149. title: "合同签订日期",
  150. inputType: "DatePicker",
  151. require: true,
  152. valueFormat: "yyyy-MM-dd",
  153. },
  154. {
  155. key: "deliveryType",
  156. title: "交货方式",
  157. inputType: "Select",
  158. referName: "puarchase_contract_delivery_type",
  159. },
  160. {
  161. key: "source",
  162. title: "合同来源",
  163. inputType: "Input",
  164. value: "自制",
  165. disabled: true,
  166. },
  167. {
  168. key: "contractPartycName",
  169. title: "合同丙方",
  170. inputType: "PopoverSelect",
  171. referName: "SUPPLIER_PARAM",
  172. dataMapping: {
  173. contractPartyc: "code",
  174. contractPartycName: "name",
  175. },
  176. },
  177. {
  178. key: "guaranteePeriodEnd",
  179. title: "质保期限",
  180. inputType: "Input",
  181. require: true,
  182. },
  183. {
  184. key: "freightMethods",
  185. title: "运费承担方式",
  186. inputType: "Select",
  187. referName: "puarchase_contract_freight_methods",
  188. },
  189. {
  190. key: "signDate",
  191. title: "合同创建时间",
  192. inputType: "DatePicker",
  193. disabled: true,
  194. },
  195. {
  196. key: "isTarget",
  197. title: "是否有指标",
  198. inputType: "Select",
  199. require: true,
  200. referName: "sys_yes_no",
  201. },
  202. {
  203. key: "contractTarget",
  204. title: "合同指标",
  205. inputType: "Input",
  206. require: true,
  207. placeholder: '当【是否有指标】="有"时,必填',
  208. },
  209. {
  210. key: "exemptionPostageCondtion",
  211. title: "包邮条件",
  212. inputType: "Input",
  213. placeholder:
  214. "当运费承担方式为供应商有条件承担时,该字段必填,填写要求,写明什么条件下供应商承担全部,什么条件下我方承担,什么条件下分别承担",
  215. span: 12,
  216. },
  217. {
  218. key: "isRebate",
  219. title: "是否有返利",
  220. inputType: "Select",
  221. require: true,
  222. referName: "sys_yes_no",
  223. },
  224. {
  225. key: "rebatePolicy",
  226. title: "返利政策",
  227. inputType: "Input",
  228. placeholder: '当【是否有返利】="有"时,必填',
  229. span: 18,
  230. },
  231. { key: "externalContract", title: "外部合同号", inputType: "Input" },
  232. {
  233. key: "rollbackPolicy",
  234. title: "退换货政策",
  235. inputType: "Input",
  236. require: true,
  237. },
  238. { key: "enquiryCode", title: "询价单号", inputType: "Input" },
  239. {
  240. key: "contractContent",
  241. title: "合同主要内容",
  242. inputType: "Textarea",
  243. require: true,
  244. span: 24,
  245. },
  246. { key: "refusalReasons", title: "拒绝理由", inputType: "Input", span: 24 },
  247. {
  248. key: "externalFile",
  249. title: "对外附件",
  250. inputType: "Upload",
  251. span: 24,
  252. fileType: ["pdf"],
  253. },
  254. {
  255. key: "puFile",
  256. title: "采购商盖章合同附件",
  257. inputType: "Upload",
  258. span: 24,
  259. fileType: ["pdf"],
  260. },
  261. {
  262. key: "supplierFile",
  263. title: "供应商盖章合同附件",
  264. inputType: "Upload",
  265. span: 24,
  266. fileType: ["pdf"],
  267. },
  268. { key: "projectCode", title: "项目编号", inputType: "Input" },
  269. { key: "projectName", title: "项目名称", inputType: "Input" },
  270. { key: "area", title: "区域", inputType: "Input" },
  271. { key: "consigneePhone", title: "收货人联系方式", inputType: "Input" },
  272. {
  273. key: "paymentAgreement",
  274. title: "付款协议",
  275. inputType: "PopoverSelect",
  276. referName: "PAYAGREEMENT_PARAM",
  277. dataMapping: {
  278. paymentAgreement: "code",
  279. paymentAgreementName: "name",
  280. },
  281. require: true,
  282. },
  283. {
  284. key: "taxPrice",
  285. title: "价税合计",
  286. inputType: "InputNumber",
  287. },
  288. {
  289. key: "currencyName",
  290. title: "币种",
  291. inputType: "PopoverSelect",
  292. referName: "CURRENCY_PARAM",
  293. dataMapping: {
  294. currency: "code",
  295. currencyName: "name",
  296. },
  297. require: true,
  298. },
  299. { key: "guaranteePeriod", title: "质保期", inputType: "Input" },
  300. ];
  301. export const TabColumns = [
  302. {
  303. title: "物料基本信息",
  304. key: "contractItemList",
  305. tableColumns: [
  306. {
  307. title: "物料名称",
  308. key: "materialName",
  309. inputType: "PopoverSelect",
  310. width: 200,
  311. referName: "MATERIAL_PARAM",
  312. dataMapping: {
  313. material: "code",
  314. materialName: "name",
  315. puUnit: "unitIdName",
  316. registration: "registrationNo",
  317. specification: "specification",
  318. manufacturer: "manufacturerIdName",
  319. },
  320. },
  321. { title: "物料编码", key: "material", width: 200 },
  322. {
  323. title: "规格",
  324. key: "specification",
  325. width: 200,
  326. },
  327. // {
  328. // title: "品牌",
  329. // key: "brand",
  330. // inputType: "PopoverSelect",
  331. // width: 200,
  332. // referName: "MATERIAL_PARAM",
  333. // dataMapping: {
  334. // material: "code",
  335. // materialName: "name",
  336. // },
  337. // },
  338. {
  339. title: "生产厂家",
  340. key: "manufacturer",
  341. inputType: "Input",
  342. width: 200,
  343. },
  344. {
  345. title: "采购单位",
  346. key: "puUnit",
  347. inputType: "PopoverSelect",
  348. width: 200,
  349. referName: "UNIT_PARAM",
  350. dataMapping: {
  351. puUnit: "name",
  352. },
  353. },
  354. {
  355. title: "税率%",
  356. key: "tax",
  357. inputType: "PopoverSelect",
  358. referName: "TAX_RATE_PARAM",
  359. dataMapping: {
  360. tax: "ntaxrate",
  361. },
  362. width: 200,
  363. },
  364. {
  365. title: "采购数量",
  366. key: "qty",
  367. inputType: "InputNumber",
  368. width: 200,
  369. },
  370. {
  371. title: "含税单价",
  372. key: "taxPrice",
  373. inputType: "InputNumber",
  374. width: 200,
  375. },
  376. {
  377. title: "含税金额合计",
  378. key: "taxMoney",
  379. inputType: "ComputedInput",
  380. width: 200,
  381. computed: (prop) => {
  382. const { qty, taxPrice } = prop;
  383. const taxMoney = (qty * taxPrice).toFixed(8);
  384. return taxMoney === "NaN" ? null : taxMoney;
  385. },
  386. },
  387. {
  388. title: "无税单价",
  389. key: "taxFreePrice",
  390. inputType: "ComputedInput",
  391. width: 200,
  392. computed: (prop) => {
  393. const { tax, taxPrice } = prop;
  394. const newTax = Number(tax) / 100;
  395. const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
  396. return taxFreePrice === "NaN" ? null : taxFreePrice;
  397. },
  398. },
  399. {
  400. title: "无税金额合计",
  401. key: "taxFreeMoney",
  402. inputType: "ComputedInput",
  403. width: 200,
  404. computed: (prop) => {
  405. const { qty, taxFreePrice } = prop;
  406. const taxFreeMoney = (qty * taxFreePrice).toFixed(8);
  407. return taxFreeMoney === "NaN" ? null : taxFreeMoney;
  408. },
  409. },
  410. {
  411. title: "注册证号及备案凭证号",
  412. key: "registration",
  413. inputType: "Input",
  414. width: 200,
  415. },
  416. {
  417. title: "收货客户",
  418. key: "customerName",
  419. inputType: "PopoverSelect",
  420. width: 200,
  421. referName: "CUSTOMER_PARAM",
  422. dataMapping: {
  423. customer: "code",
  424. customerName: "name",
  425. },
  426. },
  427. ],
  428. },
  429. {
  430. title: "合同条款",
  431. key: "contractClauseList",
  432. tableColumns: [
  433. { title: "条款编码", key: "code", inputType: "Input" },
  434. { title: "条款名称", key: "name", inputType: "Input" },
  435. { title: "条款内容", key: "content", inputType: "Input" },
  436. { title: "变量序号", key: "variableRowno" },
  437. { title: "变量内容", key: "variableContent", inputType: "Input" },
  438. ],
  439. },
  440. {
  441. title: "合同费用",
  442. key: "contractExpenseList",
  443. tableColumns: [
  444. { title: "费用编码", key: "code", inputType: "Input" },
  445. { title: "费用名称", key: "name", inputType: "Input" },
  446. {
  447. title: "费用金额",
  448. key: "money",
  449. inputType: "InputNumber",
  450. width: 200,
  451. },
  452. ],
  453. },
  454. {
  455. title: "付款协议信息",
  456. key: "contractAgreementList",
  457. tableColumns: [
  458. {
  459. title: "付款阶段",
  460. key: "satge",
  461. inputType: "InputNumber",
  462. width: 200,
  463. },
  464. {
  465. title: "付款起点",
  466. key: "origin",
  467. width: 200,
  468. inputType: "Select",
  469. referName: "puarchase_contract_origin",
  470. },
  471. { title: "账期天数", key: "paymetDays", inputType: "Input", width: 200 },
  472. { title: "付款比例%", key: "ratio", inputType: "Input", width: 200 },
  473. { title: "付款金额", key: "money", inputType: "Input", width: 200 },
  474. {
  475. title: "是否预付款",
  476. key: "isAdvance",
  477. width: 200,
  478. inputType: "Select",
  479. referName: "sys_yes_no",
  480. },
  481. {
  482. title: "是否质保金",
  483. key: "isQuality",
  484. width: 200,
  485. inputType: "Select",
  486. referName: "sys_yes_no",
  487. },
  488. {
  489. title: "结算方式",
  490. key: "paymentMeans",
  491. inputType: "PopoverSelect",
  492. width: 200,
  493. referName: "BALATYPE_PARAM",
  494. dataMapping: {
  495. paymentMeans: "name",
  496. },
  497. },
  498. {
  499. title: "需进度确认",
  500. key: "schedule",
  501. inputType: "Select",
  502. referName: "sys_yes_no",
  503. width: 200,
  504. },
  505. ],
  506. },
  507. {
  508. title: "合同执行组织范围",
  509. key: "contractApplyOrgList",
  510. tableColumns: [
  511. {
  512. title: "组织名称",
  513. key: "orgName",
  514. inputType: "PopoverSelect",
  515. referName: "ORG_PARAM",
  516. dataMapping: {
  517. org: "code",
  518. orgName: "name",
  519. },
  520. },
  521. { title: "组织编码", key: "org" },
  522. ],
  523. },
  524. ];
  525. export default { FormColumns, TabColumns };