add.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. const columns = [
  2. {
  3. key: "puOrg",
  4. title: "采购组织",
  5. type: "InputDialog",
  6. config: {
  7. componentName: "Organization",
  8. dataMapping: { puOrg: "deptName" },
  9. },
  10. require: true,
  11. },
  12. { key: "code", title: "合同编码", type: "Input" },
  13. {
  14. key: "lastPuMoney",
  15. title: "上年度采购额",
  16. type: "Input",
  17. require: true,
  18. },
  19. {
  20. key: "buyer",
  21. title: "采购员",
  22. type: "InputDialog",
  23. config: {
  24. componentName: "User",
  25. dataMapping: {
  26. buyer: "userName",
  27. puDept: "deptName",
  28. },
  29. },
  30. require: true,
  31. },
  32. {
  33. key: "supplier",
  34. title: "供应商",
  35. type: "InputDialog",
  36. config: {
  37. componentName: "Supplier",
  38. dataMapping: { supplier: "name" },
  39. },
  40. require: true,
  41. },
  42. {
  43. key: "contractType",
  44. title: "合同类型",
  45. type: "Select",
  46. require: true,
  47. config: {
  48. optionsName: "purchase_contract_contract_type",
  49. },
  50. },
  51. {
  52. key: "puMoneyYear",
  53. title: "本年度采购额",
  54. type: "Input",
  55. require: true,
  56. },
  57. {
  58. key: "puDept",
  59. title: "采购部门",
  60. type: "InputDialog",
  61. config: { componentName: "Department" },
  62. require: true,
  63. },
  64. {
  65. key: "supplierTier",
  66. title: "供应商层级",
  67. type: "Select",
  68. require: true,
  69. config: {
  70. optionsName: "purchase_contract_supplier_tier",
  71. },
  72. },
  73. { key: "contractName", title: "合同名称", type: "Input", require: true },
  74. {
  75. key: "grossRateAverage",
  76. title: "平均毛利率",
  77. type: "Input",
  78. require: true,
  79. },
  80. {
  81. key: "approveFlow",
  82. title: "审批流程",
  83. type: "Select",
  84. require: true,
  85. config: {
  86. optionsName: "purchase_contract_approve_flow",
  87. },
  88. },
  89. {
  90. key: "consumableClass",
  91. title: "耗材类别",
  92. type: "Select",
  93. require: true,
  94. config: {
  95. optionsName: "purchase_contract_consumable_class",
  96. },
  97. },
  98. {
  99. key: "effectiveDate",
  100. title: "合同生效日期",
  101. type: "DatePicker",
  102. require: true,
  103. config: { type: "date" },
  104. },
  105. {
  106. key: "brandGrossRate",
  107. title: "同类品牌及毛利率",
  108. type: "Input",
  109. require: true,
  110. },
  111. {
  112. key: "contractFormat",
  113. title: "合同格式",
  114. type: "Input",
  115. require: true,
  116. },
  117. {
  118. key: "productName",
  119. title: "产品类别&名称",
  120. type: "Input",
  121. require: true,
  122. },
  123. {
  124. key: "endDate",
  125. title: "合同终止日期",
  126. type: "DatePicker",
  127. require: true,
  128. config: { type: "date" },
  129. },
  130. {
  131. key: "invoiceTax",
  132. title: "发票税率",
  133. type: "InputDialog",
  134. config: {
  135. componentName: "Tax",
  136. dataMapping: {
  137. invoiceTax: "mattaxesname",
  138. },
  139. },
  140. require: true,
  141. },
  142. {
  143. key: "emergencyDegree",
  144. title: "紧急程度",
  145. type: "Select",
  146. require: true,
  147. config: {
  148. optionsName: "purchase_contract_emergency_degree",
  149. },
  150. },
  151. { key: "project", title: "项目医院", type: "Input", require: true },
  152. {
  153. key: "signDate",
  154. title: "合同签订日期",
  155. type: "DatePicker",
  156. require: true,
  157. config: { type: "date" },
  158. },
  159. {
  160. key: "deliveryType",
  161. title: "交货方式",
  162. type: "Select",
  163. config: {
  164. optionsName: "purchase_contract_delivery_type",
  165. },
  166. },
  167. {
  168. key: "source",
  169. title: "合同来源",
  170. type: "Input",
  171. value: "自制",
  172. disabled: true,
  173. },
  174. {
  175. key: "contractPartyc",
  176. title: "合同丙方",
  177. type: "InputDialog",
  178. config: {
  179. componentName: "Supplier",
  180. dataMapping: {
  181. contractPartyc: "name",
  182. },
  183. },
  184. },
  185. {
  186. key: "guaranteePeriodEnd",
  187. title: "质保期限",
  188. type: "Input",
  189. require: true,
  190. },
  191. {
  192. key: "freightMethods",
  193. title: "运费承担方式",
  194. type: "Select",
  195. config: {
  196. optionsName: "purchase_contract_freight_methods",
  197. },
  198. },
  199. {
  200. key: "signDate",
  201. title: "合同创建时间",
  202. type: "DatePicker",
  203. disabled: true,
  204. config: { type: "date" },
  205. },
  206. {
  207. key: "isTarget",
  208. title: "是否有指标",
  209. type: "Select",
  210. require: true,
  211. config: {
  212. optionsName: "purchase_contract_is_target",
  213. },
  214. },
  215. {
  216. key: "contractTarget",
  217. title: "合同指标",
  218. type: "Input",
  219. require: true,
  220. placeholder: '当【是否有指标】="有"时,必填',
  221. },
  222. {
  223. key: "exemptionPostageCondtion",
  224. title: "包邮条件",
  225. type: "Input",
  226. placeholder:
  227. "当运费承担方式为供应商有条件承担时,该字段必填,填写要求,写明什么条件下供应商承担全部,什么条件下我方承担,什么条件下分别承担",
  228. span: 12,
  229. },
  230. {
  231. key: "isRebate",
  232. title: "是否有返利",
  233. type: "Select",
  234. require: true,
  235. config: {
  236. optionsName: "purchase_contract_is_rebate",
  237. },
  238. },
  239. {
  240. key: "rebatePolicy",
  241. title: "返利政策",
  242. type: "Input",
  243. placeholder: '当【是否有返利】="有"时,必填',
  244. span: 18,
  245. },
  246. { key: "externalContract", title: "外部合同号", type: "Input" },
  247. {
  248. key: "rollbackPolicy",
  249. title: "退换货政策",
  250. type: "Input",
  251. require: true,
  252. },
  253. {
  254. key: "contractContent",
  255. title: "合同主要内容",
  256. type: "Textarea",
  257. require: true,
  258. span: 24,
  259. },
  260. { key: "refusalReasons", title: "拒绝理由", type: "Input", span: 24 },
  261. { key: "enquiryCode", title: "询价单号", type: "Input" },
  262. { key: "externalFile", title: "对外附件", type: "Upload", span: 24 },
  263. { key: "puFile", title: "采购商盖章合同附件", type: "Upload", span: 24 },
  264. {
  265. key: "supplierFile",
  266. title: "供应商盖章合同附件",
  267. type: "Upload",
  268. span: 24,
  269. },
  270. { key: "projectCode", title: "项目编号", type: "Input" },
  271. { key: "projectName", title: "项目名称", type: "Input" },
  272. { key: "area", title: "区域", type: "Input" },
  273. { key: "consigneePhone", title: "收货人联系方式", type: "Input" },
  274. {
  275. key: "paymentAgreement",
  276. title: "付款协议",
  277. type: "InputDialog",
  278. config: {
  279. componentName: "PaymentPlan",
  280. dataMapping: {
  281. buyer: "userName",
  282. puDept: "deptName",
  283. },
  284. },
  285. require: true,
  286. },
  287. {
  288. key: "taxPrice",
  289. title: "价税合计",
  290. type: "InputNumber",
  291. config: { controlsPosition: "right" },
  292. },
  293. {
  294. key: "currency",
  295. title: "币种",
  296. type: "InputDialog",
  297. config: {
  298. componentName: "Currency",
  299. dataMapping: {
  300. currency: "name",
  301. },
  302. },
  303. require: true,
  304. },
  305. { key: "guaranteePeriod", title: "质保期", type: "Input" },
  306. // { key: "buyerName", title: "采购员名称" },
  307. // { key: "supplierName", title: "供应商名称" },
  308. // { key: "puDeptName", title: "采购部门名称" },
  309. // { key: "contractPartycName", title: "合同丙方名称" },
  310. // { key: "currencyName", title: "币种名称" },
  311. // { key: "tenantId", title: "租户号" },
  312. // { key: "revision", title: "乐观锁" },
  313. // { key: "createByName", title: "创建人" },
  314. // { key: "updateByName", title: "创建人名称" },
  315. // { key: "delFlag", title: "删除标记" },
  316. ];
  317. export const initColumns = () => columns;
  318. const tabColumns = [
  319. {
  320. title: "物料基本信息",
  321. key: "first",
  322. tableColumns: [
  323. { title: "序号", key: "" },
  324. { title: "赠品", key: "" },
  325. { title: "物料编码", key: "" },
  326. { title: "物料名称", key: "" },
  327. { title: "规格", key: "" },
  328. { title: "生产厂家", key: "" },
  329. { title: "收货客户", key: "" },
  330. { title: "品牌", key: "" },
  331. { title: "采购数量", key: "" },
  332. { title: "采购单位", key: "" },
  333. { title: "计价数量", key: "" },
  334. { title: "税率%", key: "" },
  335. { title: "含税单价", key: "" },
  336. { title: "含税金额合计", key: "", width: 150 },
  337. { title: "价格有效期(起)", key: "", width: 150 },
  338. { title: "计划到货日期", key: "", width: 150 },
  339. { title: "来源类型", key: "" },
  340. { title: "来源单号", key: "" },
  341. { title: "需求单号", key: "" },
  342. { title: "备注", key: "" },
  343. ],
  344. },
  345. {
  346. title: "合同条款",
  347. key: "second",
  348. tableColumns: [
  349. { title: "序号", key: "" },
  350. { title: "条款编码", key: "" },
  351. { title: "条款名称", key: "" },
  352. { title: "条款内容", key: "" },
  353. { title: "变量序号", key: "" },
  354. { title: "变量内容", key: "" },
  355. { title: "备注", key: "" },
  356. ],
  357. },
  358. {
  359. title: "合同费用",
  360. key: "third",
  361. tableColumns: [
  362. { title: "序号", key: "" },
  363. { title: "费用编码", key: "" },
  364. { title: "费用名称", key: "" },
  365. { title: "费用金额", key: "" },
  366. { title: "备注", key: "" },
  367. ],
  368. },
  369. {
  370. title: "付款协议信息",
  371. key: "fourth",
  372. tableColumns: [
  373. { title: "序号", key: "" },
  374. { title: "付款阶段", key: "" },
  375. { title: "是否预付款", key: "" },
  376. { title: "是否质保金", key: "" },
  377. { title: "结算方式", key: "" },
  378. { title: "付款起点", key: "" },
  379. { title: "付款金额", key: "" },
  380. { title: "付款比例%", key: "" },
  381. { title: "账期天数", key: "" },
  382. { title: "备注", key: "" },
  383. ],
  384. },
  385. {
  386. title: "合同执行组织范围",
  387. key: "fifth",
  388. tableColumns: [
  389. { title: "序号", key: "" },
  390. { title: "组织名称", key: "" },
  391. { title: "组织编码", key: "" },
  392. ],
  393. },
  394. ];
  395. export const initTabColumns = () => tabColumns;