index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <view class="order-details">
  3. <!-- #ifdef H5 -->
  4. <!-- 给header上与data上加on为退款订单-->
  5. <view class="nav_bar">
  6. 订单详情
  7. <navigator url="/pages/work/orderList/index">
  8. <text class="iconfont icon-fanhui2"></text>
  9. </navigator>
  10. </view>
  11. <view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'>
  12. <view class='pictrue' v-if="isGoodsReturn==false">
  13. <image :src="orderInfo.status_pic"></image>
  14. </view>
  15. <view class='data' :class='isGoodsReturn ? "on":""'>
  16. <view class='state'>{{title}}</view>
  17. <view>{{orderInfo._add_time }}</view>
  18. </view>
  19. </view>
  20. <view class="address_info">
  21. <view class="user_top acea-row row-middle" v-if="orderInfo.real_name">
  22. <text class="iconfont icon-yonghu2"></text>
  23. <text class="order_name">{{ userInfo.nickname }}</text>
  24. </view>
  25. <view class="address" v-if="orderInfo.product_type == 0 && orderInfo.delivery_type !='fictitious'">
  26. <view class="user">
  27. <span>{{ orderInfo.real_name }}</span>
  28. <span class="pl34">{{ orderInfo.user_phone }}</span>
  29. </view>
  30. <view class="detail">{{orderInfo.user_address }}</view>
  31. </view>
  32. </view>
  33. <view class="list">
  34. <view class="item-info acea-row row-between row-top" v-for="(item, index) in orderInfo.cartInfo" :key="index">
  35. <view class="pictrue">
  36. <image :src="item.productInfo.image"></image>
  37. </view>
  38. <view>
  39. <view class="text acea-row row-between">
  40. <view class="name line2">{{ item.productInfo.store_name }}</view>
  41. <view class="money">¥{{ item.productInfo.attrInfo.price }}
  42. <view class="cart_num">x{{ item.cart_num }}</view>
  43. </view>
  44. </view>
  45. <view class="sku line1" v-if="item.productInfo.attrInfo.suk">
  46. {{ item.productInfo.attrInfo.suk }}
  47. </view>
  48. </view>
  49. </view>
  50. <view class="public-total">
  51. 共{{ orderInfo.total_num }}件商品,实付款
  52. <span class="money">¥{{ orderInfo.pay_price }}</span> ( 邮费 ¥{{ orderInfo.pay_postage}})
  53. </view>
  54. <div class='wrapper' v-if='orderInfo.delivery_type=="fictitious" && orderInfo.product_type!=1'>
  55. <view class='item acea-row row-between'>
  56. <view>虚拟发货:</view>
  57. <view class='conter'>已发货,请注意查收</view>
  58. </view>
  59. <div class='item acea-row row-between'>
  60. <div>虚拟备注:</div>
  61. <div class='conter'>{{orderInfo.fictitious_content}}</div>
  62. </div>
  63. </div>
  64. <div class='wrapper' v-if="orderInfo.virtual_info && orderInfo.product_type==1">
  65. <div class='item acea-row row-between'>
  66. <div>卡密发货:</div>
  67. <div class='conter'>{{orderInfo.virtual_info}}</div>
  68. </div>
  69. </div>
  70. <!-- <div class='wrapper' style="border-bottom: 1px solid #eee;" v-if="orderInfo.custom_form && orderInfo.custom_form.length">
  71. <div class='item acea-row row-between' v-for="(item,index) in orderInfo.custom_form" :key="index" v-if="item.value">
  72. <div>{{item.title}}:</div>
  73. <div v-if="item.label == 'img'" class='conter'>
  74. <div class='pictrue' v-for="(img,indexn) in item.value" :key="indexn">
  75. <image :src='img'/>
  76. </div>
  77. </div>
  78. <div v-if="item.label != 'img'" class='conter'>{{item.value}}</div>
  79. </div>
  80. </div> -->
  81. <view class='wrapper'>
  82. <view class='item acea-row row-between'>
  83. <view>订单编号:</view>
  84. <view class='conter'> {{ orderInfo.order_id}}
  85. <text class="copy copy-data" @tap="copy(orderInfo.order_id)">复制</text>
  86. </view>
  87. </view>
  88. <div class="item acea-row row-between">
  89. <div>支付时间:</div>
  90. <div class="conter">{{ orderInfo._pay_time }}</div>
  91. </div>
  92. <div class="item acea-row row-between">
  93. <div>支付状态:</div>
  94. <div class="conter">{{ orderInfo.paid ? '已支付' : '未支付' }}</div>
  95. </div>
  96. <div class="item acea-row row-between">
  97. <div>支付方式:</div>
  98. <div class="conter">{{ orderInfo._status?orderInfo._status._payType:'' }}</div>
  99. </div>
  100. <div class="item acea-row row-between" v-if="orderInfo.mark">
  101. <div v-if="isReturen == 1">退款留言:</div>
  102. <div v-else>买家留言:</div>
  103. <div class="conter">{{ orderInfo.mark }}</div>
  104. </div>
  105. <div class="item acea-row row-between" v-if="orderInfo.refund_goods_explain">
  106. <div>退货留言:</div>
  107. <div class='conter'>{{orderInfo.refund_goods_explain}}</div>
  108. </div>
  109. <div class="item acea-row row-between" v-if="orderInfo.refund_img && orderInfo.refund_img.length">
  110. <div>退款凭证:</div>
  111. <div class="conter">
  112. <div class="pictrue" v-for="(item,index) in orderInfo.refund_img">
  113. <image :src="item" mode="aspectFill"/>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="item acea-row row-between" v-if="orderInfo.refund_goods_img && orderInfo.refund_goods_img.length">
  118. <div>退货凭证:</div>
  119. <div class="conter">
  120. <div class="pictrue" v-for="(item,index) in orderInfo.refund_goods_img">
  121. <image :src="item" mode="aspectFill"/>
  122. </div>
  123. </div>
  124. </div>
  125. </view>
  126. <div class="wrapper">
  127. <div class="item acea-row row-between">
  128. <div>商品总价:</div>
  129. <div class="conter">¥{{ orderInfo.total_price }}</div>
  130. </div>
  131. <div class="item acea-row row-between">
  132. <div>优惠券抵扣:</div>
  133. <div class="conter">-¥{{ orderInfo.coupon_price }}</div>
  134. </div>
  135. <div class="item acea-row row-between">
  136. <div>优惠活动金额:</div>
  137. <div class="conter">-¥{{ orderInfo.promotions_price }}</div>
  138. </div>
  139. <div class="item acea-row row-between">
  140. <div>运费:</div>
  141. <div class="conter">¥{{ orderInfo.pay_postage }}</div>
  142. </div>
  143. <div class="actualPay acea-row row-right">
  144. 实付款:<span class="money font-color-red">¥{{ orderInfo.pay_price }}</span>
  145. </div>
  146. </div>
  147. <div class="wrapper" v-show="orderInfo.delivery_type">
  148. <div class="item acea-row row-between">
  149. <div>配送方式:</div>
  150. <div class="conter" v-if="orderInfo.delivery_type === 'express'">快递</div>
  151. <div class="conter" v-if="orderInfo.delivery_type === 'send'">送货</div>
  152. <div class="conter" v-if="orderInfo.delivery_type === 'cashier'">收银台</div>
  153. <div class="conter" v-if="orderInfo.delivery_type === 'fictitious'">虚拟发货</div>
  154. </div>
  155. <div class="item acea-row row-between">
  156. <div v-if="orderInfo.delivery_type === 'express'">快递公司:</div>
  157. <div v-if="orderInfo.delivery_type === 'send'">送货人:</div>
  158. <div class="conter">{{ orderInfo.delivery_name }}</div>
  159. </div>
  160. <div class="item acea-row row-between">
  161. <div v-if="orderInfo.delivery_type === 'express'">快递单号:</div>
  162. <div v-if="orderInfo.delivery_type === 'send'">送货人电话:</div>
  163. <div class="conter" v-if="orderInfo.delivery_id">
  164. {{ orderInfo.delivery_id}}
  165. <span class="copy copy-data" @tap="copy(orderInfo.delivery_id)">复制</span>
  166. </div>
  167. </div>
  168. </div>
  169. <view style='height:20rpx;'></view>
  170. <!-- <view class='footer acea-row row-right row-middle'>
  171. <div class="more"></div>
  172. <div class="bnt cancel" @click="modify(0)" v-if="types === 0">一键改价</div>
  173. <div class="bnt cancel" @click="modify(2)" v-if="types === -1">立即退款</div>
  174. <div class="bnt cancel" @click="modify(1)">订单备注</div>
  175. <div class="bnt cancel"
  176. v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
  177. @click="offlinePay">确认付款</div>
  178. </view> -->
  179. </view>
  180. <!-- #endif -->
  181. </view>
  182. </template>
  183. <script>
  184. // #ifdef H5
  185. import {getWorkOrderInfo} from "@/api/work.js";
  186. export default{
  187. data() {
  188. return {
  189. userId:"",
  190. title:"请等待",
  191. isGoodsReturn:false,
  192. types:"",
  193. isReturen:0,
  194. orderInfo:{},
  195. userInfo:{}
  196. }
  197. },
  198. onLoad(e) {
  199. if(e){
  200. this.order_id = e.id;
  201. this.userId = this.$Cache.get('work_user_id')
  202. this.getInfo();
  203. }
  204. },
  205. methods:{
  206. getInfo(){
  207. let that = this;
  208. getWorkOrderInfo(this.order_id,{userid:this.userId,}).then(res=>{
  209. that.orderInfo = res.data.orderInfo;
  210. that.userInfo = res.data.userInfo;
  211. that.types = res.data.orderInfo._status._type;
  212. that.title = res.data.orderInfo._status._title;
  213. }).catch(err=>{
  214. return that.$util.Tips({
  215. title: err
  216. });
  217. })
  218. },
  219. copy(value){
  220. let that = this;
  221. uni.setClipboardData({
  222. data: value
  223. });
  224. }
  225. }
  226. }
  227. // #endif
  228. </script>
  229. <style lang="scss">
  230. /* #ifdef H5 */
  231. .order-details .nav_bar{
  232. height: 88rpx;
  233. line-height: 88rpx;
  234. background: #1890FF;
  235. color: #fff;
  236. font-size: 32rpx;
  237. text-align: center;
  238. position: relative;
  239. .icon-fanhui2{
  240. position: absolute;
  241. left: 12rpx;
  242. top: 50%;
  243. transform: translate(0, -50%);
  244. }
  245. }
  246. .order-details .header {
  247. padding: 0 30rpx;
  248. height: 150rpx;
  249. display: flex;
  250. align-items: center;
  251. flex-wrap: nowrap;
  252. background: #1890FF;
  253. }
  254. .order-details .header.on {
  255. background-color: #666 !important;
  256. }
  257. .order-details .header .pictrue {
  258. width: 110rpx;
  259. height: 110rpx;
  260. }
  261. .order-details .header .pictrue image {
  262. width: 100%;
  263. height: 100%;
  264. }
  265. .order-details .header .data {
  266. color: rgba(255, 255, 255, 0.8);
  267. font-size: 24rpx;
  268. margin-left: 27rpx;
  269. }
  270. .order-details .header .data.on {
  271. margin-left: 0;
  272. }
  273. .order-details .header .data .state {
  274. font-size: 30rpx;
  275. font-weight: bold;
  276. color: #fff;
  277. margin-bottom: 7rpx;
  278. }
  279. .order-details .header .data .time {
  280. margin-left: 20rpx;
  281. }
  282. .order-details .address_info{
  283. width: 710rpx;
  284. margin: 20rpx auto 0;
  285. background: #FFFFFF;
  286. border-radius: 12rpx;
  287. background-image: url(../../../static/images/line.jpg);
  288. background-repeat: no-repeat;
  289. background-position: bottom;
  290. .user_top{
  291. height: 88rpx;
  292. padding: 0 34rpx 0;
  293. box-sizing: border-box;
  294. border-bottom: 1px solid #f5f5f5;
  295. .iconfont {
  296. color: #1890FF;
  297. font-size: 44rpx;
  298. }
  299. .order_name{
  300. font-size: 28rpx;
  301. font-family: PingFangSC-Regular, PingFang SC;
  302. font-weight: 400;
  303. color: rgba(0, 0, 0, 0.85);
  304. padding-left: 20rpx;
  305. }
  306. }
  307. .address{
  308. .user{
  309. color: rgba(0, 0, 0, 0.85);
  310. font-size: 28rpx;
  311. padding: 26rpx 24rpx 12rpx;
  312. box-sizing: border-box;
  313. }
  314. .detail{
  315. color: #666666;
  316. font-size: 28rpx;
  317. padding: 0 24rpx 30rpx;
  318. }
  319. .pl34{
  320. padding-left: 34rpx;
  321. }
  322. }
  323. }
  324. .list{
  325. width: 710rpx;
  326. margin: 20rpx auto 0;
  327. }
  328. .item-info {
  329. padding: 30rpx 24rpx 30rpx;
  330. background: #fff;
  331. }
  332. .item-info .pictrue {
  333. width: 140rpx;
  334. height: 140rpx;
  335. }
  336. .item-info .pictrue image {
  337. width: 100%;
  338. height: 100%;
  339. border-radius: 8rpx;
  340. }
  341. .item-info .text {
  342. width: 486rpx;
  343. font-size: 28rpx;
  344. color: #999;
  345. }
  346. .item-info .text .name {
  347. width: 306rpx;
  348. color: rgba(0, 0, 0, 0.85);
  349. font-size: 28rpx;
  350. height: 80rpx;
  351. line-height: 40rpx;
  352. margin-left: 22rpx;
  353. }
  354. .sku{
  355. width: 306rpx;
  356. margin: 26rpx 0 0 22rpx;
  357. font-size: 24rpx;
  358. color: #666;
  359. }
  360. .item-info .text .money {
  361. width: 150rpx;
  362. text-align: right;
  363. color: rgba(0, 0, 0, 0.85);
  364. }
  365. .cart_num{
  366. height: 40rpx;
  367. font-size: 28rpx;
  368. font-weight: 400;
  369. color: rgba(0, 0, 0, 0.85);
  370. line-height: 40rpx;
  371. margin-top: 8rpx;
  372. }
  373. .item-info .text .money .return{
  374. margin-top: 10rpx;
  375. font-size: 24rpx;
  376. }
  377. .totalPrice {
  378. font-size: 26rpx;
  379. color: #282828;
  380. text-align: right;
  381. margin: 27rpx 0 0 30rpx;
  382. padding: 0 30rpx 30rpx 0;
  383. border-bottom: 1rpx solid #eee;
  384. }
  385. .totalPrice .money {
  386. font-size: 28rpx;
  387. font-weight: bold;
  388. color: #F5222D;
  389. }
  390. .public-total {
  391. font-size: 28rpx;
  392. color: #282828;
  393. height: 92rpx;
  394. line-height: 92rpx;
  395. text-align: right;
  396. padding: 0 24rpx;
  397. background-color: #fff;
  398. }
  399. .public-total .money {
  400. color: #F5222D;
  401. }
  402. .wrapper {
  403. background-color: #fff;
  404. padding: 36rpx 24rpx 16rpx;
  405. margin-top: 20rpx;
  406. border-radius: 12rpx;
  407. }
  408. .wrapper .item {
  409. font-size: 28rpx;
  410. color: rgba(0, 0, 0, 0.85);
  411. padding-bottom: 20rpx;
  412. }
  413. .wrapper .item .conter {
  414. color: #868686;
  415. display: flex;
  416. flex-wrap: nowrap;
  417. justify-content: flex-end;
  418. text-align: right;
  419. .pictrue{
  420. width: 140rpx;
  421. height: 140rpx;
  422. margin-left: 20rpx;
  423. image{
  424. width: 100%;
  425. height: 100%;
  426. border-radius: 12rpx;
  427. }
  428. }
  429. }
  430. .footer {
  431. width: 100%;
  432. height: 100rpx;
  433. position: fixed;
  434. bottom: 0;
  435. left: 0;
  436. background-color: #fff;
  437. padding: 0 30rpx;
  438. box-sizing: border-box;
  439. .more {
  440. position: absolute;
  441. left: 30rpx;
  442. font-size: 26rpx;
  443. color: #333;
  444. .icon-xiangshang {
  445. margin-left: 6rpx;
  446. font-size: 22rpx;
  447. }
  448. }
  449. .more-box {
  450. color: #333;
  451. position: absolute;
  452. left: 30rpx;
  453. bottom: 110rpx;
  454. background-color: #fff;
  455. padding: 18rpx 24rpx;
  456. border-radius: 4rpx;
  457. font-size: 28rpx;
  458. -webkit-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  459. -moz-box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  460. box-shadow: 0px 0px 3px 0px rgba(200, 200, 200, 0.75);
  461. .more-btn {
  462. color: #333;
  463. padding: 4rpx;
  464. z-index: 9999;
  465. }
  466. }
  467. .more-box:before {
  468. content: "";
  469. width: 0rpx;
  470. height: 0rpx;
  471. border-top: 10rpx solid #fff;
  472. border-bottom: 10rpx solid transparent;
  473. border-left: 10rpx solid #fff;
  474. position: absolute;
  475. bottom: -10rpx;
  476. left: 0px;
  477. }
  478. }
  479. .footer .bnt {
  480. width: 176rpx;
  481. height: 60rpx;
  482. text-align: center;
  483. line-height: 60rpx;
  484. border-radius: 50rpx;
  485. color: #fff;
  486. font-size: 27rpx;
  487. }
  488. .footer .bnt.refundBnt {
  489. width: 210rpx;
  490. }
  491. .footer .bnt.cancel {
  492. color: #666;
  493. border: 1rpx solid #ccc;
  494. }
  495. .footer .bnt~.bnt {
  496. margin-left: 18rpx;
  497. }
  498. .copy {
  499. font-size: 20rpx;
  500. color: #333;
  501. border-radius: 3rpx;
  502. border: 1rpx solid #666;
  503. padding: 3rpx 15rpx;
  504. margin-left: 24rpx;
  505. white-space: nowrap;
  506. }
  507. /* #endif */
  508. </style>