<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>
|