index.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495
  1. <template>
  2. <view class="order-detail-page">
  3. <nav-bar title="订单详情"></nav-bar>
  4. <!-- 骨架屏 -->
  5. <view class="skeleton-page" v-if="loading">
  6. <view class="skeleton-header skeleton-box"></view>
  7. <view class="skeleton-progress skeleton-box"></view>
  8. <view class="skeleton-row-cards">
  9. <view class="skeleton-card skeleton-box"></view>
  10. <view class="skeleton-card skeleton-box"></view>
  11. </view>
  12. <view class="skeleton-content skeleton-box"></view>
  13. </view>
  14. <!-- 真实内容 -->
  15. <view class="real-content fade-in" v-else>
  16. <!-- 订单号与状态 -->
  17. <view class="order-header">
  18. <view class="order-id-row">
  19. <text class="order-id">{{ order.code || order.id }}</text>
  20. <text :class="['status-badge', `badge-${order.statusKey}`]">{{ order.statusText }}</text>
  21. <text class="service-badge">{{ currentServiceName }}</text>
  22. </view>
  23. </view>
  24. <!-- 状态进度条 -->
  25. <view class="progress-card">
  26. <view class="progress-steps">
  27. <view v-for="(step, i) in progressSteps" :key="i"
  28. :class="['step-item', { done: step.done, active: step.active }]">
  29. <view class="step-circle">
  30. <uni-icons v-if="step.done" type="checkmarkempty" size="12" color="#fff"></uni-icons>
  31. <text v-else class="step-num">{{ i + 1 }}</text>
  32. </view>
  33. <view class="step-line" v-if="i < progressSteps.length - 1" :class="{ done: step.done }"></view>
  34. <text class="step-label">{{ step.label }}</text>
  35. <text class="step-time">{{ step.time }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 宠物档案 + 用户信息 -->
  40. <view class="info-row-cards">
  41. <view class="info-card pet-card">
  42. <text class="card-label">宠物档案</text>
  43. <view class="pet-header">
  44. <view class="pet-avatar">
  45. <image v-if="order.petAvatarUrl" :src="order.petAvatarUrl" mode="aspectFill" class="avatar-img"></image>
  46. <text v-else>{{ (order.petName || '宠')[0] }}</text>
  47. </view>
  48. <view class="pet-basic">
  49. <text class="pet-name">
  50. {{ order.petName || '-' }}
  51. <text class="gender-male" v-if="order.petGender === 'male'">♂</text>
  52. <text class="gender-female" v-else-if="order.petGender === 'female'">♀</text>
  53. </text>
  54. <view class="pet-tags">
  55. <text class="mini-tag" v-if="order.petAge">{{ order.petAge }}</text>
  56. <text class="mini-tag" v-if="order.petWeight">{{ order.petWeight }}</text>
  57. <text class="breed-badge" v-if="order.petBreed">{{ order.petBreed }}</text>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="pet-attrs">
  62. <view class="attr-item">
  63. <text class="attr-label">品种</text>
  64. <text class="attr-val">{{ order.petBreed || '-' }}</text>
  65. </view>
  66. <view class="attr-item">
  67. <text class="attr-label">疫苗状态</text>
  68. <text class="attr-val highlight">{{ order.petVaccine || '-' }}</text>
  69. </view>
  70. <view class="attr-item full">
  71. <text class="attr-label">性格特点</text>
  72. <text class="attr-val">{{ order.petCharacter || '-' }}</text>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="info-card user-card">
  77. <text class="card-label">用户信息</text>
  78. <view class="user-header">
  79. <view class="user-avatar">
  80. <image v-if="order.userAvatarUrl" :src="order.userAvatarUrl" mode="aspectFill" class="avatar-img"></image>
  81. <uni-icons v-else type="person" size="26" color="#aaa"></uni-icons>
  82. </view>
  83. <view class="user-basic">
  84. <text class="user-name-text">{{ order.userName }}</text>
  85. <text class="user-phone">{{ order.userPhone }}</text>
  86. </view>
  87. </view>
  88. <view class="service-address-box">
  89. <text class="addr-label">服务地址</text>
  90. <text class="addr-text">{{ order.address }}</text>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- 标签页 -->
  95. <view class="detail-tabs-wrap">
  96. <view class="tab-nav">
  97. <view v-for="tab in tabList" :key="tab.name"
  98. :class="['tab-nav-item', { active: activeTab === tab.name }]" @click="activeTab = tab.name">
  99. <text>{{ tab.title }}</text>
  100. </view>
  101. </view>
  102. <!-- 任务详情扩展板块 -->
  103. <view class="tab-content" v-if="activeTab === 'base'">
  104. <view class="base-info-grid">
  105. <view class="bi-item" v-for="item in baseInfoList" :key="item.label">
  106. <text class="bi-label">{{ item.label }}</text>
  107. <text :class="['bi-val', item.highlight ? 'highlight' : '']">{{ item.value }}</text>
  108. </view>
  109. </view>
  110. <!-- 接送任务详情 -->
  111. <block v-if="order.type === 'transport'">
  112. <text class="sub-title">接送任务详情</text>
  113. <view class="task-card transport-card">
  114. <view class="task-header">
  115. <text class="type-tag" :class="getTransportClass(order.subOrderType)">
  116. {{ getTransportLabel(order.subOrderType) }}
  117. </text>
  118. <text class="task-time">{{ order.serviceTime }}</text>
  119. </view>
  120. <view class="task-body">
  121. <view class="task-row">
  122. <text class="task-label">起点</text>
  123. <text class="task-value">{{ order.fromAddress || '-' }}</text>
  124. </view>
  125. <view class="task-row">
  126. <text class="task-label">终点</text>
  127. <text class="task-value">{{ order.toAddress || '-' }}</text>
  128. </view>
  129. <view class="task-row contact-row">
  130. <text class="task-value">{{ order.userName }} — {{ order.userPhone }}</text>
  131. </view>
  132. </view>
  133. </view>
  134. </block>
  135. <!-- 上门服务执行要求 -->
  136. <block v-if="['feeding', 'washing'].includes(order.type)">
  137. <text class="sub-title">服务执行要求</text>
  138. <view class="task-card req-card">
  139. <view class="req-item">
  140. <text class="req-label">服务地址</text>
  141. <text class="req-value">{{ order.address }}</text>
  142. </view>
  143. </view>
  144. </block>
  145. </view>
  146. <!-- 指派履约者 -->
  147. <view class="tab-content" v-if="activeTab === 'assignee'">
  148. <view class="empty-state" v-if="order.statusKey === 'wait_dispatch'">
  149. <uni-icons type="clock" size="40" color="#ccc"></uni-icons>
  150. <text class="empty-text">等待派单中...</text>
  151. </view>
  152. <view class="assignee-card" v-else>
  153. <view class="assignee-header">
  154. <view class="assignee-avatar">
  155. <image v-if="order.assigneeAvatarUrl" :src="order.assigneeAvatarUrl" mode="aspectFill" class="avatar-img"></image>
  156. <uni-icons v-else type="person" size="30" color="#aaa"></uni-icons>
  157. </view>
  158. <view class="assignee-info">
  159. <text class="assignee-name">{{ order.assigneeName }}</text>
  160. <text class="assignee-phone">联系电话:{{ order.assigneePhone }}</text>
  161. <text class="assignee-zone">归属区域:{{ order.assigneeZone }}</text>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. <!-- 服务进度 -->
  167. <view class="tab-content" v-if="activeTab === 'progress'">
  168. <view class="empty-state" v-if="['wait_dispatch', 'wait_accept'].includes(order.statusKey) || serviceTimeline.length === 0">
  169. <uni-icons type="info" size="40" color="#ccc"></uni-icons>
  170. <text class="empty-text">服务尚未开始或暂无进度</text>
  171. </view>
  172. <view class="timeline" v-else>
  173. <view class="tl-item" v-for="(tl, i) in serviceTimeline" :key="i">
  174. <view class="tl-dot"></view>
  175. <view class="tl-body">
  176. <text class="tl-time">{{ tl.time }}</text>
  177. <text class="tl-title">{{ tl.title }}</text>
  178. <text class="tl-desc">{{ tl.desc }}</text>
  179. <view class="tl-media" v-if="tl.media && tl.media.length">
  180. <view v-for="(item, idx) in tl.media" :key="idx" class="media-item">
  181. <image v-if="item.type === 'image'" mode="aspectFill" :src="item.url" class="p-img" @click="previewImage(item.url, tl.media)"></image>
  182. <view v-else-if="item.type === 'video'" class="p-video-box" @click="openVideoPreview(item.url)">
  183. <image src="/static/video-placeholder.png" mode="aspectFill" class="p-img" style="background:#000;"></image>
  184. <view class="play-icon-overlay">
  185. <uni-icons type="videocam-filled" size="30" color="#fff"></uni-icons>
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. <!-- 订单日志 -->
  195. <view class="tab-content" v-if="activeTab === 'log'">
  196. <view class="empty-state" v-if="orderLogs.length === 0">
  197. <uni-icons type="info" size="40" color="#ccc"></uni-icons>
  198. <text class="empty-text">暂无订单日志</text>
  199. </view>
  200. <view class="timeline" v-else>
  201. <view class="tl-item" v-for="(log, i) in orderLogs" :key="i">
  202. <view class="tl-dot log-dot"></view>
  203. <view class="tl-body">
  204. <text class="tl-time">{{ log.time }}</text>
  205. <text class="tl-title">{{ log.title }}</text>
  206. <text class="tl-desc">{{ log.desc }}</text>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. <!-- 视频全屏预览 -->
  214. <view class="video-preview-mask" v-if="videoPreview.visible" @click.stop="closeVideoPreview">
  215. <video :src="videoPreview.url" autoplay controls class="preview-video" @click.stop></video>
  216. <view class="close-video-btn" @click.stop="closeVideoPreview">
  217. <uni-icons type="closeempty" size="24" color="#fff"></uni-icons>
  218. </view>
  219. </view>
  220. <!-- 底部取消按钮 -->
  221. <view class="cancel-bar safe-bottom" v-if="!loading && ['wait_dispatch', 'wait_accept'].includes(order.statusKey)">
  222. <button class="cancel-order-btn" @click="onCancelOrder">取消订单</button>
  223. </view>
  224. <!-- 自定义取消订单弹窗 -->
  225. <view class="custom-modal" v-if="showCancelModal">
  226. <view class="modal-mask" @click="closeCancelModal"></view>
  227. <view class="modal-content">
  228. <view class="modal-title">提示</view>
  229. <view class="modal-body">
  230. <view style="margin-bottom: 20rpx; font-size: 28rpx; color: #666;">确定要取消订单 [{{ order.id }}] 吗?</view>
  231. <textarea class="cancel-input" v-model="cancelReason" placeholder="必填,请输入取消原因" placeholder-class="ph-color" :show-confirm-bar="false"></textarea>
  232. </view>
  233. <view class="modal-footer">
  234. <view class="modal-btn btn-cancel" @click="closeCancelModal">取消</view>
  235. <view class="modal-btn btn-confirm" @click="confirmCancelOrder">确定</view>
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <script setup>
  242. import { ref, reactive, computed, watch } from 'vue'
  243. import { onLoad } from '@dcloudio/uni-app'
  244. import navBar from '@/components/nav-bar/index.vue'
  245. import { getSubOrderInfo, cancelSubOrder } from '@/api/order/subOrder'
  246. import { getPet } from '@/api/archieves/pet'
  247. import { getCustomer } from '@/api/archieves/customer'
  248. import { getFulfiller } from '@/api/fulfiller/fulfiller'
  249. import { listSubOrderLog } from '@/api/order/subOrderLog'
  250. import { listComplaintByOrder } from '@/api/fulfiller/complaint'
  251. const activeTab = ref('base')
  252. const activeService = ref('transport')
  253. const orderId = ref('')
  254. const loading = ref(true)
  255. const tabList = [
  256. { title: '基础信息', name: 'base' },
  257. { title: '履约者', name: 'assignee' },
  258. { title: '服务进度', name: 'progress' },
  259. { title: '订单日志', name: 'log' }
  260. ]
  261. const currentServiceName = computed(() => {
  262. const map = { transport: '宠物接送', feed: '上门喂遛', wash: '上门洗护' }
  263. return map[activeService.value]
  264. })
  265. const order = reactive({
  266. id: '',
  267. code: '',
  268. statusKey: 'serving',
  269. statusText: '服务中',
  270. status: 2,
  271. petName: '',
  272. petBreed: '',
  273. petAge: '',
  274. petWeight: '',
  275. petGender: '',
  276. petVaccine: '',
  277. petCharacter: '',
  278. petHealth: '',
  279. userName: '',
  280. userPhone: '',
  281. address: '',
  282. shopName: '',
  283. createTime: '',
  284. bookTime: '',
  285. packageName: '',
  286. remark: '',
  287. assigneeName: '',
  288. cancelTime: '',
  289. pickAddress: '',
  290. pickTime: '',
  291. sendAddress: '',
  292. sendTime: '',
  293. fromAddress: '',
  294. toAddress: '',
  295. type: 'transport', // 对应后端 transport/feeding/washing
  296. subOrderType: 0, // 接送子类型
  297. service: '',
  298. pet: '',
  299. customer: '',
  300. fulfiller: '',
  301. fulfillerName: '',
  302. assigneePhone: '-',
  303. assigneeZone: '-',
  304. petAvatarUrl: '',
  305. userAvatarUrl: '',
  306. assigneeAvatarUrl: ''
  307. })
  308. const orderLogsData = ref([])
  309. const fulfillerLogsData = ref([])
  310. const complaintList = ref([])
  311. const loadOrderDetail = async (id) => {
  312. if (!id) return
  313. loading.value = true
  314. try {
  315. const res = await getSubOrderInfo(id)
  316. console.log('订单详情返回:', res)
  317. if (res) {
  318. // 手动逐个赋值,避免 Object.assign 导致的全量字段触发及潜在的递归更新
  319. order.id = res.id
  320. order.code = res.code || res.id
  321. order.status = res.status
  322. order.statusKey = getStatusKey(res.status)
  323. order.statusText = getStatusName(res.status)
  324. order.bookTime = res.serviceTime || '-'
  325. order.shopName = res.storeName || '-'
  326. order.userName = res.customerName || '-'
  327. order.userPhone = res.contactPhoneNumber || '-'
  328. order.assigneeName = res.fulfillerName || '-'
  329. order.remark = res.remark || '-'
  330. order.fromAddress = res.fromAddress || '-'
  331. order.toAddress = res.toAddress || '-'
  332. order.address = res.address || res.toAddress || '-'
  333. order.type = res.type || 'transport'
  334. order.subOrderType = res.subOrderType
  335. order.pet = res.usrPet
  336. order.customer = res.usrCustomer
  337. order.fulfiller = res.fulfiller
  338. order.packageName = res.groupPurchasePackageName || res.packageName || '-'
  339. order.createTime = res.createTime || '-'
  340. // 并行加载关联信息,提升效率并减少串行触发的重演
  341. const tasks = []
  342. if (res.usrPet) tasks.push(loadPetInfo(res.usrPet))
  343. if (res.usrCustomer) tasks.push(loadCustomerInfo(res.usrCustomer))
  344. if (res.fulfiller) tasks.push(loadFulfillerInfo(res.fulfiller))
  345. await Promise.all([
  346. ...tasks,
  347. loadOrderLogs(id),
  348. loadComplaints(id)
  349. ])
  350. }
  351. } catch (error) {
  352. console.error('加载订单详情失败:', error)
  353. uni.showToast({ title: '加载失败', icon: 'none' })
  354. } finally {
  355. loading.value = false
  356. }
  357. }
  358. const loadPetInfo = async (petId) => {
  359. try {
  360. const res = await getPet(petId)
  361. if (res) {
  362. const data = res.data || res
  363. console.log('宠物详情 res:', data)
  364. order.petName = data.name || '-'
  365. order.petBreed = data.breed || '-'
  366. order.petAge = data.age ? `${data.age}岁` : '-'
  367. order.petWeight = data.weight ? `${data.weight}kg` : '-'
  368. order.petGender = Number(data.gender) === 1 ? 'male' : (Number(data.gender) > 0 ? 'female' : '')
  369. order.petVaccine = data.vaccineStatus || '-'
  370. order.petCharacter = data.cutePersonality || data.personality || '-'
  371. order.petHealth = data.healthStatus || '-'
  372. order.petAvatarUrl = data.avatarUrl || ''
  373. }
  374. } catch (error) {
  375. console.error('加载宠物信息失败:', error)
  376. }
  377. }
  378. const loadCustomerInfo = async (customerId) => {
  379. try {
  380. const res = await getCustomer(customerId)
  381. if (res) {
  382. const data = res.data || res
  383. console.log('客户详情 res:', data)
  384. order.userName = data.name || '-'
  385. order.userPhone = data.phone || '-'
  386. order.address = data.address || '-'
  387. order.userAvatarUrl = data.avatarUrl || ''
  388. }
  389. } catch (error) {
  390. console.error('加载客户信息失败:', error)
  391. }
  392. }
  393. const loadFulfillerInfo = async (fulfillerId) => {
  394. try {
  395. const res = await getFulfiller(fulfillerId)
  396. if (res) {
  397. const data = res.data || res
  398. console.log('履约者详情 res:', data)
  399. order.assigneeName = data.name || order.assigneeName
  400. order.assigneePhone = data.phone || '-'
  401. order.assigneeZone = data.stationName || '-'
  402. order.assigneeAvatarUrl = data.avatarUrl || data.avatar || ''
  403. }
  404. } catch (error) {
  405. console.error('加载履约者信息失败:', error)
  406. }
  407. }
  408. const loadOrderLogs = async (id) => {
  409. try {
  410. const res = await listSubOrderLog({ orderId: id })
  411. const list = res || []
  412. orderLogsData.value = list.filter(i => Number(i?.logType) === 0)
  413. fulfillerLogsData.value = list.filter(i => Number(i?.logType) === 1)
  414. } catch (error) {
  415. console.error('加载订单日志失败:', error)
  416. orderLogsData.value = []
  417. fulfillerLogsData.value = []
  418. }
  419. }
  420. const loadComplaints = async (id) => {
  421. try {
  422. const res = await listComplaintByOrder(id)
  423. complaintList.value = res || []
  424. } catch (error) {
  425. console.error('加载投诉记录失败:', error)
  426. complaintList.value = []
  427. }
  428. }
  429. const getStatusKey = (status) => {
  430. const map = { 0: 'wait_dispatch', 1: 'wait_accept', 2: 'serving', 3: 'confirming', 4: 'done', 5: 'cancel' }
  431. return map[status] || 'serving'
  432. }
  433. const getStatusName = (status) => {
  434. const map = { 0: '待派单', 1: '待接单', 2: '服务中', 3: '待商家确认', 4: '已完成', 5: '已取消' }
  435. return map[status] || '-'
  436. }
  437. const getTransportLabel = (t) => {
  438. if (t === 0 || t === '0') return '接'
  439. if (t === 1 || t === '1') return '送'
  440. if (t === 2 || t === '2') return '单程接'
  441. if (t === 3 || t === '3') return '单程送'
  442. return '接送'
  443. }
  444. const getTransportClass = (t) => {
  445. if (t === 0 || t === '0' || t === 2 || t === '2') return 'tag-blue'
  446. return 'tag-orange'
  447. }
  448. const getTypeName = (type) => {
  449. const map = { transport: '宠物接送', feeding: '上门喂遛', washing: '上门洗护' }
  450. return map[type] || '-'
  451. }
  452. onLoad((options) => {
  453. // 防御性校验:id 必须是有效值(非空、非字符串 "undefined")
  454. if (options.id && options.id !== 'undefined') {
  455. orderId.value = options.id
  456. console.log('订单详情页:接收到的订单ID =', options.id)
  457. loadOrderDetail(options.id)
  458. } else {
  459. console.error('订单详情页:缺少有效的订单ID,options =', options)
  460. uni.showToast({ title: '订单ID无效', icon: 'none' })
  461. loading.value = false
  462. }
  463. if (options.service) activeService.value = options.service
  464. })
  465. const progressSteps = computed(() => {
  466. const status = order.status
  467. const steps = [
  468. { label: '商户下单', time: '' },
  469. { label: '运营派单', time: '' },
  470. { label: '履约接单', time: '' },
  471. { label: '服务中', time: '' },
  472. { label: '已完成', time: '' }
  473. ]
  474. const getSystemLogTime = (step) => {
  475. const log = (orderLogsData.value || []).find(l => parseInt(l.step) === step)
  476. return log ? (log.createTime || log.time) : ''
  477. }
  478. const getFulfillerLogTime = (step) => {
  479. const log = (fulfillerLogsData.value || []).find(l => parseInt(l.step) === step)
  480. return log ? (log.createTime || log.time) : ''
  481. }
  482. const fulfillerCustomLogTime = () => {
  483. const log = [...(fulfillerLogsData.value || [])].reverse().find(l => {
  484. const s = parseInt(l.step)
  485. return s >= 1 && s <= 98
  486. })
  487. return log ? (log.createTime || log.time) : ''
  488. }
  489. let active = 0
  490. if (status === 5) {
  491. const cancelTime = getSystemLogTime(5) || order.cancelTime || ''
  492. return [
  493. { label: '商户下单', time: getSystemLogTime(0) || order.createTime || '', done: true, active: false },
  494. { label: '已取消', time: cancelTime, done: true, active: true }
  495. ].map(s => ({ ...s, time: s.time ? s.time.substring(5, 16) : '' }))
  496. }
  497. steps[0].time = getSystemLogTime(0) || order.createTime || ''
  498. if (steps[0].time) active = 1
  499. steps[1].time = getSystemLogTime(1) || ''
  500. if (steps[1].time || status >= 1) active = 2
  501. steps[2].time = getSystemLogTime(2) || getFulfillerLogTime(0) || ''
  502. if (status === 1) {
  503. steps[2].label = '待履约者接单'
  504. } else if (status >= 2) {
  505. steps[2].label = '履约者已接单'
  506. if (steps[2].time) active = 3
  507. }
  508. const cTime = fulfillerCustomLogTime()
  509. steps[3].time = getSystemLogTime(3) || cTime || ''
  510. if (status === 2) {
  511. steps[3].label = '待服务'
  512. if (cTime) active = 4
  513. } else if (status >= 3) {
  514. steps[3].label = '服务进行中'
  515. if (steps[3].time) active = 4
  516. }
  517. if (status === 4 || getSystemLogTime(4) || getFulfillerLogTime(99)) {
  518. steps[4].time = getSystemLogTime(4) || getFulfillerLogTime(99) || ''
  519. active = 5
  520. }
  521. return steps.map((s, i) => ({
  522. label: s.label,
  523. time: s.time ? s.time.substring(5, 16) : '',
  524. done: i < active,
  525. active: i === active
  526. }))
  527. })
  528. const baseInfoList = computed(() => {
  529. const list = [
  530. { label: '系统单号', value: order.code || order.id },
  531. { label: '服务类型', value: currentServiceName.value },
  532. { label: '归属门店', value: order.shopName },
  533. { label: '宠主信息', value: `${order.userName} / ${order.userPhone}` },
  534. { label: '预约时间', value: order.bookTime },
  535. { label: '团购套餐', value: order.packageName },
  536. { label: '创建时间', value: order.createTime },
  537. { label: '订单备注', value: order.remark }
  538. ]
  539. if (order.statusKey === 'cancel') list.push({ label: '取消时间', value: order.cancelTime || '2024-02-02 11:30', highlight: true })
  540. return list
  541. })
  542. // 视频判定辅助函数
  543. const isVideo = (url) => {
  544. if (!url) return false;
  545. const videoExts = ['.mp4', '.mov', '.avi', '.wmv', '.webm', '.ogg'];
  546. return videoExts.some(ext => String(url).toLowerCase().endsWith(ext));
  547. }
  548. const videoPreview = reactive({
  549. visible: false,
  550. url: ''
  551. })
  552. const openVideoPreview = (url) => {
  553. videoPreview.url = url;
  554. videoPreview.visible = true;
  555. }
  556. const closeVideoPreview = () => {
  557. videoPreview.visible = false;
  558. videoPreview.url = '';
  559. }
  560. const previewImage = (url, mediaList) => {
  561. const imgUrls = mediaList.filter(m => m.type === 'image').map(m => m.url);
  562. uni.previewImage({
  563. current: url,
  564. urls: imgUrls
  565. });
  566. }
  567. const serviceTimeline = computed(() => {
  568. const list = fulfillerLogsData.value || []
  569. return list.map((i) => {
  570. const rawUrls = i?.photoUrls || [];
  571. const urlList = Array.isArray(rawUrls) ? rawUrls : (typeof rawUrls === 'string' ? rawUrls.split(',').filter(Boolean) : []);
  572. const media = urlList.map(url => {
  573. const type = isVideo(url) ? 'video' : 'image';
  574. return { type, url }
  575. });
  576. return {
  577. title: i?.title || '-',
  578. time: i?.createTime || i?.time || '',
  579. desc: i?.content || '',
  580. media: media
  581. }
  582. })
  583. })
  584. const orderLogs = computed(() => {
  585. return (orderLogsData.value || []).map(log => ({
  586. time: log.createTime || log.time || '',
  587. title: log.title,
  588. desc: log.content
  589. }))
  590. })
  591. const showCancelModal = ref(false)
  592. const cancelReason = ref('')
  593. const onCancelOrder = () => {
  594. cancelReason.value = ''
  595. showCancelModal.value = true
  596. }
  597. const closeCancelModal = () => {
  598. showCancelModal.value = false
  599. }
  600. const confirmCancelOrder = async () => {
  601. const reason = cancelReason.value.trim()
  602. if (!reason) {
  603. uni.showToast({ title: '取消原因不能为空', icon: 'none' })
  604. return
  605. }
  606. try {
  607. uni.showLoading({ title: '处理中' })
  608. await cancelSubOrder({ orderId: order.id, reason })
  609. uni.hideLoading()
  610. uni.showToast({ title: '订单已取消', icon: 'success' })
  611. showCancelModal.value = false
  612. // 重新初始化页面数据
  613. loadOrderDetail(order.id)
  614. } catch (error) {
  615. uni.hideLoading()
  616. console.error('取消订单失败:', error)
  617. uni.showToast({ title: '取消失败', icon: 'none' })
  618. }
  619. }
  620. </script>
  621. <style lang="scss" scoped>
  622. .order-detail-page {
  623. background: #f2f3f7;
  624. min-height: 100vh;
  625. padding-bottom: 160rpx;
  626. }
  627. .order-header {
  628. padding: 24rpx 32rpx 16rpx;
  629. }
  630. .order-id-row {
  631. display: flex;
  632. align-items: center;
  633. gap: 16rpx;
  634. flex-wrap: wrap;
  635. }
  636. .order-id {
  637. font-size: 26rpx;
  638. color: #666;
  639. font-family: monospace;
  640. }
  641. .status-badge {
  642. font-size: 22rpx;
  643. padding: 4rpx 16rpx;
  644. border-radius: 20rpx;
  645. font-weight: 600;
  646. }
  647. .badge-wait_dispatch {
  648. background: #fff0f0;
  649. color: #f44336;
  650. }
  651. .badge-wait_accept {
  652. background: #fff8e1;
  653. color: #ff9800;
  654. }
  655. .badge-serving {
  656. background: #e3f2fd;
  657. color: #2196f3;
  658. }
  659. .badge-done {
  660. background: #e8f5e9;
  661. color: #4caf50;
  662. }
  663. .badge-cancel {
  664. background: #f5f5f5;
  665. color: #9e9e9e;
  666. }
  667. .service-badge {
  668. font-size: 22rpx;
  669. padding: 4rpx 16rpx;
  670. border-radius: 20rpx;
  671. background: #fff3e0;
  672. color: #ff9500;
  673. }
  674. .progress-card {
  675. background: #fff;
  676. margin: 0 24rpx 24rpx;
  677. border-radius: 28rpx;
  678. padding: 32rpx 16rpx 24rpx;
  679. }
  680. .progress-steps {
  681. display: flex;
  682. align-items: flex-start;
  683. }
  684. .step-item {
  685. display: flex;
  686. flex-direction: column;
  687. align-items: center;
  688. flex: 1;
  689. position: relative;
  690. z-index: 1;
  691. }
  692. .step-circle {
  693. width: 44rpx;
  694. height: 44rpx;
  695. border-radius: 50%;
  696. background: #e0e0e0;
  697. display: flex;
  698. align-items: center;
  699. justify-content: center;
  700. margin-bottom: 8rpx;
  701. position: relative;
  702. z-index: 2;
  703. }
  704. .step-num {
  705. font-size: 20rpx;
  706. color: #fff;
  707. }
  708. .step-item.done .step-circle,
  709. .step-item.active .step-circle {
  710. background: #ff9500;
  711. }
  712. .step-line {
  713. position: absolute;
  714. top: 22rpx;
  715. left: 50%;
  716. width: 100%;
  717. height: 4rpx;
  718. background: #e0e0e0;
  719. z-index: 0;
  720. }
  721. .step-line.done {
  722. background: #ff9500;
  723. }
  724. .step-label {
  725. font-size: 20rpx;
  726. color: #999;
  727. text-align: center;
  728. }
  729. .step-item.done .step-label,
  730. .step-item.active .step-label {
  731. color: #ff9500;
  732. font-weight: 600;
  733. }
  734. .step-time {
  735. font-size: 18rpx;
  736. color: #bbb;
  737. margin-top: 4rpx;
  738. }
  739. .info-row-cards {
  740. display: flex;
  741. gap: 20rpx;
  742. margin: 0 24rpx 24rpx;
  743. }
  744. .info-card {
  745. flex: 1;
  746. background: #fff;
  747. border-radius: 28rpx;
  748. padding: 24rpx;
  749. min-width: 0;
  750. }
  751. .card-label {
  752. display: block;
  753. font-size: 24rpx;
  754. font-weight: 700;
  755. color: #333;
  756. margin-bottom: 20rpx;
  757. border-left: 6rpx solid #ff9500;
  758. padding-left: 12rpx;
  759. }
  760. .pet-header {
  761. display: flex;
  762. align-items: center;
  763. gap: 16rpx;
  764. margin-bottom: 20rpx;
  765. }
  766. .pet-avatar, .user-avatar, .assignee-avatar {
  767. width: 80rpx; height: 80rpx; border-radius: 50%; background: #f0f2f5;
  768. display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  769. .avatar-img { width: 100%; height: 100%; }
  770. }
  771. .pet-basic {
  772. flex: 1;
  773. min-width: 0;
  774. }
  775. .pet-name {
  776. display: block;
  777. font-size: 28rpx;
  778. font-weight: bold;
  779. color: #222;
  780. }
  781. .gender-male {
  782. color: #409eff;
  783. margin-left: 4rpx;
  784. }
  785. .gender-female {
  786. color: #f56c6c;
  787. margin-left: 4rpx;
  788. }
  789. .pet-tags {
  790. display: flex;
  791. flex-wrap: wrap;
  792. gap: 12rpx;
  793. margin-top: 10rpx;
  794. align-items: center;
  795. }
  796. .mini-tag {
  797. font-size: 20rpx;
  798. background: #f5f5f5;
  799. border-radius: 8rpx;
  800. padding: 4rpx 12rpx;
  801. color: #666;
  802. white-space: nowrap;
  803. }
  804. .breed-badge {
  805. font-size: 20rpx;
  806. background: #ffe0b2;
  807. color: #e65100;
  808. border-radius: 8rpx;
  809. padding: 4rpx 12rpx;
  810. white-space: nowrap;
  811. }
  812. .pet-attrs {
  813. display: flex;
  814. flex-wrap: wrap;
  815. gap: 12rpx 0;
  816. }
  817. .attr-item {
  818. width: 50%;
  819. }
  820. .attr-item.full {
  821. width: 100%;
  822. }
  823. .attr-label {
  824. display: block;
  825. font-size: 20rpx;
  826. color: #aaa;
  827. }
  828. .attr-val {
  829. display: block;
  830. font-size: 22rpx;
  831. color: #333;
  832. }
  833. .attr-val.highlight {
  834. color: #4caf50;
  835. }
  836. .user-header {
  837. display: flex;
  838. align-items: center;
  839. gap: 16rpx;
  840. margin-bottom: 20rpx;
  841. }
  842. .user-name-text {
  843. display: block;
  844. font-size: 28rpx;
  845. font-weight: bold;
  846. color: #222;
  847. }
  848. .user-phone {
  849. display: block;
  850. font-size: 24rpx;
  851. color: #666;
  852. }
  853. .service-address-box {
  854. background: #fff8f0;
  855. border-radius: 16rpx;
  856. padding: 16rpx;
  857. }
  858. .addr-label {
  859. display: block;
  860. font-size: 20rpx;
  861. color: #ff9500;
  862. margin-bottom: 6rpx;
  863. }
  864. .addr-text {
  865. display: block;
  866. font-size: 22rpx;
  867. color: #333;
  868. line-height: 1.5;
  869. }
  870. .detail-tabs-wrap {
  871. margin: 0 24rpx;
  872. background: #fff;
  873. border-radius: 28rpx;
  874. overflow: hidden;
  875. }
  876. .tab-nav {
  877. display: flex;
  878. border-bottom: 2rpx solid #EEEEEE;
  879. }
  880. .tab-nav-item {
  881. flex: 1;
  882. text-align: center;
  883. padding: 24rpx 0;
  884. font-size: 24rpx;
  885. color: #666;
  886. position: relative;
  887. }
  888. .tab-nav-item.active {
  889. color: #ff9500;
  890. font-weight: bold;
  891. }
  892. .tab-nav-item.active::after {
  893. content: '';
  894. position: absolute;
  895. bottom: 0;
  896. left: 50%;
  897. transform: translateX(-50%);
  898. width: 48rpx;
  899. height: 6rpx;
  900. background: #ff9500;
  901. border-radius: 6rpx;
  902. }
  903. .tab-content {
  904. padding: 28rpx;
  905. min-height: 280rpx;
  906. }
  907. .base-info-grid {
  908. display: flex;
  909. flex-wrap: wrap;
  910. gap: 20rpx;
  911. margin-bottom: 32rpx;
  912. }
  913. .bi-item {
  914. width: calc(50% - 10rpx);
  915. background: #f8f8f8;
  916. border-radius: 16rpx;
  917. padding: 16rpx 20rpx;
  918. box-sizing: border-box;
  919. display: flex;
  920. flex-direction: column;
  921. justify-content: center;
  922. }
  923. .bi-label {
  924. display: block;
  925. font-size: 20rpx;
  926. color: #aaa;
  927. margin-bottom: 8rpx;
  928. }
  929. .bi-val {
  930. display: block;
  931. font-size: 24rpx;
  932. color: #333;
  933. font-weight: 500;
  934. word-break: break-all;
  935. line-height: 1.4;
  936. }
  937. .bi-val.highlight {
  938. color: #f44336;
  939. }
  940. .sub-title {
  941. display: block;
  942. font-size: 28rpx;
  943. font-weight: bold;
  944. color: #333;
  945. margin: 12rpx 0 24rpx;
  946. }
  947. /* 任务卡片样式 */
  948. .task-card {
  949. padding: 24rpx;
  950. background: #fff;
  951. border: 2rpx solid #EEEEEE;
  952. border-radius: 12rpx;
  953. margin-bottom: 20rpx;
  954. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
  955. }
  956. .task-header {
  957. display: flex;
  958. align-items: center;
  959. gap: 16rpx;
  960. margin-bottom: 20rpx;
  961. }
  962. .type-tag {
  963. font-size: 22rpx;
  964. padding: 4rpx 12rpx;
  965. border-radius: 6rpx;
  966. border: 1rpx solid;
  967. }
  968. .tag-blue {
  969. color: #007aff;
  970. background: #eef6ff;
  971. border-color: #007aff;
  972. }
  973. .tag-orange {
  974. color: #ff9500;
  975. background: #fff8f0;
  976. border-color: #ff9500;
  977. }
  978. .task-time {
  979. font-size: 26rpx;
  980. font-weight: bold;
  981. color: #f56c6c;
  982. }
  983. .task-body {
  984. display: flex;
  985. flex-direction: column;
  986. gap: 12rpx;
  987. }
  988. .task-row {
  989. display: flex;
  990. align-items: flex-start;
  991. gap: 20rpx;
  992. }
  993. .task-label {
  994. width: 60rpx;
  995. font-size: 24rpx;
  996. color: #999;
  997. flex-shrink: 0;
  998. }
  999. .task-value {
  1000. font-size: 26rpx;
  1001. color: #333;
  1002. line-height: 1.4;
  1003. }
  1004. .contact-row {
  1005. margin-top: 8rpx;
  1006. padding-top: 8rpx;
  1007. }
  1008. .contact-row .task-value {
  1009. color: #999;
  1010. }
  1011. /* 执行要求卡片 */
  1012. .req-card {
  1013. background: #f9f9f9;
  1014. border: none;
  1015. }
  1016. .req-item {
  1017. display: flex;
  1018. align-items: center;
  1019. }
  1020. .req-label {
  1021. width: 140rpx;
  1022. font-size: 24rpx;
  1023. color: #333;
  1024. }
  1025. .req-value {
  1026. flex: 1;
  1027. font-size: 26rpx;
  1028. color: #333;
  1029. }
  1030. .assignee-card {
  1031. background: #f9f9f9;
  1032. border-radius: 24rpx;
  1033. padding: 28rpx;
  1034. }
  1035. .assignee-header {
  1036. display: flex;
  1037. gap: 24rpx;
  1038. }
  1039. .assignee-avatar {
  1040. width: 100rpx;
  1041. height: 100rpx;
  1042. border-radius: 50%;
  1043. background: #e0e0e0;
  1044. display: flex;
  1045. align-items: center;
  1046. justify-content: center;
  1047. }
  1048. .assignee-name {
  1049. display: block;
  1050. font-size: 30rpx;
  1051. font-weight: bold;
  1052. color: #222;
  1053. margin-bottom: 8rpx;
  1054. }
  1055. .assignee-phone,
  1056. .assignee-zone {
  1057. display: block;
  1058. font-size: 24rpx;
  1059. color: #666;
  1060. margin-bottom: 4rpx;
  1061. }
  1062. .timeline {
  1063. position: relative;
  1064. padding-left: 40rpx;
  1065. }
  1066. .tl-item {
  1067. position: relative;
  1068. margin-bottom: 40rpx;
  1069. padding-left: 32rpx;
  1070. }
  1071. .tl-dot {
  1072. position: absolute;
  1073. left: -12rpx;
  1074. top: 8rpx;
  1075. width: 24rpx;
  1076. height: 24rpx;
  1077. border-radius: 50%;
  1078. background: #ff9500;
  1079. border: 4rpx solid #fff;
  1080. box-shadow: 0 0 0 4rpx #ff9500;
  1081. }
  1082. .tl-item::before {
  1083. content: '';
  1084. position: absolute;
  1085. left: -2rpx;
  1086. top: 32rpx;
  1087. bottom: -40rpx;
  1088. width: 4rpx;
  1089. background: #f0f0f0;
  1090. }
  1091. .tl-item:last-child::before {
  1092. display: none;
  1093. }
  1094. .tl-time {
  1095. display: block;
  1096. font-size: 22rpx;
  1097. color: #aaa;
  1098. margin-bottom: 6rpx;
  1099. }
  1100. .tl-title {
  1101. display: block;
  1102. font-size: 28rpx;
  1103. font-weight: 600;
  1104. color: #222;
  1105. margin-bottom: 6rpx;
  1106. }
  1107. .tl-desc {
  1108. display: block;
  1109. font-size: 24rpx;
  1110. color: #666;
  1111. }
  1112. .log-dot {
  1113. background: #e0e0e0;
  1114. box-shadow: 0 0 0 4rpx #e0e0e0;
  1115. }
  1116. .empty-state {
  1117. display: flex;
  1118. flex-direction: column;
  1119. align-items: center;
  1120. justify-content: center;
  1121. padding: 80rpx 0;
  1122. gap: 24rpx;
  1123. }
  1124. .empty-text {
  1125. font-size: 26rpx;
  1126. color: #bbb;
  1127. }
  1128. .cancel-bar {
  1129. position: fixed;
  1130. bottom: 0;
  1131. left: 0;
  1132. right: 0;
  1133. padding: 24rpx 32rpx;
  1134. background: rgba(255, 255, 255, 0.95);
  1135. box-shadow: 0 -8rpx 28rpx rgba(0, 0, 0, 0.08);
  1136. z-index: 100;
  1137. }
  1138. .cancel-order-btn {
  1139. width: 100%;
  1140. height: 96rpx;
  1141. font-size: 32rpx;
  1142. font-weight: 600;
  1143. border: 2rpx solid #f44336;
  1144. color: #f44336;
  1145. background: transparent;
  1146. border-radius: 48rpx;
  1147. line-height: 92rpx;
  1148. &::after { border: none; }
  1149. }
  1150. /* 骨架屏动画与样式 */
  1151. .skeleton-page {
  1152. padding: 24rpx;
  1153. }
  1154. .skeleton-box {
  1155. background: #e0e0e0;
  1156. border-radius: 16rpx;
  1157. margin-bottom: 24rpx;
  1158. animation: skeleton-shimmer 1.5s infinite linear;
  1159. background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  1160. background-size: 400% 100%;
  1161. }
  1162. @keyframes skeleton-shimmer {
  1163. 0% {
  1164. background-position: 100% 0;
  1165. }
  1166. 100% {
  1167. background-position: -100% 0;
  1168. }
  1169. }
  1170. .skeleton-header {
  1171. height: 80rpx;
  1172. border-radius: 20rpx;
  1173. }
  1174. .skeleton-progress {
  1175. height: 120rpx;
  1176. border-radius: 28rpx;
  1177. }
  1178. .skeleton-row-cards {
  1179. display: flex;
  1180. gap: 20rpx;
  1181. margin-bottom: 24rpx;
  1182. }
  1183. .skeleton-card {
  1184. flex: 1;
  1185. height: 280rpx;
  1186. border-radius: 28rpx;
  1187. margin-bottom: 0;
  1188. }
  1189. .skeleton-content {
  1190. height: 500rpx;
  1191. border-radius: 28rpx;
  1192. }
  1193. /* 渐显进入动画 */
  1194. .fade-in {
  1195. animation: fadeIn 0.4s ease-out forwards;
  1196. }
  1197. @keyframes fadeIn {
  1198. from {
  1199. opacity: 0;
  1200. transform: translateY(10rpx);
  1201. }
  1202. to {
  1203. opacity: 1;
  1204. transform: translateY(0);
  1205. }
  1206. }
  1207. /* 日志媒体相关样式 */
  1208. .tl-media {
  1209. display: flex;
  1210. flex-wrap: wrap;
  1211. gap: 16rpx;
  1212. margin-top: 16rpx;
  1213. }
  1214. .media-item {
  1215. width: 160rpx;
  1216. height: 160rpx;
  1217. border-radius: 12rpx;
  1218. overflow: hidden;
  1219. background: #f0f0f0;
  1220. position: relative;
  1221. }
  1222. .p-img, .p-video-box {
  1223. width: 100%;
  1224. height: 100%;
  1225. }
  1226. .play-icon-overlay {
  1227. position: absolute;
  1228. top: 50%;
  1229. left: 50%;
  1230. transform: translate(-50%, -50%);
  1231. width: 60rpx;
  1232. height: 60rpx;
  1233. background: rgba(0, 0, 0, 0.4);
  1234. border-radius: 50%;
  1235. display: flex;
  1236. align-items: center;
  1237. justify-content: center;
  1238. pointer-events: none;
  1239. }
  1240. /* 视频预览弹窗 */
  1241. .video-preview-mask {
  1242. position: fixed;
  1243. top: 0;
  1244. left: 0;
  1245. right: 0;
  1246. bottom: 0;
  1247. background: #000;
  1248. z-index: 999;
  1249. display: flex;
  1250. align-items: center;
  1251. justify-content: center;
  1252. }
  1253. .preview-video {
  1254. width: 100%;
  1255. height: 60vh;
  1256. }
  1257. .close-video-btn {
  1258. position: absolute;
  1259. top: 100rpx;
  1260. right: 40rpx;
  1261. width: 64rpx;
  1262. height: 64rpx;
  1263. border-radius: 50%;
  1264. background: rgba(255, 255, 255, 0.2);
  1265. display: flex;
  1266. justify-content: center;
  1267. z-index: 1000;
  1268. }
  1269. /* 自定义弹窗样式 */
  1270. .custom-modal {
  1271. position: fixed;
  1272. top: 0;
  1273. left: 0;
  1274. width: 100%;
  1275. height: 100%;
  1276. z-index: 999;
  1277. display: flex;
  1278. align-items: center;
  1279. justify-content: center;
  1280. }
  1281. .modal-mask {
  1282. position: absolute;
  1283. top: 0;
  1284. left: 0;
  1285. width: 100%;
  1286. height: 100%;
  1287. background-color: rgba(0, 0, 0, 0.5);
  1288. }
  1289. .modal-content {
  1290. position: relative;
  1291. width: 80%;
  1292. background-color: #fff;
  1293. border-radius: 16rpx;
  1294. overflow: hidden;
  1295. z-index: 1000;
  1296. }
  1297. .modal-title {
  1298. padding: 30rpx 0 20rpx;
  1299. text-align: center;
  1300. font-size: 32rpx;
  1301. font-weight: bold;
  1302. color: #333;
  1303. }
  1304. .modal-body {
  1305. padding: 10rpx 40rpx 30rpx;
  1306. }
  1307. .cancel-input {
  1308. width: 100%;
  1309. height: 160rpx;
  1310. background-color: #f8f8f8;
  1311. border-radius: 8rpx;
  1312. padding: 20rpx;
  1313. font-size: 28rpx;
  1314. box-sizing: border-box;
  1315. color: #333;
  1316. }
  1317. .ph-color {
  1318. color: #999;
  1319. }
  1320. .modal-footer {
  1321. display: flex;
  1322. border-top: 2rpx solid #EEEEEE;
  1323. }
  1324. .modal-btn {
  1325. flex: 1;
  1326. height: 90rpx;
  1327. line-height: 90rpx;
  1328. text-align: center;
  1329. font-size: 30rpx;
  1330. font-weight: 500;
  1331. }
  1332. .btn-cancel {
  1333. color: #666;
  1334. border-right: 2rpx solid #EEEEEE;
  1335. }
  1336. .btn-confirm {
  1337. color: #2196f3;
  1338. }
  1339. </style>