Commit 43930c36 authored by lixy's avatar lixy

联系客服-回复

parent 37ff459c
...@@ -89,3 +89,14 @@ export function getCompanyInfoByType(query) { ...@@ -89,3 +89,14 @@ export function getCompanyInfoByType(query) {
params: query params: query
}); });
} }
/**
* 回复
*/
export function feedbackInfoUpdate(query) {
return fetch({
url: 'api/website/feedbackInfo/updateObj',
method: 'post',
data: query
});
}
...@@ -26,6 +26,21 @@ ...@@ -26,6 +26,21 @@
{{ scope.row.content}} {{ scope.row.content}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="回复内容">
<template slot-scope="scope">
{{ scope.row.responseInfo}}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
v-if="!scope.row.responseInfo"
size="small"
class="el-button el-button--text el-button--small"
@click="handleDeal(scope.row)"
>回复</el-button>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="状态">--> <!-- <el-table-column align="center" label="状态">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;--> <!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;-->
...@@ -39,13 +54,19 @@ ...@@ -39,13 +54,19 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
</div> </div>
<!-- 回复 -->
<deal-dialog v-if="dealVisible" :one-row="oneRow" v-on:dealEvent="dealEvent"></deal-dialog>
</div> </div>
</template> </template>
<script type="javascript"> <script type="javascript">
import dealDialog from "./dealDialog";
import { feedbackInfoList } from 'api/userManagement/index' import { feedbackInfoList } from 'api/userManagement/index'
import {timestamp2Date} from '@/utils/dateUtils'; import {timestamp2Date} from '@/utils/dateUtils';
export default { export default {
name: 'userManagement', name: 'userManagement',
components: {
dealDialog
},
computed:{ computed:{
getStatus(status) { getStatus(status) {
return (status) => { return (status) => {
...@@ -70,6 +91,8 @@ ...@@ -70,6 +91,8 @@
limit: 20, limit: 20,
type: 3 //1、联系客服,2、意见反馈,3、订单反馈 type: 3 //1、联系客服,2、意见反馈,3、订单反馈
}, },
oneRow: {}, // 当前操作项
dealVisible: false, // 回复弹窗
invoiceDialogVisible: false, // 查看发票弹窗 invoiceDialogVisible: false, // 查看发票弹窗
addressDialogVisible: false // 查看地址弹窗 addressDialogVisible: false // 查看地址弹窗
} }
...@@ -85,6 +108,22 @@ ...@@ -85,6 +108,22 @@
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() // 获取用户列表 this.getList() // 获取用户列表
}, },
/**
* 回复
*/
handleDeal(row){
this.oneRow = row
this.dealVisible = true
},
/**
* 回复-返回
*/
dealEvent(e){
this.dealVisible = false
if(e){
this.getList()
}
},
/** /**
* 查看发票-返回界面 * 查看发票-返回界面
*/ */
......
...@@ -25,6 +25,21 @@ ...@@ -25,6 +25,21 @@
{{ scope.row.content}} {{ scope.row.content}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="回复内容">
<template slot-scope="scope">
{{ scope.row.responseInfo}}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
v-if="!scope.row.responseInfo"
size="small"
class="el-button el-button--text el-button--small"
@click="handleDeal(scope.row)"
>回复</el-button>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="状态">--> <!-- <el-table-column align="center" label="状态">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;--> <!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;-->
...@@ -38,9 +53,12 @@ ...@@ -38,9 +53,12 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
</div> </div>
<!-- 回复 -->
<deal-dialog v-if="dealVisible" :one-row="oneRow" v-on:dealEvent="dealEvent"></deal-dialog>
</div> </div>
</template> </template>
<script type="javascript"> <script type="javascript">
import dealDialog from "./dealDialog";
import { feedbackInfoList } from 'api/userManagement/index' import { feedbackInfoList } from 'api/userManagement/index'
import {timestamp2Date} from '@/utils/dateUtils'; import {timestamp2Date} from '@/utils/dateUtils';
export default { export default {
...@@ -58,6 +76,9 @@ ...@@ -58,6 +76,9 @@
} }
}, },
}, },
components: {
dealDialog
},
data() { data() {
return { return {
times: [], times: [],
...@@ -69,6 +90,8 @@ ...@@ -69,6 +90,8 @@
limit: 20, limit: 20,
type: 1 //1、联系客服,2、意见反馈,3、订单反馈 type: 1 //1、联系客服,2、意见反馈,3、订单反馈
}, },
oneRow: {}, // 当前操作项
dealVisible: false, // 回复弹窗
invoiceDialogVisible: false, // 查看发票弹窗 invoiceDialogVisible: false, // 查看发票弹窗
addressDialogVisible: false // 查看地址弹窗 addressDialogVisible: false // 查看地址弹窗
} }
...@@ -84,6 +107,22 @@ ...@@ -84,6 +107,22 @@
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() // 获取用户列表 this.getList() // 获取用户列表
}, },
/**
* 回复
*/
handleDeal(row){
this.oneRow = row
this.dealVisible = true
},
/**
* 回复-返回
*/
dealEvent(e){
this.dealVisible = false
if(e){
this.getList()
}
},
/** /**
* 查看发票-返回界面 * 查看发票-返回界面
*/ */
......
<template>
<el-dialog title="回复" :visible.sync="isVisible" width="600px" class="send-main">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-form-item label="回复内容" prop="responseInfo">
<el-input type="textarea" v-model="form.responseInfo" placeholder="请输入回复内容" :maxlength="400"></el-input>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="!isClick" @click="okSend('form')">确 定</el-button>
<el-button type="primary" v-else style="opacity: 0.6;" disabled>确 定</el-button>
</div>
</el-dialog>
</template>
<script type="javascript">
import {feedbackInfoUpdate} from 'api/website/order/index'
export default {
props: ['oneRow'],
name: 'dealDialog',
data() {
return {
isClick: false, // 是否点击了发货
rules: {
responseInfo: { required: true, message: '请输入回复内容', trigger: 'blur' }
},
form: {
id: this.oneRow.id,
responseInfo: '' // 回复内容
},
isVisible: false,
}
},
watch: {
isVisible(newValue, oldValue) {
if (!newValue) {
this.$emit('dealEvent', false)
}
}
},
mounted() {
this.isVisible = true
},
methods: {
/**
* 弹框-取消
* */
cancel() {
this.$emit('dealEvent', false)
},
/**
* 回复
*/
okSend(formName) {
let _this = this
if(this.isClick){
return
}
this.isClick = true
setTimeout(function(){
_this.isClick = false
}, 2000)
const set = this.$refs;
set[formName].validate((valid) => {
if (valid) {
feedbackInfoUpdate(this.form).then((response) => {
if(response.status == 200){
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000
});
this.$emit('dealEvent', true)
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
})
}
});
}
})
}
}
}
</script>
<style lang="scss">
.send-main{
.send-info{
border: 1px solid #eee;
padding: 20px;
margin-bottom: 20px;
margin-top: 20px;
}
.invoice-item{
padding: 20px;
border: 1px solid #eee;
.invoice-item-text{
margin-top: 10px;
}
}
}
</style>
...@@ -25,6 +25,21 @@ ...@@ -25,6 +25,21 @@
{{ scope.row.content}} {{ scope.row.content}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="回复内容">
<template slot-scope="scope">
{{ scope.row.responseInfo}}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
v-if="!scope.row.responseInfo"
size="small"
class="el-button el-button--text el-button--small"
@click="handleDeal(scope.row)"
>回复</el-button>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="状态">--> <!-- <el-table-column align="center" label="状态">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;--> <!-- &lt;!&ndash; 根据状态获取对应中文 &ndash;&gt;-->
...@@ -38,13 +53,19 @@ ...@@ -38,13 +53,19 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
</div> </div>
<!-- 回复 -->
<deal-dialog v-if="dealVisible" :one-row="oneRow" v-on:dealEvent="dealEvent"></deal-dialog>
</div> </div>
</template> </template>
<script type="javascript"> <script type="javascript">
import dealDialog from "./dealDialog";
import { feedbackInfoList } from 'api/userManagement/index' import { feedbackInfoList } from 'api/userManagement/index'
import {timestamp2Date} from '@/utils/dateUtils'; import {timestamp2Date} from '@/utils/dateUtils';
export default { export default {
name: 'userManagement', name: 'userManagement',
components: {
dealDialog
},
computed:{ computed:{
getStatus(status) { getStatus(status) {
return (status) => { return (status) => {
...@@ -69,6 +90,8 @@ ...@@ -69,6 +90,8 @@
limit: 20, limit: 20,
type: 2 //1、联系客服,2、意见反馈,3、订单反馈 type: 2 //1、联系客服,2、意见反馈,3、订单反馈
}, },
oneRow: {}, // 当前操作项
dealVisible: false, // 回复弹窗
invoiceDialogVisible: false, // 查看发票弹窗 invoiceDialogVisible: false, // 查看发票弹窗
addressDialogVisible: false // 查看地址弹窗 addressDialogVisible: false // 查看地址弹窗
} }
...@@ -138,6 +161,22 @@ ...@@ -138,6 +161,22 @@
handleAddress(){ handleAddress(){
this.addressDialogVisible = true this.addressDialogVisible = true
}, },
/**
* 回复
*/
handleDeal(row){
this.oneRow = row
this.dealVisible = true
},
/**
* 回复-返回
*/
dealEvent(e){
this.dealVisible = false
if(e){
this.getList()
}
},
/** /**
* 清除搜索 * 清除搜索
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment