张雄 2 years ago
parent 6524c685a3
commit ad46e424dc

@ -0,0 +1,55 @@
import httpService from "@/request"
// 查询所有的社区介绍信息
export function getCommunityList(params) {
return httpService({
url: `/user/communityIntroduction/list`,
method: 'get',
params: params,
})
}
// 添加社区介绍信息
export function AddCommunityIntro(params) {
return httpService({
url: `/user/communityIntroduction/insert`,
method: 'post',
data: params,
})
}
// 根据社区介绍主键Id查询社区介绍信息
export function findCommunityIntro(params) {
return httpService({
url: `/user/communityIntroduction/findById`,
method: 'get',
params: params,
})
}
// 修改社区介绍信息
export function updateCommunityIntro(params) {
return httpService({
url: `/user/communityIntroduction/update`,
method: 'post',
data: params,
})
}
// 删除社区介绍信息
export function delCommunityIntro(params) {
return httpService({
url: `/user/communityIntroduction/delete`,
method: 'post',
data: params,
})
}
// 启用社区介绍信息
export function enableCommunityIntro(params) {
return httpService({
url: `/user/communityIntroduction/enable`,
method: 'get',
params: params,
})
}

@ -0,0 +1,46 @@
import httpService from "@/request"
// 查询所有的咨询建议/投诉表扬
export function getAdviceList(params) {
return httpService({
url: `/user/advice/list`,
method: 'get',
params: params,
})
}
// 查询今日咨询建议/投诉表扬数量
export function getTodayAdvice(params) {
return httpService({
url: `/user/advice/findTodayAdviceNum`,
method: 'get',
params: params,
})
}
// 批量删除咨询建议/投诉表扬
export function delAdvice(params) {
return httpService({
url: `/user/advice/delete`,
method: 'post',
data: params,
})
}
// 根据id查询咨询建议/投诉表扬
export function adviceDetail(params) {
return httpService({
url: `/user/advice/findById`,
method: 'get',
params: params,
})
}
// 回复咨询建议/投诉表扬
export function replyDetail(params) {
return httpService({
url: `/user/advice/reply`,
method: 'post',
data: params,
})
}

@ -0,0 +1,64 @@
import httpService from "@/request"
// 查询所有便民电话信息
export function getPhoneList(params) {
return httpService({
url: `/user/conveniencePhone/list`,
method: 'get',
params: params,
})
}
// 添加便民电话信息
export function addPhone(params) {
return httpService({
url: `/user/conveniencePhone/insert`,
method: 'post',
data: params,
})
}
// 根据便民电话主键id查询便民电话信息
export function findPhone(params) {
return httpService({
url: `/user/conveniencePhone/findById`,
method: 'get',
params: params,
})
}
// 修改便民电话信息
export function updatePhone(params) {
return httpService({
url: `/user/conveniencePhone/update`,
method: 'post',
data: params,
})
}
// 定时检查信息
export function reminderInfo(params) {
return httpService({
url: `/user/conveniencePhone/reminderInfo`,
method: 'get',
params: params,
})
}
// 更新定时检查信息
export function updateReminder(params) {
return httpService({
url: `/user/conveniencePhone/updateReminder`,
method: 'post',
data: params,
})
}
// 批量删除便民电话
export function delPhone(params) {
return httpService({
url: `/user/conveniencePhone/delete`,
method: 'post',
data: params,
})
}

@ -25,3 +25,12 @@ export function shopOrderCancel(params) {
params: params,
})
}
// 根据ID查询订单记录
export function getOrderRecord(params) {
return httpService({
url: `/user/shopOrder/orderRecord`,
method: 'get',
params: params,
})
}

@ -189,4 +189,31 @@ export default [
},
]
},
{
path: '/Recommand',
name: "Recommand",
title: "建议咨询",
icon: 'question-circle',
hide: false,
component: resolve => require(['@/views/Operation/Recommand'], resolve),
meta: {title: '建议咨询'},
},
{
path: '/Suggestion',
name: "Suggestion",
title: "便民电话",
icon: 'phone',
hide: false,
component: resolve => require(['@/views/Operation/Suggestion'], resolve),
meta: {title: '便民电话'},
},
{
path: '/CommunityIntro',
name: "CommunityIntro",
title: "社区介绍",
icon: 'snippets',
hide: false,
component: resolve => require(['@/views/Operation/CommunityIntro'], resolve),
meta: {title: '社区介绍'},
},
]

@ -30,7 +30,6 @@
<a-col :span="19">
<div class="treebox">
<a-tree
class="tree"
v-model="checkedKeys"
v-if="treeShow != undefined"
checkable

@ -7,6 +7,9 @@ export const columns = [
title: "楼栋名称",
dataIndex: "name",
width: "20%",
customRender:function(name){
return name + '栋'
}
},
{
title: "房屋总数",
@ -23,7 +26,7 @@ export const columns = [
dataIndex: "leaseRate",
width: "20%",
customRender:function(leaseRate){
return ( leaseRate*100 )+'%'
return ( leaseRate*100 ).toFixed(2)+'%'
}
},
{

@ -47,6 +47,32 @@
</a-select>
</a-form-model-item>
</a-col>
<!-- -->
<div v-if="form.identity == 2 || form.identity == 3">
<a-col :span="12">
<a-form-model-item label="业主姓名" prop="ownerName">
<a-input placeholder="请输入姓名" v-model="form.ownerName" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="业主电话" prop="ownerTel">
<a-input placeholder="请输入电话" v-model="form.ownerTel" style="width: 90%" />
</a-form-model-item>
</a-col>
</div>
<div v-if="form.identity == 4">
<a-col :span="12">
<a-form-model-item label="租户姓名" prop="tenantName">
<a-input placeholder="请输入姓名" v-model="form.tenantName" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="租户电话" prop="tenantTel">
<a-input placeholder="请输入电话" v-model="form.tenantTel" style="width: 90%" />
</a-form-model-item>
</a-col>
</div>
<!-- -->
<a-col :span="12">
<a-form-model-item label="姓名" prop="name">
<a-input placeholder="请输入姓名" v-model="form.name" style="width: 90%" />

@ -26,6 +26,10 @@ export const form = {
ownerTel:undefined,
tenantName:undefined,
tenantTel:undefined,
ownerName:undefined, //业主姓名
ownerTel:undefined, //业主电话
tenantName: undefined,//租户姓名
tenantTel: undefined,//租户电话
}
const handleConfirm = (rule,value,callback) => {

@ -324,8 +324,6 @@ export default {
uploadHeaders,
headList: [],
form:{
pageNum: 1,
size: 10,
status: undefined,
workOrderTypeId: undefined,
keyword: ''
@ -504,6 +502,7 @@ export default {
})
},
getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getAllWorkOrder(this.form).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
@ -695,7 +694,6 @@ export default {
})
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;

@ -0,0 +1,71 @@
export const form = {
name: '',
status: undefined,
createName: '',
nearModifyDateStart: '',
nearModifyDateEnd: '',
createDateStart: '',
createDateEnd: '',
}
export const addForm = {
name: '',
content: '',
imgUrls: [],
}
export const columns = [
{
title: "模版名称",
width: "9%",
dataIndex: "name",
},
{
title: "内容",
width: "15%",
dataIndex: "content",
scopedSlots: { customRender: "content" },
},
{
title: "启用状态",
width: "12%",
dataIndex: "status",
scopedSlots: { customRender: "status" },
},
{
title: "创建人名称",
width: "12%",
dataIndex: "createName",
},
{
title: "最近修改时间",
width: "16%",
dataIndex: "nearModifyDate",
},
{
title: "创建时间",
width: "16%",
dataIndex: "createDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
}
export function doStr(str, number) {
if(str.length >= number) {
return str.substr(0,number-1) + '...'
} else {
return str
}
}

@ -0,0 +1,307 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>社区介绍</span>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.name" style="width: 200px" placeholder="模版名称"></a-input>
<a-select style="width: 200px" v-model="form.status" placeholder="启用状态">
<a-select-option :value="1">启用中</a-select-option>
<a-select-option :value="2">未启用</a-select-option>
</a-select>
<a-input v-model="form.createName" style="width: 200px" placeholder="创建人"></a-input>
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 300px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['最近修改时间开始','最近修改时间结束']"></a-range-picker>
<a-range-picker @change="handlerTime2" v-model="selTime2" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['创建时间开始','创建时间结束']"></a-range-picker>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">新增模版</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1700 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<span slot="content" slot-scope="text, record">
<a-popover>
<template slot="content">
<div style="width: 600px">{{record.content}}</div>
</template>
<div>{{doStr(record.content,21)}}</div>
</a-popover>
</span>
<template slot="status" slot-scope="text,record">
<a-switch checked-children=""
un-checked-children="未启用"
:checked="record.status == 1"
@change="handleEnable(record)">
</a-switch>
</template>
<template slot="action" slot-scope="text,record">
<span><a @click=edit(record)>编辑</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="mode==1?'新增模版':'编辑模版'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="24">
<a-form-model-item label="模版名称" prop="name">
<a-input style="width: 560px" placeholder="请输入模版名称" v-model="addForm.name"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="内容" prop="content">
<a-textarea style="width: 560px" :autosize="{minRows: 8}" placeholder="请输入内容" v-model="addForm.content"></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片">
<commonUpload :fileList='fileList' @handleChange="handleChange" />
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="detailClose"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { getCommunityList, AddCommunityIntro, enableCommunityIntro,
findCommunityIntro, updateCommunityIntro, delCommunityIntro} from "@/api/operation/comIntro"
import {form,addForm, rules, columns,doStr } from "./depend/config";
export default {
data() {
return {
form: form,
selTime: [],
selTime2: [],
addForm: addForm,
fileList: [],
mode: 1, //1 2
activeId: undefined,
rules: rules,
columns: columns,
doStr: doStr,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
//
detailShow: false,
//
selectedRowKeys: [],
}
},
created() {
this.getData()
},
methods: {
getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getCommunityList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form = {
name: '',
status: undefined,
createName: '',
nearModifyDateStart: '',
nearModifyDateEnd: '',
createDateStart: '',
createDateEnd: '',
},
this.selTime = [],
this.selTime2 = [],
this.getData()
},
handlerChange() {
},
detailClose() {
this.addForm = {
name: '',
content: '',
imgUrls: [],
},
this.fileList = []
this.detailShow = false
},
///
addConfirm() {
if(this.mode == 1) {
AddCommunityIntro(this.addForm).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else {
let obj = Object.assign(this.addForm, {id: this.activeId})
updateCommunityIntro(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
//
edit(val) {
this.mode = 2;
findCommunityIntro({communityIntroductionId: val.id}).then(res => {
let data = res.data;
this.addForm.name = data.name;
this.addForm.content = data.content;
if(data.imgList.length>0){
const pic = []
this.addForm.imgUrls.push(data.imgList[0].url)
for(let item of data.imgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.fileList = pic
}
this.activeId = data.id
})
this.detailShow = true;
},
//
del(val) {
this.$confirm({
title: "是否删除该模版?",
icon:'delete',
onOk:async()=>{
let res = await delCommunityIntro({communityIntroductionIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的模版?",
icon:'delete',
onOk:async()=>{
let res = await delCommunityIntro({communityIntroductionIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
//
handleEnable(val) {
enableCommunityIntro({communityIntroductionId: val.id}).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
})
},
//
handlerTime(val) {
this.form.nearModifyDateStart = val[0];
this.form.nearModifyDateEnd = val[1];
},
handlerTime2(val) {
this.form.createDateStart = val[0];
this.form.createDateEnd = val[1];
},
//
handleChange(data) {
this.fileList = data;
this.addForm.imgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.addForm.imgUrls.push(ele.response.data)
}
})
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -0,0 +1,86 @@
export const columns = [
{
title: "序号",
width: "6%",
dataIndex: "id",
},
{
title: "内容",
width: "12%",
dataIndex: "content",
},
{
title: "类型",
width: "8%",
dataIndex: "type",
customRender: function (type) {
switch (type) {
case 1: return '咨询'
case 2: return '建议'
case 3: return '投诉'
case 4: return '表扬'
}
}
},
{
title: "发布人",
width: "9%",
dataIndex: "releaseName",
},
{
title: "发布时间",
width: "12%",
dataIndex: "releaseDate",
},
{
title: "状态",
width: "8%",
dataIndex: "status",
customRender: function (status) {
switch (status) {
case 3: return '已反馈'
case 2: return '反馈中'
case 1: return '未反馈'
}
}
},
{
title: "评分数",
width: "10%",
dataIndex: "rate",
scopedSlots: { customRender: "rate" },
},
{
title: "最后一次回复/提问时间",
width: "14%",
dataIndex: "lastFeedBackDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const replyColumns = [
{
title: "创建人",
width: "43%",
dataIndex: "createUserType",
scopedSlots: { customRender: "create" },
},
{
title: "反馈内容",
width: "43%",
dataIndex: "content",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "13%",
scopedSlots: { customRender: "action" },
},
]

@ -0,0 +1,354 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>咨询建议</span>
<a-radio-group
v-model="form.type"
button-style="solid"
@change="typeChange"
>
<a-radio-button :value="undefined"> 全部 </a-radio-button>
<a-radio-button :value="1"> 咨询 </a-radio-button>
<a-radio-button :value="2"> 建议 </a-radio-button>
<a-radio-button :value="3"> 投诉 </a-radio-button>
<a-radio-button :value="4"> 表扬 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-alert v-if="form.type==1" :message="'温馨提示:今日新增 '+todayMessage+' 条咨询'" type="warning" show-icon />
<a-alert v-else-if="form.type==2" :message="'温馨提示:今日新增 '+todayMessage+' 条建议'" type="warning" show-icon />
<a-alert v-else-if="form.type==3" :message="'温馨提示:今日新增 '+todayMessage+' 条投诉'" type="warning" show-icon />
<a-alert v-else-if="form.type==4" :message="'温馨提示:今日新增 '+todayMessage+' 条表扬'" type="warning" show-icon />
<a-alert v-else :message="'温馨提示:今日共新增 '+todayMessage+' 条'" type="warning" show-icon />
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['开始时间','结束时间']"></a-range-picker>
<a-input v-model="form.releaseName" style="width: 200px" placeholder="发布人"></a-input>
<a-select v-model="form.status" style="width: 200px" placeholder="请选择状态">
<a-select-option :value="0">未反馈</a-select-option>
<a-select-option :value="1">反馈中</a-select-option>
<a-select-option :value="2">已反馈</a-select-option>
</a-select>
<a-select v-model="form.score" style="width: 200px" placeholder="请选择评分">
<a-select-option :value="0">差评</a-select-option>
<a-select-option :value="1">中评</a-select-option>
<a-select-option :value="2">好评</a-select-option>
</a-select>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1800 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="rate" slot-scope="text,record">
<a-rate :default-value="(record.score/2.0)" disabled allow-half></a-rate>
</template>
<template slot="action" slot-scope="text,record">
<span><a @click=detail(record)>详情</a></span>
<span><a style="margin-left: 8px" @click=reply(record)>回复</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="activeTitle" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-descriptions style="padding: 16px" :column="1">
<a-descriptions-item label="类型">
{{adviceInfo.type==1?'咨询':2?'建议':3?'投诉':'表扬'}}
</a-descriptions-item>
<a-descriptions-item label="照片">
<img v-for="(item,index) in adviceInfo.imgUrl"
:key="index" :src="$ImgUrl(item.url)" style="height: 90px;width: 160px" />
</a-descriptions-item>
<a-descriptions-item label="反馈内容">
<a-table :columns="replyColumns" :data-source="adviceInfo.voUserAdviceDetailList" :pagination="false">
<template slot="create" slot-scope="text,row">
{{row.createName}}({{row.createUserType==1?'住户':'物业'}}) {{row.createDate}}
</template>
<template v-if="activeTitle=='回复'" slot="action" slot-scope="text,row">
<a @click="singelReply(row)"></a>
</template>
</a-table>
</a-descriptions-item>
<a-descriptions-item label="评分星级" v-if="activeTitle=='咨询详情'">
<a-rate :value="(adviceInfo.score*1)/2.0" disabled allow-half></a-rate>
</a-descriptions-item>
</a-descriptions>
<div v-if="activeTitle=='回复'">
<span>回复反馈</span>
<a-divider></a-divider>
<a-form-model :model="repForm" :rules="rules" style="padding: 16px" layout="inline">
<a-form-model-item label="反馈" prop="content">
<a-textarea v-model="repForm.content" :autoSize="{ minRows: 8}" placeholder="请输入回复反馈" style="width: 500px">
</a-textarea>
</a-form-model-item>
</a-form-model>
</div>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="replyConfirm" type="primary" :style="{ marginRight: '8px' }"> 确认 </a-button>
<a-button @click="detailClose"> </a-button>
</div>
<a-modal :visible="singelReplyVisible" title="回复" @ok="singleConfirm" @cancel="singelReplyVisible=false">
<a-form-model-item label="回复">
<a-textarea v-model="singleForm.content" :autoSize="{ minRows: 4}" placeholder="请输入回复内容" style="width: 500px">
</a-textarea>
</a-form-model-item>
</a-modal>
</a-drawer>
</div>
</template>
<script>
import { getAdviceList,delAdvice,adviceDetail,replyDetail,getTodayAdvice } from "@/api/operation/recommand"
import { columns,replyColumns } from "./depend/config";
export default {
data() {
return {
form: {
type: undefined,
releaseName: '',
releaseDateStart: '',
releaseDateEnd: '',
status: undefined,
score: undefined,
},
repForm: {
appAdviceId: undefined,
content: '',
parentId: 0
},
singleForm: {
appAdviceId: undefined,
content: '',
parentId: 0
},
selTime: [],
rules: {
content: [{ required: true, message: "请输入回复", trigger: "blur" }],
},
activeName: 0,
columns: columns,
replyColumns: replyColumns,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
selectedRowKeys: [],
//
activeTitle: '',
detailShow: false,
adviceInfo: {voUserAdviceDetailList: []},
//
singelReplyVisible: false,
//
todayMessage: undefined,
}
},
created() {
this.getApi()
this.getData()
},
methods: {
getApi() {
getTodayAdvice({type: this.form.type}).then(res => {
let data = res.data;
this.todayMessage = data
})
},
getData() {
let obj = Object.assign( this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getAdviceList(obj).then(res => {
this.pagination.total = res.data.total;
this.tableData = res.data.rows
})
},
reset() {
this.form = {
type: undefined,
releaseName: '',
releaseDateStart: undefined,
releaseDateEnd: undefined,
status: undefined,
score: undefined,
},
this.selTime = [];
this.getData();
},
handlerChange() {
},
detailClose() {
this.adviceInfo = {};
this.repForm = {
appAdviceId: undefined,
content: '',
parentId: 0
},
this.detailShow = false
},
//
typeChange(val) {
this.getData();
this.getApi()
},
//
handlerTime(val) {
this.form.releaseDateStart = val[0];
this.form.releaseDateEnd = val[1];
},
//
detail(val) {
this.activeTitle = '咨询详情'
adviceDetail({adviceId: val.id}).then(res => {
let data = res.data;
this.repForm.appAdviceId = data.id
this.adviceInfo = data
})
this.detailShow = true;
},
reply(val) {
this.activeTitle = '回复'
adviceDetail({adviceId: val.id}).then(res => {
let data = res.data;
this.repForm.appAdviceId = data.id
this.adviceInfo = data
})
this.detailShow = true;
},
replyConfirm() {
replyDetail(this.repForm).then(res => {
if (res.code === 200) {
this.$message.success(res.msg);
this.detailClose();
this.getData();
} else {
this.$message.error(res.msg);
}
})
},
singleConfirm() {
replyDetail(this.singleForm).then(res => {
if (res.code === 200) {
this.$message.success(res.msg);
this.singelReplyVisible = false;
this.singleForm = {
appAdviceId: undefined,
content: '',
parentId: 0
},
this.detailClose();
this.getData();
} else {
this.$message.error(res.msg);
}
})
},
singelReply(val) {
this.singleForm.appAdviceId = this.adviceInfo.id
this.singleForm.parentId = val.id
this.singelReplyVisible = true
},
del(val) {
if(val.status == 1 || val.status == 2) {
this.$confirm({
title: "该条信息您还未回复,是否删除?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
} else {
this.$confirm({
title: "是否确认删除该信息?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
selectionChoosed(val) {
this.selectedRowKeys = val
},
//
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的信息?",
icon:'delete',
onOk:async()=>{
let res = await delAdvice({adviceIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -0,0 +1,72 @@
export const columns = [
{
title: "名称",
width: "12%",
dataIndex: "name",
},
{
title: "联系方式",
width: "12%",
dataIndex: "tel",
},
{
title: "类型",
width: "12%",
dataIndex: "type",
customRender: function (type) {
switch (type) {
case 1: return '业委会'
case 2: return '绿化'
case 3: return '快递'
case 4: return '搬家'
}
}
},
{
title: "状态",
width: "12%",
dataIndex: "status",
customRender: function (status) {
switch (status) {
case 1: return '正常'
case 2: return '有误'
case 3: return '空号'
case 4: return '搬家'
}
}
},
{
title: "下次检查时间",
width: "16%",
dataIndex: "nextControlDate",
},
{
title: "APP端排序权重",
width: "12%",
dataIndex: "weight",
},
{
title: "提醒内容",
width: "12%",
dataIndex: "remindContent",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const rules = {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
tel: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
],
type: [{ required: true, message: "请选择类型", trigger: "change" }],
status: [{ required: true, message: "请选择状态", trigger: "change" }],
weight: [{ required: true, message: "请输入权重", trigger: "blur" }],
}

@ -0,0 +1,327 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>便民电话</span>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="form.name" style="width: 200px" placeholder="联系名称"></a-input>
<a-input v-model="form.tel" style="width: 200px" placeholder="联系电话"></a-input>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">新增电话</a-button>
<a-button style="margin: 10px" @click="check" type="primary" ghost>定时检查</a-button>
<div class="main">
<a-table :columns="columns" :data-source="tableData"
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1700 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}">
<template slot="action" slot-scope="text,record">
<span><a @click=edit(record)>编辑</a></span>
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<a-drawer :title="mode==1?'新增电话':'编辑电话'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-row>
<a-form-model :model="addForm" :rules="rules">
<a-col :span="12">
<a-form-model-item label="联系名称" prop="name">
<a-input style="width: 240px" v-model="addForm.name"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系电话" prop="tel">
<a-input style="width: 240px" v-model="addForm.tel"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="类型" prop="type">
<a-select style="width: 240px" v-model="addForm.type">
<a-select-option :value="1">业委会</a-select-option>
<a-select-option :value="2">绿化</a-select-option>
<a-select-option :value="3">快递</a-select-option>
<a-select-option :value="4">搬家</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="状态" prop="status">
<a-select style="width: 240px" v-model="addForm.status">
<a-select-option :value="1">正常</a-select-option>
<a-select-option :value="2">有误</a-select-option>
<a-select-option :value="3">空号</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="权重" prop="weight">
<a-input-number style="width: 120px" v-model="addForm.weight" :min="0"></a-input-number>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="detailClose"> </a-button>
</div>
</a-drawer>
<a-drawer title="定时检查" :width="720" :visible="checkShow" :body-style="{ paddingBottom: '60px' }" @close="checkClose">
<div class="drawer-content">
<span>基本信息</span>
<a-divider></a-divider>
<a-row>
<a-form-model>
<a-col :span="20">
<a-form-model-item label="提醒间隔">
<a-select v-model="checkForm.reminderInterval">
<a-select-option :value="1">一个月</a-select-option>
<a-select-option :value="2">半年</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="20">
<a-form-model-item label="提醒内容">
<a-textarea v-model="checkForm.reminderContent"></a-textarea>
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
</div>
<div class="drawer-footer" style="float: left">
<a-button @click="checkConfirm" type="primary" :style="{ marginRight: '8px' }">
确认
</a-button>
<a-button @click="checkClose"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import {getPhoneList,addPhone, findPhone, updatePhone, delPhone,reminderInfo,updateReminder} from "@/api/operation/suggestion"
import { rules, columns } from "./depend/config";
export default {
data() {
return {
form: {
name: '',
tel: ''
},
addForm: {
name: '',
tel: '',
type: undefined,
status: undefined,
weight: 0,
},
checkForm: {
reminderInterval: undefined,
reminderContent: ''
},
mode: 1, //1 2
activeId: undefined,
activeName: 0,
rules: rules,
columns: columns,
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
//
detailShow: false,
//
checkShow: false,
//
selectedRowKeys: [],
}
},
created() {
this.getData()
},
methods: {
getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getPhoneList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
})
},
reset() {
this.form = {
name: '',
tel: ''
},
this.getData()
},
handlerChange() {
},
detailClose() {
this.addForm = {
name: '',
tel: '',
type: undefined,
status: undefined,
weight: 0,
}
this.detailShow = false
},
checkClose() {
this.checkForm = {
reminderInterval: undefined,
reminderContent: ''
}
this.checkShow = false
},
//
addConfirm() {
if(this.mode == 1) {
addPhone(this.addForm).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
} else {
let obj = Object.assign(this.addForm, {id: this.activeId})
updatePhone(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.detailClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
}
},
//
edit(val) {
this.mode = 2;
findPhone({conveniencePhoneId: val.id}).then(res => {
let data = res.data;
this.addForm = {
name: data.name,
tel: data.tel,
type: data.type,
status: data.status,
weight: data.weight,
},
this.activeId = data.id
})
this.detailShow = true;
},
//
check() {
reminderInfo().then(res => {
let data = res.data;
this.checkForm = data;
this.checkShow = true;
})
},
checkConfirm() {
let obj = Object.assign(this.checkForm, {id: this.activeId})
updateReminder(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg);
this.checkClose()
this.getData()
} else {
this.$message.error(res.msg);
}
})
},
//
del(val) {
this.$confirm({
title: "是否删除该电话?",
icon:'delete',
onOk:async()=>{
let res = await delPhone({conveniencePhoneIds: [val.id]})
if(res.code === 200){
this.$message.success(res.msg);
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
},
//
selectionChoosed(val) {
this.selectedRowKeys = val
},
handleMenuClick(data) {
if (data.key === "del") {
this.$confirm({
title: "是否删除选中的电话?",
icon:'delete',
onOk:async()=>{
let res = await delPhone({conveniencePhoneIds: this.selectedRowKeys})
if(res.code === 200){
this.$message.success(res.msg);
this.selectedRowKeys = [];
this.getData()
} else {
this.$message.error(res.msg);
}
},
})
}
}
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
}
</script>
<style lang="less">
.drawer-content {
padding: 16px;
}
</style>

@ -16,22 +16,12 @@
<a-space size='large'><a-button type="primary" v-if="infoData.tradeStatus===2"></a-button><a v-if="infoData.tradeStatus===2||infoData.tradeStatus===4"></a></a-space>
</a-col>
<a-col :span="20" style="margin-top:20px">
<a-steps :current="
infoData.tradeStatus == 0?0 : infoData.tradeStatus == 1?0 :
infoData.tradeStatus == 2?1 : infoData.tradeStatus == 3?1 :
infoData.tradeStatus == 4?2 : infoData.tradeStatus == 5?3 : 3 " style="">
<a-step v-if="infoData.tradeStatus == 1" title="交易超时/已退款" />
<a-step v-else title="买家下单" description="等待买家付款." />
<a-step v-if="infoData.tradeStatus == 3" title="买家付款" description="交易支付成功." />
<a-step v-else title="买家付款" description="交易支付成功." />
<a-step title="商家发货" description="已成功发货." />
<a-step v-if="infoData.tradeStatus == 5" title="完成订单" />
<a-step v-else-if="infoData.tradeStatus == 6" title="申请取消" status="error" />
<a-step v-else-if="infoData.tradeStatus == 7" title="申请拒收" />
<a-step v-else-if="infoData.tradeStatus == 8" title="取消订单失败" />
<a-step v-else-if="infoData.tradeStatus == 9" title="取消订单成功" status="finish" />
<a-step v-else-if="infoData.tradeStatus == 10" title="发生拆单" />
<a-step v-else-if="infoData.tradeStatus == 11" title="售后换新" />
<a-steps :current="recordList.length-1">
<a-step :title="item.content" v-for="(item) in recordList" :key="item.id">
<template slot="description">
{{item.createDate}}
</template>
</a-step>
</a-steps>
</a-col>
</a-row>
@ -111,13 +101,14 @@
</template>
<script>
import { orderInfo } from '@/api/shop/order'
import { orderInfo,getOrderRecord } from '@/api/shop/order'
import { detailColumns } from './config'
export default {
data(){
return{
infoData:{},
skuList:[],
recordList: [],
detailColumns
}
},
@ -190,9 +181,12 @@ export default {
getInfo(id){
orderInfo({orderId:id}).then(res=>{
this.infoData = res.data
console.log(res.data)
this.skuList = res.data.skuList
})
getOrderRecord({orderId:id}).then(res => {
let data = res.data
this.recordList = data
})
},
back(){
this.$router.go(-1)

Binary file not shown.
Loading…
Cancel
Save