yuanhao
2025-05-19 cc610ef597a4b600b4c48c80026f3a99be171f3b
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
<template>
    <view>
        <view class="page-box">
            <view class="padding">
                <view class="font">
                    建议
                </view>
                <view class="margin-top">
                    <u-textarea :cursorSpacing="70" v-model="complaintReason" placeholder="请输入..."></u-textarea>
                </view>
            </view>
            <view class="down">
                <view class="enter" @click="entery()">提交</view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import { getDicts } from '@/api/data.js'
    import { orderComplaint, confirmOrderId } from '@/api/qiye.js'
    import {  complaintAdd } from '@/api/index'
    export default {
        data() {
            return {
                list: [],
                complaintReason: '',
                complaintType: ''
            }
        },
        onLoad() {
            getDicts('complaint_type').then(val => {
                this.list = val.data.data
            })
        },
        methods: {
            entery() {
                if(this.complaintReason==''){
                    uni.showToast({
                        title: '请输入投诉内容',
                        icon: 'none'
                    })
                    return
                }
                const userInfo = uni.getStorageSync('qiyedata')
                const companyId = uni.getStorageSync('companyId')
                let data = {
                    complaintType: -1,
                    complaintReason:this.complaintReason,
                    companyName: userInfo.companyName,
                    companyPhone: userInfo.companyPhone,
                    companyUser: userInfo.companyUser,
                    companyId: companyId
                }
                complaintAdd(data).then(val => {
                    if(val.data.code == 200) {
                        uni.showToast({
                            title: '提交成功',
                            icon: 'none'
                        })
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 500)
                    }
                })
            },
        }
    }
</script>
 
<style lang="scss" scoped>
    ::v-deep .u-radio-group {
        margin-top: 20rpx;
        flex-wrap: wrap;
        .u-radio {
            margin-right: 20rpx;
            margin-bottom: 20rpx;
        }
    }
    
.page-box {
        padding: 24rpx 0;
        .font{
            color: #4a4e60;
            font-size: 32rpx;
            margin-top: 20rpx;
        }
        .title1 {
            font-size: 36rpx;
            font-weight: 700;
            padding: 0 32rpx;
            border-bottom: 2rpx solid #F4F4F4;
            padding-bottom: 24rpx;
        }
 
        .padding {
            padding: 0 24rpx;
        }
 
        .margin-top {
            margin-top: 20rpx;
        }
 
        .down {
            padding: 34rpx 30rpx 30rpx;
            display: flex;
            justify-content: space-between;
 
            >view {
                display: inline-block;
            }
 
            .button {
                padding: 20rpx 40rpx;
                background: #F7F7F7;
                border-radius: 20rpx;
            }
 
            .enter {
                width: 100%;
                background: #1171E0;
                color: white;
                border-radius: 20rpx;
                padding: 20rpx 40rpx;
                text-align: center;
            }
        }
    }
    ::v-deep .u-textarea {
        background-color: #F4F4F4;
    }
</style>