api.d.ts 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. /**
  2. * API 类型定义
  3. */
  4. declare namespace Api {
  5. namespace Auth {
  6. interface UserInfo {
  7. userId?: string
  8. id?: string
  9. username: string
  10. realName?: string
  11. phone?: string
  12. email?: string
  13. sex?: string
  14. remark?: string
  15. role: string
  16. roleNames?: string[]
  17. regionId?: string
  18. regionName?: string
  19. roles?: string[]
  20. /** 自定义头像 URL,空则前端使用 `/avatart.png` */
  21. avatarUrl?: string | null
  22. }
  23. interface LoginParams {
  24. username: string
  25. password: string
  26. }
  27. interface LoginResponse {
  28. token: string
  29. refreshToken: string
  30. expiresIn: number
  31. userInfo: UserInfo
  32. }
  33. }
  34. namespace User {
  35. interface UserItem {
  36. id: string
  37. deptId: string
  38. supervisorUserId?: string
  39. userNo: string
  40. nickName: string
  41. email: string
  42. phoneNo: string
  43. hireDate?: string
  44. probationMonths?: number | null
  45. lastWorkDay?: string
  46. sex: string
  47. avatar: string
  48. status: string
  49. tenantNo: string
  50. orderNum: number
  51. remark: string
  52. createTime: string
  53. updateTime: string
  54. deptName?: string
  55. roleIds?: string[]
  56. postIds?: string[]
  57. /** 经启用职位继承的启用角色 ID */
  58. postInheritedRoleIds?: string[]
  59. /** 有效角色 ID(启用直接绑定 ∪ 职位继承) */
  60. effectiveRoleIds?: string[]
  61. /** 有效角色名称 */
  62. effectiveRoleNames?: string[]
  63. }
  64. }
  65. namespace Region {
  66. interface RegionItem {
  67. id: string
  68. name: string
  69. code: string
  70. description?: string
  71. sortOrder: number
  72. isActive: boolean
  73. createAt: string
  74. }
  75. interface RegionDetail extends RegionItem {
  76. updateAt: string
  77. updateBy: string
  78. }
  79. }
  80. namespace Category {
  81. interface CategoryItem {
  82. id: string
  83. name: string
  84. imageUrl?: string
  85. parentId?: string
  86. parentName?: string
  87. sortOrder: number
  88. isActive: boolean
  89. createAt: string
  90. }
  91. }
  92. namespace Unit {
  93. interface UnitItem {
  94. id: string
  95. name: string
  96. code: string
  97. isActive: boolean
  98. createAt: string
  99. }
  100. }
  101. namespace Tenant {
  102. interface TenantItem {
  103. id: string
  104. tenantNo: string
  105. tenantName: string
  106. contactName: string
  107. contactPhone: string
  108. orderNum: number
  109. remark: string
  110. createTime: string
  111. updateTime: string
  112. }
  113. }
  114. namespace Product {
  115. interface ProductItem {
  116. id: string
  117. name: string
  118. categoryId?: string
  119. categoryName?: string
  120. unitId?: string
  121. unitName?: string
  122. description?: string
  123. imageUrl?: string
  124. isActive: boolean
  125. createAt: string
  126. }
  127. interface ProductDetail extends ProductItem {
  128. updateAt: string
  129. updateBy: string
  130. }
  131. // 商品轮播图
  132. interface ProductBanner {
  133. id: string
  134. productId: string
  135. mediaType: string
  136. fileUrl: string
  137. thumbnailUrl?: string
  138. sortOrder: number
  139. createAt: string
  140. }
  141. interface ProductBannerCreate {
  142. mediaType?: string
  143. fileUrl: string
  144. thumbnailUrl?: string
  145. sortOrder?: number
  146. }
  147. interface ProductBannerUpdate {
  148. mediaType?: string
  149. fileUrl?: string
  150. thumbnailUrl?: string
  151. sortOrder?: number
  152. }
  153. // 商品详情媒体
  154. interface ProductDetailMedia {
  155. id: string
  156. productId: string
  157. contentType: string
  158. contentText?: string
  159. fileUrl?: string
  160. thumbnailUrl?: string
  161. description?: string
  162. sortOrder: number
  163. createAt: string
  164. }
  165. interface ProductDetailMediaCreate {
  166. contentType?: string
  167. contentText?: string
  168. fileUrl?: string
  169. thumbnailUrl?: string
  170. description?: string
  171. sortOrder?: number
  172. }
  173. interface ProductDetailMediaUpdate {
  174. contentType?: string
  175. contentText?: string
  176. fileUrl?: string
  177. thumbnailUrl?: string
  178. description?: string
  179. sortOrder?: number
  180. }
  181. // 商品参数模板
  182. interface ProductParameter {
  183. id: string
  184. name: string
  185. code: string
  186. paramType: string
  187. options?: string
  188. placeholder?: string
  189. isRequired: number
  190. isActive: number
  191. sortOrder: number
  192. remark?: string
  193. createAt: string
  194. }
  195. interface ProductParameterSimple {
  196. id: string
  197. name: string
  198. code: string
  199. paramType: string
  200. options?: string
  201. }
  202. interface ProductParameterCreate {
  203. name: string
  204. code: string
  205. paramType?: string
  206. options?: string
  207. placeholder?: string
  208. isRequired?: number
  209. isActive?: number
  210. sortOrder?: number
  211. remark?: string
  212. }
  213. interface ProductParameterUpdate {
  214. name?: string
  215. code?: string
  216. paramType?: string
  217. options?: string
  218. placeholder?: string
  219. isRequired?: number
  220. isActive?: number
  221. sortOrder?: number
  222. remark?: string
  223. }
  224. // 分类参数关联
  225. interface CategoryParameter {
  226. id: string
  227. categoryId: string
  228. parameterId: string
  229. parameterName: string
  230. parameterCode: string
  231. paramType: string
  232. options?: string
  233. placeholder?: string
  234. isRequired: number
  235. defaultValue?: string
  236. sortOrder: number
  237. }
  238. interface CategoryParameterCreate {
  239. categoryId: string
  240. parameterId: string
  241. isRequired?: number
  242. defaultValue?: string
  243. sortOrder?: number
  244. }
  245. // 商品参数值
  246. interface ProductParameterValue {
  247. id: string
  248. productId: string
  249. parameterId: string
  250. parameterName?: string
  251. parameterCode?: string
  252. paramType?: string
  253. options?: string
  254. placeholder?: string
  255. paramValue?: string
  256. sortOrder: number
  257. }
  258. interface ProductParameterValueCreate {
  259. productId: string
  260. parameterId: string
  261. paramValue?: string
  262. }
  263. // 售后评价
  264. interface ProductReview {
  265. id: string
  266. productId: string
  267. orderId?: string
  268. orderItemId?: string
  269. userId: string
  270. userName?: string
  271. rating: number
  272. ratingTags?: string
  273. content?: string
  274. isAnonymous: number
  275. replyContent?: string
  276. replyTime?: string
  277. replyBy?: string
  278. replyByName?: string
  279. likeCount: number
  280. isTop: number
  281. status: string
  282. rejectReason?: string
  283. createAt: string
  284. mediaList?: ProductReviewMedia[]
  285. }
  286. interface ProductReviewMedia {
  287. id: string
  288. reviewId: string
  289. mediaType: string
  290. fileUrl: string
  291. thumbnailUrl?: string
  292. sortOrder: number
  293. }
  294. interface ProductReviewStatistics {
  295. totalCount: number
  296. pendingCount: number
  297. approvedCount: number
  298. rejectedCount: number
  299. avgRating: number
  300. ratingDistribution: Record<string, number>
  301. }
  302. }
  303. namespace Order {
  304. interface OrderItem {
  305. id: string
  306. orderNo: string
  307. clientId: string
  308. clientName: string
  309. regionId: string
  310. regionName: string
  311. priceListId: string
  312. totalAmount: string
  313. paidAmount: string
  314. receivableAmount: string
  315. refundAmount: string
  316. status: string
  317. paymentMethod?: string
  318. contactPerson?: string
  319. contactPhone?: string
  320. deliveryAddress?: string
  321. createAt: string
  322. }
  323. interface OrderDetail extends OrderItem {
  324. items: OrderItemDetail[]
  325. cancelReason?: string
  326. cancelReviewTime?: string
  327. completedTime?: string
  328. remark?: string
  329. }
  330. interface OrderItemDetail {
  331. id: string
  332. productId: string
  333. productName: string
  334. unitId: string
  335. unitName: string
  336. quantity: string
  337. unitPrice: string
  338. amount: string
  339. deliveredQuantity: string
  340. status: string
  341. }
  342. }
  343. namespace Delivery {
  344. interface DeliveryTask {
  345. id: string
  346. taskNo: string
  347. orderId: string
  348. orderNo: string
  349. regionId: string
  350. regionName: string
  351. deliverId?: string
  352. deliverName?: string
  353. status: string
  354. pickupTime?: string
  355. deliveryTime?: string
  356. createAt: string
  357. }
  358. interface DeliveryTaskDetail extends DeliveryTask {
  359. items: DeliveryTaskItem[]
  360. }
  361. interface DeliveryTaskItem {
  362. id: string
  363. productName: string
  364. quantity: string
  365. deliveredQuantity: string
  366. status: string
  367. }
  368. }
  369. namespace Dept {
  370. interface DeptItem {
  371. id: string
  372. parentId: string
  373. deptName: string
  374. deptCategoryCode: string
  375. status: string
  376. leaderUserId?: string
  377. leader: string
  378. leaderPhone: string
  379. tenantNo: string
  380. orderNum: number
  381. remark: string
  382. createTime: string
  383. updateTime: string
  384. children?: DeptItem[]
  385. }
  386. }
  387. namespace Dict {
  388. interface DictTypeItem {
  389. id: string
  390. dictName: string
  391. dictType: string
  392. tenantNo: string
  393. orderNum: number
  394. remark: string
  395. createTime: string
  396. updateTime: string
  397. }
  398. interface DictDataItem {
  399. id: string
  400. dictLabel: string
  401. dictValue: string
  402. dictType: string
  403. tenantNo: string
  404. orderNum: number
  405. remark: string
  406. createTime: string
  407. updateTime: string
  408. }
  409. interface DictDataOption {
  410. label: string
  411. value: string
  412. }
  413. }
  414. namespace Site {
  415. interface SiteItem {
  416. id: string
  417. siteName: string
  418. siteCode: string
  419. siteType: string
  420. status: string
  421. address: string
  422. contactName: string
  423. contactPhone: string
  424. businessScope: string
  425. siteImage: string
  426. tenantNo: string
  427. orderNum: number
  428. remark: string
  429. createTime: string
  430. updateTime: string
  431. }
  432. }
  433. namespace Post {
  434. interface PostItem {
  435. id: string
  436. postName: string
  437. postCode: string
  438. status: string
  439. tenantNo: string
  440. orderNum: number
  441. remark: string
  442. boundUserNames?: string[]
  443. createTime: string
  444. updateTime: string
  445. }
  446. }
  447. namespace ItemUnit {
  448. interface ItemUnitItem {
  449. id: string
  450. unitCode: string
  451. unitName: string
  452. tenantNo: string
  453. orderNum: number
  454. remark: string
  455. createTime: string
  456. updateTime: string
  457. }
  458. }
  459. namespace BizCustomer {
  460. interface CustomerItem {
  461. id: string
  462. customerName: string
  463. sex: string
  464. idCardNo: string
  465. age: number | null
  466. phoneNo: string
  467. customerTags: string
  468. tenantNo: string
  469. orderNum: number
  470. remark: string
  471. createTime: string
  472. updateTime: string
  473. }
  474. type PartyRole = 'mother' | 'father' | 'newborn'
  475. type RelationBizType = 'cell_storage' | 'research_donation'
  476. interface RelationMember {
  477. role: PartyRole
  478. customerId: string
  479. name: string
  480. phone: string
  481. idCardNo: string
  482. }
  483. interface RelationGroup {
  484. bizType: RelationBizType
  485. protocolId: string
  486. protocolNo: string
  487. protocolStatus: string
  488. registerDate: string
  489. myRole: PartyRole
  490. members: RelationMember[]
  491. }
  492. interface ProtocolSummary {
  493. bizType: RelationBizType
  494. protocolId: string
  495. protocolNo: string
  496. protocolStatus: string
  497. registerDate: string
  498. myRole: PartyRole
  499. }
  500. interface CustomerRelations {
  501. customer: CustomerItem
  502. relatedGroups: RelationGroup[]
  503. protocols: ProtocolSummary[]
  504. }
  505. }
  506. namespace BizCellSampleType {
  507. interface CellSampleTypeItem {
  508. id: string
  509. typeCode: string
  510. typeName: string
  511. typeLogo: string
  512. storageYears: number | null
  513. storagePrice: number | null
  514. /** 样本编码过滤文本,空则协议单选编码时不过滤 */
  515. sampleCodeFilter: string
  516. tenantNo: string
  517. orderNum: number
  518. remark: string
  519. createTime: string
  520. updateTime: string
  521. }
  522. }
  523. namespace BizCollectionRegion {
  524. interface RegionItem {
  525. id: string
  526. regionName: string
  527. hospitalNames: string[]
  528. staffNames?: string[]
  529. leaderNames?: string[]
  530. tenantNo: string
  531. orderNum: number
  532. remark: string
  533. createTime: string
  534. updateTime: string
  535. }
  536. }
  537. namespace BizCollectionHospital {
  538. interface HospitalItem {
  539. id: string
  540. regionId: string
  541. hospitalName: string
  542. regionName?: string
  543. tenantNo: string
  544. orderNum: number
  545. remark: string
  546. createTime: string
  547. updateTime: string
  548. }
  549. }
  550. namespace BizCollectionRegionStaff {
  551. interface StaffItem {
  552. id: string
  553. regionId: string
  554. userId: string
  555. userName: string
  556. nickName: string
  557. userNo: string
  558. deptName: string
  559. isLeader: boolean
  560. tenantNo: string
  561. orderNum: number
  562. remark: string
  563. createTime: string
  564. updateTime: string
  565. }
  566. }
  567. namespace BizCollectionProtocolNo {
  568. interface ProtocolNoItem {
  569. id: string
  570. protocolNo: string
  571. issued: number
  572. /** 是否已在采集协议单或科研捐赠单中占用(与号池「是否下发」无关) */
  573. usedInProtocol?: boolean
  574. issuedUserId: string
  575. issuedUserName: string
  576. issuedTime: string
  577. tenantNo: string
  578. orderNum: number
  579. remark: string
  580. createTime: string
  581. updateTime: string
  582. }
  583. }
  584. namespace BizSampleCode {
  585. interface SampleCodeItem {
  586. id: string
  587. sampleCode: string
  588. sampleCodeType: string
  589. issued: number
  590. labStorageCode?: string
  591. /** 是否已在采集协议单或科研捐赠单样本表中占用(与号池「是否下发」无关) */
  592. usedInProtocol?: boolean
  593. issuedUserId: string
  594. issuedUserName: string
  595. issuedTime: string
  596. tenantNo: string
  597. orderNum: number
  598. remark: string
  599. createTime: string
  600. updateTime: string
  601. }
  602. }
  603. namespace Menu {
  604. interface MenuItem {
  605. id: string
  606. menuName: string
  607. parentId: string
  608. menuType: string
  609. path: string
  610. component: string
  611. perms: string
  612. isFrame: number
  613. visible: string
  614. status: string
  615. tenantNo: string
  616. orderNum: number
  617. remark: string
  618. createTime: string
  619. updateTime: string
  620. children?: MenuItem[]
  621. }
  622. }
  623. namespace ExpressCompany {
  624. interface ExpressCompanyItem {
  625. id: string
  626. expressCode: string
  627. expressName: string
  628. expressLogo: string
  629. tenantNo: string
  630. orderNum: number
  631. remark: string
  632. createTime: string
  633. updateTime: string
  634. }
  635. }
  636. namespace Role {
  637. interface RoleItem {
  638. id: string
  639. roleName: string
  640. dataScope: string
  641. status: string
  642. tenantNo: string
  643. orderNum: number
  644. remark: string
  645. boundUserNames?: string[]
  646. boundPostNames?: string[]
  647. createTime: string
  648. updateTime: string
  649. }
  650. }
  651. namespace Leave {
  652. interface LeaveItem {
  653. id: string
  654. leaveType: string
  655. leaveTypeLabel?: string
  656. startDate: string
  657. endDate: string
  658. days: number
  659. reason: string
  660. wfInstanceId: string
  661. status: string
  662. tenantNo?: string
  663. orderNum?: number
  664. remark?: string
  665. createBy?: string
  666. createTime?: string
  667. updateBy?: string
  668. updateTime?: string
  669. }
  670. }
  671. namespace Workflow {
  672. interface ProcessDefItem {
  673. id: string
  674. processCode: string
  675. processName: string
  676. status: string
  677. latestVersion: number | null
  678. tenantNo: string
  679. orderNum: number
  680. remark: string
  681. createTime: string
  682. updateTime: string
  683. }
  684. interface VersionItem {
  685. id: string
  686. versionNo: number
  687. isLatest: string
  688. remark: string
  689. createTime: string
  690. updateTime: string
  691. }
  692. interface NodeData {
  693. nodeKey: string
  694. nodeType: string
  695. nodeName: string | null
  696. configJson: string | null
  697. }
  698. interface TransitionData {
  699. fromNodeKey: string
  700. toNodeKey: string
  701. conditionExpr: string | null
  702. }
  703. interface DesignerData {
  704. graphJson: string | null
  705. versionNo: number
  706. nodes: NodeData[]
  707. transitions: TransitionData[]
  708. }
  709. interface TaskItem {
  710. id: string
  711. instanceId: string
  712. nodeKey: string | null
  713. assigneeUserId: string | null
  714. status: string | null
  715. commentText: string | null
  716. createTime: string
  717. updateTime: string
  718. processName: string | null
  719. businessType: string | null
  720. businessId: string | null
  721. starterUserId: string | null
  722. instanceStatus: string | null
  723. instanceCreateTime: string | null
  724. }
  725. interface MyInstanceItem {
  726. id: string
  727. processName: string | null
  728. businessType: string | null
  729. businessId: string | null
  730. starterUserId: string | null
  731. status: string
  732. createTime: string
  733. updateTime: string
  734. businessTypeLabel?: string
  735. starterUserName?: string
  736. }
  737. interface TaskDetail {
  738. id: string
  739. nodeKey: string | null
  740. nodeName?: string | null
  741. assigneeUserId: string | null
  742. assigneeUserName?: string | null
  743. status: string | null
  744. commentText: string | null
  745. createTime: string
  746. updateTime: string
  747. }
  748. interface InstanceDetail {
  749. id: string
  750. processVersionId: string
  751. businessType: string | null
  752. businessId: string | null
  753. starterUserId: string | null
  754. status: string | null
  755. variables: string
  756. createTime: string
  757. tasks: TaskDetail[]
  758. }
  759. interface BusinessAllTasks {
  760. businessType: string
  761. businessId: string
  762. businessFormFields: Array<{ label: string; value: string }>
  763. tasks: Array<{
  764. id: string
  765. instanceId: string
  766. instanceStatus: string
  767. nodeKey: string | null
  768. nodeName: string
  769. assigneeUserId: string | null
  770. assigneeUserName: string
  771. status: string | null
  772. commentText: string | null
  773. createTime: string
  774. updateTime: string
  775. }>
  776. }
  777. }
  778. namespace CellProductType {
  779. interface CellProductTypeItem {
  780. id: string
  781. productTypeCode: string
  782. productTypeName: string
  783. tenantNo: string
  784. orderNum: number
  785. remark: string
  786. createTime: string
  787. updateTime: string
  788. }
  789. }
  790. namespace CellProductSpec {
  791. interface CellProductSpecItem {
  792. id: string
  793. specCode: string
  794. specName: string
  795. tenantNo: string
  796. orderNum: number
  797. remark: string
  798. createTime: string
  799. updateTime: string
  800. }
  801. }
  802. }
  803. declare module '*.vue' {
  804. import type { DefineComponent } from 'vue'
  805. const component: DefineComponent<{}, {}, any>
  806. export default component
  807. }