index.vue 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641
  1. <template>
  2. <view class="detail-container">
  3. <!-- 加载动画 -->
  4. <view class="loading-container" v-if="pageLoading">
  5. <!-- 顶部骨架 -->
  6. <view class="skeleton-header">
  7. <view class="skeleton-line skeleton-ani" style="width: 30%; height: 36rpx;"></view>
  8. <view class="skeleton-line skeleton-ani" style="width: 20%; height: 36rpx;"></view>
  9. </view>
  10. <view class="skeleton-progress">
  11. <view class="skeleton-circle skeleton-ani" v-for="i in 4" :key="i"></view>
  12. </view>
  13. <!-- 卡片骨架 -->
  14. <view class="skeleton-card" v-for="j in 3" :key="'c' + j">
  15. <view class="skeleton-line skeleton-ani" style="width: 60%; height: 28rpx; margin-bottom: 20rpx;">
  16. </view>
  17. <view class="skeleton-line skeleton-ani" style="width: 90%; height: 24rpx; margin-bottom: 14rpx;">
  18. </view>
  19. <view class="skeleton-line skeleton-ani" style="width: 75%; height: 24rpx;"></view>
  20. </view>
  21. </view>
  22. <template v-else>
  23. <!-- 顶部动态状态区 -->
  24. <view class="detail-header">
  25. <view class="status-row">
  26. <text class="status-title">{{ displayStatusText }}</text>
  27. <text class="status-price">¥{{ orderDetail.fulfillmentCommission }}</text>
  28. </view>
  29. <!-- 进度条区域 -->
  30. <view class="progress-bar">
  31. <view class="step-item" v-for="(step, index) in progressSteps" :key="index"
  32. :class="{ 'active': index === progressIndex, 'done': index < progressIndex }">
  33. <view class="step-circle-wrapper">
  34. <!-- Connecting Line before circle, except first item -->
  35. <view class="step-line" v-if="index !== 0"
  36. :class="{ 'active-line': index <= progressIndex }">
  37. </view>
  38. <view class="step-circle">{{ index + 1 }}</view>
  39. </view>
  40. <text class="step-text">{{ step }}</text>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- 内容区域 -->
  45. <scroll-view scroll-y class="detail-content">
  46. <!-- 宠物信息 -->
  47. <view class="white-card pet-bar">
  48. <image class="pb-avatar" :src="orderDetail.petAvatar" mode="aspectFill"></image>
  49. <view class="pb-info">
  50. <view class="pb-name-row">
  51. <text class="pb-name">{{ orderDetail.petName }}</text>
  52. </view>
  53. <view class="pb-tags">
  54. <text class="pb-tag">{{ orderDetail.serviceName }}</text>
  55. </view>
  56. </view>
  57. <view class="pb-actions">
  58. <view class="pb-btn profile-btn" @click="showPetProfile">宠物档案</view>
  59. <view class="pb-btn phone-btn" @click="callPhone">
  60. <image class="phone-icon" src="/static/icons/phone_orange.svg"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- 路线及服务信息 -->
  65. <view class="white-card service-info-card">
  66. <view class="si-row time-row">
  67. <image class="si-icon outline" src="/static/icons/clock.svg"></image>
  68. <view class="si-content">
  69. <text class="si-label">服务时间</text>
  70. <text class="si-val">{{ orderDetail.time }}</text>
  71. </view>
  72. <view class="si-action record-btn" @tap.stop="openAnomalyModal">
  73. <text>异常记录</text>
  74. <image class="record-arrow" src="/static/icons/right_arrow_orange.svg"></image>
  75. </view>
  76. </view>
  77. <!-- 接送类型的地址展现 -->
  78. <template v-if="orderDetail.type === 1">
  79. <view class="si-row addr-row start-addr">
  80. <view class="icon-circle start">起</view>
  81. <view class="route-line-vertical"></view>
  82. <view class="si-content">
  83. <text class="si-addr-title">{{ orderDetail.startLocation }}</text>
  84. <text class="si-addr-desc">{{ orderDetail.startAddress }}</text>
  85. </view>
  86. <view class="nav-btn-circle" @click="openNavigation('start')">
  87. <image class="nav-arrow" src="/static/icons/nav_arrow.svg"></image>
  88. </view>
  89. </view>
  90. <view class="si-row addr-row end-addr">
  91. <view class="icon-circle end">终</view>
  92. <view class="si-content">
  93. <text class="si-addr-title">{{ orderDetail.endLocation }}</text>
  94. <text class="si-addr-desc">{{ orderDetail.endAddress }}</text>
  95. </view>
  96. <view class="nav-btn-circle" @click="openNavigation('end')">
  97. <image class="nav-arrow" src="/static/icons/nav_arrow.svg"></image>
  98. </view>
  99. </view>
  100. </template>
  101. <!-- 喂遛/洗护类型的地址展现 -->
  102. <template v-else>
  103. <view class="si-row addr-row end-addr">
  104. <view class="icon-circle service">服</view>
  105. <view class="si-content">
  106. <text class="si-addr-title">{{ orderDetail.endLocation }}</text>
  107. <text class="si-addr-desc">{{ orderDetail.endAddress }}</text>
  108. </view>
  109. <view class="nav-btn-circle" @click="openNavigation('end')">
  110. <image class="nav-arrow" src="/static/icons/nav_arrow.svg"></image>
  111. </view>
  112. </view>
  113. </template>
  114. <view class="si-row">
  115. <image class="si-icon outline custom-icon-file" src="/static/icons/file.svg"></image>
  116. <view class="si-content">
  117. <text class="si-label">备注</text>
  118. <text class="si-val">{{ orderDetail.remark || '-' }}</text>
  119. </view>
  120. </view>
  121. <!-- <view class="si-row record-history-row" @tap.stop="openAnomalyModal">
  122. <view class="si-content">
  123. <text class="si-label">异常记录</text>
  124. <text class="si-val">查看历史异常记录</text>
  125. </view>
  126. <image class="record-arrow" src="/static/icons/right_arrow_orange.svg"></image>
  127. </view> -->
  128. </view>
  129. <!-- 打卡任务 -->
  130. <view class="white-card task-card" v-if="currentStep < steps.length">
  131. <text class="tc-title">当前任务:{{ currentTaskTitle }}</text>
  132. <text class="tc-desc">{{ currentTaskDesc }}</text>
  133. <!-- 单个巨大点击区触发弹窗 -->
  134. <view class="full-media-add" @click="openUploadModal">
  135. <image class="upload-icon-large" src="/static/icons/camera_grey.svg"></image>
  136. <text class="upload-text-large">上传图或视频</text>
  137. </view>
  138. </view>
  139. <!-- 订单属性 -->
  140. <view class="white-card base-info-card">
  141. <view class="bi-row">
  142. <image class="si-icon outline" src="/static/icons/order_no.svg"></image>
  143. <view class="bi-content">
  144. <text class="bi-label">订单编号</text>
  145. <view class="bi-val-row">
  146. <text class="bi-val">{{ orderDetail.orderNo }}</text>
  147. <text class="bi-copy" @click="copyOrderNo">复制</text>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="bi-row">
  152. <image class="si-icon outline" src="/static/icons/clock.svg"></image>
  153. <view class="bi-content">
  154. <text class="bi-label">下单时间</text>
  155. <text class="bi-val">{{ orderDetail.createTime }}</text>
  156. </view>
  157. </view>
  158. </view>
  159. <!-- 订单进度 -->
  160. <view class="white-card timeline-card">
  161. <view class="tl-title-row">
  162. <view class="orange-bar"></view>
  163. <text class="tl-title">订单进度</text>
  164. </view>
  165. <view class="tl-list">
  166. <view class="tl-item" v-for="(log, idx) in orderDetail.progressLogs" :key="idx">
  167. <view class="tl-marker active">
  168. <view class="tl-dot-inner"></view>
  169. </view>
  170. <view class="tl-content-row">
  171. <view class="tl-header">
  172. <text class="tl-status">{{ log.status }}</text>
  173. <text class="tl-time">{{ log.time }}</text>
  174. </view>
  175. <!-- 媒体(图片/视频)展示 -->
  176. <view class="tl-medias" v-if="log.medias && log.medias.length > 0">
  177. <view class="tl-media-item" v-for="(media, midx) in log.medias" :key="midx"
  178. @click="previewMedia(log.medias, midx)">
  179. <image v-if="!isVideo(media)" class="tl-img" :src="media" mode="aspectFill">
  180. </image>
  181. <view v-else class="tl-video-placeholder">
  182. <view class="tl-play-icon">
  183. </view>
  184. <text class="tl-video-label">视频</text>
  185. </view>
  186. </view>
  187. </view>
  188. <!-- 备注展示 -->
  189. <view class="tl-remark" v-if="log.remark">
  190. <text>{{ log.remark }}</text>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. <view style="height: 140rpx;"></view>
  197. </scroll-view>
  198. <!-- 底部操作栏 -->
  199. <view class="bottom-action-bar">
  200. <view class="action-left">
  201. <button class="action-btn outline grey-outline" @click="goToAnomaly">异常上报</button>
  202. <button class="action-btn outline orange-outline" @click="openSumModal"
  203. v-if="serviceMode === 0">宠护小结</button>
  204. </view>
  205. <view class="action-right">
  206. <button class="action-btn primary" @click="openUploadModal" v-if="currentStep < steps.length">{{
  207. currentTaskTitle }}</button>
  208. <button class="action-btn primary grey-bg" v-else>已完成</button>
  209. </view>
  210. </view>
  211. <!-- 宠物档案弹窗 -->
  212. <view class="pet-modal-mask" v-if="showPetModal" @click="closePetProfile">
  213. <view class="pet-modal-content" @click.stop>
  214. <!-- 头部 -->
  215. <view class="pet-modal-header">
  216. <text class="pet-modal-title">宠物档案</text>
  217. <view style="flex:1"></view>
  218. <view class="pm-remark-btn" @click="openPetRemarkInput">备注</view>
  219. <view class="close-icon-btn" @click="closePetProfile">×</view>
  220. </view>
  221. <scroll-view scroll-y class="pet-modal-scroll">
  222. <!-- 宠物基础信息 -->
  223. <view class="pet-base-info">
  224. <image class="pm-avatar" :src="currentPetInfo.petAvatar" mode="aspectFill"></image>
  225. <view class="pm-info-text">
  226. <view class="pm-name-row">
  227. <text class="pm-name">{{ currentPetInfo.petName }}</text>
  228. <view class="pm-gender" v-if="currentPetInfo.petGender === 'M'">
  229. <text class="gender-icon">♂</text>
  230. <text>公</text>
  231. </view>
  232. <view class="pm-gender female" v-else-if="currentPetInfo.petGender === 'F'">
  233. <text class="gender-icon">♀</text>
  234. <text>母</text>
  235. </view>
  236. </view>
  237. <text class="pm-breed">品种:{{ currentPetInfo.petBreed }}</text>
  238. </view>
  239. </view>
  240. <!-- 属性网格 -->
  241. <view class="pm-detail-grid">
  242. <view class="pm-grid-item half">
  243. <text class="pm-label">年龄</text>
  244. <text class="pm-val">{{ currentPetInfo.petAge || '未知' }}</text>
  245. </view>
  246. <view class="pm-grid-item half">
  247. <text class="pm-label">体重</text>
  248. <text class="pm-val">{{ currentPetInfo.petWeight || '未知' }}</text>
  249. </view>
  250. <view class="pm-grid-item full">
  251. <text class="pm-label">性格</text>
  252. <text class="pm-val">{{ currentPetInfo.petPersonality || '无' }}</text>
  253. </view>
  254. <view class="pm-grid-item full">
  255. <text class="pm-label">爱好</text>
  256. <text class="pm-val">{{ currentPetInfo.petHobby || '无' }}</text>
  257. </view>
  258. <view class="pm-grid-item full">
  259. <text class="pm-label">备注</text>
  260. <text class="pm-val">{{ currentPetInfo.petRemark || '无特殊过敏史' }}</text>
  261. </view>
  262. </view>
  263. <!-- 标签 -->
  264. <view class="pm-tags-row" v-if="currentPetInfo.petTags && currentPetInfo.petTags.length > 0">
  265. <view class="pm-tag-chip" v-for="(tag, ti) in currentPetInfo.petTags" :key="ti">
  266. <text class="pm-tag-chip-text">{{ tag }}</text>
  267. </view>
  268. </view>
  269. <!-- 备注日志 -->
  270. <view class="pm-log-section">
  271. <view class="pm-log-header">
  272. <view
  273. style="width:6rpx; height:28rpx; background:#FF9800; border-radius:3rpx; margin-right:12rpx;">
  274. </view>
  275. <text class="pm-log-section-title">备注日志</text>
  276. </view>
  277. <view class="pm-log-item" v-for="(log, lIndex) in currentPetInfo.petLogs" :key="lIndex">
  278. <text class="pm-log-date">{{ log.date }}</text>
  279. <text class="pm-log-text">{{ log.content }}</text>
  280. <text class="pm-log-recorder" v-if="log.recorder !== '系统记录'">记录人:{{ log.recorder
  281. }}</text>
  282. <text class="pm-log-recorder system" v-else>系统记录</text>
  283. </view>
  284. </view>
  285. <view style="height: 30rpx;"></view>
  286. </scroll-view>
  287. </view>
  288. </view>
  289. <!-- 宠物备注输入弹窗 -->
  290. <view class="upload-modal-mask" v-if="showPetRemarkInput" @click="closePetRemarkInput">
  291. <view class="upload-modal-content" @click.stop>
  292. <view class="um-header">
  293. <text class="um-title">添加备注</text>
  294. </view>
  295. <view class="um-body">
  296. <textarea class="um-textarea" v-model="petRemarkText" auto-height placeholder="请输入宠物备注内容..."
  297. placeholder-style="color:#ccc; font-size:26rpx;"></textarea>
  298. </view>
  299. <view class="um-footer">
  300. <button class="um-submit-btn active" @click="submitPetRemark">确认提交</button>
  301. </view>
  302. </view>
  303. </view>
  304. <!-- 选择地图导航弹窗 (复用) -->
  305. <view class="nav-modal-mask" v-if="showNavModal" @click="closeNavModal">
  306. <view class="nav-action-sheet" @click.stop>
  307. <view class="nav-sheet-title">选择地图进行导航</view>
  308. <view class="nav-sheet-item" @click="chooseMap('高德')">高德地图</view>
  309. <view class="nav-sheet-item" @click="chooseMap('腾讯')">腾讯地图</view>
  310. <view class="nav-sheet-item" @click="chooseMap('百度')">百度地图</view>
  311. <view class="nav-sheet-gap"></view>
  312. <view class="nav-sheet-item cancel" @click="closeNavModal">取消</view>
  313. </view>
  314. </view>
  315. <!-- 上传图视频弹窗 (新增) -->
  316. <view class="upload-modal-mask" v-if="showUploadModal" @click="closeUploadModal">
  317. <view class="upload-modal-content" @click.stop>
  318. <view class="um-header">
  319. <text class="um-title">上传图或视频 ({{ modalMediaList.length }}/6)</text>
  320. <text class="um-remark-hint">{{ currentTaskDesc }}</text>
  321. </view>
  322. <view class="um-body">
  323. <view class="um-grid">
  324. <view class="um-item" v-for="(img, idx) in modalMediaList" :key="idx">
  325. <image class="um-preview" :src="img.thumb || img.url || img.localPath || img"
  326. mode="aspectFill">
  327. </image>
  328. <view class="um-video-badge" v-if="img.mediaType === 'video'">
  329. <image class="play-icon-small" src="/static/icons/play_circle.svg"></image>
  330. </view>
  331. <view class="um-del" @click="removeModalMedia(idx)">×</view>
  332. </view>
  333. <view class="um-add" @click="chooseModalMedia" v-if="modalMediaList.length < 6">
  334. <image class="um-add-icon" src="/static/icons/camera_grey.svg"></image>
  335. <text class="um-add-text">拍摄/上传</text>
  336. </view>
  337. </view>
  338. <textarea class="um-textarea" v-model="modalRemark" placeholder="在此输入备注信息..."
  339. placeholder-style="color:#ccc; font-size:26rpx;"></textarea>
  340. </view>
  341. <view class="um-footer">
  342. <view class="um-submit-btn" :class="{ 'active': modalMediaList.length > 0 }"
  343. @click="handleConfirmUpload">
  344. 确认提交</view>
  345. </view>
  346. </view>
  347. </view>
  348. <!-- 宠护小结弹窗 -->
  349. <view class="sum-modal-mask" v-if="showSumModal" @click="closeSumModal">
  350. <view class="sum-modal-card" @click.stop>
  351. <scroll-view scroll-y class="sum-modal-scroll">
  352. <view class="sum-modal-inner">
  353. <text class="sum-modal-title">宠物护理工作小结</text>
  354. <view class="sum-meta-row">
  355. <text class="sum-meta-label">日期:</text>
  356. <text class="sum-meta-val">{{ sumDate }}</text>
  357. </view>
  358. <view class="sum-meta-row">
  359. <text class="sum-meta-label">客户住址:</text>
  360. <text class="sum-meta-val">{{ orderDetail.endAddress }}</text>
  361. </view>
  362. <view class="sum-meta-row">
  363. <text class="sum-meta-label">宠主姓名:</text>
  364. <text class="sum-meta-val">{{ orderDetail.ownerName || '未知' }}</text>
  365. </view>
  366. <view class="sum-section-title">宠物信息</view>
  367. <view class="sum-pet-card">
  368. <image class="sum-pet-avatar" :src="orderDetail.petAvatar" mode="aspectFill"></image>
  369. <view class="sum-pet-info">
  370. <view class="sum-pet-name-row">
  371. <text class="sum-pet-name">{{ orderDetail.petName || '未知' }}</text>
  372. <text class="sum-pet-breed">品种: {{ orderDetail.petBreed || '未知' }}</text>
  373. </view>
  374. <text class="sum-pet-remark">{{ orderDetail.petNotes || '暂无备注' }}</text>
  375. </view>
  376. </view>
  377. <view class="sum-section-title">服务内容记录</view>
  378. <textarea class="sum-textarea" v-model="sumContent" auto-height placeholder="请填写服务内容..."
  379. placeholder-style="color:#ccc"></textarea>
  380. <view class="sum-sign-row">
  381. <text class="sum-sign-label">护宠师签名:</text>
  382. <text class="sum-sign-val">{{ sumSigner }}</text>
  383. </view>
  384. <view style="height: 20rpx;"></view>
  385. </view>
  386. </scroll-view>
  387. <view class="sum-footer">
  388. <button class="sum-submit-btn" @click="submitSumModal">提交小结</button>
  389. </view>
  390. </view>
  391. </view>
  392. <!-- 异常记录弹窗 -->
  393. <view class="modal-mask" v-if="showAnomalyModal" @click="closeAnomalyModal">
  394. <view class="anomaly-modal-content" @click.stop>
  395. <view class="am-header">
  396. <text class="am-title">历史异常记录</text>
  397. <view class="close-icon-btn" @click="closeAnomalyModal">×</view>
  398. </view>
  399. <scroll-view scroll-y class="am-scroll-list">
  400. <view class="empty-list" v-if="anomalyList.length === 0">
  401. <image class="empty-icon" src="/static/empty-rest.png" mode="aspectFit"></image>
  402. <text class="empty-text">暂无异常记录</text>
  403. </view>
  404. <view class="am-item" v-for="(item, index) in anomalyList" :key="index">
  405. <view class="am-item-header">
  406. <text class="am-item-type">{{ item.typeLabel }}</text>
  407. <text class="am-item-status" :class="'status-' + item.status">{{
  408. getAnomalyStatusLabel(item.status)
  409. }}</text>
  410. </view>
  411. <text class="am-item-content">{{ item.content }}</text>
  412. <view class="am-item-photos" v-if="item.photos && item.photos.length > 0">
  413. <view class="am-photo-item" v-for="(photoUrl, pIdx) in item.photoUrls" :key="pIdx"
  414. @click="previewMedia(item.photoUrls, pIdx)">
  415. <image v-if="!isVideo(photoUrl)" class="am-photo" :src="photoUrl" mode="aspectFill">
  416. </image>
  417. <view v-else class="tl-video-placeholder miniaturized">
  418. <view class="tl-play-icon small">
  419. </view>
  420. <text class="tl-video-label small">视频</text>
  421. </view>
  422. </view>
  423. </view>
  424. <view class="am-audit-box" v-if="item.status !== 0">
  425. <view class="am-audit-header">
  426. <text class="am-audit-label">{{ item.status === 1 ? '审核通过' : '驳回理由' }}</text>
  427. <text class="am-audit-time">{{ item.auditTime }}</text>
  428. </view>
  429. <text class="am-audit-remark">{{ item.auditRemark || '无' }}</text>
  430. </view>
  431. </view>
  432. </scroll-view>
  433. </view>
  434. </view>
  435. <!-- 视频播放弹窗 -->
  436. <view class="video-player-mask" v-if="videoPlayerShow" @click="closeVideoPlayer">
  437. <view class="video-player-content" @click.stop>
  438. <video class="v-player" :src="videoPlayerUrl" autoplay controls></video>
  439. <view class="v-close" @click="closeVideoPlayer">×</view>
  440. </view>
  441. </view>
  442. </template>
  443. </view>
  444. </template>
  445. <script>
  446. import { getOrderInfo, clockIn, submitNursingSummary } from '@/api/order/subOrder'
  447. import { getOrderLogs } from '@/api/order/subOrderLog'
  448. import { uploadFile } from '@/api/fulfiller/app'
  449. import { getAnomalyList } from '@/api/fulfiller/anamaly'
  450. import { listAllService } from '@/api/service/list'
  451. import { reportGps } from '@/utils/gps'
  452. import { getDictDataByType } from '@/api/system/dict'
  453. import { getPetDetail, submitPetRemark as apiSubmitPetRemark } from '@/api/archieves/pet'
  454. import { listChangeLog } from '@/api/archieves/changeLog'
  455. export default {
  456. data() {
  457. return {
  458. orderId: null,
  459. pageLoading: true,
  460. orderType: 1,
  461. orderStatus: 2,
  462. serviceId: null,
  463. serviceMode: null,
  464. petId: null,
  465. petDetail: null,
  466. clockInSteps: [],
  467. currentClockIn: null,
  468. currentStep: 0,
  469. orderDetail: {
  470. type: 1, fulfillmentCommission: '0.00', timeLabel: '服务时间', time: '',
  471. petAvatar: '/static/dog.png', petName: '', petBreed: '',
  472. serviceTag: '', startLocation: '', startAddress: '', endAddress: '',
  473. customerPhone: '', serviceContent: '', remark: '',
  474. orderNo: '', createTime: '', serviceName: '',
  475. progressLogs: [], nursingSummary: ''
  476. },
  477. serviceList: [],
  478. showPetModal: false,
  479. currentPetInfo: {},
  480. showNavModal: false,
  481. navTargetPointType: '',
  482. showUploadModal: false,
  483. modalMediaList: [],
  484. modalRemark: '',
  485. showSumModal: false,
  486. sumContent: '',
  487. sumDate: '',
  488. sumSigner: '未知',
  489. showPetRemarkInput: false,
  490. petRemarkText: '',
  491. showAnomalyModal: false,
  492. anomalyList: [],
  493. anomalyTypeDict: [],
  494. videoPlayerShow: false,
  495. videoPlayerUrl: ''
  496. }
  497. },
  498. computed: {
  499. steps() {
  500. if (this.clockInSteps.length > 0) return this.clockInSteps.map(s => s.title)
  501. return this.orderType === 1
  502. ? ['到达打卡', '确认出发', '送达打卡']
  503. : ['到达打卡', '开始服务', '服务结束']
  504. },
  505. progressSteps() { return ['已接单', ...this.steps, '订单完成'] },
  506. progressIndex() { return this.currentStep + 1 },
  507. displayStatusText() {
  508. if (this.currentStep >= this.steps.length) return '已完成';
  509. if (this.currentStep > 0) return this.orderType === 1 ? '配送中' : '服务中';
  510. return this.orderType === 1 ? '待接送' : '待服务';
  511. },
  512. currentStatusText() {
  513. return this.currentStep >= this.steps.length ? '已完成' : this.steps[this.currentStep];
  514. },
  515. currentTaskTitle() {
  516. if (this.currentStep >= this.steps.length) return '订单已完成';
  517. if (this.currentClockIn) return this.currentClockIn.title;
  518. return this.steps[this.currentStep] || '打卡';
  519. },
  520. currentTaskDesc() {
  521. if (this.currentStep >= this.steps.length) return '感谢您的服务,请注意休息';
  522. if (this.currentClockIn && this.currentClockIn.remark) return this.currentClockIn.remark;
  523. return '请按要求提交照片或视频及备注';
  524. }
  525. },
  526. async onLoad(options) {
  527. if (options.id) this.orderId = options.id
  528. this.pageLoading = true
  529. reportGps(true).catch(e => console.log('Init GPS check skipped', e));
  530. try {
  531. await this.loadAnomalyTypeDict()
  532. await this.loadServiceList()
  533. await this.loadOrderDetail()
  534. } finally {
  535. this.pageLoading = false
  536. }
  537. },
  538. methods: {
  539. async loadServiceList() {
  540. try {
  541. const res = await listAllService()
  542. this.serviceList = res.data || []
  543. } catch (err) { console.error('获取服务类型失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  544. },
  545. loadServiceDetail(serviceId) {
  546. const serviceInfo = (this.serviceList || []).find(s => s.id === serviceId)
  547. if (serviceInfo) {
  548. this.serviceMode = serviceInfo.mode
  549. this.orderDetail.serviceName = serviceInfo.name
  550. if (serviceInfo.clockInRemark) {
  551. try {
  552. const parsed = JSON.parse(serviceInfo.clockInRemark)
  553. if (Array.isArray(parsed) && parsed.length > 0) this.clockInSteps = parsed
  554. } catch (parseErr) { console.error('解析 clockInRemark 失败:', parseErr) }
  555. }
  556. }
  557. },
  558. async loadOrderDetail() {
  559. if (!this.orderId) { uni.showToast({ title: '订单ID缺失', icon: 'none' }); return }
  560. try {
  561. const res = await getOrderInfo(this.orderId)
  562. const order = res.data
  563. if (!order) { uni.showToast({ title: '订单不存在', icon: 'none' }); return }
  564. this.serviceId = order.service
  565. this.petId = order.usrPet || null
  566. this.transformOrderData(order)
  567. if (this.serviceId) this.loadServiceDetail(this.serviceId)
  568. if (this.petId) await this.loadPetDetail(this.petId)
  569. await this.loadOrderLogs()
  570. } catch (err) {
  571. console.error('获取订单详情失败:', err)
  572. uni.showToast({ title: err.message || err.msg || '加载失败', icon: 'none' })
  573. }
  574. },
  575. async loadOrderLogs() {
  576. try {
  577. const res = await getOrderLogs(this.orderId)
  578. const logs = res.data || []
  579. const progressLogs = logs.filter(log => log.logType === 1)
  580. this.orderDetail.progressLogs = progressLogs.map(log => ({
  581. status: log.title || '', time: log.createTime || '',
  582. medias: log.photoUrls || [], remark: log.content || ''
  583. }))
  584. const validLogs = logs.filter(log => log.logType === 1 && log.step !== undefined && log.step !== null)
  585. .sort((a, b) => new Date(b.createTime).getTime() - new Date(a.createTime).getTime())
  586. if (validLogs.length > 0) {
  587. const latestStep = validLogs[0].step
  588. const stepIndex = this.clockInSteps.findIndex(s => s.step === latestStep)
  589. this.currentStep = stepIndex >= 0 ? stepIndex + 1 : Number(latestStep)
  590. } else { this.currentStep = 0 }
  591. this.updateCurrentClockIn()
  592. } catch (err) { console.error('获取订单日志失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  593. },
  594. updateCurrentClockIn() {
  595. this.currentClockIn = this.currentStep < this.clockInSteps.length ? this.clockInSteps[this.currentStep] : null
  596. },
  597. transformOrderData(order) {
  598. const mode = order.mode || 0
  599. const isRoundTrip = mode === 1
  600. this.orderType = isRoundTrip ? 1 : 2
  601. this.orderStatus = order.status || 2
  602. this.orderDetail = {
  603. type: this.orderType,
  604. fulfillmentCommission: (order.fulfillmentCommission / 100).toFixed(2),
  605. timeLabel: isRoundTrip ? '取货时间' : '服务时间',
  606. time: order.serviceTime || '',
  607. petAvatar: '/static/dog.png',
  608. petName: order.petName || order.contact || '',
  609. petBreed: order.breed || '',
  610. serviceTag: order.groupPurchasePackageName || '',
  611. startLocation: order.fromAddress || '暂无起点',
  612. startAddress: order.fromAddress || '',
  613. fromAddress: order.fromAddress || '',
  614. fromLat: order.fromLat, fromLng: order.fromLng,
  615. endLocation: (order.contact || '') + ' ' + (order.contactPhoneNumber || ''),
  616. endAddress: order.toAddress || '',
  617. toAddress: order.toAddress || '',
  618. toLat: order.toLat, toLng: order.toLng,
  619. customerPhone: order.contactPhoneNumber || '',
  620. ownerName: order.contact || '',
  621. serviceContent: order.remark || '', remark: order.remark || '',
  622. orderNo: order.code || 'T' + order.id,
  623. createTime: order.serviceTime || '',
  624. nursingSummary: order.nursingSummary || '',
  625. fulfillerName: order.fulfillerName || '',
  626. progressLogs: [{ status: '您已接单', time: order.serviceTime || '' }]
  627. }
  628. if (this.orderDetail.fulfillerName) this.sumSigner = this.orderDetail.fulfillerName
  629. },
  630. async loadPetDetail(petId) {
  631. try {
  632. const res = await getPetDetail(petId)
  633. const pet = res.data
  634. if (pet) {
  635. this.petDetail = pet
  636. this.orderDetail.petAvatar = pet.avatarUrl || '/static/dog.png'
  637. this.orderDetail.petName = pet.name || this.orderDetail.petName
  638. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed
  639. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName
  640. }
  641. } catch (err) { console.error('获取宠物档案失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  642. },
  643. async loadAnomalyList() {
  644. if (!this.orderId) return
  645. try {
  646. const res = await getAnomalyList(this.orderId)
  647. const list = res.data || []
  648. this.anomalyList = list.map(item => {
  649. const dict = this.anomalyTypeDict.find(d => d.value === item.type)
  650. return { ...item, typeLabel: dict ? dict.label : item.type, photoUrls: item.photoUrls || [] }
  651. })
  652. } catch (err) { console.error('获取异常列表失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  653. },
  654. async loadAnomalyTypeDict() {
  655. try {
  656. const res = await getDictDataByType('flf_anamaly_type')
  657. this.anomalyTypeDict = res.data.map(item => ({ label: item.dictLabel, value: item.dictValue }))
  658. } catch (err) { console.error('获取异常字典失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  659. },
  660. openAnomalyModal() { this.showAnomalyModal = true; this.loadAnomalyList() },
  661. closeAnomalyModal() { this.showAnomalyModal = false },
  662. getAnomalyStatusLabel(status) {
  663. return { 0: '待审核', 1: '已通过', 2: '已驳回' }[status] || '未知'
  664. },
  665. showPetProfile() {
  666. const pet = this.petDetail
  667. if (pet) {
  668. this.currentPetInfo = {
  669. petAvatar: pet.avatarUrl || '/static/dog.png',
  670. petName: pet.name || '', petBreed: pet.breed || '',
  671. petGender: pet.gender === 1 ? 'M' : (pet.gender === 2 ? 'F' : ''),
  672. petAge: pet.age ? pet.age + '岁' : '未知',
  673. petWeight: pet.weight ? pet.weight + 'kg' : '未知',
  674. petPersonality: pet.personality || pet.cutePersonality || '无',
  675. petHobby: '', petRemark: pet.remark || '无',
  676. petTags: (pet.tags || []).map(t => t.name), petLogs: [],
  677. petSize: pet.size || '', petIsSterilized: pet.isSterilized,
  678. petHealthStatus: pet.healthStatus || '', petAllergies: pet.allergies || '',
  679. petMedicalHistory: pet.medicalHistory || '', petVaccineStatus: pet.vaccineStatus || '',
  680. ownerName: pet.ownerName || '', ownerPhone: pet.ownerPhone || ''
  681. }
  682. this.loadPetChangeLogs(pet.id)
  683. } else {
  684. this.currentPetInfo = {
  685. ...this.orderDetail, petGender: '', petAge: '未知', petWeight: '未知',
  686. petPersonality: '无', petHobby: '', petRemark: '无', petTags: [], petLogs: []
  687. }
  688. }
  689. this.showPetModal = true
  690. },
  691. async loadPetChangeLogs(petId) {
  692. if (!petId) return
  693. try {
  694. const res = await listChangeLog({ targetId: petId, targetType: 'pet' })
  695. const logs = res.data || []
  696. this.currentPetInfo.petLogs = logs.map(item => ({
  697. date: item.createTime || '', content: item.content || '', recorder: item.operatorName || '未知'
  698. }))
  699. } catch (err) { console.error('获取宠物备注列表失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  700. },
  701. closePetProfile() { this.showPetModal = false },
  702. openPetRemarkInput() { this.petRemarkText = ''; this.showPetRemarkInput = true },
  703. closePetRemarkInput() { this.showPetRemarkInput = false },
  704. async submitPetRemark() {
  705. if (!this.petRemarkText.trim()) { uni.showToast({ title: '备注内容不能为空', icon: 'none' }); return }
  706. if (!this.petId) { uni.showToast({ title: '宠物信息缺失', icon: 'none' }); return }
  707. uni.showLoading({ title: '提交中...', mask: true });
  708. try {
  709. await apiSubmitPetRemark({ petId: this.petId, content: this.petRemarkText });
  710. uni.hideLoading(); uni.showToast({ title: '备注已添加', icon: 'success' });
  711. this.closePetRemarkInput(); this.loadPetChangeLogs(this.petId);
  712. } catch (err) { uni.hideLoading(); console.error('提交宠物备注失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) }
  713. },
  714. goToAnomaly() {
  715. uni.navigateTo({ url: '/pages/orders/anomaly/index?orderId=' + (this.orderId || '') });
  716. },
  717. callPhone() {
  718. const phoneNum = this.orderDetail.customerPhone || '18900008451'
  719. if (!phoneNum) { uni.showToast({ title: '手机号不存在', icon: 'none' }); return }
  720. uni.showModal({
  721. title: '拨号提示',
  722. content: `系统将为您拨打手机号: ${phoneNum},请授予拨号权限以正常通话。`,
  723. confirmText: '呼叫', cancelText: '取消',
  724. success: (res) => {
  725. if (res.confirm) {
  726. uni.makePhoneCall({
  727. phoneNumber: phoneNum,
  728. fail: () => { uni.showToast({ title: '无法唤起拨号盘,请检查权限设置', icon: 'none' }) }
  729. });
  730. }
  731. }
  732. });
  733. },
  734. openNavigation(type) { this.navTargetPointType = type; this.showNavModal = true },
  735. closeNavModal() { this.showNavModal = false },
  736. chooseMap(mapType) {
  737. let pointType = this.navTargetPointType;
  738. let name = pointType === 'start' ? (this.orderDetail.fromAddress || '起点') : (this.orderDetail.toAddress || '终点');
  739. let address = pointType === 'start' ? (this.orderDetail.fromAddress || '起点地址') : (this.orderDetail.toAddress || '终点地址');
  740. let latitude = pointType === 'start' ? Number(this.orderDetail.fromLat) : Number(this.orderDetail.toLat);
  741. let longitude = pointType === 'start' ? Number(this.orderDetail.fromLng) : Number(this.orderDetail.toLng);
  742. this.showNavModal = false;
  743. const navigateTo = (lat, lng, addrName, addrDesc) => {
  744. uni.openLocation({
  745. latitude: lat, longitude: lng, name: addrName,
  746. address: addrDesc || '无法获取详细地址',
  747. success: () => { console.log('打开导航成功: ' + mapType) },
  748. fail: (err) => { console.error('打开导航失败:', err); uni.showToast({ title: '打开地图失败', icon: 'none' }) }
  749. });
  750. };
  751. if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
  752. navigateTo(latitude, longitude, name, address);
  753. } else {
  754. uni.showLoading({ title: '获取当前位置...', mask: true });
  755. reportGps(true).then(res => {
  756. uni.hideLoading(); navigateTo(res.latitude, res.longitude, name, address);
  757. }).catch(err => { uni.hideLoading(); console.error('获取地理位置失败:', err); uni.showToast({ title: err.message || err.msg || '请求失败', icon: 'none' }) });
  758. }
  759. },
  760. openUploadModal() { this.modalMediaList = []; this.modalRemark = ''; this.showUploadModal = true },
  761. closeUploadModal() { this.showUploadModal = false },
  762. handleConfirmUpload() { this.confirmUploadModal() },
  763. chooseModalMedia() {
  764. uni.showActionSheet({
  765. itemList: ['选择图片', '选择视频'],
  766. success: (asRes) => {
  767. if (asRes.tapIndex === 0) {
  768. uni.chooseImage({
  769. count: 6 - this.modalMediaList.length,
  770. sizeType: ['compressed'],
  771. sourceType: ['album', 'camera'],
  772. success: async (res) => {
  773. uni.showLoading({ title: '上传中...', mask: true });
  774. try {
  775. for (const filePath of res.tempFilePaths) {
  776. const uploadRes = await uploadFile(filePath);
  777. if (uploadRes.code === 200) {
  778. this.modalMediaList.push({
  779. url: uploadRes.data.url, ossId: uploadRes.data.ossId,
  780. localPath: filePath, mediaType: 'image'
  781. });
  782. }
  783. }
  784. uni.hideLoading(); uni.showToast({ title: '上传成功', icon: 'success' });
  785. } catch (err) { uni.hideLoading(); uni.showToast({ title: err.message || err.msg || '上传失败', icon: 'none' }) }
  786. },
  787. fail: (err) => { console.error('选择图片失败:', err) }
  788. });
  789. } else if (asRes.tapIndex === 1) {
  790. uni.chooseVideo({
  791. sourceType: ['album', 'camera'],
  792. compressed: true,
  793. success: async (res) => {
  794. uni.showLoading({ title: '上传中...', mask: true });
  795. try {
  796. const uploadRes = await uploadFile(res.tempFilePath);
  797. if (uploadRes.code === 200) {
  798. this.modalMediaList.push({
  799. url: uploadRes.data.url, ossId: uploadRes.data.ossId,
  800. localPath: res.tempFilePath, mediaType: 'video',
  801. thumb: res.thumbTempFilePath || res.tempFilePath
  802. });
  803. }
  804. uni.hideLoading(); uni.showToast({ title: '上传成功', icon: 'success' });
  805. } catch (err) { uni.hideLoading(); uni.showToast({ title: err.message || err.msg || '上传失败', icon: 'none' }) }
  806. },
  807. fail: (err) => { console.error('选择视频失败:', err) }
  808. });
  809. }
  810. }
  811. });
  812. },
  813. removeModalMedia(index) { this.modalMediaList.splice(index, 1) },
  814. async confirmUploadModal() {
  815. if (this.modalMediaList.length === 0) { uni.showToast({ title: '请上传至少一张图片或视频', icon: 'none' }); return }
  816. try {
  817. uni.showLoading({ title: '提交中...' });
  818. const ossIds = this.modalMediaList.map(item => item.ossId);
  819. const clockInType = this.currentClockIn ? this.currentClockIn.step : (this.currentStep + 1);
  820. const clockInData = {
  821. orderId: this.orderId, photos: ossIds,
  822. content: this.modalRemark || '', step: clockInType,
  823. title: this.currentTaskTitle,
  824. startFlag: Number(clockInType) === 1,
  825. endFlag: Number(this.currentStep) === this.steps.length - 1
  826. };
  827. await clockIn(clockInData);
  828. uni.hideLoading(); this.closeUploadModal();
  829. uni.showToast({ title: '打卡成功', icon: 'success' });
  830. await this.loadOrderDetail();
  831. } catch (err) {
  832. uni.hideLoading(); console.error('打卡失败:', err);
  833. uni.showToast({ title: err.message || err.msg || '打卡失败', icon: 'none' });
  834. }
  835. },
  836. copyOrderNo() {
  837. uni.setClipboardData({ data: this.orderDetail.orderNo, success: () => { uni.showToast({ title: '复制成功', icon: 'none' }) } });
  838. },
  839. openSumModal() {
  840. let displayDate = '';
  841. if (this.orderDetail.time) {
  842. displayDate = this.orderDetail.time.split(' ')[0].replace(/-/g, '/');
  843. } else {
  844. const now = new Date();
  845. displayDate = `${now.getFullYear()}/${String(now.getMonth() + 1).padStart(2, '0')}/${String(now.getDate()).padStart(2, '0')}`;
  846. }
  847. this.sumDate = displayDate;
  848. if (this.orderDetail.nursingSummary) {
  849. this.sumContent = this.orderDetail.nursingSummary;
  850. } else if (!this.sumContent) {
  851. this.sumContent = '1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:';
  852. }
  853. this.showSumModal = true;
  854. },
  855. closeSumModal() { this.showSumModal = false },
  856. async submitSumModal() {
  857. if (!this.sumContent.trim()) { uni.showToast({ title: '请填写服务内容', icon: 'none' }); return }
  858. uni.showLoading({ title: '提交中...', mask: true });
  859. try {
  860. const res = await submitNursingSummary({ orderId: this.orderId, content: this.sumContent });
  861. uni.hideLoading();
  862. if (res.code === 200) {
  863. uni.showToast({ title: '小结已提交', icon: 'success' });
  864. this.closeSumModal(); await this.loadOrderDetail();
  865. } else {
  866. // 对于业务失败,如果 request.js 没弹,这里补一下,但要用原信息
  867. uni.showToast({ title: res.msg || '提交小结失败', icon: 'none' })
  868. }
  869. } catch (err) {
  870. uni.hideLoading(); console.error('提交宠护小结失败:', err);
  871. uni.showToast({ title: err.message || err.msg || '提交小结失败', icon: 'none' });
  872. }
  873. },
  874. isVideo(url) {
  875. if (!url) return false;
  876. const videoExts = ['.mp4', '.mov', '.m4v', '.3gp', '.avi', '.wmv'];
  877. return videoExts.some(ext => url.toLowerCase().includes(ext));
  878. },
  879. getVideoPoster(url) {
  880. if (!this.isVideo(url)) return url;
  881. if (url.includes('?x-oss-process') || url.includes('?ci-process') || url.includes('?vframe')) return url;
  882. if (url.includes('myqcloud.com')) return url + '?ci-process=snapshot&time=1';
  883. return url + '?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast';
  884. },
  885. previewMedia(medias, currentIdx) {
  886. const url = medias[currentIdx];
  887. if (this.isVideo(url)) {
  888. this.videoPlayerUrl = url; this.videoPlayerShow = true;
  889. } else {
  890. const imageUrls = medias.filter(m => !this.isVideo(m));
  891. const newIdx = imageUrls.indexOf(url);
  892. uni.previewImage({ current: newIdx >= 0 ? newIdx : 0, urls: imageUrls });
  893. }
  894. },
  895. closeVideoPlayer() { this.videoPlayerShow = false; this.videoPlayerUrl = '' }
  896. }
  897. }
  898. </script>
  899. <style>
  900. page {
  901. background-color: #F8F8F8;
  902. }
  903. .detail-container {
  904. padding-bottom: 200rpx;
  905. }
  906. .loading-container {
  907. padding: 30rpx;
  908. }
  909. .skeleton-header {
  910. background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
  911. border-radius: 20rpx;
  912. padding: 40rpx;
  913. display: flex;
  914. justify-content: space-between;
  915. align-items: center;
  916. margin-bottom: 20rpx;
  917. }
  918. .skeleton-progress {
  919. background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
  920. border-radius: 0 0 20rpx 20rpx;
  921. margin-top: -40rpx;
  922. padding: 30rpx 40rpx 40rpx;
  923. display: flex;
  924. justify-content: space-around;
  925. margin-bottom: 25rpx;
  926. }
  927. .skeleton-circle {
  928. width: 40rpx;
  929. height: 40rpx;
  930. border-radius: 50%;
  931. background-color: rgba(255, 255, 255, 0.3);
  932. }
  933. .skeleton-card {
  934. background-color: #fff;
  935. border-radius: 20rpx;
  936. padding: 30rpx;
  937. margin-bottom: 25rpx;
  938. box-shadow: 0 5rpx 20rpx rgba(0, 0, 0, 0.03);
  939. }
  940. .skeleton-line {
  941. border-radius: 8rpx;
  942. background-color: #f0f0f0;
  943. }
  944. .skeleton-ani {
  945. background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  946. background-size: 400% 100%;
  947. animation: skeleton-loading 1.4s ease infinite;
  948. }
  949. .skeleton-header .skeleton-ani {
  950. background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.35) 37%, rgba(255, 255, 255, 0.2) 63%);
  951. background-size: 400% 100%;
  952. animation: skeleton-loading 1.4s ease infinite;
  953. }
  954. .skeleton-progress .skeleton-ani {
  955. background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.35) 37%, rgba(255, 255, 255, 0.2) 63%);
  956. background-size: 400% 100%;
  957. animation: skeleton-loading 1.4s ease infinite;
  958. }
  959. @keyframes skeleton-loading {
  960. 0% {
  961. background-position: 100% 50%;
  962. }
  963. 100% {
  964. background-position: 0 50%;
  965. }
  966. }
  967. .detail-header {
  968. background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
  969. padding: 40rpx 40rpx 50rpx 40rpx;
  970. color: #fff;
  971. border-radius: 20rpx;
  972. margin: 30rpx 30rpx 25rpx 30rpx;
  973. box-shadow: 0 5rpx 15rpx rgba(255, 87, 34, 0.2);
  974. }
  975. .status-row {
  976. display: flex;
  977. justify-content: space-between;
  978. align-items: center;
  979. margin-bottom: 40rpx;
  980. }
  981. .status-title {
  982. font-size: 28rpx;
  983. font-weight: bold;
  984. }
  985. .status-fulfillmentCommission {
  986. font-size: 40rpx;
  987. font-weight: bold;
  988. }
  989. .progress-bar {
  990. display: flex;
  991. justify-content: space-between;
  992. align-items: flex-start;
  993. padding: 0 10rpx;
  994. }
  995. .step-item {
  996. display: flex;
  997. flex-direction: column;
  998. align-items: center;
  999. flex: 1;
  1000. position: relative;
  1001. opacity: 0.5;
  1002. }
  1003. .step-item.done {
  1004. opacity: 1;
  1005. }
  1006. .step-item.done .step-circle {
  1007. background-color: #fff;
  1008. color: #FF5722;
  1009. font-weight: bold;
  1010. }
  1011. .step-item.done .step-text {
  1012. font-weight: 500;
  1013. }
  1014. .step-item.active {
  1015. opacity: 1;
  1016. }
  1017. .step-item.active .step-circle {
  1018. background-color: #fff;
  1019. color: #FF5722;
  1020. font-weight: bold;
  1021. width: 48rpx;
  1022. height: 48rpx;
  1023. font-size: 24rpx;
  1024. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.15);
  1025. }
  1026. .step-item.active .step-text {
  1027. font-weight: bold;
  1028. }
  1029. .step-circle-wrapper {
  1030. position: relative;
  1031. width: 100%;
  1032. display: flex;
  1033. justify-content: center;
  1034. margin-bottom: 10rpx;
  1035. }
  1036. .step-circle {
  1037. width: 40rpx;
  1038. height: 40rpx;
  1039. border-radius: 50%;
  1040. background-color: rgba(255, 255, 255, 0.3);
  1041. color: rgba(255, 255, 255, 0.8);
  1042. font-size: 20rpx;
  1043. display: flex;
  1044. justify-content: center;
  1045. align-items: center;
  1046. position: relative;
  1047. z-index: 2;
  1048. transition: all 0.2s;
  1049. }
  1050. .step-line {
  1051. position: absolute;
  1052. top: 50%;
  1053. right: calc(50% + 20rpx);
  1054. width: calc(100% - 40rpx);
  1055. height: 2rpx;
  1056. background-color: rgba(255, 255, 255, 0.3);
  1057. z-index: 1;
  1058. transform: translateY(-50%);
  1059. }
  1060. .step-line.active-line {
  1061. background-color: #fff;
  1062. height: 3rpx;
  1063. }
  1064. .step-text {
  1065. font-size: 24rpx;
  1066. }
  1067. .detail-content {
  1068. width: 100%;
  1069. box-sizing: border-box;
  1070. padding: 0 30rpx;
  1071. position: relative;
  1072. z-index: 10;
  1073. }
  1074. .white-card {
  1075. background-color: #fff;
  1076. border-radius: 20rpx;
  1077. padding: 30rpx;
  1078. margin-bottom: 25rpx;
  1079. box-shadow: 0 5rpx 20rpx rgba(0, 0, 0, 0.03);
  1080. }
  1081. .pet-bar {
  1082. display: flex;
  1083. align-items: center;
  1084. }
  1085. .pb-avatar {
  1086. width: 100rpx;
  1087. height: 100rpx;
  1088. border-radius: 50%;
  1089. margin-right: 20rpx;
  1090. }
  1091. .pb-info {
  1092. flex: 1;
  1093. display: flex;
  1094. flex-direction: column;
  1095. }
  1096. .pb-name-row {
  1097. margin-bottom: 10rpx;
  1098. }
  1099. .pb-name {
  1100. font-size: 32rpx;
  1101. font-weight: bold;
  1102. color: #333;
  1103. margin-right: 15rpx;
  1104. }
  1105. .pb-breed {
  1106. font-size: 26rpx;
  1107. color: #999;
  1108. }
  1109. .pb-tags {
  1110. display: flex;
  1111. }
  1112. .pb-tag {
  1113. background-color: #FFF3E0;
  1114. color: #FF9800;
  1115. font-size: 22rpx;
  1116. padding: 4rpx 16rpx;
  1117. border-radius: 8rpx;
  1118. }
  1119. .pb-actions {
  1120. display: flex;
  1121. align-items: center;
  1122. }
  1123. .pb-btn {
  1124. display: flex;
  1125. align-items: center;
  1126. justify-content: center;
  1127. }
  1128. .profile-btn {
  1129. border: 2rpx solid #FF9800;
  1130. color: #FF9800;
  1131. font-size: 24rpx;
  1132. padding: 8rpx 20rpx;
  1133. border-radius: 30rpx;
  1134. margin-right: 20rpx;
  1135. }
  1136. .phone-btn {
  1137. width: 60rpx;
  1138. height: 60rpx;
  1139. border-radius: 50%;
  1140. background-color: #FFF3E0;
  1141. }
  1142. .phone-icon {
  1143. width: 32rpx;
  1144. height: 32rpx;
  1145. }
  1146. .si-row {
  1147. display: flex;
  1148. align-items: flex-start;
  1149. margin-bottom: 30rpx;
  1150. }
  1151. .si-row:last-child {
  1152. margin-bottom: 0;
  1153. }
  1154. .si-icon {
  1155. width: 36rpx;
  1156. height: 36rpx;
  1157. margin-right: 20rpx;
  1158. margin-top: 4rpx;
  1159. }
  1160. .si-icon-uni {
  1161. margin-right: 20rpx;
  1162. margin-top: 4rpx;
  1163. display: flex;
  1164. align-items: center;
  1165. justify-content: center;
  1166. }
  1167. .si-content {
  1168. flex: 1;
  1169. display: flex;
  1170. flex-direction: column;
  1171. }
  1172. .si-label {
  1173. font-size: 24rpx;
  1174. color: #999;
  1175. margin-bottom: 6rpx;
  1176. }
  1177. .icon-bg {
  1178. width: 44rpx;
  1179. height: 44rpx;
  1180. border-radius: 8rpx;
  1181. display: flex;
  1182. justify-content: center;
  1183. align-items: center;
  1184. margin-right: 20rpx;
  1185. margin-top: 4rpx;
  1186. flex-shrink: 0;
  1187. }
  1188. .icon-bg.grey-bg {
  1189. background-color: #F8F8F8;
  1190. }
  1191. .custom-icon {
  1192. width: 28rpx;
  1193. height: 28rpx;
  1194. }
  1195. .custom-icon-file {
  1196. width: 36rpx;
  1197. height: 36rpx;
  1198. }
  1199. .si-val {
  1200. font-size: 28rpx;
  1201. color: #333;
  1202. }
  1203. .record-btn {
  1204. font-size: 24rpx;
  1205. color: #FF5722;
  1206. display: flex;
  1207. align-items: center;
  1208. }
  1209. .record-arrow {
  1210. width: 24rpx;
  1211. height: 24rpx;
  1212. margin-left: 6rpx;
  1213. }
  1214. .record-history-row {
  1215. margin-top: 30rpx;
  1216. padding-top: 25rpx;
  1217. border-top: 1px dashed #f0f0f0;
  1218. display: flex;
  1219. justify-content: space-between;
  1220. align-items: center;
  1221. }
  1222. .addr-row {
  1223. position: relative;
  1224. align-items: stretch;
  1225. }
  1226. .icon-circle {
  1227. width: 40rpx;
  1228. height: 40rpx;
  1229. border-radius: 50%;
  1230. color: #fff;
  1231. font-size: 22rpx;
  1232. display: flex;
  1233. align-items: center;
  1234. justify-content: center;
  1235. margin-right: 20rpx;
  1236. flex-shrink: 0;
  1237. font-weight: bold;
  1238. margin-top: 6rpx;
  1239. position: relative;
  1240. z-index: 1;
  1241. }
  1242. .icon-circle.start {
  1243. background-color: #FFB74D;
  1244. }
  1245. .icon-circle.end {
  1246. background-color: #81C784;
  1247. }
  1248. .icon-circle.service {
  1249. background-color: #81C784;
  1250. }
  1251. .route-line-vertical {
  1252. position: absolute;
  1253. left: 19rpx;
  1254. top: 46rpx;
  1255. bottom: -6rpx;
  1256. border-left: 2rpx dashed #E0E0E0;
  1257. width: 0;
  1258. z-index: 0;
  1259. }
  1260. .si-addr-title {
  1261. font-size: 30rpx;
  1262. font-weight: bold;
  1263. color: #333;
  1264. margin-bottom: 6rpx;
  1265. }
  1266. .si-addr-desc {
  1267. font-size: 24rpx;
  1268. color: #999;
  1269. }
  1270. .nav-btn-circle {
  1271. width: 50rpx;
  1272. height: 50rpx;
  1273. background-color: #FFF3E0;
  1274. border-radius: 50%;
  1275. display: flex;
  1276. align-items: center;
  1277. justify-content: center;
  1278. margin-top: 6rpx;
  1279. }
  1280. .nav-arrow {
  1281. width: 28rpx;
  1282. height: 28rpx;
  1283. }
  1284. .task-card {
  1285. display: flex;
  1286. flex-direction: column;
  1287. }
  1288. .tc-title {
  1289. font-size: 30rpx;
  1290. font-weight: bold;
  1291. color: #333;
  1292. margin-bottom: 15rpx;
  1293. }
  1294. .tc-desc {
  1295. font-size: 22rpx;
  1296. color: #666;
  1297. margin-bottom: 12rpx;
  1298. }
  1299. .media-grid {
  1300. display: flex;
  1301. flex-wrap: wrap;
  1302. gap: 20rpx;
  1303. margin-bottom: 20rpx;
  1304. }
  1305. .media-item {
  1306. width: 160rpx;
  1307. height: 160rpx;
  1308. position: relative;
  1309. border-radius: 12rpx;
  1310. }
  1311. .media-preview {
  1312. width: 100%;
  1313. height: 100%;
  1314. border-radius: 12rpx;
  1315. }
  1316. .media-del {
  1317. position: absolute;
  1318. top: -10rpx;
  1319. right: -10rpx;
  1320. width: 36rpx;
  1321. height: 36rpx;
  1322. background-color: rgba(0, 0, 0, 0.5);
  1323. color: #fff;
  1324. border-radius: 50%;
  1325. display: flex;
  1326. align-items: center;
  1327. justify-content: center;
  1328. font-size: 24rpx;
  1329. z-index: 2;
  1330. }
  1331. .media-add {
  1332. width: 160rpx;
  1333. height: 160rpx;
  1334. border: 2rpx dashed #ccc;
  1335. border-radius: 12rpx;
  1336. display: flex;
  1337. flex-direction: column;
  1338. align-items: center;
  1339. justify-content: center;
  1340. background-color: #FAFAFA;
  1341. box-sizing: border-box;
  1342. }
  1343. .upload-icon-small {
  1344. width: 40rpx;
  1345. height: 40rpx;
  1346. margin-bottom: 10rpx;
  1347. }
  1348. .upload-text-small {
  1349. font-size: 22rpx;
  1350. color: #999;
  1351. }
  1352. .full-media-add {
  1353. width: 100%;
  1354. height: 140rpx;
  1355. background-color: #FAFAFA;
  1356. border: 2rpx dashed #E0E0E0;
  1357. border-radius: 12rpx;
  1358. display: flex;
  1359. flex-direction: column;
  1360. justify-content: center;
  1361. align-items: center;
  1362. margin-top: 10rpx;
  1363. }
  1364. .upload-icon-large {
  1365. width: 50rpx;
  1366. height: 50rpx;
  1367. margin-bottom: 10rpx;
  1368. opacity: 0.5;
  1369. }
  1370. .upload-text-large {
  1371. font-size: 24rpx;
  1372. color: #999;
  1373. }
  1374. .bi-row {
  1375. display: flex;
  1376. align-items: flex-start;
  1377. margin-bottom: 25rpx;
  1378. }
  1379. .bi-row:last-child {
  1380. margin-bottom: 0;
  1381. }
  1382. .bi-icon {
  1383. width: 32rpx;
  1384. height: 32rpx;
  1385. margin-right: 20rpx;
  1386. margin-top: 4rpx;
  1387. }
  1388. .bi-icon-uni {
  1389. margin-right: 20rpx;
  1390. margin-top: 4rpx;
  1391. display: flex;
  1392. align-items: center;
  1393. justify-content: center;
  1394. }
  1395. .bi-content {
  1396. flex: 1;
  1397. display: flex;
  1398. flex-direction: column;
  1399. }
  1400. .bi-label {
  1401. font-size: 24rpx;
  1402. color: #999;
  1403. margin-bottom: 6rpx;
  1404. }
  1405. .bi-val-row {
  1406. display: flex;
  1407. align-items: center;
  1408. }
  1409. .bi-val {
  1410. font-size: 28rpx;
  1411. color: #333;
  1412. }
  1413. .bi-copy {
  1414. background-color: #F0F0F0;
  1415. color: #666;
  1416. font-size: 20rpx;
  1417. padding: 2rpx 10rpx;
  1418. border-radius: 6rpx;
  1419. margin-left: 15rpx;
  1420. }
  1421. .tl-title-row {
  1422. display: flex;
  1423. align-items: center;
  1424. margin-bottom: 30rpx;
  1425. }
  1426. .orange-bar {
  1427. width: 8rpx;
  1428. height: 32rpx;
  1429. background-color: #FF9800;
  1430. margin-right: 16rpx;
  1431. border-radius: 4rpx;
  1432. }
  1433. .tl-title {
  1434. font-size: 30rpx;
  1435. font-weight: bold;
  1436. color: #333;
  1437. }
  1438. .tl-list {
  1439. display: flex;
  1440. flex-direction: column;
  1441. padding-left: 10rpx;
  1442. }
  1443. .tl-item {
  1444. display: flex;
  1445. position: relative;
  1446. padding-bottom: 40rpx;
  1447. }
  1448. .tl-item:last-child {
  1449. padding-bottom: 0;
  1450. }
  1451. .tl-marker {
  1452. width: 16rpx;
  1453. height: 16rpx;
  1454. border-radius: 50%;
  1455. background-color: #E0E0E0;
  1456. position: absolute;
  1457. left: 0;
  1458. top: 6rpx;
  1459. z-index: 2;
  1460. display: flex;
  1461. justify-content: center;
  1462. align-items: center;
  1463. }
  1464. .tl-marker.active {
  1465. background-color: #fff;
  1466. border: 3rpx solid #FF9800;
  1467. width: 18rpx;
  1468. height: 18rpx;
  1469. left: -1rpx;
  1470. }
  1471. .tl-dot-inner {
  1472. width: 10rpx;
  1473. height: 10rpx;
  1474. border-radius: 50%;
  1475. background-color: #FF9800;
  1476. }
  1477. .tl-item:not(:last-child)::after {
  1478. content: '';
  1479. position: absolute;
  1480. left: 7rpx;
  1481. top: 24rpx;
  1482. bottom: -6rpx;
  1483. width: 2rpx;
  1484. background-color: #FFE0B2;
  1485. z-index: 1;
  1486. }
  1487. .tl-content-row {
  1488. margin-left: 40rpx;
  1489. display: flex;
  1490. flex-direction: column;
  1491. width: 100%;
  1492. }
  1493. .tl-header {
  1494. display: flex;
  1495. justify-content: space-between;
  1496. align-items: center;
  1497. width: 100%;
  1498. margin-bottom: 10rpx;
  1499. }
  1500. .tl-status {
  1501. font-size: 28rpx;
  1502. color: #333;
  1503. font-weight: 500;
  1504. }
  1505. .tl-time {
  1506. font-size: 24rpx;
  1507. color: #999;
  1508. }
  1509. .tl-medias {
  1510. display: flex;
  1511. flex-wrap: wrap;
  1512. gap: 15rpx;
  1513. margin-bottom: 15rpx;
  1514. }
  1515. .tl-img {
  1516. width: 140rpx;
  1517. height: 140rpx;
  1518. border-radius: 8rpx;
  1519. }
  1520. .tl-remark {
  1521. font-size: 24rpx;
  1522. color: #666;
  1523. background-color: #F9F9F9;
  1524. padding: 15rpx;
  1525. border-radius: 8rpx;
  1526. line-height: 1.5;
  1527. }
  1528. .bottom-action-bar {
  1529. position: fixed;
  1530. bottom: 0;
  1531. left: 0;
  1532. width: 100%;
  1533. height: 120rpx;
  1534. background-color: #fff;
  1535. display: flex;
  1536. align-items: center;
  1537. justify-content: space-between;
  1538. padding: 0 30rpx;
  1539. box-shadow: 0 -5rpx 20rpx rgba(0, 0, 0, 0.05);
  1540. box-sizing: border-box;
  1541. padding-bottom: constant(safe-area-inset-bottom);
  1542. padding-bottom: env(safe-area-inset-bottom);
  1543. z-index: 100;
  1544. }
  1545. .action-left,
  1546. .action-right {
  1547. display: flex;
  1548. align-items: center;
  1549. }
  1550. .action-btn {
  1551. height: 64rpx;
  1552. line-height: 64rpx;
  1553. border-radius: 32rpx;
  1554. font-size: 26rpx;
  1555. padding: 0 35rpx;
  1556. margin: 0;
  1557. }
  1558. .action-left .action-btn:first-child {
  1559. margin-right: 20rpx;
  1560. }
  1561. .action-btn.grey-outline {
  1562. background-color: #fff;
  1563. color: #666;
  1564. border: 1px solid #E0E0E0;
  1565. }
  1566. .action-btn.orange-outline {
  1567. background-color: #FFF8F0;
  1568. color: #FF9800;
  1569. border: 1px solid #FF9800;
  1570. }
  1571. .action-btn.primary {
  1572. background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
  1573. color: #fff;
  1574. box-shadow: 0 4rpx 12rpx rgba(255, 87, 34, 0.2);
  1575. border: none;
  1576. }
  1577. .action-btn.grey-bg {
  1578. background: #E0E0E0;
  1579. color: #999;
  1580. box-shadow: none;
  1581. border: none;
  1582. }
  1583. .action-btn::after {
  1584. border: none;
  1585. }
  1586. .upload-modal-mask {
  1587. position: fixed;
  1588. top: 0;
  1589. left: 0;
  1590. width: 100%;
  1591. height: 100%;
  1592. background-color: rgba(0, 0, 0, 0.4);
  1593. z-index: 999;
  1594. display: flex;
  1595. justify-content: center;
  1596. align-items: center;
  1597. }
  1598. .upload-modal-content {
  1599. width: 600rpx;
  1600. background-color: #ffffff;
  1601. border-radius: 20rpx;
  1602. padding: 40rpx;
  1603. box-sizing: border-box;
  1604. display: flex;
  1605. flex-direction: column;
  1606. }
  1607. .um-header {
  1608. text-align: center;
  1609. margin-bottom: 40rpx;
  1610. }
  1611. .um-title {
  1612. font-size: 32rpx;
  1613. font-weight: bold;
  1614. color: #333;
  1615. }
  1616. .um-remark-hint {
  1617. display: block;
  1618. font-size: 22rpx;
  1619. color: #999;
  1620. margin-top: 16rpx;
  1621. line-height: 1.4;
  1622. }
  1623. .um-grid {
  1624. display: flex;
  1625. flex-wrap: wrap;
  1626. margin-bottom: 30rpx;
  1627. }
  1628. .um-item {
  1629. width: 130rpx;
  1630. height: 130rpx;
  1631. border-radius: 8rpx;
  1632. margin-right: 20rpx;
  1633. margin-bottom: 20rpx;
  1634. position: relative;
  1635. background-color: #f5f5f5;
  1636. overflow: hidden;
  1637. }
  1638. .um-item:nth-child(4n) {
  1639. margin-right: 0;
  1640. }
  1641. .um-preview {
  1642. width: 100%;
  1643. height: 100%;
  1644. }
  1645. .um-del {
  1646. position: absolute;
  1647. top: 4rpx;
  1648. right: 4rpx;
  1649. width: 36rpx;
  1650. height: 36rpx;
  1651. line-height: 32rpx;
  1652. text-align: center;
  1653. background-color: rgba(0, 0, 0, 0.5);
  1654. color: #fff;
  1655. border-radius: 50%;
  1656. font-size: 28rpx;
  1657. z-index: 10;
  1658. }
  1659. .um-video-badge {
  1660. position: absolute;
  1661. top: 0;
  1662. left: 0;
  1663. right: 0;
  1664. bottom: 0;
  1665. display: flex;
  1666. justify-content: center;
  1667. align-items: center;
  1668. background-color: rgba(0, 0, 0, 0.2);
  1669. z-index: 5;
  1670. }
  1671. .play-icon-small {
  1672. width: 48rpx;
  1673. height: 48rpx;
  1674. opacity: 0.9;
  1675. }
  1676. .um-add {
  1677. width: 130rpx;
  1678. height: 130rpx;
  1679. border-radius: 8rpx;
  1680. border: 1px dashed #e5e5e5;
  1681. display: flex;
  1682. flex-direction: column;
  1683. justify-content: center;
  1684. align-items: center;
  1685. box-sizing: border-box;
  1686. margin-bottom: 20rpx;
  1687. }
  1688. .um-add-icon {
  1689. width: 44rpx;
  1690. height: 44rpx;
  1691. margin-bottom: 10rpx;
  1692. opacity: 0.4;
  1693. }
  1694. .um-add-text {
  1695. font-size: 24rpx;
  1696. color: #ccc;
  1697. }
  1698. .um-textarea {
  1699. width: 100%;
  1700. height: 160rpx;
  1701. background-color: #ffffff;
  1702. border-radius: 12rpx;
  1703. padding: 24rpx;
  1704. font-size: 28rpx;
  1705. color: #333;
  1706. box-sizing: border-box;
  1707. border: 1px solid #f0f0f0;
  1708. }
  1709. .um-footer {
  1710. margin-top: 40rpx;
  1711. display: flex;
  1712. justify-content: center;
  1713. }
  1714. .um-submit-btn {
  1715. width: 100%;
  1716. height: 88rpx;
  1717. line-height: 88rpx;
  1718. border-radius: 44rpx;
  1719. font-size: 32rpx;
  1720. background-color: #E0E0E0;
  1721. color: #fff;
  1722. border: none;
  1723. text-align: center;
  1724. }
  1725. .um-submit-btn.active {
  1726. background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
  1727. color: #fff;
  1728. box-shadow: 0 4rpx 10rpx rgba(255, 87, 34, 0.3);
  1729. }
  1730. .um-submit-btn::after {
  1731. border: none;
  1732. }
  1733. .pet-modal-mask {
  1734. position: fixed;
  1735. top: 0;
  1736. left: 0;
  1737. width: 100%;
  1738. height: 100%;
  1739. background-color: rgba(0, 0, 0, 0.5);
  1740. z-index: 999;
  1741. display: flex;
  1742. justify-content: center;
  1743. align-items: center;
  1744. }
  1745. .pet-modal-content {
  1746. width: 680rpx;
  1747. max-height: 85vh;
  1748. background-color: #fff;
  1749. border-radius: 20rpx;
  1750. display: flex;
  1751. flex-direction: column;
  1752. overflow: hidden;
  1753. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);
  1754. }
  1755. .pet-modal-header {
  1756. display: flex;
  1757. align-items: center;
  1758. padding: 30rpx 30rpx 20rpx;
  1759. border-bottom: 1px solid #f5f5f5;
  1760. flex-shrink: 0;
  1761. }
  1762. .pet-modal-title {
  1763. font-size: 32rpx;
  1764. font-weight: bold;
  1765. color: #333;
  1766. }
  1767. .close-icon-btn {
  1768. width: 52rpx;
  1769. height: 52rpx;
  1770. line-height: 52rpx;
  1771. text-align: center;
  1772. font-size: 36rpx;
  1773. color: #999;
  1774. border-radius: 50%;
  1775. background-color: #f5f5f5;
  1776. flex-shrink: 0;
  1777. }
  1778. .pm-remark-btn {
  1779. height: 52rpx;
  1780. line-height: 52rpx;
  1781. padding: 0 24rpx;
  1782. background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
  1783. color: #fff;
  1784. font-size: 26rpx;
  1785. border-radius: 26rpx;
  1786. margin-right: 16rpx;
  1787. font-weight: bold;
  1788. flex-shrink: 0;
  1789. }
  1790. .pet-modal-scroll {
  1791. flex: 1;
  1792. height: 65vh;
  1793. overflow: auto;
  1794. }
  1795. .pet-base-info {
  1796. display: flex;
  1797. align-items: center;
  1798. padding: 24rpx 30rpx;
  1799. border-bottom: 1px solid #f9f9f9;
  1800. }
  1801. .pm-avatar {
  1802. width: 100rpx;
  1803. height: 100rpx;
  1804. border-radius: 50%;
  1805. margin-right: 20rpx;
  1806. flex-shrink: 0;
  1807. }
  1808. .pm-info-text {
  1809. flex: 1;
  1810. display: flex;
  1811. flex-direction: column;
  1812. }
  1813. .pm-name-row {
  1814. display: flex;
  1815. align-items: center;
  1816. margin-bottom: 8rpx;
  1817. }
  1818. .pm-name {
  1819. font-size: 32rpx;
  1820. font-weight: bold;
  1821. color: #333;
  1822. margin-right: 12rpx;
  1823. }
  1824. .pm-gender {
  1825. display: flex;
  1826. align-items: center;
  1827. background-color: #E3F2FD;
  1828. color: #1976D2;
  1829. font-size: 22rpx;
  1830. padding: 2rpx 10rpx;
  1831. border-radius: 10rpx;
  1832. }
  1833. .pm-gender.female {
  1834. background-color: #FCE4EC;
  1835. color: #C2185B;
  1836. }
  1837. .gender-icon {
  1838. font-size: 22rpx;
  1839. margin-right: 4rpx;
  1840. }
  1841. .pm-breed {
  1842. font-size: 26rpx;
  1843. color: #999;
  1844. }
  1845. .pm-detail-grid {
  1846. padding: 20rpx 30rpx;
  1847. display: flex;
  1848. flex-wrap: wrap;
  1849. gap: 16rpx;
  1850. border-bottom: 1px solid #f9f9f9;
  1851. }
  1852. .pm-grid-item {
  1853. background-color: #FAFAFA;
  1854. border-radius: 12rpx;
  1855. padding: 16rpx 20rpx;
  1856. display: flex;
  1857. flex-direction: column;
  1858. }
  1859. .pm-grid-item.half {
  1860. width: calc(50% - 8rpx);
  1861. }
  1862. .pm-grid-item.full {
  1863. width: 100%;
  1864. }
  1865. .pm-label {
  1866. font-size: 24rpx;
  1867. color: #999;
  1868. margin-bottom: 8rpx;
  1869. }
  1870. .pm-val {
  1871. font-size: 28rpx;
  1872. color: #333;
  1873. line-height: 1.5;
  1874. }
  1875. .pm-tags-row {
  1876. display: flex;
  1877. flex-wrap: wrap;
  1878. padding: 0 24rpx 20rpx;
  1879. gap: 16rpx;
  1880. }
  1881. .pm-tag-chip {
  1882. background-color: #FFF3E0;
  1883. border: 1px solid #FFB74D;
  1884. border-radius: 20rpx;
  1885. padding: 6rpx 20rpx;
  1886. }
  1887. .pm-tag-chip-text {
  1888. font-size: 24rpx;
  1889. color: #FF9800;
  1890. }
  1891. .pm-log-section {
  1892. padding: 20rpx 24rpx;
  1893. border-top: 1px solid #f5f5f5;
  1894. margin-top: 10rpx;
  1895. }
  1896. .pm-log-header {
  1897. display: flex;
  1898. align-items: center;
  1899. margin-bottom: 20rpx;
  1900. }
  1901. .pm-log-section-title {
  1902. font-size: 28rpx;
  1903. font-weight: bold;
  1904. color: #333;
  1905. }
  1906. .pm-log-item {
  1907. padding: 16rpx 0;
  1908. border-bottom: 1px solid #f9f9f9;
  1909. display: flex;
  1910. flex-direction: column;
  1911. }
  1912. .pm-log-date {
  1913. font-size: 24rpx;
  1914. color: #999;
  1915. margin-bottom: 8rpx;
  1916. }
  1917. .pm-log-text {
  1918. font-size: 28rpx;
  1919. color: #333;
  1920. line-height: 1.6;
  1921. margin-bottom: 6rpx;
  1922. }
  1923. .pm-log-recorder {
  1924. font-size: 22rpx;
  1925. color: #FF9800;
  1926. text-align: right;
  1927. }
  1928. .pm-log-recorder.system {
  1929. color: #999;
  1930. }
  1931. .pm-bottom-close {
  1932. margin: 16rpx 30rpx;
  1933. height: 72rpx;
  1934. line-height: 72rpx;
  1935. border-radius: 36rpx;
  1936. font-size: 28rpx;
  1937. background-color: #f5f5f5;
  1938. color: #666;
  1939. border: none;
  1940. }
  1941. .pm-bottom-close::after {
  1942. border: none;
  1943. }
  1944. .sum-modal-mask {
  1945. position: fixed;
  1946. top: 0;
  1947. left: 0;
  1948. width: 100%;
  1949. height: 100%;
  1950. background-color: rgba(0, 0, 0, 0.5);
  1951. z-index: 999;
  1952. display: flex;
  1953. justify-content: center;
  1954. align-items: center;
  1955. }
  1956. .sum-modal-card {
  1957. width: 660rpx;
  1958. max-height: 80vh;
  1959. background-color: #fff;
  1960. border-radius: 20rpx;
  1961. display: flex;
  1962. flex-direction: column;
  1963. overflow: hidden;
  1964. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);
  1965. }
  1966. .sum-modal-scroll {
  1967. flex: 1;
  1968. overflow: hidden;
  1969. }
  1970. .sum-modal-inner {
  1971. padding: 32rpx 36rpx 0;
  1972. }
  1973. .sum-modal-title {
  1974. display: block;
  1975. font-size: 34rpx;
  1976. font-weight: bold;
  1977. color: #333;
  1978. text-align: center;
  1979. margin-bottom: 30rpx;
  1980. }
  1981. .sum-meta-row {
  1982. display: flex;
  1983. margin-bottom: 16rpx;
  1984. align-items: flex-start;
  1985. }
  1986. .sum-meta-label {
  1987. font-size: 26rpx;
  1988. color: #999;
  1989. flex-shrink: 0;
  1990. width: 140rpx;
  1991. }
  1992. .sum-meta-val {
  1993. font-size: 24rpx;
  1994. color: #333;
  1995. flex: 1;
  1996. }
  1997. .sum-section-title {
  1998. font-size: 26rpx;
  1999. font-weight: bold;
  2000. color: #333;
  2001. padding-left: 12rpx;
  2002. border-left: 6rpx solid #FF9800;
  2003. margin-top: 24rpx;
  2004. margin-bottom: 16rpx;
  2005. }
  2006. .sum-pet-card {
  2007. background-color: #FAFAFA;
  2008. border-radius: 12rpx;
  2009. padding: 20rpx;
  2010. display: flex;
  2011. align-items: center;
  2012. }
  2013. .sum-pet-avatar {
  2014. width: 80rpx;
  2015. height: 80rpx;
  2016. border-radius: 50%;
  2017. margin-right: 20rpx;
  2018. flex-shrink: 0;
  2019. }
  2020. .sum-pet-info {
  2021. flex: 1;
  2022. display: flex;
  2023. flex-direction: column;
  2024. }
  2025. .sum-pet-name-row {
  2026. display: flex;
  2027. align-items: center;
  2028. margin-bottom: 8rpx;
  2029. }
  2030. .sum-pet-name {
  2031. font-size: 26rpx;
  2032. font-weight: bold;
  2033. color: #333;
  2034. margin-right: 12rpx;
  2035. }
  2036. .sum-pet-breed {
  2037. font-size: 24rpx;
  2038. color: #999;
  2039. }
  2040. .sum-pet-remark {
  2041. font-size: 24rpx;
  2042. color: #666;
  2043. line-height: 1.5;
  2044. }
  2045. .sum-textarea {
  2046. width: 100%;
  2047. min-height: 220rpx;
  2048. background-color: #fff;
  2049. border: 1px solid #eeeeee;
  2050. border-radius: 12rpx;
  2051. padding: 18rpx;
  2052. font-size: 26rpx;
  2053. color: #333;
  2054. box-sizing: border-box;
  2055. line-height: 1.8;
  2056. }
  2057. .sum-sign-row {
  2058. display: flex;
  2059. align-items: center;
  2060. margin-top: 30rpx;
  2061. padding: 16rpx 0;
  2062. border-top: 1px solid #f5f5f5;
  2063. }
  2064. .sum-sign-label {
  2065. font-size: 26rpx;
  2066. color: #999;
  2067. margin-right: 10rpx;
  2068. }
  2069. .sum-sign-val {
  2070. font-size: 26rpx;
  2071. color: #333;
  2072. }
  2073. .sum-footer {
  2074. padding: 20rpx 36rpx 36rpx;
  2075. padding-bottom: max(36rpx, constant(safe-area-inset-bottom));
  2076. padding-bottom: max(36rpx, env(safe-area-inset-bottom));
  2077. background-color: #fff;
  2078. }
  2079. .sum-submit-btn {
  2080. width: 100%;
  2081. height: 84rpx;
  2082. line-height: 84rpx;
  2083. border-radius: 42rpx;
  2084. font-size: 30rpx;
  2085. background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
  2086. color: #fff;
  2087. border: none;
  2088. box-shadow: 0 4rpx 16rpx rgba(255, 87, 34, 0.25);
  2089. }
  2090. .sum-submit-btn::after {
  2091. border: none;
  2092. }
  2093. .modal-mask {
  2094. position: fixed;
  2095. top: 0;
  2096. left: 0;
  2097. right: 0;
  2098. bottom: 0;
  2099. background-color: rgba(0, 0, 0, 0.5);
  2100. z-index: 999;
  2101. display: flex;
  2102. align-items: center;
  2103. justify-content: center;
  2104. }
  2105. .anomaly-modal-content {
  2106. width: 650rpx;
  2107. background-color: #fff;
  2108. border-radius: 20rpx;
  2109. padding: 30rpx;
  2110. position: relative;
  2111. max-height: 80vh;
  2112. display: flex;
  2113. flex-direction: column;
  2114. }
  2115. .am-header {
  2116. display: flex;
  2117. justify-content: space-between;
  2118. align-items: center;
  2119. margin-bottom: 30rpx;
  2120. padding-bottom: 20rpx;
  2121. border-bottom: 1px solid #f5f5f5;
  2122. }
  2123. .am-title {
  2124. font-size: 32rpx;
  2125. font-weight: bold;
  2126. color: #333;
  2127. }
  2128. .am-scroll-list {
  2129. flex: 1;
  2130. }
  2131. .am-item {
  2132. padding: 24rpx;
  2133. background-color: #F9FAFB;
  2134. border-radius: 12rpx;
  2135. margin-bottom: 24rpx;
  2136. }
  2137. .am-item-header {
  2138. display: flex;
  2139. justify-content: space-between;
  2140. align-items: center;
  2141. margin-bottom: 16rpx;
  2142. }
  2143. .am-item-type {
  2144. font-size: 28rpx;
  2145. font-weight: bold;
  2146. color: #333;
  2147. }
  2148. .am-item-status {
  2149. font-size: 22rpx;
  2150. padding: 4rpx 16rpx;
  2151. border-radius: 20rpx;
  2152. }
  2153. .am-item-status.status-0 {
  2154. background-color: #FFF3E0;
  2155. color: #FF9800;
  2156. }
  2157. .am-item-status.status-1 {
  2158. background-color: #E8F5E9;
  2159. color: #4CAF50;
  2160. }
  2161. .am-item-status.status-2 {
  2162. background-color: #FFEBEE;
  2163. color: #F44336;
  2164. }
  2165. .am-item-content {
  2166. font-size: 26rpx;
  2167. color: #666;
  2168. line-height: 1.6;
  2169. display: block;
  2170. margin-bottom: 16rpx;
  2171. }
  2172. .am-item-photos {
  2173. display: flex;
  2174. flex-wrap: wrap;
  2175. gap: 12rpx;
  2176. margin-bottom: 20rpx;
  2177. }
  2178. .am-photo {
  2179. width: 130rpx;
  2180. height: 130rpx;
  2181. border-radius: 8rpx;
  2182. }
  2183. .am-audit-box {
  2184. margin-top: 20rpx;
  2185. padding-top: 20rpx;
  2186. border-top: 1px dashed #E0E0E0;
  2187. }
  2188. .am-audit-header {
  2189. display: flex;
  2190. justify-content: space-between;
  2191. align-items: center;
  2192. margin-bottom: 8rpx;
  2193. }
  2194. .am-audit-label {
  2195. font-size: 24rpx;
  2196. font-weight: bold;
  2197. color: #333;
  2198. }
  2199. .am-audit-time {
  2200. font-size: 22rpx;
  2201. color: #999;
  2202. }
  2203. .am-audit-remark {
  2204. font-size: 24rpx;
  2205. color: #666;
  2206. line-height: 1.5;
  2207. }
  2208. .empty-list {
  2209. display: flex;
  2210. flex-direction: column;
  2211. align-items: center;
  2212. padding: 100rpx 0;
  2213. }
  2214. .empty-icon {
  2215. width: 200rpx;
  2216. height: 200rpx;
  2217. margin-bottom: 20rpx;
  2218. opacity: 0.5;
  2219. }
  2220. .empty-text {
  2221. font-size: 26rpx;
  2222. color: #999;
  2223. }
  2224. .tl-media-item {
  2225. position: relative;
  2226. width: 140rpx;
  2227. height: 140rpx;
  2228. }
  2229. .tl-video-placeholder {
  2230. width: 100%;
  2231. height: 100%;
  2232. background: linear-gradient(135deg, #444 0%, #222 100%);
  2233. border-radius: 8rpx;
  2234. display: flex;
  2235. flex-direction: column;
  2236. justify-content: center;
  2237. align-items: center;
  2238. }
  2239. .tl-video-placeholder.miniaturized {
  2240. border-radius: 8rpx;
  2241. overflow: hidden;
  2242. }
  2243. .tl-video-label {
  2244. color: #fff;
  2245. font-size: 20rpx;
  2246. margin-top: 50rpx;
  2247. opacity: 0.8;
  2248. }
  2249. .tl-video-label.small {
  2250. margin-top: 35rpx;
  2251. font-size: 18rpx;
  2252. }
  2253. .tl-play-icon {
  2254. position: absolute;
  2255. top: 50%;
  2256. left: 50%;
  2257. transform: translate(-50%, -50%);
  2258. width: 60rpx;
  2259. height: 60rpx;
  2260. display: flex;
  2261. justify-content: center;
  2262. align-items: center;
  2263. background-color: rgba(255, 255, 255, 0.2);
  2264. border: 2rpx solid #fff;
  2265. border-radius: 50%;
  2266. }
  2267. .tl-play-icon::after {
  2268. content: '';
  2269. display: block;
  2270. width: 0;
  2271. height: 0;
  2272. border-top: 15rpx solid transparent;
  2273. border-bottom: 15rpx solid transparent;
  2274. border-left: 20rpx solid #fff;
  2275. margin-left: 6rpx;
  2276. }
  2277. .tl-play-icon.small {
  2278. width: 40rpx;
  2279. height: 40rpx;
  2280. }
  2281. .tl-play-icon.small::after {
  2282. border-top: 10rpx solid transparent;
  2283. border-bottom: 10rpx solid transparent;
  2284. border-left: 14rpx solid #fff;
  2285. margin-left: 4rpx;
  2286. }
  2287. .video-player-mask {
  2288. position: fixed;
  2289. top: 0;
  2290. left: 0;
  2291. right: 0;
  2292. bottom: 0;
  2293. background-color: rgba(0, 0, 0, 0.9);
  2294. z-index: 999;
  2295. display: flex;
  2296. justify-content: center;
  2297. align-items: center;
  2298. }
  2299. .video-player-content {
  2300. position: relative;
  2301. width: 100%;
  2302. height: 600rpx;
  2303. }
  2304. .v-player {
  2305. width: 100%;
  2306. height: 100%;
  2307. }
  2308. .v-close {
  2309. position: absolute;
  2310. top: -80rpx;
  2311. right: 40rpx;
  2312. width: 60rpx;
  2313. height: 60rpx;
  2314. background-color: rgba(255, 255, 255, 0.2);
  2315. color: #fff;
  2316. border-radius: 50%;
  2317. display: flex;
  2318. justify-content: center;
  2319. align-items: center;
  2320. font-size: 40rpx;
  2321. }
  2322. .am-photo-item {
  2323. position: relative;
  2324. width: 150rpx;
  2325. height: 150rpx;
  2326. border-radius: 8rpx;
  2327. overflow: hidden;
  2328. }
  2329. .am-photo {
  2330. width: 150rpx;
  2331. height: 150rpx;
  2332. border-radius: 8rpx;
  2333. }
  2334. .nav-modal-mask {
  2335. position: fixed;
  2336. top: 0;
  2337. left: 0;
  2338. right: 0;
  2339. bottom: 0;
  2340. background-color: rgba(0, 0, 0, 0.6);
  2341. z-index: 1000;
  2342. display: flex;
  2343. align-items: flex-end;
  2344. }
  2345. .nav-action-sheet {
  2346. width: 100%;
  2347. background-color: #fff;
  2348. border-radius: 30rpx 30rpx 0 0;
  2349. padding-bottom: constant(safe-area-inset-bottom);
  2350. padding-bottom: env(safe-area-inset-bottom);
  2351. overflow: hidden;
  2352. }
  2353. .nav-sheet-title {
  2354. display: block;
  2355. text-align: center;
  2356. font-size: 26rpx;
  2357. color: #999;
  2358. padding: 30rpx 0;
  2359. border-bottom: 1px solid #f5f5f5;
  2360. }
  2361. .nav-sheet-item {
  2362. display: block;
  2363. text-align: center;
  2364. font-size: 32rpx;
  2365. color: #333;
  2366. padding: 35rpx 0;
  2367. border-bottom: 1px solid #f5f5f5;
  2368. background-color: #fff;
  2369. }
  2370. .nav-sheet-item:active {
  2371. background-color: #f9f9f9;
  2372. }
  2373. .nav-sheet-item.cancel {
  2374. color: #999;
  2375. }
  2376. .nav-sheet-gap {
  2377. height: 12rpx;
  2378. background-color: #f5f5f5;
  2379. }
  2380. </style>