投诉内容文本换行,投诉处理人员新增默认当前账号
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
<view class="items checkout flex items-center" @tap="handleClick">
|
||||
<view class="label">处理人员</view>
|
||||
<view class="value ellipsis">
|
||||
<text>{{ checkoutinfo.userName ? checkoutinfo.userName : '请选择' }}</text>
|
||||
<view class="username">
|
||||
<text>{{ checkoutinfo.userName ? checkoutinfo.userName : '请选择' }}</text>
|
||||
</view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="items">
|
||||
@@ -13,8 +16,8 @@
|
||||
<textarea
|
||||
style="width: 100%; height: 100%; overflow: hidden"
|
||||
v-model="form.handleContent"
|
||||
:maxlength="-1"
|
||||
auto-height
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
placeholder-style="font-size:28rpx;"
|
||||
/>
|
||||
@@ -29,8 +32,9 @@
|
||||
|
||||
<script setup lang="ts" key="handle">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
import { onLoad, onUnload, onShow } from '@dcloudio/uni-app'
|
||||
import { putComplainProcess } from '@/api/complain'
|
||||
import { getSettingInfo } from '../../api/api.js'
|
||||
|
||||
const checkoutinfo = ref({
|
||||
userName: '',
|
||||
@@ -40,10 +44,19 @@ const form = ref({
|
||||
complaintId: '',
|
||||
handleContent: ''
|
||||
})
|
||||
let userIsAccount = true
|
||||
/** 获取用户信息 */
|
||||
function getUserInfo() {
|
||||
getSettingInfo().then(res => {
|
||||
checkoutinfo.value.userName = res.data.nickName
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(options => {
|
||||
if (options && options.handleId && options.handleId.trim()) {
|
||||
form.value.complaintId = options.handleId
|
||||
}
|
||||
getUserInfo()
|
||||
})
|
||||
|
||||
// 选择处理人员
|
||||
@@ -54,6 +67,7 @@ function handleClick() {
|
||||
backData: (data: { userName: string; userId: string }) => {
|
||||
checkoutinfo.value.userName = decodeURIComponent(data.userName)
|
||||
checkoutinfo.value.userId = data.userId
|
||||
userIsAccount = false
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -65,14 +79,22 @@ function handleBlur(e) {
|
||||
|
||||
// 处理投诉 提交
|
||||
function handleSelecthouse() {
|
||||
if (checkoutinfo.value.userId) {
|
||||
if (userIsAccount || checkoutinfo.value.userId) {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '处理投诉中'
|
||||
})
|
||||
putComplainProcess({
|
||||
id: form.value.complaintId,
|
||||
handleContent: form.value.handleContent,
|
||||
handleId: checkoutinfo.value.userId
|
||||
}).then(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
.then(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
@@ -94,6 +116,28 @@ function handleSelecthouse() {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
|
||||
.ellipsis {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.username {
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
margin-right: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border: 1rpx solid #353535;
|
||||
transform: rotate(45deg);
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
.label {
|
||||
width: 128rpx;
|
||||
|
||||
Reference in New Issue
Block a user