info.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <view class="content">
  3. <view class="card">
  4. <view class="row">
  5. <view class="name">
  6. 取宠时间
  7. </view>
  8. <view class="text">
  9. {{info.agree_date}}
  10. {{info.agree_time}}
  11. </view>
  12. </view>
  13. <view class="row">
  14. <view class="name">
  15. 托运方式
  16. </view>
  17. <view class="text">
  18. {{info.freight === 'air'?'空运':''}}
  19. {{info.freight === 'fast'?'快车':''}}
  20. {{info.freight === 'special'?'专车':''}}
  21. </view>
  22. </view>
  23. </view>
  24. <view class="card">
  25. <view class="title">
  26. 托运信息
  27. </view>
  28. <view class="order">
  29. <view class="order_a"><text class="order_yuan"></text> <text>取</text></view>
  30. <view class="order_b">
  31. <view class="order_p">{{info.from_addr.address}}</view>
  32. <view class="order_c">
  33. <view class="order_p1">{{info.from_addr.name}}</view>
  34. <view class="order_p2">{{info.from_addr.mobile}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="order" style="margin-bottom: 20rpx;">
  39. <view class="order_a"><text class="order_yuana order_yuan "></text> <text>送</text></view>
  40. <view class="order_b">
  41. <view class="order_p">{{info.to_addr.address}}</view>
  42. <view class="order_c">
  43. <view class="order_p1">{{info.to_addr.name}}</view>
  44. <view class="order_p2">{{info.to_addr.mobile}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="row">
  49. <view class="row half">
  50. <view class="name">
  51. 宠物类别
  52. </view>
  53. <view class="text">
  54. {{info.pet_category}}
  55. </view>
  56. </view>
  57. <view class="row half">
  58. <view class="name">
  59. 宠物数量
  60. </view>
  61. <view class="text">
  62. {{info.num}}
  63. </view>
  64. </view>
  65. </view>
  66. <view class="row">
  67. <view class="row half">
  68. <view class="name">
  69. 上门接宠
  70. </view>
  71. <view class="text">
  72. {{info.pick_up === 1 || info.pick_up === 4? '需要':'不需要'}}
  73. </view>
  74. </view>
  75. <view class="row half">
  76. <view class="name">
  77. 送宠到家
  78. </view>
  79. <view class="text">
  80. {{info.pick_up === 2|| info.pick_up === 4? '需要':'不需要'}}
  81. </view>
  82. </view>
  83. </view>
  84. <view class="row">
  85. <view class="row half">
  86. <view class="name">
  87. 宠物规格
  88. </view>
  89. <view class="text">
  90. {{info.spec}}
  91. </view>
  92. </view>
  93. <view class="row half">
  94. <view class="name">
  95. 有无宠笼
  96. </view>
  97. <view class="text">
  98. {{info.has_cage?"有":"没有"}}
  99. </view>
  100. </view>
  101. </view>
  102. <view class="row">
  103. <view class="row half">
  104. <view class="name">
  105. 宠物重量
  106. </view>
  107. <view class="text">
  108. {{info.weight}}
  109. </view>
  110. </view>
  111. <view class="row half">
  112. <view class="name">
  113. 宠具件数
  114. </view>
  115. <view class="text">
  116. {{info.piece}}
  117. </view>
  118. </view>
  119. </view>
  120. <view class="row">
  121. <view class="row half">
  122. <view class="name">
  123. 备注信息
  124. </view>
  125. <view class="text">
  126. {{info.remark}}
  127. </view>
  128. </view>
  129. </view>
  130. <view class="row" v-if="info.images.length > 1">
  131. <view class="row half">
  132. <view class="name">
  133. 宠物图片
  134. </view>
  135. </view>
  136. </view>
  137. <view class="image">
  138. <image v-for="(item,index) in info.images" :src="item" class="image-dom" :key="index"></image>
  139. </view>
  140. </view>
  141. <view class="card">
  142. <view class="title">
  143. 订单信息
  144. </view>
  145. <view class="row">
  146. <view class="name">
  147. 订单编号
  148. </view>
  149. <view class="text">
  150. {{info.no}}
  151. </view>
  152. </view>
  153. <view class="row">
  154. <view class="name">
  155. 下单时间
  156. </view>
  157. <view class="text">
  158. {{info.created_at?$u.timeFormat(info.created_at, 'yyyy年mm月dd日 hh时MM分'):"-"}}
  159. </view>
  160. </view>
  161. <view class="row">
  162. <view class="name">
  163. 支付方式
  164. </view>
  165. <view class="text">
  166. {{info.pay_type === 1?"余额":"微信"}}
  167. </view>
  168. </view>
  169. <view class="row">
  170. <view class="name">
  171. 支付时间
  172. </view>
  173. <view class="text">
  174. {{info.pay_time?$u.timeFormat(info.pay_time, 'yyyy年mm月dd日 hh时MM分'):'-'}}
  175. </view>
  176. </view>
  177. </view>
  178. <view class="card" v-if="info.protect_valid">
  179. <view class="row">
  180. <view class="row half">
  181. <image src="http://pet.hdlkeji.com/assets/static/detaila.png" style="width: 30rpx;height: 30rpx;"></image>
  182. <view style="margin: 0 20rpx;">宠物安心保</view>
  183. <image src="http://pet.hdlkeji.com/assets/static/1/29.png" style="width: 30rpx;height: 30rpx;"></image>
  184. </view>
  185. <view class="row half yellow">
  186. 生效中
  187. </view>
  188. </view>
  189. <view class="row">
  190. <view class="name">
  191. {{info.protect_amount}}保{{info.protect_max}}
  192. </view>
  193. </view>
  194. </view>
  195. <view class="card">
  196. <view class="title">
  197. 配送信息
  198. </view>
  199. <view class="row">
  200. <view class="name">
  201. 取宠代理
  202. </view>
  203. <view class="text">
  204. {{info.from_addr.name}}
  205. </view>
  206. </view>
  207. <view class="row">
  208. <view class="name">
  209. 联系电话
  210. </view>
  211. <view class="text">
  212. {{info.from_addr.mobile}}
  213. </view>
  214. </view>
  215. <view class="row">
  216. <view class="name">
  217. 派送代理
  218. </view>
  219. <view class="text">
  220. {{info.to_addr.name}}
  221. </view>
  222. </view>
  223. <view class="row">
  224. <view class="name">
  225. 联系方式
  226. </view>
  227. <view class="text">
  228. {{info.to_addr.mobile}}
  229. </view>
  230. </view>
  231. <view class="row">
  232. <view class="name">
  233. 完成时间
  234. </view>
  235. <view class="text">
  236. {{info.completed_at?$u.timeFormat(info.completed_at, 'yyyy年mm月dd日 hh时MM分'):'-'}}
  237. </view>
  238. </view>
  239. </view>
  240. <view class="card" v-if="info.status > 50">
  241. <view class="title">
  242. 结算信息
  243. </view>
  244. <view class="row">
  245. <view class="row half">
  246. <view class="name">
  247. 取件费
  248. </view>
  249. <view class="text red">
  250. {{info.current_send_order.fee_1}}
  251. </view>
  252. </view>
  253. <view class="row half">
  254. <view class="name">
  255. 派送费
  256. </view>
  257. <view class="text red">
  258. {{info.current_send_order.fee_3}}
  259. </view>
  260. </view>
  261. </view>
  262. <view class="row">
  263. <view class="row half">
  264. <view class="name">
  265. 运输费
  266. </view>
  267. <view class="text red">
  268. {{info.current_send_order.fee_2}}
  269. </view>
  270. </view>
  271. <view class="row half">
  272. <view class="name">
  273. 寄养费
  274. </view>
  275. <view class="text red">
  276. {{info.current_send_order.fee_5}}
  277. </view>
  278. </view>
  279. </view>
  280. <view class="row">
  281. <view class="row half">
  282. <view class="name">
  283. 宠具费
  284. </view>
  285. <view class="text red">
  286. {{info.current_send_order.fee_4}}
  287. </view>
  288. </view>
  289. <view class="row half">
  290. <view class="name">
  291. 其他
  292. </view>
  293. <view class="text red">
  294. {{info.current_send_order.fee_6}}
  295. </view>
  296. </view>
  297. </view>
  298. <view class="row">
  299. <view class="row half">
  300. <view class="name">
  301. 总计
  302. </view>
  303. <view class="text red">
  304. {{info.current_send_order.fee_total}}
  305. </view>
  306. </view>
  307. </view>
  308. </view>
  309. <view class="card" v-if="info.status === 70">
  310. <view class="title">
  311. 退款信息
  312. </view>
  313. <view class="row">
  314. <view class="row">
  315. <view class="name">
  316. 退款金额
  317. </view>
  318. <view class="text red">
  319. {{info.refund_amount||''}}
  320. </view>
  321. </view>
  322. </view>
  323. <view class="row">
  324. <view class="row">
  325. <view class="name">
  326. 退款时间
  327. </view>
  328. <view class="text red">
  329. {{info.refund_at?$u.timeFormat(info.refund_at, 'yyyy年mm月dd日 hh时MM分'):'-'}}
  330. </view>
  331. </view>
  332. </view>
  333. <view class="row">
  334. <view class="row">
  335. <view class="name">
  336. 退款原因
  337. </view>
  338. <view class="text red">
  339. {{info.refund_reason||''}}
  340. </view>
  341. </view>
  342. </view>
  343. <view class="row">
  344. <view class="row half">
  345. <view class="name">
  346. 宠物图片
  347. </view>
  348. </view>
  349. </view>
  350. <view class="image">
  351. <image :src="item" class="image-dom" v-for="(item,index) in info.refund_images" @click="clickImage"></image>
  352. </view>
  353. </view>
  354. <view class="card" style="margin-bottom: 15vh;">
  355. <view class="title">
  356. 备注信息
  357. </view>
  358. <view class="row">
  359. <view class="name" v-for="(item,key) in info.user_remark">
  360. {{item.txt}}
  361. </view>
  362. </view>
  363. </view>
  364. <view class="bottom-btn">
  365. <view class="buttom-dom" @click="create(info.id)" v-if="info.status === 1">
  366. 立即接单
  367. </view>
  368. <view class="buttom-dom" @click="video(0,1,info.id)"
  369. v-if="info.status === 10 || info.status === 20 || info.status === 30">
  370. 备注
  371. </view>
  372. <view class="buttom-dom" @click="video(0,2,info.id)" v-if="info.status === 10 || info.status === 20">
  373. 上传更多
  374. </view>
  375. <view class="buttom-dom" @click="video(info.status,3,info.id)" v-if="info.status === 10">
  376. 上传取宠视频
  377. </view>
  378. <view class="buttom-dom" @click="video(info.status,4,info.id)" v-if="info.status === 20">
  379. 上传运输视频
  380. </view>
  381. <view class="buttom-dom" @click="video(info.status,5,info.id)" v-if="info.status === 30">
  382. 上传送达视频
  383. </view>
  384. </view>
  385. </view>
  386. </template>
  387. <script>
  388. export default {
  389. data() {
  390. return {
  391. // 是否是管理员
  392. isAdmin: false,
  393. info: {}
  394. }
  395. },
  396. onShow() {
  397. this.isAdmin = getApp().globalData.isAdmin
  398. this.getData(id);
  399. },
  400. onLoad(e) {
  401. let id = e.id
  402. this.isAdmin = getApp().globalData.isAdmin
  403. this.getData(id);
  404. },
  405. methods: {
  406. // 点击查看图片
  407. clickImage(){
  408. uni.previewImage({
  409. urls:this.info.refund_images
  410. })
  411. },
  412. // 点击立即接单
  413. create(id) {
  414. this.request("/sender_order_controller/get", {
  415. id: id
  416. }, "POST").then(res => {
  417. if (res.code === 1) {
  418. this.$u.toast('接单成功')
  419. setTimeout(function() {
  420. uni.navigateBack({
  421. delta:1
  422. })
  423. }, 2000);
  424. }
  425. })
  426. },
  427. // 获取订单信息
  428. getData(id) {
  429. // 判断是否是管理员
  430. let url = '';
  431. if(!this.isAdmin){
  432. url = "/sender_order_controller/detail"
  433. }else{
  434. url = "/admin_order/order_detail"
  435. }
  436. this.request(url, {
  437. id: id
  438. }, "GET").then(res => {
  439. console.log(res)
  440. if (res.code === 1) {
  441. this.info = res.data
  442. }
  443. })
  444. },
  445. // 点击上传视频
  446. video(status, type, id) {
  447. // status 的订单状态 10取宠视频 20 运输视频 30送宠视频
  448. // type 1 备注 2上传更多 3上传取宠视频 4上传运输视频 5上传送达视频
  449. // function gotoPage(){
  450. // uni.navigateTo({
  451. // url: "./video?status=" + status + "&type=" + type + "&id=" + id
  452. // })
  453. // }
  454. // if(type === 3){
  455. // uni.showModal({
  456. // title:"确认宠物已到达正在配送?",
  457. // success(res) {
  458. // if(res.confirm){
  459. // gotoPage()
  460. // }
  461. // }
  462. // })
  463. // }
  464. uni.navigateTo({
  465. url: "./video?status=" + status + "&type=" + type + "&id=" + id
  466. })
  467. }
  468. }
  469. }
  470. </script>
  471. <style lang="scss">
  472. .content {
  473. padding-top: 40rpx;
  474. padding-bottom: 5vh;
  475. }
  476. .yellow{
  477. color: #F6B403;
  478. display: flex;
  479. flex-direction: row;
  480. align-items: center;
  481. justify-content: flex-end !important;
  482. }
  483. .row {
  484. justify-content: flex-start;
  485. }
  486. .card {
  487. background-color: #FFFFFF;
  488. width: 93%;
  489. margin: 0 auto;
  490. margin-bottom: 40rpx;
  491. padding: 30rpx;
  492. border-radius: 30rpx;
  493. display: flex;
  494. flex-direction: column;
  495. align-items: center;
  496. justify-content: space-between;
  497. .name {
  498. color: #999;
  499. }
  500. .text {
  501. text-indent: 1em;
  502. }
  503. .red {
  504. color: red;
  505. }
  506. .title {
  507. font-size: 36rpx;
  508. font-weight: bold;
  509. padding-bottom: 20rpx;
  510. width: 100%;
  511. }
  512. .row {
  513. margin-bottom: 20rpx;
  514. }
  515. }
  516. .card {
  517. .order {
  518. width: 100%;
  519. display: flex;
  520. justify-content: space-between;
  521. align-items: center;
  522. // height: 100rpx;
  523. background: #F5F6FB;
  524. opacity: 1;
  525. padding: 14rpx 24rpx;
  526. box-sizing: border-box;
  527. border-radius: 16rpx;
  528. margin-bottom: 10rpx;
  529. .order_a {
  530. font-size: 26rpx;
  531. font-family: PingFang SC;
  532. font-weight: 500;
  533. line-height: 36rpx;
  534. color: #1F4971;
  535. opacity: 1;
  536. display: flex;
  537. justify-content: flex-start;
  538. align-items: center;
  539. .order_yuan {
  540. display: inline-block;
  541. width: 14rpx;
  542. height: 14rpx;
  543. background: #F6B403;
  544. border-radius: 50%;
  545. opacity: 1;
  546. margin-right: 10rpx;
  547. }
  548. .order_yuana {
  549. display: inline-block;
  550. width: 14rpx;
  551. height: 14rpx;
  552. background: #F54948;
  553. border-radius: 50%;
  554. opacity: 1;
  555. margin-right: 10rpx;
  556. }
  557. }
  558. .order_b {
  559. width: 85%;
  560. text-align: left;
  561. .order_p {
  562. font-size: 26rpx;
  563. font-family: PingFang SC;
  564. font-weight: 500;
  565. line-height: 36rpx;
  566. color: #111111;
  567. opacity: 1;
  568. }
  569. .order_c {
  570. display: flex;
  571. justify-content: flex-start;
  572. align-items: center;
  573. margin-top: 6rpx;
  574. .order_p1 {
  575. font-size: 26rpx;
  576. font-family: PingFang SC;
  577. font-weight: 400;
  578. line-height: 36rpx;
  579. color: #111111;
  580. opacity: 1;
  581. }
  582. .order_p2 {
  583. font-size: 26rpx;
  584. font-family: PingFang SC;
  585. font-weight: 400;
  586. line-height: 36rpx;
  587. color: #111111;
  588. opacity: 1;
  589. margin-left: 40rpx;
  590. }
  591. }
  592. }
  593. }
  594. }
  595. .min-card {
  596. width: 100%;
  597. background-color: #F8F8F8;
  598. }
  599. .image {
  600. width: 100%;
  601. display: flex;
  602. flex-direction: row;
  603. align-items: center;
  604. justify-content: flex-start;
  605. .image-dom {
  606. width: 120rpx;
  607. height: 120rpx;
  608. border: 1px #eee solid;
  609. margin-right: 20rpx;
  610. flex-wrap: wrap;
  611. }
  612. }
  613. .bottom-btn {
  614. position: fixed;
  615. bottom: 0;
  616. width: 100vw;
  617. height: 10vh;
  618. background-color: #FFFFFF;
  619. display: flex;
  620. flex-direction: row;
  621. align-items: center;
  622. justify-content: flex-end;
  623. .buttom-dom {
  624. height: 70rpx;
  625. min-width: 20%;
  626. background-color: #F6B301;
  627. color: #FFFFFF;
  628. text-align: center;
  629. line-height: 70rpx;
  630. color: #FFFFFF;
  631. border-radius: 70rpx;
  632. margin: 0 40rpx;
  633. padding: 0 10rpx;
  634. }
  635. }
  636. </style>