refundDetails.vue 15.4 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
<!-- 退货详情 -->
<template>
  <view>
    <global-loading />
    <view v-if="ifShow">
      <view>
        <view class="order-details-status">
          <view class="status-title-box" v-if='status == 1'>
            <view class="l">
              <text class="status">审核中</text>
              <!-- <text class="label" v-if="deliveryfalse">还剩1天22时30分</text> -->
            </view>

          </view>
          <!--  审核通过-->
          <view class="status-title-box" v-if="status == 10">
            <view class="l">
              <text class="status">审核通过</text>
              <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
            </view>
      
          </view>
          <!--  审核不通过-->
          <view class="status-title-box" v-if="status == 6">
            <view class="l">
              <text class="status">审核不通过</text>
              <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
            </view>
    
          </view>
          <view class="reason" v-if="status == 6">原因: {{ itemlist.reason }}</view>
          <!--  退款中-->
          <view class="status-title-box" v-if="status == 2">
            <view class="l">
              <text class="status">退款中</text>
              <!-- <text class="label">2020年4月24日 22:00:00</text> -->
            </view>
        
          </view>
          <!--  退款中-->
          <view class="status-title-box" v-if="status == 7">
            <view class="l">
              <text class="status">评审中</text>
            </view>
         
          </view>
          <!--  退货完成待退款-->
          <view class="status-title-box" v-if="status == 4">
            <view class="l">
              <text class="status">退款成功</text>
              <!-- <text class="label">2020年4月24日 22:00:00</text> -->
            </view>
          
          </view>
          <!--  退货完成拒绝退款-->
          <view class="status-title-box" v-if="status == 5">
            <view class="l">
              <text class="status">退款失败</text>
              <!-- <text class="label">2020年4月24日 22:00:00</text> -->
            </view>
           
          </view>
          <!--  平台介入拒绝-->
          <view class="status-title-box" v-if="status == 9 && isPlaformState === 1">
            <view class="l">
              <text class="status">审核失败</text>
            </view>
          </view>
          <!--  退款成功-->
          <view class="status-title-box" v-if="status == 9">
            <view class="l">
              <text class="status">撤销申请</text>
              <!-- <text class="label" v-if="deliveryfalse">2020年4月24日 22:00:00</text> -->
            </view>
       
          </view>

        </view>

        <!-- 发起退款 -->
        <view class="order-details-info-box mt20" v-if='status == 0'>
          <view class="order-details-price" v-if='status != 0'>
            <text>退款总金额</text>
            <text class="price-box"><text class="fuhao">¥</text>{{itemlist.price}}</text>
          </view>
          <view class="address-box return-explain-box">
            <view>您已成功发起退款申请,请耐心等待商家处理。</view>
            <view class="address-info-r mt20 mar-top-20">
              <view class="item fs24">
                <text class="circle"></text>
                <text class="">卖家同意或超时未处理,系统将退款给您</text>
              </view>
              <view class="item fs24">
                <text class="circle"></text>
                <text class="">如果卖家拒绝,您可以修改退款申请后再次发起,卖家会重新处理</text>
              </view>
            </view>
            <view class="return-explain-btn">
              <text class="btn" @click="cancelRefundTap">撤销申请</text>
              <text class="btn" @click="platform(itemlist.afterId, itemlist.orderId)" v-if="status==6 || status==8">平台介入</text>
            </view>
          </view>
        </view>
        <view class="order-details-info-box mt20" v-if="status==6 || status==8">
          <view class="return-explain-btn">
            <text class="btn" @click="cancelRefundTap">撤销申请</text>
            <text class="btn" @click="platform(itemlist.afterId, itemlist.orderId)">平台介入</text>
          </view>
        </view>
        <!-- 退款成功 -->
        <view class="order-details-info-box mt20" v-if="status == 4">
          <view class="order-details-price return-explain-box">
            <text>已原路退回金额</text>
            <text class="price-box"><text class="fuhao">¥</text>{{itemlist.price}}</text>
          </view>
        </view>
        <!-- 平台介入关闭 -->
        <view class="order-details-info-box mt20" v-if="status == 9 && isPlaformState === 1">
          <view class="address-box return-explain-box">
            <view>平台介入申请失败</view>
          </view>
        </view>
        <!-- 退款关闭 -->
        <view class="order-details-info-box mt20" v-if="status == 9">
          <view class="address-box return-explain-box">
            <view>因您撤销退款申请,退款已关闭</view>
          </view>
        </view>

        <view class="order-list-box" >
          <view class="title">退款信息</view>
          <view class="item" >
            <view class="order-info-box">
              <view class="order-info" v-for="item in itemlist.skus">
                <view class="order-info-item">
                  <image :src="$baseURL+item.image" class="product-img"></image>
                  <view class="info-box">
                    <text class="product-name">{{item.productName}}</text>
                    <view class="product-sku mt20">{{item.value}}</view>
                  </view>
                </view>
              </view>
              <view class="delivery-way-box">
                <view class="item" v-if="deliveryfalse">
                  <!-- <text class="way">退款原因:多拍/错拍/不想要</text> -->
                </view>
                <view class="item">
                  <text class="way">退款金额:¥{{itemlist.price}}</text>
                </view>
                <view class="item">
                  <text class="way">退款编号:{{itemlist.afterFormid}}</text>
                </view>
                <view class="item">
                  <text class="way">申请时间:{{itemlist.createTime}}</text>
                </view>
              </view>
            </view>
          </view>
        </view>
        <view class="order-list-box negotiate">
          <view class="title">协商历史</view>
          <view class="orderLineBox">
            <u-time-line>
              <u-time-line-item v-if="itemlist.afterHistory.length>0" v-for="item in itemlist.afterHistory">
                <!-- 此处没有自定义左边的内容,会默认显示一个点 -->
                <template v-slot:content>
                  <view>
                    <view class="u-order-desc">{{item.title}}</view>
                    <view class="u-order-time">{{item.time}}</view>
                  </view>
                </template>
              </u-time-line-item>
            </u-time-line>
          </view>
        </view>
      </view>
      <u-popup v-model="intervention" mode="center" border-radius="14" close-icon-pos="top-right"
               close-icon-size="20">
        <view class="interventionBox">
          <view class="intTit">你已申请平台介入正在审核中...</view>
          <!--        <textarea class="textarea-text" v-model="reason" placeholder-style="color:#BBBBBB" placeholder="请输入介入原因"/>-->
          <!--        <view class="btnBox">-->
          <!--          <button @click="interventionFn" class="primary">确定</button>-->
          <!--          <button @click="closeInterventionFn">取消</button>-->
          <!--        </view>-->
        </view>
      </u-popup>
    </view>
  </view>
</template>

<script>
	const NET = require('../../utils/request')
	const API = require('../../config/api')
	export default {
		data() {
			return {
				item:{},
				itemlist:{},
				status:0,
				deliveryfalse:false,
				ReturnDetailData:[],
        images: '',
        intervention: false,
        interventionText: '',
        afterId: '',
        orderId: '',
        ifShow: false
			}
		},
		onLoad(options){
			this.item = JSON.parse(options.item)
			this.getReturnDetail()
		},
		methods: {
			getReturnDetail(){
				NET.request(API.ReturnDetail,{
					afterId:this.item.afterId,
					orderId:this.item.orderId
				},'GET').then(res => {
					this.status = res.data.afterState
					this.itemlist = res.data
          this.ifShow = true
				}).catch(res => {

				})
			},
      cancelRefundTap(){
        // uni.showLoading({
        //   title:'正在撤销退货...'
        // })
        NET.request(API.CancelReturnGoods, {
          afterId:this.item.afterId,
          orderId:this.item.orderId
        }, 'POST').then(res => {
          // uni.hideLoading()
          uni.showToast({
            title:'撤销成功',
          })
          uni.switchTab({
            url:'../../pages/tabbar/user/index'
          })
        }).catch(res => {
          // uni.hideLoading()
        })
      },
      // 平台介入
      platform (afterId, orderId) {
        uni.navigateTo({
          url:`../../pages_category_page1/orderModule/Intervene?afterId=${afterId}&orderId=${orderId}`
        })
      },
      closeInterventionFn() {
        this.intervention = false
      }
		}
	}
</script>

<style>
page {
  background: #f8f8f8;
}

.order-details-status {
  width: 100%;
  height: 302upx;
  background: url("https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/refundBg.png") no-repeat left top;
  background-size: contain;
}

.status-title-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 40upx 30upx 0;
  box-sizing: border-box;
}
.reason {
  padding-left: 32rpx;
  color: #FFFFFF;
}
.status-title-box2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40upx 30upx 0;
  box-sizing: border-box;
}

.status-title-box .l {
  display: flex;
  flex-direction: column;
}

.status-title-box .l .status, .status-title-box2 .status {
  font-size: 30upx;
  color: #fff;
}

.status-title-box .l .label, .status-title-box2 .label {
  font-size: 24upx;
  color: #fff;
  margin-top: 14upx;
}

.status-title-box .r {
  width: 80upx;
  height: 80upx;
}

.order-details-info-box {
  padding: 0 30upx;
  box-sizing: border-box;
  background: #fff;
}

.order-details-info-box.mt20 {
  margin-top: 20upx;
}

.order-details-price {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 100upx;
  border-bottom: 1px solid #e5e5e5;
  font-size: 30upx;
  color: #333;
}

.order-details-price .price-box {
  font-size: 36upx;
  color: #C83732;
}

.order-details-price .fuhao {
  font-size: 24upx;
}

.address-box {
  background: #fff;
  padding: 30upx 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 28upx;
  color: #333;
  border-bottom: 1px solid #e5e5e5;
}

.address-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 20upx;
}

.address-box .address-img {
  width: 45upx;
  height: 45upx;
  margin-right: 40upx;
}

.address-box .address-info-r {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 28upx;
  color: #999;
}

.ml30 {
  margin-left: 30upx;
}

.address-box .address-info-r .item {
  display: flex;
  flex-direction: row;
}

.address-box .address-info-r .title {
  display: inline-block;
  width: 100upx;
  text-align: justify;
  text-justify: distribute-all-lines;
  text-align-last: justify;
}

.address-box .address-info-r .item .r {
  flex: 1;
  line-height: 40upx;
}

.return-explain-box {
  border-bottom: none;
}

.return-explain-box .address-info-r .item {
  display: flex;
  flex-direction: row;
  align-items: center;
  line-height: 40upx;
}

.address-info-r .item .circle {
  width: 8upx;
  height: 8upx;
  border-radius: 50%;
  background: #bbb;
  margin-right: 10upx;
}

.return-explain-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20upx;
}

.negotiate {
  padding-bottom: 20rpx;
  background: #FFFFFF;
}

.return-explain-btn .btn {
  width: 130upx;
  height: 56upx;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4upx;
  text-align: center;
  line-height: 56upx;
  margin-left: 20upx;
  color: #333;
  font-size: 26upx;
}

.return-explain-btn .btn.on {
  color: #ff7911;
  border: 1px solid #ff7911;
}


.order-list-box {
  margin-top: 20upx;
}
.orderLineBox {
  padding: 0 30rpx;
  background: #FFFFFF;
}
.order-list-box .title{
  padding: 30upx;
  box-sizing: border-box;
  font-size: 30upx;
  color:#333;
  background: #fff;
}
.order-list-box .item {
  margin-bottom: 20upx;
  background: #fff;
  border-radius: 10upx;
}

.order-info-box {
  padding: 0 30upx;
  box-sizing: border-box;
}

.order-info {
  border-bottom: 1px solid #eee;
}

.order-info-item {
  display: flex;
  flex-direction: row;
  padding: 20upx 0;
}

.product-img {
  width: 180upx;
  height: 180upx;
  border-radius: 10upx;
  margin-right: 30upx;
}

.info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
}

.product-name {
  font-size: 26upx;
  color: #333;
  height: 68upx;
  line-height: 34upx;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price-sku-box {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.product-sku {
  font-size: 24upx;
  color: #999;
}

.product-price {
  font-size: 28upx;
  color: #333;
  font-weight: 400;
}

.product-price .fuhao {
  font-size: 28upx;
}

.product-num {
  font-size: 28upx;
  color: #999;
}
.delivery-way-box{
  display: flex;
  flex-direction: column;
  margin: 30upx 0 10upx;
}
.delivery-way-box .item {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 26upx;
  color: #333;
}
.delivery-way-box .item .way {
  color: #999;
}
.interventionBox .btnBox {
  display: flex;
}
.interventionBox .btnBox button {
  width: 50%;
  border-radius: 0;
}
.interventionBox .btnBox .primary {
  color: #F5DEB2;
  background: #333333;
}
.interventionBox .btnBox /deep/ uni-button:after {
  border-radius: 0;
}
.interventionBox .intTit{
  height: 100upx;
  line-height: 100upx;
  text-align: center;
  border-bottom: 1upx solid #EEE;
  font-size: 32upx;
}
.interventionBox .btnBox .u-btn {
  width: 50%;
  margin: 0;
  border-radius: 0 !important;
}
.interventionBox .btnBox .u-btn:after {
  border-radius: 0;
  border-color: #CCCCCC;
}
.interventionBox .btnBox .u-btn--primary {
  background: #FF7700;
}
.interventionBox .textarea-text {
  padding: 20upx;
  font-size: 20upx;
  height: 200rpx;
}
.interventionBox /deep/ .uni-textarea-textarea {
  width: 100%;
}
.interventionBox /deep/ .uni-textarea {
  width: 100%;
}
.u-node {
  width: 44rpx;
  height: 44rpx;
  border-radius: 100rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #d0d0d0;
}

.u-order-title {
  color: #333333;
  font-weight: bold;
  font-size: 32rpx;
}

.u-order-desc {
  color: rgb(150, 150, 150);
  font-size: 28rpx;
  margin-bottom: 6rpx;
}

.u-order-time {
  color: rgb(200, 200, 200);
  font-size: 26rpx;
}
</style>