index.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483
  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 v-if="order.petGender === 1 || order.petGender === '1'">♂</text>
  52. <text v-else-if="order.petGender === 0 || order.petGender === '0'">♀</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 = data.gender ?? '-'
  369. order.petVaccine = data.vaccineStatus || '-'
  370. order.petCharacter = 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. }
  702. .step-num {
  703. font-size: 20rpx;
  704. color: #fff;
  705. }
  706. .step-item.done .step-circle,
  707. .step-item.active .step-circle {
  708. background: #ff9500;
  709. }
  710. .step-line {
  711. position: absolute;
  712. top: 22rpx;
  713. left: 50%;
  714. width: 100%;
  715. height: 4rpx;
  716. background: #e0e0e0;
  717. z-index: 0;
  718. }
  719. .step-line.done {
  720. background: #ff9500;
  721. }
  722. .step-label {
  723. font-size: 20rpx;
  724. color: #999;
  725. text-align: center;
  726. }
  727. .step-item.done .step-label,
  728. .step-item.active .step-label {
  729. color: #ff9500;
  730. font-weight: 600;
  731. }
  732. .step-time {
  733. font-size: 18rpx;
  734. color: #bbb;
  735. margin-top: 4rpx;
  736. }
  737. .info-row-cards {
  738. display: flex;
  739. gap: 20rpx;
  740. margin: 0 24rpx 24rpx;
  741. }
  742. .info-card {
  743. flex: 1;
  744. background: #fff;
  745. border-radius: 28rpx;
  746. padding: 24rpx;
  747. min-width: 0;
  748. }
  749. .card-label {
  750. display: block;
  751. font-size: 24rpx;
  752. font-weight: 700;
  753. color: #333;
  754. margin-bottom: 20rpx;
  755. border-left: 6rpx solid #ff9500;
  756. padding-left: 12rpx;
  757. }
  758. .pet-header {
  759. display: flex;
  760. align-items: center;
  761. gap: 16rpx;
  762. margin-bottom: 20rpx;
  763. }
  764. .pet-avatar, .user-avatar, .assignee-avatar {
  765. width: 80rpx; height: 80rpx; border-radius: 50%; background: #f0f2f5;
  766. display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  767. .avatar-img { width: 100%; height: 100%; }
  768. }
  769. .pet-basic {
  770. flex: 1;
  771. min-width: 0;
  772. }
  773. .pet-name {
  774. display: block;
  775. font-size: 28rpx;
  776. font-weight: bold;
  777. color: #222;
  778. }
  779. .pet-tags {
  780. display: flex;
  781. flex-wrap: wrap;
  782. gap: 12rpx;
  783. margin-top: 10rpx;
  784. align-items: center;
  785. }
  786. .mini-tag {
  787. font-size: 20rpx;
  788. background: #f5f5f5;
  789. border-radius: 8rpx;
  790. padding: 4rpx 12rpx;
  791. color: #666;
  792. white-space: nowrap;
  793. }
  794. .breed-badge {
  795. font-size: 20rpx;
  796. background: #ffe0b2;
  797. color: #e65100;
  798. border-radius: 8rpx;
  799. padding: 4rpx 12rpx;
  800. white-space: nowrap;
  801. }
  802. .pet-attrs {
  803. display: flex;
  804. flex-wrap: wrap;
  805. gap: 12rpx 0;
  806. }
  807. .attr-item {
  808. width: 50%;
  809. }
  810. .attr-item.full {
  811. width: 100%;
  812. }
  813. .attr-label {
  814. display: block;
  815. font-size: 20rpx;
  816. color: #aaa;
  817. }
  818. .attr-val {
  819. display: block;
  820. font-size: 22rpx;
  821. color: #333;
  822. }
  823. .attr-val.highlight {
  824. color: #4caf50;
  825. }
  826. .user-header {
  827. display: flex;
  828. align-items: center;
  829. gap: 16rpx;
  830. margin-bottom: 20rpx;
  831. }
  832. .user-name-text {
  833. display: block;
  834. font-size: 28rpx;
  835. font-weight: bold;
  836. color: #222;
  837. }
  838. .user-phone {
  839. display: block;
  840. font-size: 24rpx;
  841. color: #666;
  842. }
  843. .service-address-box {
  844. background: #fff8f0;
  845. border-radius: 16rpx;
  846. padding: 16rpx;
  847. }
  848. .addr-label {
  849. display: block;
  850. font-size: 20rpx;
  851. color: #ff9500;
  852. margin-bottom: 6rpx;
  853. }
  854. .addr-text {
  855. display: block;
  856. font-size: 22rpx;
  857. color: #333;
  858. line-height: 1.5;
  859. }
  860. .detail-tabs-wrap {
  861. margin: 0 24rpx;
  862. background: #fff;
  863. border-radius: 28rpx;
  864. overflow: hidden;
  865. }
  866. .tab-nav {
  867. display: flex;
  868. border-bottom: 2rpx solid #EEEEEE;
  869. }
  870. .tab-nav-item {
  871. flex: 1;
  872. text-align: center;
  873. padding: 24rpx 0;
  874. font-size: 24rpx;
  875. color: #666;
  876. position: relative;
  877. }
  878. .tab-nav-item.active {
  879. color: #ff9500;
  880. font-weight: bold;
  881. }
  882. .tab-nav-item.active::after {
  883. content: '';
  884. position: absolute;
  885. bottom: 0;
  886. left: 50%;
  887. transform: translateX(-50%);
  888. width: 48rpx;
  889. height: 6rpx;
  890. background: #ff9500;
  891. border-radius: 6rpx;
  892. }
  893. .tab-content {
  894. padding: 28rpx;
  895. min-height: 280rpx;
  896. }
  897. .base-info-grid {
  898. display: flex;
  899. flex-wrap: wrap;
  900. gap: 20rpx;
  901. margin-bottom: 32rpx;
  902. }
  903. .bi-item {
  904. width: calc(50% - 10rpx);
  905. background: #f8f8f8;
  906. border-radius: 16rpx;
  907. padding: 16rpx 20rpx;
  908. box-sizing: border-box;
  909. display: flex;
  910. flex-direction: column;
  911. justify-content: center;
  912. }
  913. .bi-label {
  914. display: block;
  915. font-size: 20rpx;
  916. color: #aaa;
  917. margin-bottom: 8rpx;
  918. }
  919. .bi-val {
  920. display: block;
  921. font-size: 24rpx;
  922. color: #333;
  923. font-weight: 500;
  924. word-break: break-all;
  925. line-height: 1.4;
  926. }
  927. .bi-val.highlight {
  928. color: #f44336;
  929. }
  930. .sub-title {
  931. display: block;
  932. font-size: 28rpx;
  933. font-weight: bold;
  934. color: #333;
  935. margin: 12rpx 0 24rpx;
  936. }
  937. /* 任务卡片样式 */
  938. .task-card {
  939. padding: 24rpx;
  940. background: #fff;
  941. border: 2rpx solid #EEEEEE;
  942. border-radius: 12rpx;
  943. margin-bottom: 20rpx;
  944. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
  945. }
  946. .task-header {
  947. display: flex;
  948. align-items: center;
  949. gap: 16rpx;
  950. margin-bottom: 20rpx;
  951. }
  952. .type-tag {
  953. font-size: 22rpx;
  954. padding: 4rpx 12rpx;
  955. border-radius: 6rpx;
  956. border: 1rpx solid;
  957. }
  958. .tag-blue {
  959. color: #007aff;
  960. background: #eef6ff;
  961. border-color: #007aff;
  962. }
  963. .tag-orange {
  964. color: #ff9500;
  965. background: #fff8f0;
  966. border-color: #ff9500;
  967. }
  968. .task-time {
  969. font-size: 26rpx;
  970. font-weight: bold;
  971. color: #f56c6c;
  972. }
  973. .task-body {
  974. display: flex;
  975. flex-direction: column;
  976. gap: 12rpx;
  977. }
  978. .task-row {
  979. display: flex;
  980. align-items: flex-start;
  981. gap: 20rpx;
  982. }
  983. .task-label {
  984. width: 60rpx;
  985. font-size: 24rpx;
  986. color: #999;
  987. flex-shrink: 0;
  988. }
  989. .task-value {
  990. font-size: 26rpx;
  991. color: #333;
  992. line-height: 1.4;
  993. }
  994. .contact-row {
  995. margin-top: 8rpx;
  996. padding-top: 8rpx;
  997. }
  998. .contact-row .task-value {
  999. color: #999;
  1000. }
  1001. /* 执行要求卡片 */
  1002. .req-card {
  1003. background: #f9f9f9;
  1004. border: none;
  1005. }
  1006. .req-item {
  1007. display: flex;
  1008. align-items: center;
  1009. }
  1010. .req-label {
  1011. width: 140rpx;
  1012. font-size: 24rpx;
  1013. color: #333;
  1014. }
  1015. .req-value {
  1016. flex: 1;
  1017. font-size: 26rpx;
  1018. color: #333;
  1019. }
  1020. .assignee-card {
  1021. background: #f9f9f9;
  1022. border-radius: 24rpx;
  1023. padding: 28rpx;
  1024. }
  1025. .assignee-header {
  1026. display: flex;
  1027. gap: 24rpx;
  1028. }
  1029. .assignee-avatar {
  1030. width: 100rpx;
  1031. height: 100rpx;
  1032. border-radius: 50%;
  1033. background: #e0e0e0;
  1034. display: flex;
  1035. align-items: center;
  1036. justify-content: center;
  1037. }
  1038. .assignee-name {
  1039. display: block;
  1040. font-size: 30rpx;
  1041. font-weight: bold;
  1042. color: #222;
  1043. margin-bottom: 8rpx;
  1044. }
  1045. .assignee-phone,
  1046. .assignee-zone {
  1047. display: block;
  1048. font-size: 24rpx;
  1049. color: #666;
  1050. margin-bottom: 4rpx;
  1051. }
  1052. .timeline {
  1053. position: relative;
  1054. padding-left: 40rpx;
  1055. }
  1056. .tl-item {
  1057. position: relative;
  1058. margin-bottom: 40rpx;
  1059. padding-left: 32rpx;
  1060. }
  1061. .tl-dot {
  1062. position: absolute;
  1063. left: -12rpx;
  1064. top: 8rpx;
  1065. width: 24rpx;
  1066. height: 24rpx;
  1067. border-radius: 50%;
  1068. background: #ff9500;
  1069. border: 4rpx solid #fff;
  1070. box-shadow: 0 0 0 4rpx #ff9500;
  1071. }
  1072. .tl-item::before {
  1073. content: '';
  1074. position: absolute;
  1075. left: -2rpx;
  1076. top: 32rpx;
  1077. bottom: -40rpx;
  1078. width: 4rpx;
  1079. background: #f0f0f0;
  1080. }
  1081. .tl-item:last-child::before {
  1082. display: none;
  1083. }
  1084. .tl-time {
  1085. display: block;
  1086. font-size: 22rpx;
  1087. color: #aaa;
  1088. margin-bottom: 6rpx;
  1089. }
  1090. .tl-title {
  1091. display: block;
  1092. font-size: 28rpx;
  1093. font-weight: 600;
  1094. color: #222;
  1095. margin-bottom: 6rpx;
  1096. }
  1097. .tl-desc {
  1098. display: block;
  1099. font-size: 24rpx;
  1100. color: #666;
  1101. }
  1102. .log-dot {
  1103. background: #e0e0e0;
  1104. box-shadow: 0 0 0 4rpx #e0e0e0;
  1105. }
  1106. .empty-state {
  1107. display: flex;
  1108. flex-direction: column;
  1109. align-items: center;
  1110. justify-content: center;
  1111. padding: 80rpx 0;
  1112. gap: 24rpx;
  1113. }
  1114. .empty-text {
  1115. font-size: 26rpx;
  1116. color: #bbb;
  1117. }
  1118. .cancel-bar {
  1119. position: fixed;
  1120. bottom: 0;
  1121. left: 0;
  1122. right: 0;
  1123. padding: 24rpx 32rpx;
  1124. background: rgba(255, 255, 255, 0.95);
  1125. box-shadow: 0 -8rpx 28rpx rgba(0, 0, 0, 0.08);
  1126. z-index: 100;
  1127. }
  1128. .cancel-order-btn {
  1129. width: 100%;
  1130. height: 96rpx;
  1131. font-size: 32rpx;
  1132. font-weight: 600;
  1133. border: 2rpx solid #f44336;
  1134. color: #f44336;
  1135. background: transparent;
  1136. border-radius: 48rpx;
  1137. line-height: 92rpx;
  1138. &::after { border: none; }
  1139. }
  1140. /* 骨架屏动画与样式 */
  1141. .skeleton-page {
  1142. padding: 24rpx;
  1143. }
  1144. .skeleton-box {
  1145. background: #e0e0e0;
  1146. border-radius: 16rpx;
  1147. margin-bottom: 24rpx;
  1148. animation: skeleton-shimmer 1.5s infinite linear;
  1149. background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  1150. background-size: 400% 100%;
  1151. }
  1152. @keyframes skeleton-shimmer {
  1153. 0% {
  1154. background-position: 100% 0;
  1155. }
  1156. 100% {
  1157. background-position: -100% 0;
  1158. }
  1159. }
  1160. .skeleton-header {
  1161. height: 80rpx;
  1162. border-radius: 20rpx;
  1163. }
  1164. .skeleton-progress {
  1165. height: 120rpx;
  1166. border-radius: 28rpx;
  1167. }
  1168. .skeleton-row-cards {
  1169. display: flex;
  1170. gap: 20rpx;
  1171. margin-bottom: 24rpx;
  1172. }
  1173. .skeleton-card {
  1174. flex: 1;
  1175. height: 280rpx;
  1176. border-radius: 28rpx;
  1177. margin-bottom: 0;
  1178. }
  1179. .skeleton-content {
  1180. height: 500rpx;
  1181. border-radius: 28rpx;
  1182. }
  1183. /* 渐显进入动画 */
  1184. .fade-in {
  1185. animation: fadeIn 0.4s ease-out forwards;
  1186. }
  1187. @keyframes fadeIn {
  1188. from {
  1189. opacity: 0;
  1190. transform: translateY(10rpx);
  1191. }
  1192. to {
  1193. opacity: 1;
  1194. transform: translateY(0);
  1195. }
  1196. }
  1197. /* 日志媒体相关样式 */
  1198. .tl-media {
  1199. display: flex;
  1200. flex-wrap: wrap;
  1201. gap: 16rpx;
  1202. margin-top: 16rpx;
  1203. }
  1204. .media-item {
  1205. width: 160rpx;
  1206. height: 160rpx;
  1207. border-radius: 12rpx;
  1208. overflow: hidden;
  1209. background: #f0f0f0;
  1210. position: relative;
  1211. }
  1212. .p-img, .p-video-box {
  1213. width: 100%;
  1214. height: 100%;
  1215. }
  1216. .play-icon-overlay {
  1217. position: absolute;
  1218. top: 50%;
  1219. left: 50%;
  1220. transform: translate(-50%, -50%);
  1221. width: 60rpx;
  1222. height: 60rpx;
  1223. background: rgba(0, 0, 0, 0.4);
  1224. border-radius: 50%;
  1225. display: flex;
  1226. align-items: center;
  1227. justify-content: center;
  1228. pointer-events: none;
  1229. }
  1230. /* 视频预览弹窗 */
  1231. .video-preview-mask {
  1232. position: fixed;
  1233. top: 0;
  1234. left: 0;
  1235. right: 0;
  1236. bottom: 0;
  1237. background: #000;
  1238. z-index: 999;
  1239. display: flex;
  1240. align-items: center;
  1241. justify-content: center;
  1242. }
  1243. .preview-video {
  1244. width: 100%;
  1245. height: 60vh;
  1246. }
  1247. .close-video-btn {
  1248. position: absolute;
  1249. top: 100rpx;
  1250. right: 40rpx;
  1251. width: 64rpx;
  1252. height: 64rpx;
  1253. border-radius: 50%;
  1254. background: rgba(255, 255, 255, 0.2);
  1255. display: flex;
  1256. justify-content: center;
  1257. z-index: 1000;
  1258. }
  1259. /* 自定义弹窗样式 */
  1260. .custom-modal {
  1261. position: fixed;
  1262. top: 0;
  1263. left: 0;
  1264. width: 100%;
  1265. height: 100%;
  1266. z-index: 999;
  1267. display: flex;
  1268. align-items: center;
  1269. justify-content: center;
  1270. }
  1271. .modal-mask {
  1272. position: absolute;
  1273. top: 0;
  1274. left: 0;
  1275. width: 100%;
  1276. height: 100%;
  1277. background-color: rgba(0, 0, 0, 0.5);
  1278. }
  1279. .modal-content {
  1280. position: relative;
  1281. width: 80%;
  1282. background-color: #fff;
  1283. border-radius: 16rpx;
  1284. overflow: hidden;
  1285. z-index: 1000;
  1286. }
  1287. .modal-title {
  1288. padding: 30rpx 0 20rpx;
  1289. text-align: center;
  1290. font-size: 32rpx;
  1291. font-weight: bold;
  1292. color: #333;
  1293. }
  1294. .modal-body {
  1295. padding: 10rpx 40rpx 30rpx;
  1296. }
  1297. .cancel-input {
  1298. width: 100%;
  1299. height: 160rpx;
  1300. background-color: #f8f8f8;
  1301. border-radius: 8rpx;
  1302. padding: 20rpx;
  1303. font-size: 28rpx;
  1304. box-sizing: border-box;
  1305. color: #333;
  1306. }
  1307. .ph-color {
  1308. color: #999;
  1309. }
  1310. .modal-footer {
  1311. display: flex;
  1312. border-top: 2rpx solid #EEEEEE;
  1313. }
  1314. .modal-btn {
  1315. flex: 1;
  1316. height: 90rpx;
  1317. line-height: 90rpx;
  1318. text-align: center;
  1319. font-size: 30rpx;
  1320. font-weight: 500;
  1321. }
  1322. .btn-cancel {
  1323. color: #666;
  1324. border-right: 2rpx solid #EEEEEE;
  1325. }
  1326. .btn-confirm {
  1327. color: #2196f3;
  1328. }
  1329. </style>