Browse Source

客服

fix_bug_pro20231227
马远东 1 year ago
parent
commit
f0ede063c9
  1. 4
      src/views/aftersales/aftersalesWorkOrder.vue
  2. 2
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  3. 261
      src/views/aftersales/customerService.vue

4
src/views/aftersales/aftersalesWorkOrder.vue

@ -1753,11 +1753,12 @@ const tabChenge = val => {
IndexTable(data);
} else if (val == 3) {
console.log('待处理');
ProcessingPartyState.value = true; //
details.query.workOrderStatus = '';
ArbitrationStatus.value = true; //
empty();
ProcessingPartyFun();
ProcessingPartyFun(data);
} else if (val == 4) {
ProcessingPartyState.value = false; //
//
@ -1904,6 +1905,7 @@ const reply = val => {
row:JSON.stringify(val.row),
}
});
return
console.log(val, 'ID++++++++');
console.log(val.row);
dialogcustomerService.value = true; //

2
src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -678,7 +678,7 @@ const ConfirmForm = () => {
type: 'success',
});
Indexform.value = {}; //
$router.push('/aftersales/VueTemp'); //
$router.push('/aftersales/aftersalesWorkOrder'); //
}
});
};

261
src/views/aftersales/customerService.vue

@ -1,121 +1,117 @@
<template>
<div class="content-max">
<el-descriptions class="margin-top" :column="3" :size="size" border>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon >
<user />
</el-icon>
订单自编号
</div>
</template>
{{ListRow.waybillNumber}}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon >
<iphone />
</el-icon>
Telephone
</div>
</template>
18100000000
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon >
<location />
</el-icon>
Place
</div>
</template>
Suzhou
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon >
<tickets />
</el-icon>
Remarks
</div>
</template>
<el-tag size="small">School</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon >
<office-building />
</el-icon>
Address
</div>
</template>
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
</el-descriptions-item>
<div class="content-max">
<el-descriptions class="margin-top" :column="3" :size="size" border>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon>
<user />
</el-icon>
订单自编号
</div>
</template>
{{ ListRow.waybillNumber }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon>
<iphone />
</el-icon>
运单号
</div>
</template>
18100000000
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon>
<location />
</el-icon>
车次号
</div>
</template>
Suzhou
</el-descriptions-item>
<div class="content-msg">
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon>
<tickets />
</el-icon>
工单号
</div>
</template>
School
</el-descriptions-item>
<el-descriptions-item>
<template #label>
<div class="cell-item">
<el-icon>
<office-building />
</el-icon>
异常问题描述
</div>
</template>
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
</el-descriptions-item>
</el-descriptions>
<div class="content" ref="scrollContainer">
<!-- 用户 -->
<div
:class="{ YH: item.businessId != currentUser, KF: item.businessId == currentUser }"
v-for="item in ChatHistory"
:key="item.input"
>
<div class="box">
<div class="TX"></div>
<div class="name">
<span>{{ item.businessName }}</span>
<div class="input">
{{ item.content }}
<div class="content-msg">
<div class="content" ref="scrollContainer">
<!-- 用户 -->
<div
:class="{ YH: item.businessId != currentUser, KF: item.businessId == currentUser }"
v-for="item in ChatHistory"
:key="item.input"
>
<div class="box">
<div class="TX"></div>
<div class="name">
<span>{{ item.businessName }}</span>
<div class="input">
{{ item.content }}
</div>
<div class="time">{{ item.createTime }}</div>
</div>
</div>
</div>
</div>
<div class="inputTextarea" v-loading="iconState" element-loading-text="正在处理中...">
<div class="fell">
<el-upload
ref="uploadRef"
class="upload-demo"
:action="doubledCount"
:headers="headers"
:on-success="fellSuccess"
>
<template #trigger>
<el-button type="primary">上传附件</el-button>
<div class="felltis" v-if="KFfeel">上传成功</div>
</template>
</el-upload>
<div class="el_footer">
<el-input
@keydown.enter="inputEnter"
v-model="KFinput"
:rows="4"
type="textarea"
placeholder="请输入内容"
/>
<div class="el_sed">
<el-button class="btn_fs" type="primary" @click="messagesend">发送</el-button>
</div>
</div>
<div class="time">{{ item.createTime }}</div>
</div>
</div>
</div>
</div>
<div class="inputTextarea" v-loading="iconState" element-loading-text="正在处理中...">
<div class="fell">
<el-upload
ref="uploadRef"
class="upload-demo"
:action="doubledCount"
:headers="headers"
:on-success="fellSuccess"
>
<template #trigger>
<el-button type="primary">上传附件</el-button>
<div class="felltis" v-if="KFfeel">上传成功</div>
</template>
</el-upload>
<el-input
@keydown.enter="inputEnter"
v-model="KFinput"
:rows="4"
type="textarea"
placeholder="请输入内容"
/>
</div>
<el-button class="btn_fs" type="primary" @click="messagesend">发送</el-button>
</div>
</div>
</div>
</template>
<script setup>
@ -127,6 +123,7 @@ const KFfeel = ref(''); //文件附件地址
const iconState = ref(false); //
const KFinput = ref(''); //
const ListRow = ref(); //
const currentUser = ref(null); //Id
const $route = useRoute();
const Mydata = ref(null); //
import { ElMessage } from 'element-plus';
@ -154,6 +151,7 @@ const onLoad = () => {
ListRow.value = JSON.parse($route.query.row);
console.log();
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
currentUser.value = Mydata.value.id;
console.log(ListRow.value, '路由参数');
FKList();
};
@ -171,10 +169,8 @@ const messagesendFn = () => {
annex: KFfeel.value,
};
console.log(data, '处理好的数据');
$_AddReply(data).then(res => {
//
const currentTime = new Date();
//
const currentTime = new Date();
//
const year = String(currentTime.getFullYear());
const month = String(currentTime.getMonth() + 1).padStart(2, '0');
@ -184,6 +180,8 @@ const messagesendFn = () => {
const seconds = String(currentTime.getSeconds()).padStart(2, '0');
//
const formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
$_AddReply(data).then(res => {
console.log(res, '添加成功');
if (res.data.code == 200) {
//
@ -203,7 +201,13 @@ const messagesendFn = () => {
}, 0);
KFinput.value = ''; //
KFfeel.value = null; //
}
}).catch(res=>{
console.log('err');
KFinput.value = ''; //
KFfeel.value = null; //
iconState.value = false;
});
console.log(Mydata.value, '参数');
};
@ -239,13 +243,15 @@ const fellSuccess = (response, uploadFile) => {
<style scoped lang="scss">
.content {
width: 100%;
height: 80%;
height: 78%;
overflow-y: scroll;
scroll-behavior: smooth;
padding: 10px;
/* 添加平滑滚动效果 */
border-radius: 5px;
border: 1px solid #ccc;
box-sizing: border-box;
margin: 4px;
.YH {
width: 100%;
min-height: 50px;
@ -360,13 +366,26 @@ const fellSuccess = (response, uploadFile) => {
:deep(.el-descriptions__header) {
margin-bottom: 0 !important;
}
.content-max{
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
.content-msg{
flex: 1;
}
.content-max {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
.content-msg {
flex: 1;
}
}
.inputTextarea {
padding: 10px;
box-sizing: border-box;
}
.el_footer {
display: flex;
}
.el_sed {
width: 7%;
display: flex;
justify-content: center;
align-items: flex-end;
}
</style>

Loading…
Cancel
Save