columns.js 21 KB

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