123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <template>
- <view class="content">
- <view class="box">
- <view class="hflex acenter jbetween">
- <view class="box_title" v-if="pageData.refund_status == 2">退款成功</view>
- <view class="box_title" v-if="pageData.refund_status == 3">退款关闭</view>
- <view class="box_title" v-if="pageData.refund_status == 1">申请中,等待商家审核</view>
- <view class="box_title" v-if="pageData.refund_status == 0">撤销退款申请</view>
- <view class="box_title" v-if="pageData.refund_status == 2">¥{{pageData.refund_money}}</view>
- <view class="hflex acenter blue_bg2" v-if="pageData.refund_status == 1">
- <view class="blue_bg">剩余审核时间</view>
- <view class="">
- <u-count-down autoStart :time="time" format="mm:ss" @change="onChange">
- <view class="time">
- <!-- <text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} 小时</text> -->
- <text class="time__item">{{ timeData.minutes>10?timeData.minutes:'0'+timeData.minutes }} 分钟</text>
- <text class="time__item">{{ timeData.seconds>10?timeData.seconds:'0'+timeData.seconds }} 秒</text>
- </view>
- </u-count-down>
- </view>
- </view>
- </view>
- <view class="box_subtitle">{{pageData.refund_time}}</view>
- <view class="hflex acenter jbetween" style="padding-top: 32rpx;" v-if="pageData.refund_status == 2">
- <view class="left">退回银行卡</view>
- <view class="left">¥{{pageData.refund_money}}</view>
- </view>
- </view>
- <view class="box hflex acenter jbetween" @click="toNegotiation">
- <view class="box_title">协商历史</view>
- <u-icon name="arrow-right" size="20" color="000"></u-icon>
- </view>
- <view class="box">
- <view class="title">退款信息</view>
- <view class="hflex acenter jbetween" v-for="(item,index) in pageData.goods_item" :key="index">
- <view class="img_box">
- <image class="img" :src="item.goods_cover" mode="aspectFill"></image>
- </view>
- <view class="vflex img_right">
- <view class="hflex acenter">
- <view class="name text_hide">{{item.goods_name}}</view>
- <view class="name">¥{{item.price_selling}}</view>
- </view>
- <view class="hflex jbetween" style="padding: 20rpx 0 0;">
- <view class="norm">{{item.goods_spec}}</view>
- <view class="left_text">X{{item.stock_sales}}</view>
- </view>
- </view>
- </view>
- <view class="hflex acenter jbetween cell">
- <view class="left">退款原因</view>
- <view class="right">{{pageData.refund_reason}}</view>
- </view>
- <view class="hflex acenter jbetween cell">
- <view class="left">退款备注</view>
- <view class="right">{{pageData.refund_desc ? pageData.refund_desc : '-'}}</view>
- </view>
- <view class="hflex acenter jbetween cell">
- <view class="left">退款金额</view>
- <view class="right">¥{{pageData.refund_money}}</view>
- </view>
- <view class="hflex acenter jbetween cell">
- <view class="left">申请时间</view>
- <view class="right">{{pageData.refund_time}}</view>
- </view>
- <view class="hflex acenter jbetween cell">
- <view class="left">退款编号</view>
- <view class="hflex acenter">
- <view class="right">{{pageData.order_no}}</view>
- <view style="margin: 0 8rpx;">|</view>
- <view class="text_red" @click="copy(pageData.order_no)">复制</view>
- </view>
- </view>
- <view class="vflex cell">
- <view class="left">退款凭证</view>
- <view class="hflex acenter">
- <block v-for="(item,index) in pageData.refund_nr" :key="index">
- <image :src="item" class="img" mode="aspectFill"></image>
- </block>
- </view>
- </view>
- </view>
- <u-popup :show="show" :round="10" mode="center" @close="close">
- <view class="popu">
- <view class="hflex acenter jbetween popu_top">
- <view></view>
- <view class="popu_title">填写快递信息</view>
- <image src="https://ship.shipcc.cn/common/close.png" style="width: 48rpx;height: 48rpx;"></image>
- </view>
- <u-input v-model="company.express_name" border="none" placeholder="请填写快递公司名称"></u-input>
- <u-input v-model="company.express_no" border="none" placeholder="请填写快递单号"></u-input>
- <view class="popu_btn hflex acenter jbetween" @click="save">保存</view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import $api from '@/static/js/api.js'
- var that = ''
- export default {
- data() {
- return {
- id: '',
- pageData: {
- },
- timeData: {},
- time: 0,
- show: false,
- company: {
- express_name: '',
- express_no: ''
- }
- }
- },
- onLoad(options) {
- that = this
- that.id = options.id
- that.getData()
- },
- methods: {
- getData() {
- $api.req({
- url: '/data/api.Order/order_info',
- method: 'POST',
- data: {
- order_id: that.id
- }
- }, function(res) {
- if(res.code == 1) {
- that.pageData = res.data
- for(var i=0;i<that.pageData.goods_item.length;i++) {
- that.pageData.goods_item[i].goods_spec = $api.resetspec(that.pageData.goods_item[0].goods_spec)
- }
- that.pageData.refund_nr = that.pageData.refund_nr.split("|")
- that.computTime()
- }
- })
- },
- // 倒计时
- onChange(e) {
- that.timeData = e
- },
- // 计算倒计时
- computTime() {
- var date = new Date(that.pageData.refund_time).getTime() + ( that.pageData.refund_time_ing * 1000);
- console.log(date);
- var nowDate = new Date().getTime()
- console.log(nowDate);
- that.time = date - nowDate
- console.log(that.time);
- },
- // 复制订单号
- copy(value) {
- uni.setClipboardData({
- data: value,
- success: function () {
- $api.info('复制成功')
- }
- });
- },
- cancel() {
- $api.req({
- url: '/data/api.Order/cancel_refund',
- method: 'POST',
- data: {
- order_id: that.pageData.id
- }
- }, function(res) {
- if(res.code == 1) {
- $api.info(res.info)
- that.getData()
- }
- })
- },
- open() {
- that.show = true
- },
- close() {
- that.show = false
- },
- save() {
- var data = that.company
- $api.req({
- url: '/data/api.Order/refund_return',
- method: 'POST',
- data: data
- }, function(res) {
- if(res.code == 1) {
- $api.info(res.info)
- that.close()
- }
- })
- },
- toNegotiation() {
- $api.jump('/page_shop/pages/order/negotiation?id=' + that.id)
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .content::v-deep {
- background: #F4F4F4;
- padding: 20rpx 30rpx;
- .box {
- margin-top: 20rpx;
- width: 100%;
- background: #FFFFFF;
- border-radius: 24rpx;
- box-sizing: border-box;
- padding: 24rpx 20rpx;
- .box_title {
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- line-height: 44rpx;
- }
- .blue_bg {
- width: 124rpx;
- height: 32rpx;
- background: #506DFF;
- border-radius: 18rpx 0px 18rpx 18rpx;
- font-size: 16rpx;
- text-align: center;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 32rpx;
- }
- .blue_bg2 {
- /* width: 256rpx;
- height: 32rpx; */
- background: #E7EBFF;
- border-radius: 18rpx;
- font-size: 16rpx;
- font-weight: bold;
- color: #222222;
- line-height: 32rpx;
- box-sizing: border-box;
- padding: 10rpx 24rpx 0 0;
- }
- .time {
- padding-left: 16rpx;
- }
- .subTitle {
- font-size: 24rpx;
- font-weight: 400;
- color: #888888;
- line-height: 34rpx;
- }
- .box_subtitle {
- font-size: 22rpx;
- font-weight: 400;
- color: #999999;
- line-height: 26rpx;
- padding: 8rpx 0 0;
- }
- .statue {
- padding: 24rpx 0;
- font-size: 32rpx;
- font-weight: 500;
- line-height: 44rpx;
- color: #FF5050;
- }
- .title {
- font-size: 30rpx;
- font-weight: 500;
- color: #333333;
- line-height: 42rpx;
- padding: 24rpx 0 14rpx;
- }
- .img_box {
- margin-right: 20rpx;
- .img {
- width: 180rpx;
- height: 180rpx;
- border-radius: 16rpx;
- }
- }
- .img_right {
- width: calc(100% - 200rpx);
- }
- .name {
- font-size: 30rpx;
- font-weight: 500;
- color: #222222;
- line-height: 42rpx;
- }
- .norm {
- max-width: 400rpx;
- width: max-content;
- // height: max-content;
- background: #F5F5F5;
- border-radius: 12rpx;
- box-sizing: border-box;
- padding: 12rpx 12rpx 6rpx;
- font-size: 20rpx;
- font-weight: 400;
- color: #888888;
- line-height: 28rpx;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- box-orient: vertical;
- line-clamp: 2;
- -webkit-line-clamp: 2;
-
- }
- .left_text {
- font-size: 24rpx;
- font-weight: 500;
- color: #888888;
- line-height: 28rpx;
- }
- .cell {
- padding: 15rpx 0;
- .left {
- font-size: 26rpx;
- font-weight: 400;
- color: #232323;
- line-height: 36rpx;
- white-space: nowrap;
- }
- .right {
- font-size: 26rpx;
- font-weight: 400;
- color: #888888;
- line-height: 36rpx;
- }
- .text_red {
-
- color: #EE5850;
- }
- .img {
- width: 180rpx;
- height: 180rpx;
- border-radius: 16rpx;
- margin: 0 18rpx 18rpx 0;
- }
- }
- .box_bg {
- background: #F4F4F4;
- border-radius: 20px;
- box-sizing: border-box;
- padding: 22rpx 20rpx 32rpx;
- .bg_text {
- font-size: 24rpx;
- font-weight: 400;
- color: #555555;
- line-height: 34rpx;
- }
- .box_btn1 {
- height: 60rpx;
- background: #FFFFFF;
- border-radius: 30rpx;
- border: 1px solid #9B9B9B;
- padding: 0 36rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #222222;
- line-height: 36rpx;
- }
- .box_btn2 {
- border: 1px solid #9B9B9B;
- color: #999999;
- }
- }
- }
- .popu {
- background: #FFFFFF;
- border-radius: 28px;
- width: 610rpx;
- margin: 0 auto;
- box-sizing: border-box;
- padding: 0 30rpx;
- .popu_top {
- padding: 36rpx 0 52rpx;
- .popu_title {
- font-size: 36rpx;
- font-weight: 500;
- color: #222222;
- line-height: 50rpx;
- }
- }
- .u-input {
- width: 100%;
- height: 84rpx;
- background: #F4F4F4;
- border-radius: 12rpx;
- padding: 0 20rpx !important;
- margin-bottom: 36rpx;
- }
- .popu_btn {
- margin: 24rpx auto 58rpx;
- width: 310rpx;
- height: 80rpx;
- background: #506DFF;
- border-radius: 42rpx;
- font-size: 32rpx;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 44rpx;
- }
- }
- }
- </style>
|