index.vue 14 KB

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