columns.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. export default function useColumns(){
  2. const TabColumns = [
  3. // 基本信息
  4. {
  5. item:{
  6. key: 'sysMaterialApply',
  7. title: '基本信息',
  8. },
  9. attr:{
  10. is: 'el-super-form',
  11. value:{},
  12. },
  13. TableColumns:[
  14. {
  15. item:{
  16. key:'name',
  17. title:'物料名称',
  18. required:true,
  19. },
  20. attr:{
  21. is: "el-input",
  22. // is: "el-popover-select-v2",
  23. // valueKey: "name",
  24. // referName: "MATERIAL_PARAM",
  25. // dataMapping: {
  26. // classifyId: 'classifyId',
  27. // classifyName: 'classifyIdName',
  28. // isMedicine: 'isMedicine',
  29. // unitId: 'unitId',
  30. // unitName: 'unitIdName',
  31. // packExplain: 'packExplain',
  32. // isInventoryStatus: 'isInventoryStatus',
  33. // manufacturerId: 'manufacturerId',
  34. // manufacturerName: 'manufacturerIdName',
  35. // deliveryPeriod: 'deliveryPeriod',
  36. // expiryDateManagerment: 'expiryDateManagerment',
  37. // registrant: 'registrant',
  38. // minOrderQty: 'minOrderQty',
  39. // expiryUnitId: 'expiryUnitId',
  40. // productionPermit: 'productionPermit',
  41. // minPackQty: 'minPackQty',
  42. // usefulLife: 'usefulLife',
  43. // storageCondition: 'storageCondition',
  44. // minBatchQty: 'minBatchQty',
  45. // usefulLifeUnitId: 'usefulLifeUnitId',
  46. // transportationCondition: 'transportationCondition',
  47. // materialRate: 'materialRate',
  48. // materialRateName: 'materialRateName',
  49. // nearOnsetManagerment: 'nearOnsetManagerment',
  50. // originPlace: 'originPlace',
  51. // originPlaceName: 'originPlaceName',
  52. // purchasingOrganization: 'purchasingOrganization',
  53. // purchasingOrganizationName: 'purchasingOrganizationName',
  54. // recentWarningPeriod: 'recentWarningPeriod',
  55. // brand:'brand',
  56. // puPersonnelId:'puPersonnelId',
  57. // puPersonnelName:'puPersonnelIdName',
  58. // },
  59. },
  60. },
  61. {
  62. item:{
  63. key:'code',
  64. title:'物料编码',
  65. },
  66. attr:{
  67. is: "el-input",
  68. disabled: true,
  69. },
  70. },
  71. {
  72. item:{
  73. key:'version',
  74. title:'版本号',
  75. },
  76. attr:{
  77. is: "el-input",
  78. disabled: true,
  79. },
  80. },
  81. {
  82. item:{
  83. key:'orgName',
  84. title:'所属组织',
  85. },
  86. attr:{
  87. is: "el-popover-select-v2",
  88. valueKey: "name",
  89. referName: "ORG_PARAM",
  90. dataMapping: {
  91. orgId:'id'
  92. },
  93. disabled:true,
  94. },
  95. },
  96. {
  97. item:{
  98. key:'specification',
  99. title:'规格',
  100. required: true,
  101. },
  102. attr:{
  103. is: "el-input",
  104. },
  105. },
  106. {
  107. item:{
  108. // key:'classifyId',
  109. key:'classifyName',
  110. title:'四级分类',
  111. required: true,
  112. },
  113. attr:{
  114. is: "el-popover-tree-select",
  115. referName: "MATERIALCLASSIFY_PARAM",
  116. valueKey: "name",
  117. // 末级
  118. onlyFinal: true,
  119. defaultProps: {
  120. label: function (data, node) {
  121. return data.code + " " + data.name;
  122. },
  123. children: "children",
  124. },
  125. dataMapping: {
  126. classifyId:'id'
  127. }
  128. },
  129. },
  130. {
  131. item:{
  132. key:'isMedicine',
  133. title:'医药物料',
  134. },
  135. attr:{
  136. is: "el-select",
  137. dictName: "sys_number_yes_no", // 字典名
  138. },
  139. },
  140. {
  141. item:{
  142. key:'failCause',
  143. title:'同步失败原因',
  144. },
  145. attr:{
  146. is: "el-input",
  147. },
  148. },
  149. {
  150. item:{
  151. key:'model',
  152. title:'型号',
  153. },
  154. attr:{
  155. is: "el-input",
  156. },
  157. },
  158. {
  159. item:{
  160. key:'packExplain',
  161. title:'包装说明',
  162. required: true,
  163. },
  164. attr:{
  165. is: "el-input",
  166. },
  167. },
  168. {
  169. item:{
  170. key:'serialNoManager',
  171. title:'序列号管理',
  172. },
  173. attr:{
  174. is: "el-select",
  175. dictName: "sys_number_yes_no",
  176. },
  177. },
  178. {
  179. item:{
  180. key:'barCode',
  181. title:'条形码',
  182. },
  183. attr:{
  184. is: "el-input",
  185. },
  186. },
  187. {
  188. // 单位
  189. item:{
  190. key:'unitName',
  191. title:'计量单位',
  192. required: true,
  193. },
  194. attr:{
  195. is: "el-popover-select-v2",
  196. valueKey: "name",
  197. referName: "UNIT_PARAM",
  198. dataMapping: {
  199. unitId:'id'
  200. }
  201. },
  202. },
  203. {
  204. item:{
  205. key:'deliveryPeriod',
  206. title:'交货周期',
  207. required: true,
  208. },
  209. attr:{
  210. is: "el-input-number",
  211. min: 0,
  212. controlsPosition: "right",
  213. },
  214. },
  215. {
  216. item:{
  217. key:'isInventoryStatus',
  218. title:'批号及库存状态管理',
  219. },
  220. attr:{
  221. is: "el-select",
  222. dictName: "sys_number_yes_no",
  223. },
  224. },
  225. {
  226. item:{
  227. key:'height',
  228. title:'高度',
  229. },
  230. attr:{
  231. is: "el-input-number",
  232. min: 0,
  233. controlsPosition: "right",
  234. },
  235. },
  236. {
  237. item:{
  238. key:'manufacturerName',
  239. title:'生产厂家/代理人',
  240. required: true,
  241. },
  242. attr:{
  243. is: "el-popover-select-v2",
  244. valueKey: "name",
  245. referName: "MANUFACTURER_PARAM",
  246. dataMapping: {
  247. manufacturerId: 'id',
  248. brand:"brand" ,
  249. originPlaceName: "countryName" ,
  250. originPlace: "countryId",
  251. registrant: "registrantName" ,
  252. productionPermit: "productionLicense",
  253. }
  254. },
  255. },
  256. {
  257. item:{
  258. key:'minOrderQty',
  259. title:'最小起订量',
  260. required: true,
  261. },
  262. attr:{
  263. is: "el-input-number",
  264. min: 0,
  265. controlsPosition: "right",
  266. },
  267. },
  268. {
  269. item:{
  270. key:'expiryDateManagerment',
  271. title:'效期管理',
  272. },
  273. attr:{
  274. is: "el-select",
  275. dictName: "sys_number_yes_no",
  276. },
  277. },
  278. {
  279. item:{
  280. key:'width',
  281. title:'宽度',
  282. },
  283. attr:{
  284. is: "el-input-number",
  285. min: 0,
  286. controlsPosition: "right",
  287. },
  288. },
  289. {
  290. item:{
  291. key:'registrant',
  292. title:'注册人/上市许可持有人',
  293. required: true,
  294. },
  295. attr:{
  296. is: "el-input",
  297. },
  298. },
  299. {
  300. item:{
  301. key:'minPackQty',
  302. title:'最小包装量',
  303. required: true,
  304. },
  305. attr:{
  306. is: "el-input-number",
  307. min: 0,
  308. controlsPosition: "right",
  309. },
  310. },
  311. {
  312. item:{
  313. key:'expiryUnitId',
  314. title:'效期单位',
  315. },
  316. attr:{
  317. is: "el-select",
  318. dictName: "period_unit",
  319. },
  320. },
  321. {
  322. item:{
  323. key:'length',
  324. title:'长度',
  325. },
  326. attr:{
  327. is: "el-input-number",
  328. min: 0,
  329. controlsPosition: "right",
  330. },
  331. },
  332. {
  333. item:{
  334. key:'productionPermit',
  335. title:'生产许可证',
  336. },
  337. attr:{
  338. is: "el-input",
  339. },
  340. },
  341. {
  342. item:{
  343. key:'minBatchQty',
  344. title:'最小批量',
  345. required: true,
  346. },
  347. attr:{
  348. is: "el-input-number",
  349. min: 0,
  350. controlsPosition: "right",
  351. },
  352. },
  353. {
  354. item:{
  355. key:'usefulLife',
  356. title:'有效期',
  357. },
  358. attr:{
  359. is: "el-input-number",
  360. min: 0,
  361. controlsPosition: "right",
  362. },
  363. },
  364. {
  365. item:{
  366. key:'oneClass',
  367. title:'一级分类',
  368. },
  369. attr:{
  370. is: "el-input",
  371. disabled: true,
  372. },
  373. },
  374. {
  375. item:{
  376. key:'storageCondition',
  377. title:'存储条件',
  378. required: true,
  379. },
  380. attr:{
  381. is: "el-select",
  382. dictName: "sys_storage_condition",
  383. },
  384. },
  385. {
  386. item:{
  387. key:'diCode',
  388. title:'DI码',
  389. },
  390. attr:{
  391. is: "el-input",
  392. },
  393. },
  394. {
  395. item:{
  396. key:'usefulLifeUnitId',
  397. title:'有效期至单位',
  398. },
  399. attr:{
  400. is: "el-select",
  401. dictName: "expiry_date",
  402. },
  403. },
  404. {
  405. item:{
  406. key:'twoClass',
  407. title:'二级分类',
  408. },
  409. attr:{
  410. is: "el-input",
  411. disabled: true,
  412. },
  413. },
  414. {
  415. item:{
  416. key:'transportationCondition',
  417. title:'运输条件',
  418. },
  419. attr:{
  420. is: "el-select",
  421. dictName: "sys_conditions_carriage",
  422. },
  423. },
  424. {
  425. item:{
  426. key:'healthCode',
  427. title:'医保代码',
  428. },
  429. attr:{
  430. is: "el-input",
  431. },
  432. },
  433. {
  434. item:{
  435. key:'nearOnsetManagerment',
  436. title:'近效期管理',
  437. },
  438. attr:{
  439. is: "el-select",
  440. dictName: "sys_number_yes_no",
  441. },
  442. },
  443. {
  444. item:{
  445. key:'threeClass',
  446. title:'三级分类',
  447. },
  448. attr:{
  449. is: "el-input",
  450. disabled: true,
  451. },
  452. },
  453. {
  454. item:{
  455. key:'originPlaceName',
  456. title:'产地',
  457. required: true,
  458. },
  459. attr:{
  460. is: "el-popover-select-v2",
  461. valueKey: "name",
  462. referName: "ORIGINPLACE_PARAM",
  463. dataMapping: {
  464. originPlace: 'id'
  465. },
  466. disabled: true,
  467. },
  468. },
  469. {
  470. item:{
  471. key:'manufacturersMaterialCode',
  472. title:'厂家物料编码',
  473. },
  474. attr:{
  475. is: "el-input",
  476. },
  477. },
  478. {
  479. item:{
  480. key:'recentWarningPeriod',
  481. title:'近效期预警天数',
  482. },
  483. attr:{
  484. is: "el-input-number",
  485. min: 0,
  486. controlsPosition: "right",
  487. },
  488. },
  489. {
  490. item:{
  491. key:'isEnable',
  492. title:'启用状态',
  493. },
  494. attr:{
  495. is: "el-select",
  496. dictName: "material_enable",
  497. disabled: true,
  498. },
  499. },
  500. {
  501. item:{
  502. key:'serviceLife',
  503. title:'使用期限/次数',
  504. },
  505. attr:{
  506. is: "el-input",
  507. },
  508. },
  509. {
  510. item:{
  511. key:'purchasingOrganizationName',
  512. title:'默认采购组织',
  513. required: true,
  514. },
  515. attr:{
  516. is: "el-popover-select-v2",
  517. valueKey: "name",
  518. referName: "ORG_PARAM",
  519. dataMapping: {
  520. purchasingOrganization:'id'
  521. },
  522. },
  523. },
  524. {
  525. item:{
  526. key:'materialRateName',
  527. title:'物料税类',
  528. required: true,
  529. },
  530. attr:{
  531. is: "el-popover-select-v2",
  532. valueKey: "name",
  533. referName: "MATERIALTAX_PARAM",
  534. dataMapping: {
  535. materialRate: "code",
  536. },
  537. },
  538. },
  539. {
  540. item:{
  541. key:'remark',
  542. title:'备注',
  543. },
  544. attr:{
  545. is: "el-input",
  546. },
  547. },
  548. {
  549. item:{
  550. key:'brand',
  551. title:'品牌',
  552. },
  553. attr:{
  554. is: "el-input",
  555. disabled: true,
  556. },
  557. },
  558. {
  559. item:{
  560. key:'puPersonnelName',
  561. title:'负责采购员',
  562. required: true,
  563. },
  564. attr:{
  565. is: "el-popover-select-v2",
  566. referName: "CONTACTS_PARAM",
  567. valueKey: "name",
  568. dataMapping: {
  569. puPersonnelId: "code",
  570. },
  571. },
  572. },
  573. {
  574. item:{
  575. key:'proposerName',
  576. title:'物料申请人',
  577. },
  578. attr:{
  579. // is: "el-input",
  580. // PSNLICENSE_PARAM
  581. disabled: true,
  582. is: "el-popover-select-v2",
  583. referName: "CONTACTS_PARAM",
  584. valueKey: "name",
  585. dataMapping:{
  586. proposerId: 'code'
  587. }
  588. },
  589. },
  590. {
  591. item:{
  592. key:'serviceClass',
  593. title:'服务类',
  594. },
  595. attr:{
  596. is: "el-input",
  597. // min: 0,
  598. // controlsPosition: "right",
  599. disabled: true,
  600. },
  601. },
  602. ].map(({ item, attr }) => ({
  603. attr,
  604. item: { ...item, hidden: true, span: item.span || 6 },
  605. })),
  606. },
  607. // 医药属性
  608. {
  609. item:{
  610. key:'sysMaterialMedcineApply',
  611. title:'医药属性',
  612. },
  613. attr:{
  614. is: 'el-super-form',
  615. value:{},
  616. },
  617. TableColumns:[
  618. {
  619. item:{
  620. key:'isDrug',
  621. title:'药品',
  622. },
  623. attr:{
  624. is: "el-select",
  625. dictName: "sys_medicine", // 字典名
  626. },
  627. },
  628. {
  629. item:{
  630. key:'registrationNo',
  631. title:'注册证号/备案凭证编号',
  632. },
  633. attr:{
  634. is: "el-input",
  635. },
  636. },
  637. {
  638. item:{
  639. key:'medicalInstruments',
  640. title:'管理类别',
  641. },
  642. attr:{
  643. is: "el-select",
  644. dictName: "medical_instruments", // 字典名
  645. },
  646. },
  647. {
  648. item:{
  649. key:'commonName',
  650. title:'通用名称',
  651. },
  652. attr:{
  653. is: "el-input",
  654. },
  655. },
  656. {
  657. item:{
  658. key:'ratifyBatchNo',
  659. title:'批准文号',
  660. },
  661. attr:{
  662. is: "el-input",
  663. },
  664. },
  665. {
  666. item:{
  667. key:'dosageFromName',
  668. title:'剂型',
  669. },
  670. attr:{
  671. is: "el-popover-tree-select",
  672. referName: "DOSAGEFORM_PARAM",
  673. valueKey: "name",
  674. dataMapping: {
  675. dosageFrom:'id'
  676. }
  677. },
  678. },
  679. {
  680. item:{
  681. key:'oriRegistrationNo',
  682. title:'旧注册证号',
  683. },
  684. attr:{
  685. is: "el-input",
  686. },
  687. },
  688. {
  689. item:{
  690. key:'curingType',
  691. title:'养护类型',
  692. },
  693. attr:{
  694. is: "el-select",
  695. dictName: "curing_type", // 字典名
  696. },
  697. }
  698. ].map(({ item, attr }) => ({
  699. attr,
  700. item: { ...item, hidden: true, span: item.span || 6 },
  701. })),
  702. },
  703. // 维护物料类别
  704. {
  705. item:{
  706. key:'sysMaterialMedcineItemApply',
  707. title:'维护物料类别',
  708. },
  709. attr:{
  710. is: 'el-super-ux-table',
  711. value:[]
  712. },
  713. TableColumns:[
  714. {
  715. item:{
  716. key:'drugId',
  717. title:'ID',
  718. },
  719. attr:{
  720. is: "el-input",
  721. readonly:true,
  722. },
  723. },
  724. {
  725. item:{
  726. key:'drugCode',
  727. title:'药品类别编码',
  728. require: true,
  729. },
  730. attr:{
  731. is: "el-input",
  732. readonly:true,
  733. },
  734. },
  735. {
  736. item:{
  737. key:'drugName',
  738. title:'药品类别名称',
  739. require: true,
  740. },
  741. attr:{
  742. is: "el-input",
  743. // MEDICINE_DRUG
  744. // is: "el-popover-select-v2",
  745. // valueKey: "name",
  746. // referName: "ORG_PARAM",
  747. // dataMapping: {
  748. // // drugCode: undefined,
  749. // // drugId: undefined
  750. // },
  751. readonly:true,
  752. },
  753. },
  754. ].map(({ item, attr }) => ({
  755. attr,
  756. item: { ...item, hidden: true, span: item.span || 6 },
  757. }))
  758. },
  759. // 单据信息
  760. {
  761. item:{
  762. key:'applyBillInfo',
  763. title:'单据信息',
  764. },
  765. attr:{
  766. is: 'el-super-form',
  767. value:{},
  768. },
  769. TableColumns:[
  770. {
  771. item:{
  772. key:'createByName',
  773. title:'申请人',
  774. },
  775. attr:{
  776. is: "el-input",
  777. disabled:true,
  778. },
  779. },
  780. {
  781. item:{
  782. key:'createTime',
  783. title:'申请时间',
  784. },
  785. attr:{
  786. is: "el-date-picker",
  787. valueFormat: "yyyy-MM-dd HH:mm:ss",
  788. disabled:true,
  789. },
  790. },
  791. {
  792. item:{
  793. key:'createByName',
  794. title:'创建人',
  795. },
  796. attr:{
  797. is: "el-input",
  798. disabled:true,
  799. },
  800. },
  801. {
  802. item:{
  803. key:'createTime',
  804. title:'创建时间',
  805. },
  806. attr:{
  807. is: "el-date-picker",
  808. valueFormat: "yyyy-MM-dd HH:mm:ss",
  809. disabled:true,
  810. },
  811. },
  812. {
  813. item:{
  814. key:'updateByName',
  815. title:'最后修改人',
  816. },
  817. attr:{
  818. is: "el-input",
  819. disabled:true,
  820. },
  821. },
  822. {
  823. item:{
  824. key:'updateTime',
  825. title:'最后修改时间',
  826. },
  827. attr:{
  828. is: "el-date-picker",
  829. valueFormat: "yyyy-MM-dd HH:mm:ss",
  830. disabled:true,
  831. },
  832. },
  833. {
  834. item:{
  835. key:'status',
  836. title:'单据状态',
  837. },
  838. attr:{
  839. is: "el-select",
  840. dictName: "documents_status", // 字典名
  841. disabled:true,
  842. },
  843. },
  844. // {
  845. // item:{
  846. // key:'reviewedByName',
  847. // title:'最后审核人',
  848. // },
  849. // attr:{
  850. // is: "el-input",
  851. // disabled:true,
  852. // },
  853. // },
  854. // {
  855. // item:{
  856. // key:'approvalTime',
  857. // title:'最后审核时间',
  858. // },
  859. // attr:{
  860. // is: "el-date-picker",
  861. // valueFormat: "yyyy-MM-dd HH:mm:ss",
  862. // disabled:true,
  863. // },
  864. // },
  865. ].map(({ item, attr }) => ({
  866. attr,
  867. item: { ...item, hidden: true, span: item.span || 6 },
  868. })),
  869. },
  870. ]
  871. const MaterialColums = [
  872. {
  873. item:{
  874. key:'name',
  875. title:'物料',
  876. },
  877. attr:{
  878. is: "el-popover-select-v2",
  879. valueKey: "name",
  880. referName: "MATERIAL_PARAM",
  881. dataMapping: {
  882. classifyId: 'classifyId',
  883. classifyName: 'classifyIdName',
  884. isMedicine: 'isMedicine',
  885. unitId: 'unitId',
  886. unitName: 'unitIdName',
  887. packExplain: 'packExplain',
  888. isInventoryStatus: 'isInventoryStatus',
  889. manufacturerId: 'manufacturerId',
  890. manufacturerName: 'manufacturerIdName',
  891. deliveryPeriod: 'deliveryPeriod',
  892. expiryDateManagerment: 'expiryDateManagerment',
  893. registrant: 'registrant',
  894. minOrderQty: 'minOrderQty',
  895. expiryUnitId: 'expiryUnitId',
  896. productionPermit: 'productionPermit',
  897. minPackQty: 'minPackQty',
  898. usefulLife: 'usefulLife',
  899. storageCondition: 'storageCondition',
  900. minBatchQty: 'minBatchQty',
  901. usefulLifeUnitId: 'usefulLifeUnitId',
  902. transportationCondition: 'transportationCondition',
  903. materialRate: 'materialRate',
  904. materialRateName: 'materialRateName',
  905. nearOnsetManagerment: 'nearOnsetManagerment',
  906. originPlace: 'originPlace',
  907. originPlaceName: 'originPlaceName',
  908. purchasingOrganization: 'purchasingOrganization',
  909. purchasingOrganizationName: 'purchasingOrganizationName',
  910. recentWarningPeriod: 'recentWarningPeriod',
  911. brand:'brand',
  912. puPersonnelId:'puPersonnelId',
  913. puPersonnelName:'puPersonnelIdName',
  914. },
  915. },
  916. },
  917. ]
  918. return { TabColumns, MaterialColums }
  919. }