多租户商城-商户小程序端

620 lines
17 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <!-- 退货详情 -->
  2. <template>
  3. <view>
  4. <global-loading />
  5. <view v-if="ifShow">
  6. <view>
  7. <view class="order-details-status">
  8. <view class="status-title-box" v-if='status == 1'>
  9. <view class="l">
  10. <text class="status">{{$t('common.shz')}}</text>
  11. <!-- <text class="label" v-if="deliveryfalse">还剩1天22时30分</text> -->
  12. </view>
  13. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsTime.png"></image>-->
  14. </view>
  15. <!-- 审核通过-->
  16. <view class="status-title-box" v-if="status == 10">
  17. <view class="l">
  18. <text class="status">{{$t('common.shtg')}}</text>
  19. <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
  20. </view>
  21. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsSuccess.png"></image>-->
  22. </view>
  23. <!-- 审核不通过-->
  24. <view class="status-title-box" v-if="status == 6">
  25. <view class="l">
  26. <text class="status">{{$t('common.shbtg')}}</text>
  27. <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
  28. </view>
  29. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsSuccess.png"></image>-->
  30. </view>
  31. <view class="reason" v-if="status == 6">{{$t('common.reason')}}: {{ itemlist.reason }}</view>
  32. <!-- 退款中-->
  33. <view class="status-title-box" v-if="status == 2">
  34. <view class="l">
  35. <text class="status">{{$t('common.tkz')}}</text>
  36. <!-- <text class="label">2020年4月24日 22:00:00</text> -->
  37. </view>
  38. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsFalse.png"></image>-->
  39. </view>
  40. <!-- 退款中-->
  41. <view class="status-title-box" v-if="status == 7">
  42. <view class="l">
  43. <text class="status">{{$t('common.psz')}}</text>
  44. </view>
  45. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsFalse.png"></image>-->
  46. </view>
  47. <!-- 退货完成待退款-->
  48. <view class="status-title-box" v-if="status == 4">
  49. <view class="l">
  50. <text class="status">{{$t('common.tkcg')}}</text>
  51. <!-- <text class="label">2020年4月24日 22:00:00</text> -->
  52. </view>
  53. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsFalse.png"></image>-->
  54. </view>
  55. <!-- 退货完成拒绝退款-->
  56. <view class="status-title-box" v-if="status == 5">
  57. <view class="l">
  58. <text class="status">{{$t('common.tksb')}}</text>
  59. <!-- <text class="label">2020年4月24日 22:00:00</text> -->
  60. </view>
  61. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsFalse.png"></image>-->
  62. </view>
  63. <!-- 平台介入拒绝-->
  64. <view class="status-title-box" v-if="status == 9 && isPlaformState === 1">
  65. <view class="l">
  66. <text class="status">{{$t('common.shsb')}}</text>
  67. </view>
  68. </view>
  69. <!-- 退款成功-->
  70. <view class="status-title-box" v-if="status == 9">
  71. <view class="l">
  72. <text class="status">{{$t('common.cxsq')}}</text>
  73. <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
  74. </view>
  75. <!-- <image class='r' src="http://36.138.125.206:8081/ceres-local-file/static/images/afterSaleDetailsSuccess.png"></image>-->
  76. </view>
  77. </view>
  78. <!-- 发起退款 -->
  79. <view class="order-details-info-box mt20" v-if='status == 0'>
  80. <view class="order-details-price" v-if='status != 0'>
  81. <text>{{$t('common.refundtotalamount')}}</text>
  82. <text class="price-box"><text class="fuhao"></text>{{itemlist.price}}</text>
  83. </view>
  84. <view class="address-box return-explain-box">
  85. <view>{{$t('common.refundwaitbusiness')}}</view>
  86. <view class="address-info-r mt20 mar-top-20">
  87. <view class="item fs24">
  88. <text class="circle"></text>
  89. <text class="">{{$t('common.refundbusinessagree')}}</text>
  90. </view>
  91. <view class="item fs24">
  92. <text class="circle"></text>
  93. <text class="">{{$t('common.refundbusinessreject')}}</text>
  94. </view>
  95. </view>
  96. <view class="return-explain-btn">
  97. <text class="btn" @click="cancelRefundTap">{{$t('common.cxsq')}}</text>
  98. <text class="btn" @click="platform(itemlist.afterId, itemlist.orderId)" v-if="status==6 || status==8">{{$t('page.platformintervention')}}</text>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="order-details-info-box mt20" v-if="status==6 || status==8">
  103. <view class="return-explain-btn">
  104. <text class="btn" @click="cancelRefundTap">{{$t('common.cxsq')}}</text>
  105. <text class="btn" @click="platform(itemlist.afterId, itemlist.orderId)">{{$t('page.platformintervention')}}</text>
  106. </view>
  107. </view>
  108. <!-- 退款成功 -->
  109. <view class="order-details-info-box mt20" v-if="status == 4">
  110. <view class="order-details-price return-explain-box">
  111. <text>{{$t('common.refundsuccess')}}</text>
  112. <text class="price-box"><text class="fuhao"></text>{{itemlist.price}}</text>
  113. </view>
  114. </view>
  115. <!-- 平台介入关闭 -->
  116. <view class="order-details-info-box mt20" v-if="status == 9 && isPlaformState === 1">
  117. <view class="address-box return-explain-box">
  118. <view>{{$他('common.platforminterventionfail')}}</view>
  119. </view>
  120. </view>
  121. <!-- 退款关闭 -->
  122. <view class="order-details-info-box mt20" v-if="status == 9">
  123. <view class="address-box return-explain-box">
  124. <view>{{$t('common.tkcxsuccess')}}</view>
  125. </view>
  126. </view>
  127. <view class="order-list-box" >
  128. <view class="title">{{$t('common.tkinfo')}}</view>
  129. <view class="item" >
  130. <view class="order-info-box">
  131. <view class="order-info" v-for="item in itemlist.skus">
  132. <view class="order-info-item">
  133. <image :src="item.image" class="product-img"></image>
  134. <view class="info-box">
  135. <text class="product-name">{{item.productName}}</text>
  136. <view class="product-sku mt20">{{item.value}}</view>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="delivery-way-box">
  141. <view class="item" v-if="deliveryfalse">
  142. <!-- <text class="way">退款原因多拍/错拍/不想要</text> -->
  143. </view>
  144. <view class="item">
  145. <text class="way">{{$t('common.tkamount')}}{{itemlist.price}}</text>
  146. </view>
  147. <view class="item">
  148. <text class="way">{{$t('common.tkno')}}{{itemlist.afterFormid}}</text>
  149. </view>
  150. <view class="item">
  151. <text class="way">{{$t('common.tkapplytime')}}{{itemlist.createTime}}</text>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="order-list-box negotiate">
  158. <view class="title">{{$t('common.tkxshistory')}}</view>
  159. <view class="orderLineBox">
  160. <u-time-line>
  161. <u-time-line-item v-if="itemlist.afterHistory.length>0" v-for="item in itemlist.afterHistory">
  162. <!-- 此处没有自定义左边的内容会默认显示一个点 -->
  163. <template v-slot:content>
  164. <view>
  165. <view class="u-order-desc">{{item.title}}</view>
  166. <view class="u-order-time">{{item.time}}</view>
  167. </view>
  168. </template>
  169. </u-time-line-item>
  170. </u-time-line>
  171. </view>
  172. </view>
  173. </view>
  174. <u-popup v-model="intervention" mode="center" border-radius="14" close-icon-pos="top-right"
  175. close-icon-size="20">
  176. <view class="interventionBox">
  177. <view class="intTit">{{$t('common.platforminterventionwait')}}</view>
  178. <!-- <textarea class="textarea-text" v-model="reason" placeholder-style="color:#BBBBBB" placeholder="请输入介入原因"/>-->
  179. <!-- <view class="btnBox">-->
  180. <!-- <button @click="interventionFn" class="primary">确定</button>-->
  181. <!-- <button @click="closeInterventionFn">取消</button>-->
  182. <!-- </view>-->
  183. </view>
  184. </u-popup>
  185. </view>
  186. </view>
  187. </template>
  188. <script>
  189. const NET = require('../../utils/request')
  190. const API = require('../../config/api')
  191. export default {
  192. data() {
  193. return {
  194. item:{},
  195. itemlist:{},
  196. status:0,
  197. deliveryfalse:false,
  198. ReturnDetailData:[],
  199. images: '',
  200. intervention: false,
  201. interventionText: '',
  202. afterId: '',
  203. orderId: '',
  204. ifShow: false
  205. }
  206. },
  207. onLoad(options){
  208. this.item = JSON.parse(options.item)
  209. this.getReturnDetail()
  210. },
  211. methods: {
  212. getReturnDetail(){
  213. NET.request(API.ReturnDetail,{
  214. afterId:this.item.afterId,
  215. orderId:this.item.orderId
  216. },'GET').then(res => {
  217. this.status = res.data.afterState
  218. this.itemlist = res.data
  219. this.ifShow = true
  220. }).catch(res => {
  221. })
  222. },
  223. cancelRefundTap(){
  224. // uni.showLoading({
  225. // title:'正在撤销退货...'
  226. // })
  227. NET.request(API.CancelReturnGoods, {
  228. afterId:this.item.afterId,
  229. orderId:this.item.orderId
  230. }, 'POST').then(res => {
  231. // uni.hideLoading()
  232. uni.showToast({
  233. title:this.$t('common.undosuccess'),
  234. })
  235. uni.switchTab({
  236. url:'../../pages/tabbar/user/index'
  237. })
  238. }).catch(res => {
  239. // uni.hideLoading()
  240. })
  241. },
  242. // 平台介入
  243. platform (afterId, orderId) {
  244. uni.navigateTo({
  245. url:`../../pages_category_page1/orderModule/Intervene?afterId=${afterId}&orderId=${orderId}`
  246. })
  247. },
  248. closeInterventionFn() {
  249. this.intervention = false
  250. }
  251. }
  252. }
  253. </script>
  254. <style>
  255. page {
  256. background: #f8f8f8;
  257. }
  258. .order-details-status {
  259. width: 100%;
  260. height: 302upx;
  261. background: url("http://36.138.125.206:8081/ceres-local-file/static/images/refundBg.png") no-repeat left top;
  262. background-size: contain;
  263. }
  264. .status-title-box {
  265. display: flex;
  266. flex-direction: row;
  267. align-items: center;
  268. justify-content: space-between;
  269. padding: 40upx 30upx 0;
  270. box-sizing: border-box;
  271. }
  272. .reason {
  273. padding-left: 32rpx;
  274. color: #FFFFFF;
  275. }
  276. .status-title-box2 {
  277. display: flex;
  278. flex-direction: column;
  279. align-items: center;
  280. padding: 40upx 30upx 0;
  281. box-sizing: border-box;
  282. }
  283. .status-title-box .l {
  284. display: flex;
  285. flex-direction: column;
  286. }
  287. .status-title-box .l .status, .status-title-box2 .status {
  288. font-size: 30upx;
  289. color: #fff;
  290. }
  291. .status-title-box .l .label, .status-title-box2 .label {
  292. font-size: 24upx;
  293. color: #fff;
  294. margin-top: 14upx;
  295. }
  296. .status-title-box .r {
  297. width: 80upx;
  298. height: 80upx;
  299. }
  300. .order-details-info-box {
  301. padding: 0 30upx;
  302. box-sizing: border-box;
  303. background: #fff;
  304. }
  305. .order-details-info-box.mt20 {
  306. margin-top: 20upx;
  307. }
  308. .order-details-price {
  309. display: flex;
  310. flex-direction: row;
  311. align-items: center;
  312. justify-content: space-between;
  313. height: 100upx;
  314. border-bottom: 1px solid #e5e5e5;
  315. font-size: 30upx;
  316. color: #333;
  317. }
  318. .order-details-price .price-box {
  319. font-size: 36upx;
  320. color: #C83732;
  321. }
  322. .order-details-price .fuhao {
  323. font-size: 24upx;
  324. }
  325. .address-box {
  326. background: #fff;
  327. padding: 30upx 0;
  328. box-sizing: border-box;
  329. display: flex;
  330. flex-direction: column;
  331. font-size: 28upx;
  332. color: #333;
  333. border-bottom: 1px solid #e5e5e5;
  334. }
  335. .address-info {
  336. display: flex;
  337. flex-direction: row;
  338. align-items: center;
  339. margin-top: 20upx;
  340. }
  341. .address-box .address-img {
  342. width: 45upx;
  343. height: 45upx;
  344. margin-right: 40upx;
  345. }
  346. .address-box .address-info-r {
  347. flex: 1;
  348. display: flex;
  349. flex-direction: column;
  350. font-size: 28upx;
  351. color: #999;
  352. }
  353. .ml30 {
  354. margin-left: 30upx;
  355. }
  356. .address-box .address-info-r .item {
  357. display: flex;
  358. flex-direction: row;
  359. }
  360. .address-box .address-info-r .title {
  361. display: inline-block;
  362. width: 100upx;
  363. text-align: justify;
  364. text-justify: distribute-all-lines;
  365. text-align-last: justify;
  366. }
  367. .address-box .address-info-r .item .r {
  368. flex: 1;
  369. line-height: 40upx;
  370. }
  371. .return-explain-box {
  372. border-bottom: none;
  373. }
  374. .return-explain-box .address-info-r .item {
  375. display: flex;
  376. flex-direction: row;
  377. align-items: center;
  378. line-height: 40upx;
  379. }
  380. .address-info-r .item .circle {
  381. width: 8upx;
  382. height: 8upx;
  383. border-radius: 50%;
  384. background: #bbb;
  385. margin-right: 10upx;
  386. }
  387. .return-explain-btn {
  388. display: flex;
  389. flex-direction: row;
  390. align-items: center;
  391. justify-content: flex-end;
  392. margin-top: 20upx;
  393. }
  394. .negotiate {
  395. padding-bottom: 20rpx;
  396. background: #FFFFFF;
  397. }
  398. .return-explain-btn .btn {
  399. width: 130upx;
  400. height: 56upx;
  401. background: #fff;
  402. border: 1px solid #bbb;
  403. border-radius: 4upx;
  404. text-align: center;
  405. line-height: 56upx;
  406. margin-left: 20upx;
  407. color: #333;
  408. font-size: 26upx;
  409. }
  410. .return-explain-btn .btn.on {
  411. color: #ff7911;
  412. border: 1px solid #ff7911;
  413. }
  414. .order-list-box {
  415. margin-top: 20upx;
  416. }
  417. .orderLineBox {
  418. padding: 0 30rpx;
  419. background: #FFFFFF;
  420. }
  421. .order-list-box .title{
  422. padding: 30upx;
  423. box-sizing: border-box;
  424. font-size: 30upx;
  425. color:#333;
  426. background: #fff;
  427. }
  428. .order-list-box .item {
  429. margin-bottom: 20upx;
  430. background: #fff;
  431. border-radius: 10upx;
  432. }
  433. .order-info-box {
  434. padding: 0 30upx;
  435. box-sizing: border-box;
  436. }
  437. .order-info {
  438. border-bottom: 1px solid #eee;
  439. }
  440. .order-info-item {
  441. display: flex;
  442. flex-direction: row;
  443. padding: 20upx 0;
  444. }
  445. .product-img {
  446. width: 180upx;
  447. height: 180upx;
  448. border-radius: 10upx;
  449. margin-right: 30upx;
  450. }
  451. .info-box {
  452. flex: 1;
  453. display: flex;
  454. flex-direction: column;
  455. /* justify-content: space-between; */
  456. }
  457. .product-name {
  458. font-size: 26upx;
  459. color: #333;
  460. height: 68upx;
  461. line-height: 34upx;
  462. display: -webkit-box;
  463. overflow: hidden;
  464. text-overflow: ellipsis;
  465. word-break: break-all;
  466. -webkit-box-orient: vertical;
  467. -webkit-line-clamp: 2;
  468. }
  469. .price-sku-box {
  470. display: flex;
  471. flex-direction: row;
  472. justify-content: space-between;
  473. }
  474. .product-sku {
  475. font-size: 24upx;
  476. color: #999;
  477. }
  478. .product-price {
  479. font-size: 28upx;
  480. color: #333;
  481. font-weight: 400;
  482. }
  483. .product-price .fuhao {
  484. font-size: 28upx;
  485. }
  486. .product-num {
  487. font-size: 28upx;
  488. color: #999;
  489. }
  490. .delivery-way-box{
  491. display: flex;
  492. flex-direction: column;
  493. margin: 30upx 0 10upx;
  494. }
  495. .delivery-way-box .item {
  496. display: flex;
  497. flex-direction: row;
  498. align-items: center;
  499. font-size: 26upx;
  500. color: #333;
  501. }
  502. .delivery-way-box .item .way {
  503. color: #999;
  504. }
  505. .interventionBox .btnBox {
  506. display: flex;
  507. }
  508. .interventionBox .btnBox button {
  509. width: 50%;
  510. border-radius: 0;
  511. }
  512. .interventionBox .btnBox .primary {
  513. color: #F5DEB2;
  514. background: #333333;
  515. }
  516. .interventionBox .btnBox /deep/ uni-button:after {
  517. border-radius: 0;
  518. }
  519. .interventionBox .intTit{
  520. height: 100upx;
  521. line-height: 100upx;
  522. text-align: center;
  523. border-bottom: 1upx solid #EEE;
  524. font-size: 32upx;
  525. }
  526. .interventionBox .btnBox .u-btn {
  527. width: 50%;
  528. margin: 0;
  529. border-radius: 0 !important;
  530. }
  531. .interventionBox .btnBox .u-btn:after {
  532. border-radius: 0;
  533. border-color: #CCCCCC;
  534. }
  535. .interventionBox .btnBox .u-btn--primary {
  536. background: #FF7700;
  537. }
  538. .interventionBox .textarea-text {
  539. padding: 20upx;
  540. font-size: 20upx;
  541. height: 200rpx;
  542. }
  543. .interventionBox /deep/ .uni-textarea-textarea {
  544. width: 100%;
  545. }
  546. .interventionBox /deep/ .uni-textarea {
  547. width: 100%;
  548. }
  549. .u-node {
  550. width: 44rpx;
  551. height: 44rpx;
  552. border-radius: 100rpx;
  553. display: flex;
  554. justify-content: center;
  555. align-items: center;
  556. background: #d0d0d0;
  557. }
  558. .u-order-title {
  559. color: #333333;
  560. font-weight: bold;
  561. font-size: 32rpx;
  562. }
  563. .u-order-desc {
  564. color: rgb(150, 150, 150);
  565. font-size: 28rpx;
  566. margin-bottom: 6rpx;
  567. }
  568. .u-order-time {
  569. color: rgb(200, 200, 200);
  570. font-size: 26rpx;
  571. }
  572. </style>