|
|
|
@ -22,7 +22,7 @@ |
|
|
|
|
<u-form-item label="反馈类型" label-width="170"> |
|
|
|
|
<u-radio-group v-model="form.type"> |
|
|
|
|
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList1" :key="index" |
|
|
|
|
:name="item.name"> |
|
|
|
|
:name="item.val"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</u-radio> |
|
|
|
|
</u-radio-group> |
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
|
<u-form-item label="反馈类型" label-width="170"> |
|
|
|
|
<u-radio-group v-model="form.shop"> |
|
|
|
|
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index" |
|
|
|
|
:name="item.name"> |
|
|
|
|
:name="item.val"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</u-radio> |
|
|
|
|
</u-radio-group> |
|
|
|
@ -45,15 +45,16 @@ |
|
|
|
|
<u-form-item label="投诉内容" required label-width="150" label-position="top"> |
|
|
|
|
<u-input v-model="form.comment" class="textarea" placeholder="请填写投诉内容" type="textarea" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8" |
|
|
|
|
width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload> |
|
|
|
|
<u-upload :action="action" :header="header" :fileList="finishImageList" :previewFullImage="true" |
|
|
|
|
@afterRead="afterRead" :maxCount="8" upload-text="上传照片" @delete="deletePic" name="1" |
|
|
|
|
multiple></u-upload> |
|
|
|
|
</view> |
|
|
|
|
<view class="section1Item" style="margin-top:20rpx;"> |
|
|
|
|
<u-form-item label="您的称呼" label-width="170"> |
|
|
|
|
<u-input placeholder="请输入您的称呼" v-model="form.name" /> |
|
|
|
|
<u-input placeholder="请输入您的称呼" v-model="form.user_name" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="手机号码" label-width="170"> |
|
|
|
|
<u-input placeholder="请输入手机号" v-model="form.phone" /> |
|
|
|
|
<u-input placeholder="请输入手机号" v-model="form.mobile" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
</view> |
|
|
|
|
</u-form> |
|
|
|
@ -71,7 +72,7 @@ |
|
|
|
|
<view class="feedbackItem"> |
|
|
|
|
<view class="feedbackContent"> |
|
|
|
|
<view class="fbTitle"> |
|
|
|
|
<view class="fbFlag"> |
|
|
|
|
<view class="fbFlag" v-if="item.type != 0"> |
|
|
|
|
<text v-if="item.type == 1">投诉</text> |
|
|
|
|
<text v-if="item.type == 2">建议</text> |
|
|
|
|
<text v-if="item.type == 3">表扬</text> |
|
|
|
@ -103,7 +104,7 @@ |
|
|
|
|
{{ item.replay_at }} |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="反馈内容:" label-width="150" prop="feedback"> |
|
|
|
|
{{ item.content }} |
|
|
|
|
{{ item.reply }} |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</u-collapse-item> |
|
|
|
@ -122,7 +123,7 @@ |
|
|
|
|
{{ item.replay_at }} |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="反馈内容:" label-width="150" prop="feedback"> |
|
|
|
|
{{ item.content }} |
|
|
|
|
{{ item.reply }} |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</u-collapse-item> |
|
|
|
@ -130,8 +131,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="empty" v-if="OrderType == 2"> |
|
|
|
|
<u-empty text="暂无信息" mode="list"></u-empty> |
|
|
|
|
<view class="empty" v-if="OrderType != 0 && total == 0"> |
|
|
|
|
<u-empty text="暂无信息" mode="list"></u-empty> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="empty" v-if="OrderType == 2"> |
|
|
|
|
<image class="emptyImg" :src="$picUrl + '/static/news1/feedbackempty.png'" mode="widthFix"></image> |
|
|
|
@ -143,23 +144,26 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Config from '@/core/config' |
|
|
|
|
import * as feedback from '@/api/feedback' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
action: '', |
|
|
|
|
header: '', |
|
|
|
|
OrderType: 0, |
|
|
|
|
shop_id: '', |
|
|
|
|
total: 1, |
|
|
|
|
form: { |
|
|
|
|
type: '', |
|
|
|
|
shop: '', |
|
|
|
|
shopText: '', |
|
|
|
|
comment: '', |
|
|
|
|
name: '', |
|
|
|
|
user_name: '', |
|
|
|
|
phone: '' |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
feedBackList: [], |
|
|
|
|
page: 1, |
|
|
|
|
feedBackList: [], |
|
|
|
|
checkboxList1: [{ |
|
|
|
|
name: '投诉', |
|
|
|
|
val: 1 |
|
|
|
@ -174,10 +178,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
checkboxList2: [{ |
|
|
|
|
name: '门店' |
|
|
|
|
name: '门店', |
|
|
|
|
val: 1 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '其他' |
|
|
|
|
name: '其他', |
|
|
|
|
val: 2 |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
typeShow: false, |
|
|
|
@ -187,11 +193,25 @@ export default { |
|
|
|
|
result: {} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "") |
|
|
|
|
this.header = { |
|
|
|
|
'Storeid': uni.getStorageSync('Store').storeInfo.store_id, |
|
|
|
|
'Access-Token': uni.getStorageSync('AccessToken'), |
|
|
|
|
'platform': "MP-WEIXIN", |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.getShopList() |
|
|
|
|
}, |
|
|
|
|
onLoad(params) { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onReachBottom() { |
|
|
|
|
if (this.feedBackList.length <= this.total) { |
|
|
|
|
this.pageNum++; |
|
|
|
|
this.getFeedBack(this.OrderType) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getShopList() { |
|
|
|
@ -223,7 +243,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (this.form.phone && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.phone))) { |
|
|
|
|
if (this.form.mobile && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.mobile))) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '手机号格式不正确!', |
|
|
|
|
icon: 'none', |
|
|
|
@ -235,7 +255,10 @@ export default { |
|
|
|
|
shop_id: that.shop_id, |
|
|
|
|
type: that.form.type, |
|
|
|
|
object_type: that.form.shop, |
|
|
|
|
content: that.form.comment |
|
|
|
|
content: that.form.comment, |
|
|
|
|
user_name: that.form.user_name, |
|
|
|
|
mobile: that.form.mobile, |
|
|
|
|
image_id: that.image_id |
|
|
|
|
} |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
feedback.add(params) |
|
|
|
@ -253,6 +276,7 @@ export default { |
|
|
|
|
*/ |
|
|
|
|
onOrderTab(type) { |
|
|
|
|
this.OrderType = type; |
|
|
|
|
this.pageNum = 1 |
|
|
|
|
this.feedBackList = [] |
|
|
|
|
if (type != 0) { |
|
|
|
|
this.getFeedBack(type) |
|
|
|
@ -264,14 +288,15 @@ export default { |
|
|
|
|
const that = this |
|
|
|
|
let params = { |
|
|
|
|
is_my: 0, |
|
|
|
|
page: that.page |
|
|
|
|
page: that.pageNum |
|
|
|
|
} |
|
|
|
|
params.is_my = type == 1 ? 0 : 1 |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
feedback.list(params) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
that.feedBackList = res.data.list.data |
|
|
|
|
that.total = res.data.list.total |
|
|
|
|
that.feedBackList =that.feedBackList.concat(res.data.list.data) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(reject) |
|
|
|
@ -583,6 +608,6 @@ page { |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
flex-direction: column; |
|
|
|
|
height: calc(100vh - 102rpx); |
|
|
|
|
height: calc(100vh - 102rpx); |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|