biz-mock.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. const listData = [
  2. {
  3. id: 1,
  4. title: '脐带血采集协议-王女士',
  5. code: 'XY20260810001',
  6. typeLabel: '采集协议',
  7. icon: 'orders-o',
  8. owner: '李四',
  9. time: '08-10 09:20',
  10. amount: '12,800',
  11. progress: '',
  12. desc: '分期缴费 · 待财务确认首期款项',
  13. status: '待处理',
  14. tagType: 'warning',
  15. hint: '需尽快确认',
  16. customer: '王女士',
  17. dept: '样本运营部',
  18. createdAt: '2026-08-08 14:20',
  19. stepActive: 1,
  20. steps: ['建档', '缴费确认', '样本采集', '入库'],
  21. payments: [
  22. {
  23. id: 'p1',
  24. name: '第 1 期(首期)',
  25. sub: '应缴 08-10 · 微信转账',
  26. amount: '6,400',
  27. status: '待确认',
  28. tagType: 'warning'
  29. },
  30. {
  31. id: 'p2',
  32. name: '第 2 期',
  33. sub: '应缴 09-10 · 未到期',
  34. amount: '6,400',
  35. status: '待缴费',
  36. tagType: 'primary'
  37. }
  38. ],
  39. attachments: [
  40. { name: '协议扫描件.pdf', size: '2.4 MB', time: '08-08 14:18' },
  41. { name: '身份证明.jpg', size: '860 KB', time: '08-08 14:19' }
  42. ],
  43. logs: [
  44. {
  45. title: '提交审批',
  46. desc: '提交采集协议,等待财务确认首期',
  47. time: '08-08 14:22',
  48. tone: 'done',
  49. actor: '李四',
  50. icon: 'edit',
  51. badge: '已完成'
  52. },
  53. {
  54. title: '流转至财务',
  55. desc: '系统自动分配至财务确认岗',
  56. time: '08-08 14:23',
  57. tone: 'done',
  58. actor: '系统',
  59. icon: 'cluster-o',
  60. badge: '已完成'
  61. },
  62. {
  63. title: '待确认缴费',
  64. desc: '首期 ¥6,400 等待财务核对附件',
  65. time: '08-10 09:20',
  66. tone: 'warn',
  67. actor: '财务岗',
  68. icon: 'balance-list-o',
  69. badge: '进行中'
  70. }
  71. ]
  72. },
  73. {
  74. id: 2,
  75. title: '样本接收单-批次 A12',
  76. code: 'YS20260809018',
  77. typeLabel: '样本接收',
  78. icon: 'logistics',
  79. owner: '王五',
  80. time: '08-09 16:40',
  81. amount: '',
  82. progress: '在途',
  83. desc: '冷链在途 · 预计今日 18:00 前到达库房',
  84. status: '进行中',
  85. tagType: 'primary',
  86. hint: '跟踪物流',
  87. customer: '批次 A12',
  88. dept: '仓储物流部',
  89. createdAt: '2026-08-09 09:10',
  90. stepActive: 2,
  91. steps: ['发运', '在途', '到库签收', '入库'],
  92. payments: [],
  93. attachments: [{ name: '冷链温度记录.pdf', size: '1.1 MB', time: '08-09 11:28' }],
  94. logs: [
  95. {
  96. title: '创建接收单',
  97. desc: '创建样本接收单并绑定批次 A12',
  98. time: '08-09 09:10',
  99. tone: 'done',
  100. actor: '王五',
  101. icon: 'orders-o',
  102. badge: '已完成'
  103. },
  104. {
  105. title: '冷链发出',
  106. desc: '承运方已取件,全程温控开启',
  107. time: '08-09 11:30',
  108. tone: 'done',
  109. actor: '承运方',
  110. icon: 'logistics',
  111. badge: '已完成'
  112. },
  113. {
  114. title: '运输中',
  115. desc: '当前位置:城东中转站',
  116. time: '08-09 16:40',
  117. tone: 'warn',
  118. actor: '物流跟踪',
  119. icon: 'location-o',
  120. badge: '进行中'
  121. }
  122. ]
  123. },
  124. {
  125. id: 3,
  126. title: '质检工单-QC-8821',
  127. code: 'ZJ20260808007',
  128. typeLabel: '质检工单',
  129. icon: 'certificate',
  130. owner: '赵六',
  131. time: '08-08 11:05',
  132. amount: '',
  133. progress: '阻塞',
  134. desc: '检测结论待录入,阻塞下游入库流程',
  135. status: '异常',
  136. tagType: 'danger',
  137. hint: '优先处理',
  138. customer: '样本 S-8821',
  139. dept: '质检中心',
  140. createdAt: '2026-08-07 16:40',
  141. stepActive: 1,
  142. steps: ['取样', '检测', '结论录入', '关闭'],
  143. payments: [],
  144. attachments: [{ name: '初检原始数据.xlsx', size: '428 KB', time: '08-08 10:48' }],
  145. logs: [
  146. {
  147. title: '工单创建',
  148. desc: '系统根据接收单自动生成质检工单',
  149. time: '08-07 16:40',
  150. tone: 'done',
  151. actor: '系统',
  152. icon: 'add-o',
  153. badge: '已完成'
  154. },
  155. {
  156. title: '检测完成',
  157. desc: '完成实验操作,待录入结论',
  158. time: '08-08 10:50',
  159. tone: 'done',
  160. actor: '赵六',
  161. icon: 'certificate',
  162. badge: '已完成'
  163. },
  164. {
  165. title: '异常挂起',
  166. desc: '结论超时未录入,已阻塞入库',
  167. time: '08-08 11:05',
  168. tone: 'danger',
  169. actor: '质控规则',
  170. icon: 'warning-o',
  171. badge: '异常'
  172. }
  173. ]
  174. },
  175. {
  176. id: 4,
  177. title: '出库申请-库位 B-03',
  178. code: 'CK20260807002',
  179. typeLabel: '库位出库',
  180. icon: 'send-gift-o',
  181. owner: '张三',
  182. time: '08-07 14:22',
  183. amount: '',
  184. progress: '完结',
  185. desc: '复核已完成,可归档关闭',
  186. status: '已完成',
  187. tagType: 'success',
  188. hint: '已完结',
  189. customer: '库位 B-03',
  190. dept: '仓储物流部',
  191. createdAt: '2026-08-06 10:00',
  192. stepActive: 3,
  193. steps: ['申请', '复核', '出库', '归档'],
  194. payments: [],
  195. attachments: [{ name: '出库单签收.pdf', size: '980 KB', time: '08-07 14:18' }],
  196. logs: [
  197. {
  198. title: '提交申请',
  199. desc: '发起出库申请,指定库位 B-03',
  200. time: '08-06 10:00',
  201. tone: 'done',
  202. actor: '张三',
  203. icon: 'edit',
  204. badge: '已完成'
  205. },
  206. {
  207. title: '复核通过',
  208. desc: '库管复核通过,允许出库',
  209. time: '08-07 11:10',
  210. tone: 'done',
  211. actor: '库管',
  212. icon: 'passed',
  213. badge: '已完成'
  214. },
  215. {
  216. title: '出库完成',
  217. desc: '实物已交接,单据归档',
  218. time: '08-07 14:22',
  219. tone: 'done',
  220. actor: '张三',
  221. icon: 'checked',
  222. badge: '已完成'
  223. }
  224. ]
  225. }
  226. ]
  227. export function getList() {
  228. return listData.slice()
  229. }
  230. export function getById(id) {
  231. const n = Number(id)
  232. return listData.find((r) => r.id === n) || listData[0]
  233. }
  234. function rowsByTab(idx) {
  235. if (idx === 1) return listData.filter((r) => r.status === '进行中')
  236. if (idx === 2) return listData.filter((r) => r.status === '待处理')
  237. if (idx === 3) return listData.filter((r) => r.status === '已完成')
  238. return listData
  239. }
  240. export function tabCount(idx) {
  241. return rowsByTab(idx).length
  242. }
  243. export function filterByTab(tabIndex, keyword) {
  244. const kw = (keyword || '').trim()
  245. let rows = rowsByTab(tabIndex)
  246. if (!kw) return rows
  247. return rows.filter(
  248. (r) => r.title.includes(kw) || r.code.includes(kw) || r.owner.includes(kw)
  249. )
  250. }
  251. export const LIST_TABS = [
  252. { key: 'all', label: '全部' },
  253. { key: 'doing', label: '进行中' },
  254. { key: 'pending', label: '待处理' },
  255. { key: 'done', label: '已完成' }
  256. ]