quanwei
2 days ago 04102f7237efefa744090ed7c25f7b5d0807b679
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
<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>