index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <template>
  2. <view class="order-details pos-order-details">
  3. <view class="header acea-row row-middle">
  4. <view class="state">{{ $t(title) }}</view>
  5. <view class="data">
  6. <view class="order-num">{{$t(`订单`)}}:{{ orderInfo.order_id || '' }}</view>
  7. <view>
  8. <span class="time">{{ orderInfo._add_time || '' }}</span>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="orderingUser acea-row row-middle">
  13. <span class="iconfont icon-yonghu2"></span>{{ orderInfo.nickname || '' }}
  14. </view>
  15. <view class="address">
  16. <view class="name">
  17. {{ orderInfo.real_name || ''
  18. }}<span class="phone">{{ orderInfo.user_phone || '' }}</span>
  19. </view>
  20. <view>{{ orderInfo.user_address }}</view>
  21. </view>
  22. <view class="line">
  23. <image src="/static/images/line.jpg" />
  24. </view>
  25. <view class="pos-order-goods">
  26. <navigator :url="`/pages/goods_details/index?id=${item.productInfo.id}`" hover-class="none"
  27. class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo.cartInfo" :key="index">
  28. <view class="picTxt acea-row row-between-wrapper">
  29. <view class="pictrue">
  30. <image :src="item.productInfo.image" />
  31. </view>
  32. <view class="text acea-row row-between row-column">
  33. <view class="info line2">
  34. {{ item.productInfo.store_name || '' }}
  35. </view>
  36. <view class="attr">{{ item.productInfo.suk }}</view>
  37. </view>
  38. </view>
  39. <view class="money">
  40. <view class="x-money">{{$t(`¥`)}}{{ item.productInfo.attrInfo.price || 0 }}</view>
  41. <view class="num">x{{ item.cart_num }}</view>
  42. <view class="y-money">{{$t(`¥`)}}{{ item.productInfo.attrInfo.ot_price || 0 }}</view>
  43. </view>
  44. </navigator>
  45. </view>
  46. <view class="public-total">
  47. {{$t(`共`)}}{{ orderInfo.total_num || 0 }}{{$t(`件商品,应支付`)}}
  48. <span class="money">{{$t(`¥`)}}{{ orderInfo.pay_price || 0 }}</span> ( {{$t(`邮费`)}} {{$t(`¥`)}}{{
  49. orderInfo.pay_postage || 0
  50. }}
  51. )
  52. </view>
  53. <view class="wrapper">
  54. <view class="item acea-row row-between">
  55. <view>{{$t(`订单编号`)}}:</view>
  56. <view class="conter acea-row row-middle row-right">
  57. {{ orderInfo.order_id || ''
  58. }}
  59. </view>
  60. </view>
  61. <view class="item acea-row row-between">
  62. <view>{{$t(`下单时间`)}}:</view>
  63. <view class="conter">{{ orderInfo._add_time || '' }}</view>
  64. </view>
  65. <view class="item acea-row row-between">
  66. <view>{{$t(`支付状态`)}}:</view>
  67. <view class="conter">
  68. {{ orderInfo.paid == 1 ? $t(`已支付`) : $t(`未支付`) }}
  69. </view>
  70. </view>
  71. <view class="item acea-row row-between">
  72. <view>{{$t(`支付方式`)}}:</view>
  73. <view class="conter">{{ payType }}</view>
  74. </view>
  75. <view class="item acea-row row-between">
  76. <view>{{$t(`买家留言`)}}:</view>
  77. <view class="conter">{{ orderInfo.mark || '' }}</view>
  78. </view>
  79. </view>
  80. <view class='wrapper' v-if="customForm && customForm.length">
  81. <view class='item acea-row row-between' v-for="(item,index) in customForm" :key="index">
  82. <view class='upload' v-if="item.label == 'img'">
  83. <view>{{item.title}}:</view>
  84. <view class='pictrue' v-for="(img,index) in item.value" :key="index">
  85. <image :src='img'></image>
  86. </view>
  87. </view>
  88. <view v-if="item.label !== 'img'">{{item.title}}:</view>
  89. <view v-if="item.label !== 'img'" class='conter'>{{item.value}}</view>
  90. </view>
  91. </view>
  92. <view class="wrapper">
  93. <view class='item acea-row row-between'>
  94. <view>{{$t(`商品总价`)}}:</view>
  95. <view class='conter'>
  96. {{$t(`¥`)}}{{(parseFloat(orderInfo.total_price)+parseFloat(orderInfo.vip_true_price)).toFixed(2)}}
  97. </view>
  98. </view>
  99. <view class='item acea-row row-between' v-if="orderInfo.pay_postage > 0">
  100. <view>{{$t(`配送运费`)}}:</view>
  101. <view class='conter'>{{$t(`¥`)}}{{parseFloat(orderInfo.pay_postage).toFixed(2)}}</view>
  102. </view>
  103. <view v-if="orderInfo.levelPrice > 0" class='item acea-row row-between'>
  104. <view>{{$t(`用户等级优惠`)}}:</view>
  105. <view class='conter'>-{{$t(`¥`)}}{{parseFloat(orderInfo.levelPrice).toFixed(2)}}</view>
  106. </view>
  107. <view v-if="orderInfo.memberPrice > 0" class='item acea-row row-between'>
  108. <view>{{$t(`付费会员优惠`)}}:</view>
  109. <view class='conter'>-{{$t(`¥`)}}{{parseFloat(orderInfo.memberPrice).toFixed(2)}}</view>
  110. </view>
  111. <view class='item acea-row row-between' v-if='orderInfo.coupon_price > 0'>
  112. <view>{{$t(`优惠券抵扣`)}}:</view>
  113. <view class='conter'>-{{$t(`¥`)}}{{parseFloat(orderInfo.coupon_price).toFixed(2)}}</view>
  114. </view>
  115. <view class='item acea-row row-between' v-if="orderInfo.use_integral > 0">
  116. <view>{{$t(`积分抵扣`)}}:</view>
  117. <view class='conter'>-{{$t(`¥`)}}{{parseFloat(orderInfo.deduction_price).toFixed(2)}}</view>
  118. </view>
  119. <view class='actualPay acea-row row-right'>{{$t(`实付款`)}}:<text
  120. class='money'>{{$t(`¥`)}}{{parseFloat(orderInfo.pay_price).toFixed(2)}}</text></view>
  121. </view>
  122. <view class="wrapper" v-if="
  123. orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2
  124. ">
  125. <view class="item acea-row row-between">
  126. <view>{{$t(`配送方式`)}}:</view>
  127. <view class="conter" v-if="orderInfo.delivery_type === 'express'">
  128. {{$t(`快递`)}}
  129. </view>
  130. <view class="conter" v-if="orderInfo.delivery_type === 'send'">{{$t(`送货`)}}</view>
  131. </view>
  132. <view class="item acea-row row-between">
  133. <view v-if="orderInfo.delivery_type === 'express'">{{$t(`快递公司`)}}:</view>
  134. <view v-if="orderInfo.delivery_type === 'send'">{{$t(`送货人`)}}:</view>
  135. <view class="conter">{{ orderInfo.delivery_name || '' }}</view>
  136. </view>
  137. <view class="item acea-row row-between">
  138. <view v-if="orderInfo.delivery_type === 'express'">{{$t(`快递单号`)}}:</view>
  139. <view v-if="orderInfo.delivery_type === 'send'">{{$t(`送货人电话`)}}:</view>
  140. <view class="conter">
  141. {{ orderInfo.delivery_id || ''}}
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </template>
  147. <script>
  148. import {
  149. getAdminOrderDetail
  150. } from "@/api/admin";
  151. export default {
  152. name: "AdminOrder",
  153. data: function() {
  154. return {
  155. order: false,
  156. change: false,
  157. order_id: "",
  158. orderInfo: {
  159. _status: {}
  160. },
  161. status: "",
  162. title: "",
  163. payType: "",
  164. types: "",
  165. clickNum: 1,
  166. goname: '',
  167. customForm: []
  168. };
  169. },
  170. watch: {
  171. "$route.params.oid": function(newVal) {
  172. let that = this;
  173. if (newVal != undefined) {
  174. that.order_id = newVal;
  175. that.getIndex();
  176. }
  177. }
  178. },
  179. onLoad: function(option) {
  180. let self = this
  181. this.order_id = option.id;
  182. this.goname = option.goname
  183. this.getIndex();
  184. },
  185. methods: {
  186. getIndex: function() {
  187. let that = this;
  188. getAdminOrderDetail(that.order_id).then(
  189. res => {
  190. that.orderInfo = res.data;
  191. that.types = res.data._status._type;
  192. that.title = res.data._status._title;
  193. that.payType = res.data._status._payType;
  194. if (that.orderInfo.custom_form && that.orderInfo.custom_form.length) {
  195. let arr = []
  196. that.orderInfo.custom_form.map(i => {
  197. if (i.value != '') {
  198. arr.push(i)
  199. }
  200. })
  201. that.$set(that, 'customForm', arr);
  202. }
  203. },
  204. err => {
  205. that.$util.Tips({
  206. title: err
  207. }, {
  208. tab: 3,
  209. url: 1
  210. });
  211. }
  212. );
  213. }
  214. }
  215. };
  216. </script>
  217. <style>
  218. /*商户管理订单详情*/
  219. .pos-order-details .header {
  220. background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  221. background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  222. background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  223. }
  224. .pos-order-details .header .state {
  225. font-size: 36upx;
  226. color: #fff;
  227. }
  228. .pos-order-details .header .data {
  229. margin-left: 35upx;
  230. font-size: 28upx;
  231. }
  232. .pos-order-details .header .data .order-num {
  233. font-size: 30upx;
  234. margin-bottom: 8upx;
  235. }
  236. .pos-order-details .remarks {
  237. width: 100%;
  238. height: 86upx;
  239. background-color: #fff;
  240. padding: 0 30upx;
  241. }
  242. .pos-order-details .remarks .iconfont {
  243. font-size: 40upx;
  244. color: #2a7efb;
  245. }
  246. .pos-order-details .remarks input {
  247. width: 630upx;
  248. height: 100%;
  249. font-size: 30upx;
  250. }
  251. .pos-order-details .remarks input::placeholder {
  252. color: #666;
  253. }
  254. .pos-order-details .orderingUser {
  255. font-size: 26upx;
  256. color: #282828;
  257. padding: 0 30upx;
  258. height: 67upx;
  259. background-color: #fff;
  260. margin-top: 16upx;
  261. border-bottom: 1px solid #f5f5f5;
  262. }
  263. .pos-order-details .orderingUser .iconfont {
  264. font-size: 40upx;
  265. color: #2a7efb;
  266. margin-right: 15upx;
  267. }
  268. .pos-order-details .address {
  269. margin-top: 0;
  270. }
  271. .pos-order-details .pos-order-goods {
  272. margin-top: 17upx;
  273. }
  274. .pos-order-details .footer .more {
  275. font-size: 27upx;
  276. color: #aaa;
  277. width: 100upx;
  278. height: 64upx;
  279. text-align: center;
  280. line-height: 64upx;
  281. margin-right: 25upx;
  282. position: relative;
  283. }
  284. .pos-order-details .footer .delivery {
  285. background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  286. background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  287. background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
  288. }
  289. .pos-order-details .footer .more .order .arrow {
  290. width: 0;
  291. height: 0;
  292. border-left: 11upx solid transparent;
  293. border-right: 11upx solid transparent;
  294. border-top: 20upx solid #e5e5e5;
  295. position: absolute;
  296. left: 15upx;
  297. bottom: -18upx;
  298. }
  299. .pos-order-details .footer .more .order .arrow:before {
  300. content: '';
  301. width: 0;
  302. height: 0;
  303. border-left: 9upx solid transparent;
  304. border-right: 9upx solid transparent;
  305. border-top: 19upx solid #fff;
  306. position: absolute;
  307. left: -10upx;
  308. bottom: 0;
  309. }
  310. .pos-order-details .footer .more .order {
  311. width: 200upx;
  312. background-color: #fff;
  313. border: 1px solid #eee;
  314. border-radius: 10upx;
  315. position: absolute;
  316. top: -200upx;
  317. z-index: 9;
  318. }
  319. .pos-order-details .footer .more .order .item {
  320. height: 77upx;
  321. line-height: 77upx;
  322. }
  323. .pos-order-details .footer .more .order .item~.item {
  324. border-top: 1px solid #f5f5f5;
  325. }
  326. .pos-order-details .footer .more .moreName {
  327. width: 100%;
  328. height: 100%;
  329. }
  330. /*订单详情*/
  331. .order-details .header {
  332. padding: 0 30upx;
  333. height: 150upx;
  334. }
  335. .order-details .header.on {
  336. background-color: #666 !important;
  337. }
  338. .order-details .header .pictrue {
  339. width: 110upx;
  340. height: 110upx;
  341. }
  342. .order-details .header .pictrue image {
  343. width: 100%;
  344. height: 100%;
  345. }
  346. .order-details .header .data {
  347. color: rgba(255, 255, 255, 0.8);
  348. font-size: 24upx;
  349. margin-left: 27upx;
  350. }
  351. .order-details .header.on .data {
  352. margin-left: 0;
  353. }
  354. .order-details .header .data .state {
  355. font-size: 30upx;
  356. font-weight: bold;
  357. color: #fff;
  358. margin-bottom: 7upx;
  359. }
  360. /* .order-details .header .data .time{margin-left:20upx;} */
  361. .order-details .nav {
  362. background-color: #fff;
  363. font-size: 26upx;
  364. color: #282828;
  365. padding: 25upx 0;
  366. }
  367. .order-details .nav .navCon {
  368. padding: 0 40upx;
  369. }
  370. .order-details .nav .navCon .on {
  371. font-weight: bold;
  372. color: #e93323;
  373. }
  374. .order-details .nav .progress {
  375. padding: 0 65upx;
  376. margin-top: 10upx;
  377. }
  378. .order-details .nav .progress .line {
  379. width: 100upx;
  380. height: 2upx;
  381. background-color: #939390;
  382. }
  383. .order-details .nav .progress .iconfont {
  384. font-size: 25upx;
  385. color: #939390;
  386. margin-top: -2upx;
  387. width: 30upx;
  388. height: 30upx;
  389. line-height: 33upx;
  390. text-align: center;
  391. margin-right: 0 !important;
  392. }
  393. .order-details .address {
  394. font-size: 26upx;
  395. color: #868686;
  396. background-color: #fff;
  397. padding: 25upx 30upx 30upx 30upx;
  398. }
  399. .order-details .address .name {
  400. font-size: 30upx;
  401. color: #282828;
  402. margin-bottom: 0.1rem;
  403. }
  404. .order-details .address .name .phone {
  405. margin-left: 40upx;
  406. }
  407. .order-details .line {
  408. width: 100%;
  409. height: 3upx;
  410. }
  411. .order-details .line image {
  412. width: 100%;
  413. height: 100%;
  414. display: block;
  415. }
  416. .order-details .wrapper {
  417. background-color: #fff;
  418. margin-top: 12upx;
  419. padding: 30upx;
  420. }
  421. .order-details .wrapper .item {
  422. font-size: 28upx;
  423. color: #282828;
  424. }
  425. .order-details .wrapper .item~.item {
  426. margin-top: 20upx;
  427. }
  428. .order-details .wrapper .item .conter {
  429. color: #868686;
  430. text-align: right;
  431. }
  432. .order-details .wrapper .item .conter .copy {
  433. font-size: 20rpx;
  434. color: #333;
  435. border-radius: 3rpx;
  436. border: 1px solid #666;
  437. padding: 0rpx 15rpx;
  438. margin-left: 24rpx;
  439. height: 40rpx;
  440. }
  441. .order-details .wrapper .actualPay {
  442. border-top: 1upx solid #eee;
  443. margin-top: 30upx;
  444. padding-top: 30upx;
  445. }
  446. .order-details .wrapper .actualPay .money {
  447. font-weight: bold;
  448. font-size: 30upx;
  449. color: #e93323;
  450. }
  451. .order-details .footer {
  452. width: 100%;
  453. height: 100upx;
  454. position: fixed;
  455. bottom: 0;
  456. left: 0;
  457. background-color: #fff;
  458. padding: 0 30upx;
  459. border-top: 1px solid #eee;
  460. }
  461. .order-details .footer .bnt {
  462. width: auto;
  463. height: 60upx;
  464. line-height: 60upx;
  465. text-align: center;
  466. line-height: upx;
  467. border-radius: 50upx;
  468. color: #fff;
  469. font-size: 27upx;
  470. padding: 0 3%;
  471. }
  472. .order-details .footer .bnt.cancel {
  473. color: #aaa;
  474. border: 1px solid #ddd;
  475. }
  476. .order-details .footer .bnt.default {
  477. color: #444;
  478. border: 1px solid #444;
  479. }
  480. .order-details .footer .bnt~.bnt {
  481. margin-left: 18upx;
  482. }
  483. .pos-order-goods {
  484. padding: 0 30upx;
  485. background-color: #fff;
  486. }
  487. .pos-order-goods .goods {
  488. height: 185upx;
  489. }
  490. .pos-order-goods .goods~.goods {
  491. border-top: 1px dashed #e5e5e5;
  492. }
  493. .pos-order-goods .goods .picTxt {
  494. width: 515upx;
  495. }
  496. .pos-order-goods .goods .picTxt .pictrue {
  497. width: 130upx;
  498. height: 130upx;
  499. }
  500. .pos-order-goods .goods .picTxt .pictrue image {
  501. width: 100%;
  502. height: 100%;
  503. border-radius: 6upx;
  504. }
  505. .pos-order-goods .goods .picTxt .text {
  506. width: 365upx;
  507. height: 130upx;
  508. }
  509. .pos-order-goods .goods .picTxt .text .info {
  510. font-size: 28upx;
  511. color: #282828;
  512. }
  513. .pos-order-goods .goods .picTxt .text .attr {
  514. font-size: 24upx;
  515. color: #999;
  516. }
  517. .pos-order-goods .goods .money {
  518. width: 164upx;
  519. text-align: right;
  520. font-size: 28upx;
  521. }
  522. .pos-order-goods .goods .money .x-money {
  523. color: #282828;
  524. }
  525. .pos-order-goods .goods .money .num {
  526. color: #ff9600;
  527. margin: 5upx 0;
  528. }
  529. .pos-order-goods .goods .money .y-money {
  530. color: #999;
  531. text-decoration: line-through;
  532. }
  533. .public-total {
  534. font-size: 28upx;
  535. color: #282828;
  536. border-top: 1px solid #eee;
  537. height: 92upx;
  538. line-height: 92upx;
  539. text-align: right;
  540. padding: 0 30upx;
  541. background-color: #fff;
  542. }
  543. .public-total .money {
  544. color: #ff4c3c;
  545. }
  546. .upload .pictrue {
  547. display: inline-block;
  548. margin: 22rpx 17rpx 20rpx 0;
  549. width: 156rpx;
  550. height: 156rpx;
  551. color: #bbb;
  552. }
  553. .upload .pictrue image {
  554. width: 100%;
  555. height: 100%;
  556. }
  557. </style>