文件
Henglianshutong/uniapp/pages/order/aftersale/log.vue

148 行
3.8 KiB
Vue

<!-- 售后进度 -->
<template>
<s-layout title="售后进度">
<view class="log-box">
<view v-for="(item, index) in state.info" :key="item.title">
<log-item :item="item" :index="index" :data="state.info"></log-item>
</view>
</view>
<!-- 底部按钮 -->
<su-fixed bottom placeholder>
<view class="foot-wrap">
<view class="foot-box ss-flex ss-col-center ss-row-between ss-p-x-30">
<button class="ss-reset-button ui-BG-Main-Gradient sub-btn" @tap="state.showModel = true">协商回复</button>
</view>
</view>
</su-fixed>
<su-popup :show="state.showModel" round="10" @close="state.showModel = false">
<view class="ss-modal-box">
<view class="modal-header">协商回复</view>
<scroll-view class="modal-content" scroll-y="true" :scroll-with-animation="true" :show-scrollbar="false"
@touchmove.stop>
<view class="textarea">
<uni-easyinput :inputBorder="false" type="textarea" v-model="state.formData.content"
placeholderStyle="color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
placeholder="请填写协商需求,有助于帮您快速处理问题" clearable></uni-easyinput>
<s-uploader v-model:url="state.formData.images" fileMediatype="image" limit="9" mode="grid"
:imageStyles="{ width: '168rpx', height: '168rpx' }"></s-uploader>
</view>
</scroll-view>
<view class="foot-box ss-flex ss-col-center ss-row-between ss-p-x-30">
<button class="ss-reset-button ui-BG-Main-Gradient sub-btn" @tap="onConfirm">提交</button>
</view>
</view>
</su-popup>
</s-layout>
</template>
<script setup>
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { reactive } from 'vue';
import logItem from './log-item.vue';
const state = reactive({
active: 1,
commentImages: [],
showModel: false,
list: [
{
title: '买家下单',
desc: '2018-11-11',
},
{
title: '卖家发货',
desc: '2018-11-12',
},
{
title: '买家签收',
desc: '2018-11-13',
},
{
title: '交易完成',
desc: '2018-11-14',
},
],
formData: {
content: '',
images: [],
},
});
async function getDetail(id) {
const { code, data } = await sheep.$api.order.aftersale.detail(id);
if (code === 1) {
state.info = data.logs;
}
}
async function onConfirm() {
const { code } = await sheep.$api.order.aftersale.addLog({
id: state.aftersaleId,
content: state.formData.content,
images: state.formData.images,
});
if (code === 1) {
sheep.$helper.toast('提交成功');
state.showModel = false;
getDetail(state.aftersaleId);
}
}
onLoad((options) => {
state.aftersaleId = options.id;
getDetail(options.id);
});
</script>
<style lang="scss" scoped>
:deep() {
.uni-easyinput__content-textarea {
font-size: 28rpx !important;
color: #333333 !important;
line-height: normal !important;
margin-top: 4rpx !important;
padding-left: 20rpx !important;
}
}
.log-box {
padding: 24rpx 24rpx 24rpx 40rpx;
background-color: #fff;
}
.foot-box {
height: 100rpx;
background-color: #fff;
.sub-btn {
width: 672rpx;
line-height: 74rpx;
border-radius: 38rpx;
color: rgba(#fff, 0.9);
font-size: 28rpx;
}
}
.ss-modal-box {
border-radius: 30rpx 30rpx 0 0;
.modal-header {
position: relative;
padding: 30rpx 20rpx 40rpx;
font-size: 36rpx;
font-weight: bold;
text-align: center;
}
.modal-content {
padding: 0 30rpx;
margin-bottom: 40rpx;
height: 500rpx;
box-sizing: border-box;
}
}
</style>