<template>
|
<view style="flex: 1;">
|
<uniPopup :show="isEva" type="middle" @hidePopup="hidePopupFunc">
|
<view class="ww100">
|
<view class="t-c f36 pb20">评语</view>
|
<view class="p-30-0 border-b-d9 border-t-d9 f32">
|
<view>{{orderData.project_name}}</view>
|
</view>
|
|
<view class="d-s-c p-30-0 border-b-d9 border-t-d9 f32">
|
<view class="eval">
|
服务星级:
|
<i v-for="(itemEv,indexEv) in service" :key="indexEv" :class="itemEv?'icon iconfont icon-start':'icon iconfont icon-start1'"
|
@click="chooseServ(indexEv,index)"></i>
|
</view>
|
</view>
|
<view class="d-s-c p-30-0 border-b-d9 border-t-d9 f32">
|
<radio-group class="d-s-c" @change="changeRadio($event,index)">
|
<label class="d-s-c make-item mr10">
|
<view><radio style="transform:scale(0.7)" color="#EE1413" :checked="score == 10" value="10" /></view>
|
<view class="f26 color-57">好评</view>
|
</label>
|
<label class="d-s-c make-item mr10">
|
<view><radio style="transform:scale(0.7)" color="#EE1413" :checked="score == 20" value="20" /></view>
|
<view class="f26 color-57">中评</view>
|
</label>
|
<label class="d-s-c make-item mr10">
|
<view><radio style="transform:scale(0.7)" color="#EE1413" :checked="score == 30" value="30" /></view>
|
<view class="f26 color-57">差评</view>
|
</label>
|
</radio-group>
|
</view>
|
<view class="d-s-c p-30-0 border-b-d9 border-t-d9 f32">
|
<textarea class="border-box" placeholder="请输入你的评语" v-model="evaluate_content"></textarea>
|
</view>
|
<button class="revise_btn" @click="revise">确定完成</button>
|
</view>
|
</uniPopup>
|
<shopTabBar></shopTabBar>
|
</view>
|
</template>
|
|
<script>
|
import uniPopup from '@/components/uni-popup.vue';
|
export default {
|
data() {
|
return {
|
score:10,
|
server_score:0,
|
service:[false,false,false,false,false],
|
evaluate_content:'',
|
};
|
},
|
components: {
|
uniPopup
|
},
|
props: ['isEva', 'orderData'],
|
watch:{
|
isEva(val){
|
}
|
},
|
methods: {
|
/* 服务评分 */
|
chooseServ(n,m){
|
let self=this;
|
self.server_score =0;
|
this.service.forEach((item,index)=>{
|
if(index<=n){
|
this.service.splice(index,1,true);
|
self.server_score++;
|
}else{
|
this.service.splice(index,1,false);
|
}
|
})
|
},
|
/* 单选框 */
|
changeRadio(e, index) {
|
this.score = e.detail.value;
|
},
|
revise(){
|
let self = this;
|
uni.showModal({
|
title: '提示',
|
content: '此操作不可恢复,您确定已完成了吗?',
|
success: function(o) {
|
if (o.confirm) {
|
uni.showLoading({
|
title: '加载中',
|
mask: true
|
});
|
uni.showLoading({
|
title: '正在提交',
|
mask: true
|
})
|
self._post('plus.release.Order/finish', {
|
id: self.orderData.id,
|
server_score:self.server_score,
|
score:self.score,
|
evaluate_content:self.evaluate_content,
|
}, function(data) {
|
uni.hideLoading();
|
uni.showToast({
|
title: '操作成功',
|
duration: 2000,
|
icon: 'success'
|
});
|
setTimeout(function(){
|
self.hidePopupFunc();
|
},2000);
|
});
|
}
|
},
|
});
|
},
|
hidePopupFunc(){
|
this.$emit('close', {
|
type: 'success',
|
})
|
},
|
}
|
};
|
</script>
|
|
<style scoped lang="scss">
|
.buy-checkout.vender .item .key {
|
width: 200rpx;
|
}
|
|
.pr20 {
|
padding-right: 20rpx;
|
/* padding-bottom: 40rpx; */
|
}
|
.icon-box.linkmen_add{
|
background-color: $dominant-color;
|
width: 38rpx;
|
height: 38rpx;
|
border-radius: 8rpx;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
.icon-box.linkmen_add .icon-jia{
|
color: #FFFFFF;
|
font-size: 22rpx;
|
}
|
.revise_btn{
|
background-color: #E2231A;
|
border: none;
|
margin-top: 30rpx;
|
color: #FFFFFF;
|
}
|
.t-c{
|
text-align: center;
|
}
|
.m-30-0{
|
margin: 30rpx 0;
|
}
|
.icon.icon-jiantou{
|
color: #999999;
|
font-size: 26rpx;
|
}
|
.icon.icon-zhanghumingcheng, .icon.icon-dizhi, .icon.icon-icon_xianshi-xian, .icon.icon-bangzhu {
|
color: #333;
|
font-size: 28rpx;
|
}
|
.address-defalut-wrap {
|
padding: 0;
|
}
|
|
.icon-start{
|
color: #f5a623;
|
}
|
|
.eval{
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
}
|
</style>
|