api.d.ts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  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. }
  475. namespace BizCellSampleType {
  476. interface CellSampleTypeItem {
  477. id: string
  478. typeCode: string
  479. typeName: string
  480. typeLogo: string
  481. storageYears: number | null
  482. storagePrice: number | null
  483. /** 样本编码过滤文本,空则协议单选编码时不过滤 */
  484. sampleCodeFilter: string
  485. tenantNo: string
  486. orderNum: number
  487. remark: string
  488. createTime: string
  489. updateTime: string
  490. }
  491. }
  492. namespace BizCollectionRegion {
  493. interface RegionItem {
  494. id: string
  495. regionName: string
  496. hospitalNames: string[]
  497. staffNames: string[]
  498. leaderNames: string[]
  499. tenantNo: string
  500. orderNum: number
  501. remark: string
  502. createTime: string
  503. updateTime: string
  504. }
  505. }
  506. namespace BizCollectionHospital {
  507. interface HospitalItem {
  508. id: string
  509. regionId: string
  510. hospitalName: string
  511. regionName?: string
  512. tenantNo: string
  513. orderNum: number
  514. remark: string
  515. createTime: string
  516. updateTime: string
  517. }
  518. }
  519. namespace BizCollectionRegionStaff {
  520. interface StaffItem {
  521. id: string
  522. regionId: string
  523. userId: string
  524. userName: string
  525. nickName: string
  526. userNo: string
  527. deptName: string
  528. isLeader: boolean
  529. tenantNo: string
  530. orderNum: number
  531. remark: string
  532. createTime: string
  533. updateTime: string
  534. }
  535. }
  536. namespace BizCollectionProtocolNo {
  537. interface ProtocolNoItem {
  538. id: string
  539. protocolNo: string
  540. issued: number
  541. /** 是否已在采集协议单或科研捐赠单中占用(与号池「是否下发」无关) */
  542. usedInProtocol?: boolean
  543. issuedUserId: string
  544. issuedUserName: string
  545. issuedTime: string
  546. tenantNo: string
  547. orderNum: number
  548. remark: string
  549. createTime: string
  550. updateTime: string
  551. }
  552. }
  553. namespace BizSampleCode {
  554. interface SampleCodeItem {
  555. id: string
  556. sampleCode: string
  557. sampleCodeType: string
  558. issued: number
  559. labStorageCode?: string
  560. /** 是否已在采集协议单或科研捐赠单样本表中占用(与号池「是否下发」无关) */
  561. usedInProtocol?: boolean
  562. issuedUserId: string
  563. issuedUserName: string
  564. issuedTime: string
  565. tenantNo: string
  566. orderNum: number
  567. remark: string
  568. createTime: string
  569. updateTime: string
  570. }
  571. }
  572. namespace Menu {
  573. interface MenuItem {
  574. id: string
  575. menuName: string
  576. parentId: string
  577. menuType: string
  578. path: string
  579. component: string
  580. perms: string
  581. isFrame: number
  582. visible: string
  583. status: string
  584. tenantNo: string
  585. orderNum: number
  586. remark: string
  587. createTime: string
  588. updateTime: string
  589. children?: MenuItem[]
  590. }
  591. }
  592. namespace ExpressCompany {
  593. interface ExpressCompanyItem {
  594. id: string
  595. expressCode: string
  596. expressName: string
  597. expressLogo: string
  598. tenantNo: string
  599. orderNum: number
  600. remark: string
  601. createTime: string
  602. updateTime: string
  603. }
  604. }
  605. namespace Role {
  606. interface RoleItem {
  607. id: string
  608. roleName: string
  609. dataScope: string
  610. status: string
  611. tenantNo: string
  612. orderNum: number
  613. remark: string
  614. boundUserNames?: string[]
  615. boundPostNames?: string[]
  616. createTime: string
  617. updateTime: string
  618. }
  619. }
  620. namespace Leave {
  621. interface LeaveItem {
  622. id: string
  623. leaveType: string
  624. leaveTypeLabel?: string
  625. startDate: string
  626. endDate: string
  627. days: number
  628. reason: string
  629. wfInstanceId: string
  630. status: string
  631. tenantNo?: string
  632. orderNum?: number
  633. remark?: string
  634. createBy?: string
  635. createTime?: string
  636. updateBy?: string
  637. updateTime?: string
  638. }
  639. }
  640. namespace Workflow {
  641. interface ProcessDefItem {
  642. id: string
  643. processCode: string
  644. processName: string
  645. status: string
  646. latestVersion: number | null
  647. tenantNo: string
  648. orderNum: number
  649. remark: string
  650. createTime: string
  651. updateTime: string
  652. }
  653. interface VersionItem {
  654. id: string
  655. versionNo: number
  656. isLatest: string
  657. remark: string
  658. createTime: string
  659. updateTime: string
  660. }
  661. interface NodeData {
  662. nodeKey: string
  663. nodeType: string
  664. nodeName: string | null
  665. configJson: string | null
  666. }
  667. interface TransitionData {
  668. fromNodeKey: string
  669. toNodeKey: string
  670. conditionExpr: string | null
  671. }
  672. interface DesignerData {
  673. graphJson: string | null
  674. versionNo: number
  675. nodes: NodeData[]
  676. transitions: TransitionData[]
  677. }
  678. interface TaskItem {
  679. id: string
  680. instanceId: string
  681. nodeKey: string | null
  682. assigneeUserId: string | null
  683. status: string | null
  684. commentText: string | null
  685. createTime: string
  686. updateTime: string
  687. processName: string | null
  688. businessType: string | null
  689. businessId: string | null
  690. starterUserId: string | null
  691. instanceStatus: string | null
  692. instanceCreateTime: string | null
  693. }
  694. interface MyInstanceItem {
  695. id: string
  696. processName: string | null
  697. businessType: string | null
  698. businessId: string | null
  699. starterUserId: string | null
  700. status: string
  701. createTime: string
  702. updateTime: string
  703. businessTypeLabel?: string
  704. starterUserName?: string
  705. }
  706. interface TaskDetail {
  707. id: string
  708. nodeKey: string | null
  709. nodeName?: string | null
  710. assigneeUserId: string | null
  711. assigneeUserName?: string | null
  712. status: string | null
  713. commentText: string | null
  714. createTime: string
  715. updateTime: string
  716. }
  717. interface InstanceDetail {
  718. id: string
  719. processVersionId: string
  720. businessType: string | null
  721. businessId: string | null
  722. starterUserId: string | null
  723. status: string | null
  724. variables: string
  725. createTime: string
  726. tasks: TaskDetail[]
  727. }
  728. interface BusinessAllTasks {
  729. businessType: string
  730. businessId: string
  731. businessFormFields: Array<{ label: string; value: string }>
  732. tasks: Array<{
  733. id: string
  734. instanceId: string
  735. instanceStatus: string
  736. nodeKey: string | null
  737. nodeName: string
  738. assigneeUserId: string | null
  739. assigneeUserName: string
  740. status: string | null
  741. commentText: string | null
  742. createTime: string
  743. updateTime: string
  744. }>
  745. }
  746. }
  747. namespace CellProductType {
  748. interface CellProductTypeItem {
  749. id: string
  750. productTypeCode: string
  751. productTypeName: string
  752. tenantNo: string
  753. orderNum: number
  754. remark: string
  755. createTime: string
  756. updateTime: string
  757. }
  758. }
  759. namespace CellProductSpec {
  760. interface CellProductSpecItem {
  761. id: string
  762. specCode: string
  763. specName: string
  764. tenantNo: string
  765. orderNum: number
  766. remark: string
  767. createTime: string
  768. updateTime: string
  769. }
  770. }
  771. }
  772. declare module '*.vue' {
  773. import type { DefineComponent } from 'vue'
  774. const component: DefineComponent<{}, {}, any>
  775. export default component
  776. }