公告管理,订单列表处理

This commit is contained in:
faiz 2024-07-29 14:00:55 +08:00
parent 706e51bee1
commit a1c3902eb0
11 changed files with 1788 additions and 711 deletions

View File

@ -322,6 +322,29 @@ export const asyncRoutes = [
} }
] ]
}, },
{
path: '/announcements',
component: Layout,
redirect: '/announcements/index',
alwaysShow: true,
name: 'announcements',
meta: {
title: '公告管理',
icon: 'el-icon-s-promotion',
roles: ['follow_index', 'log_index', 'editor']
},
children: [
{
path: 'list',
component: () => import('@/views/announcements/list'),
name: 'list',
meta: {
title: '公告列表',
roles: ['follow_index', 'editor']
}
}
]
},
{ {
path: '/icon', path: '/icon',
component: Layout, component: Layout,

View File

@ -4,7 +4,13 @@
.el-breadcrumb__inner a { .el-breadcrumb__inner a {
font-weight: 400 !important; font-weight: 400 !important;
} }
.opening-announcement {
.el-message-box__header {
.el-message-box__title {
color: red;
}
}
}
.el-upload { .el-upload {
input[type="file"] { input[type="file"] {
display: none !important; display: none !important;
@ -69,7 +75,7 @@
// dropdown // dropdown
.el-dropdown-menu { .el-dropdown-menu {
a { a {
display: block display: block;
} }
} }

View File

@ -0,0 +1,74 @@
import config from '../../package.json';
// 1、window.localStorage 浏览器永久缓存
export const Local = {
// 查看 v2.4.3版本更新日志
setKey(key) {
// @ts-ignore
return `${config.name}:${key}`;
},
// 存储数据到本地缓存,设置过期时间
setCache(key, value, expireTime) {
const now = new Date().getTime();
const item = {
value: value,
expire: now + expireTime * 1000 // 过期时间,单位是毫秒
};
localStorage.setItem(Local.setKey(key), JSON.stringify(item));
},
// 从本地缓存读取数据,检查是否过期
getCache(key) {
const itemStr = localStorage.getItem(Local.setKey(key));
if (itemStr) {
const item = JSON.parse(itemStr);
const now = new Date().getTime();
if (now < item.expire) {
return item.value;
} else {
// 数据已过期,清除缓存
localStorage.removeItem(key);
}
}
return null;
},
// 设置永久缓存
set(key, val) {
window.localStorage.setItem(Local.setKey(key), JSON.stringify(val));
},
// 获取永久缓存
get(key) {
let json = window.localStorage.getItem(Local.setKey(key));
return JSON.parse(json);
},
// 移除永久缓存
remove(key) {
window.localStorage.removeItem(Local.setKey(key));
},
// 移除全部永久缓存
clear() {
window.localStorage.clear();
},
};
// 2、window.sessionStorage 浏览器临时缓存
export const Session = {
// 设置临时缓存
set(key, val) {
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify(val));
},
// 获取临时缓存
get(key) {
let json = window.sessionStorage.getItem(Local.setKey(key));
return JSON.parse(json);
},
// 移除临时缓存
remove(key) {
window.sessionStorage.removeItem(Local.setKey(key));
},
// 移除全部临时缓存
clear() {
window.sessionStorage.clear();
},
};

View File

@ -0,0 +1,189 @@
<template>
<div class="app-container">
<div class="mb10">
<el-button
size="small"
class="filter-item"
type="primary"
@click="handleAdd('')"
>添加</el-button
>
</div>
<el-table
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" fixed width="200" label="操作">
<template slot-scope="scope">
<el-button
size="small"
class="filter-item"
type="primary"
@click="handleAdd(scope.row)"
>编辑</el-button
>
</template>
</el-table-column>
<el-table-column align="center" fixed label="标题" prop="title" />
<el-table-column align="center" fixed label="内容" prop="content" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList"
/>
<el-dialog :title="dialogTitle" :visible.sync="dialog2Visible">
<el-form ref="addForm" label-width="160px" :model="form" :rules="rules">
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item>
<el-form-item label="内容" prop="content">
<el-input v-model="form.content" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onPass(form)"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from "@/components/PaginationFixed";
export default {
name: "Announlist",
components: { Pagination },
data() {
return {
active: "follow",
order_status: [
"#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
"#9d1cb5",
],
follow_status: [
"#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
],
options: [],
value: null,
next_follow: null,
list: [],
total: 0,
listLoading: true,
listQuery: {
page: 1,
limit: 10,
times: [],
status: null,
admin: null,
zhubo: null,
os_status: [],
},
item: { next_follow: "", personnel: {} },
follow: [],
dialog2Visible: false,
oss: [],
dialogTitle: "添加",
adminList: [],
form: {
title: "",
content: "",
},
rules: {
title: [{ required: true, message: "请输入标题", trigger: "change" }],
},
};
},
created() {
this.listQuery.zhubo = this.$route.query.zhubo || null;
if (this.$route.query.start && this.$route.query.end) {
this.listQuery.times = [this.$route.query.start, this.$route.query.end];
}
this.getList();
},
methods: {
getList($is_excel) {
this.$axios
.get("/admin/announcements/index", { params: this.listQuery })
.then((response) => {
this.list = response.data.data;
this.total = response.data.total;
this.listLoading = false;
});
},
handleAdd(val) {
this.dialog2Visible = true;
this.$nextTick(() => {
this.$refs["addForm"].resetFields();
if (val) {
this.dialogTitle = "编辑";
this.form = {
title: val.title,
content: val.content,
id: val.id,
};
}
});
},
onPass() {
this.$refs.addForm.validate((valid) => {
if (valid) {
this.$axios
.post(
this.dialogTitle == "编辑"
? "/admin/announcements/edit"
: "/admin/announcements/add",
this.form
)
.then((res) => {
this.$message({
message: this.dialogTitle == "编辑" ? "编辑成功" : "添加成功",
type: "success",
});
this.dialog2Visible = false;
this.getList();
});
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
},
};
</script>
<style scoped>
.app-container {
position: relative;
padding-bottom: 60px; /* 分页条的高度 */
}
.filter-container,
.el-table {
padding-bottom: 52px; /* 分页条的高度,以避免内容重叠 */
}
.mb10 {
margin-bottom: 10px;
}
</style>

View File

@ -1,9 +1,11 @@
<template> <template>
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" /> <panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row v-if="lineChartData" style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> <el-row
v-if="lineChartData"
style="background: #fff; padding: 16px 16px 0; margin-bottom: 32px"
>
<line-chart :chart-data="lineChartData" /> <line-chart :chart-data="lineChartData" />
</el-row> </el-row>
@ -37,36 +39,36 @@
</template> </template>
<script> <script>
import PanelGroup from './components/PanelGroup' import PanelGroup from "./components/PanelGroup";
import LineChart from './components/LineChart' import LineChart from "./components/LineChart";
import RaddarChart from './components/RaddarChart' import RaddarChart from "./components/RaddarChart";
import PieChart from './components/PieChart' import PieChart from "./components/PieChart";
import BarChart from './components/BarChart' import BarChart from "./components/BarChart";
import TransactionTable from './components/TransactionTable' import TransactionTable from "./components/TransactionTable";
import TodoList from './components/TodoList' import TodoList from "./components/TodoList";
import BoxCard from './components/BoxCard' import BoxCard from "./components/BoxCard";
import { Local } from "@/utils/storage.js";
const lineChartData = { const lineChartData = {
newVisitis: { newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165], expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145] actualData: [120, 82, 91, 154, 162, 140, 145],
}, },
messages: { messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140], expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130] actualData: [180, 160, 151, 106, 145, 150, 130],
}, },
purchases: { purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100], expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130] actualData: [120, 90, 100, 138, 142, 130, 130],
}, },
shoppings: { shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160], expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130] actualData: [120, 82, 91, 154, 162, 140, 130],
} },
} };
export default { export default {
name: 'DashboardAdmin', name: "DashboardAdmin",
components: { components: {
PanelGroup, PanelGroup,
LineChart, LineChart,
@ -75,24 +77,37 @@ export default {
BarChart, BarChart,
TransactionTable, TransactionTable,
TodoList, TodoList,
BoxCard BoxCard,
}, },
data() { data() {
return { return {
lineChartData: null lineChartData: null,
} };
}, },
created() { created() {
this.$axios.get('/admin/index/line', { params: this.listQuery }).then(response => { this.$axios
this.lineChartData = response.data .get("/admin/index/line", { params: this.listQuery })
}) .then((response) => {
this.lineChartData = response.data;
});
// if (!Local.getCache("announcements")) {
this.$axios.get("/admin/announcements/getLast").then((response) => {
this.$alert(response.data.content, response.data.title, {
confirmButtonText: "确定",
customClass: "opening-announcement",
callback: (action) => {
// Local.setCache("announcements", true, 10);
},
});
});
// }
}, },
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.lineChartData = lineChartData[type] this.lineChartData = lineChartData[type];
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -4,7 +4,7 @@
<script> <script>
export default { export default {
name: 'home', name: 'overflowConcealment',
data() { data() {
return { return {
isTruncated:false isTruncated:false
@ -30,6 +30,7 @@ export default {
// showConfirmButton:false // showConfirmButton:false
}); });
}, },
//
checkTruncation() { checkTruncation() {
this.isTruncated = this.$refs['desc_conten'].offsetWidth<this.$refs['desc_conten'].scrollWidth this.isTruncated = this.$refs['desc_conten'].offsetWidth<this.$refs['desc_conten'].scrollWidth
}, },

View File

@ -151,11 +151,11 @@
} }
.lineOnSale_right{ .lineOnSale_right{
margin-left: 20px; margin-left: 20px;
display: flex;
align-items: center;
::v-deep.el-button{ ::v-deep.el-button{
display: block; display: block;
} }
display: flex;
align-items: center;
.btn{ .btn{
width: 160px; width: 160px;
height: 36px; height: 36px;

View File

@ -1,11 +1,134 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"> <div class="filter-container">
<el-input
v-model="listQuery.sn"
placeholder="订单号"
style="width: 200px"
class="filter-item"
/>
<el-table-column align="center" fixed label="电话" width="120" prop="mobile" /> <el-input
v-model="listQuery.mobile"
placeholder="手机号"
style="width: 200px"
class="filter-item"
/>
<el-table-column align="center" fixed label="平台" width="80" prop="os_name" /> <el-input
v-model="listQuery.zhubo"
placeholder="主播"
style="width: 100px"
class="filter-item"
/>
<el-input
v-model="listQuery.admin"
placeholder="客服"
style="width: 100px"
class="filter-item"
/>
<el-cascader
v-model="listQuery.os_status"
placeholder="平台状态"
:options="oss"
class="filter-item"
@change="handleChange"
/>
<el-select
v-model="listQuery.status"
filterable
placeholder="跟进状态"
class="filter-item"
style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option
v-for="(v, k) in status_arr"
:key="k"
:label="v"
:value="k"
/>
</el-select>
<el-select
v-model="listQuery.timetype"
filterable
placeholder="时间"
class="filter-item"
style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option
v-for="(v, k) in timetype_arr"
:key="k"
:label="v"
:value="k"
/>
</el-select>
<el-date-picker
v-model="listQuery.times"
class="filter-item"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束日期"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList"
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList(1)"
>
导出
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="dialog2Visible = true"
>
核单
</el-button>
</div>
<el-table
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column
align="center"
fixed
label="电话"
width="120"
prop="mobile"
/>
<el-table-column
align="center"
fixed
label="平台"
width="80"
prop="os_name"
/>
<el-table-column align="center" fixed label="直播" width="60"> <el-table-column align="center" fixed label="直播" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
@ -13,37 +136,80 @@
<el-tag v-else type="info"></el-tag> <el-tag v-else type="info"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed label="客服" width="80" prop="admin.username" /> <el-table-column
align="center"
fixed
label="客服"
width="80"
prop="admin.username"
/>
<el-table-column align="center" label="订单号" width="180" prop="sn" /> <el-table-column align="center" label="订单号" width="180" prop="sn" />
<el-table-column width="138px" align="center" label="下单时间"> <el-table-column width="138px" align="center" label="下单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_at | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="160px" align="center" label="派单时间"> <el-table-column width="160px" align="center" label="派单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.give_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.give_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="状态" width="80"> <el-table-column align="center" label="状态" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:order_status[scope.row.order_status],border:`1px solid ${order_status[scope.row.order_status]}`}" type="primary">{{ scope.row.order_status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: order_status[scope.row.order_status],
border: `1px solid ${order_status[scope.row.order_status]}`,
}"
type="primary"
>
{{ scope.row.order_status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="跟进状态" width="90"> <el-table-column align="center" label="跟进状态" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:follow_status[scope.row.status],border:`1px solid ${follow_status[scope.row.status]}`}" type="primary">{{ scope.row.status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: follow_status[scope.row.status],
border: `1px solid ${follow_status[scope.row.status]}`,
}"
type="primary"
>
{{ scope.row.status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="500px" label="标题" prop="product_name" /> <el-table-column
<el-table-column width="500px" align="center" label="跟进备注" prop="remark" /> align="center"
width="500px"
label="标题"
prop="product_name"
/>
<el-table-column
width="500px"
align="center"
label="跟进备注"
prop="remark"
/>
<el-table-column align="center" label="联系人" width="120" prop="contact" /> <el-table-column
align="center"
label="联系人"
width="120"
prop="contact"
/>
<!-- <el-table-column align="center" label="微信" width="80"> <!-- <el-table-column align="center" label="微信" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -53,13 +219,15 @@
<el-table-column width="138px" align="center" label="出行时间"> <el-table-column width="138px" align="center" label="出行时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.travel_date | parseTime('{y}-{m}-{d}') }}</span> <span>{{ scope.row.travel_date | parseTime("{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="138px" align="center" label="最后跟进时间"> <el-table-column width="138px" align="center" label="最后跟进时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.last_follow | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.last_follow | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -69,7 +237,12 @@
<i v-if="scope.row.is_check == 2" class="el-icon-close" /> <i v-if="scope.row.is_check == 2" class="el-icon-close" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="138px" label="分类" prop="category_desc" /> <el-table-column
align="center"
width="138px"
label="分类"
prop="category_desc"
/>
<el-table-column align="center" label="总金额" width="120"> <el-table-column align="center" label="总金额" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -77,11 +250,23 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="80px" label="人数" prop="quantity" /> <el-table-column
<el-table-column align="center" label="主播" width="80" prop="anchor.username" /> align="center"
width="80px"
label="人数"
prop="quantity"
/>
<el-table-column
align="center"
label="主播"
width="80"
prop="anchor.username"
/>
<el-table-column width="138px" align="center" label="修改时间"> <el-table-column width="138px" align="center" label="修改时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.update_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.update_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -114,27 +299,51 @@
{{ item.mobile }} {{ item.mobile }}
</el-form-item> </el-form-item>
<el-form-item label="下单时间"> <el-form-item label="下单时间">
{{ item.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }} {{ item.create_at | parseTime("{y}-{m}-{d} {h}:{i}") }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="人员"> <el-form-item label="人员">
<el-row> <el-row>
<el-col :span="3">大人</el-col> <el-col :span="3">大人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.adult" name="adult" placeholder="大人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.adult"
name="adult"
placeholder="大人"
/></el-col>
<el-col :span="3">老人</el-col> <el-col :span="3">老人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.old" name="old" placeholder="老人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.old"
name="old"
placeholder="老人"
/></el-col>
<el-col :span="3">小孩</el-col> <el-col :span="3">小孩</el-col>
<el-col :span="5"><el-input v-model="item.personnel.child" name="child" placeholder="小孩" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.child"
name="child"
placeholder="小孩"
/></el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="item.status !== 1" label="核销码"> <el-form-item v-if="item.status !== 1" label="核销码">
<el-input v-model="item.check_sn" name="check_sn" placeholder="请输入平台核销码" /> <el-input
v-model="item.check_sn"
name="check_sn"
placeholder="请输入平台核销码"
/>
</el-form-item> </el-form-item>
<el-form-item label="加微信" v-if="item.status !== 2"> <el-form-item label="加微信" v-if="item.status !== 2">
<el-checkbox v-model="item.is_wechat" :true-label="1" :false-label="0">已加微信</el-checkbox> <el-checkbox
v-model="item.is_wechat"
:true-label="1"
:false-label="0"
>已加微信</el-checkbox
>
</el-form-item> </el-form-item>
<el-form-item label="出游日期"> <el-form-item label="出游日期">
@ -160,12 +369,13 @@
placeholder="选择日期时间" placeholder="选择日期时间"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="跟进状态"> <el-form-item label="跟进状态">
<template v-for="(v, k) in status_arr"> <template v-for="(v, k) in status_arr">
<el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{ v }}</el-radio> <el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{
v
}}</el-radio>
</template> </template>
</el-form-item> </el-form-item>
<!-- <el-form-item label="快捷跟进" style="width: 600px;"> <!-- <el-form-item label="快捷跟进" style="width: 600px;">
@ -185,7 +395,6 @@
<el-form-item label="跟进说明"> <el-form-item label="跟进说明">
<el-input v-model="item.desc" type="textarea" /> <el-input v-model="item.desc" type="textarea" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -194,63 +403,38 @@
<el-tabs v-model="active" type="border-card"> <el-tabs v-model="active" type="border-card">
<el-tab-pane name="follow" label="跟进记录"> <el-tab-pane name="follow" label="跟进记录">
<el-table :data="item.follow" style="width: 100%">
<el-table <el-table-column label="日期" width="138">
:data="item.follow"
style="width: 100%"
>
<el-table-column
label="日期"
width="138"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="跟进人" width="110" prop="name" />
label="跟进人" <el-table-column label="状态" width="80">
width="110"
prop="name"
/>
<el-table-column
label="状态"
width="80"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ status_arr[scope.row.status] }}</span> <span>{{ status_arr[scope.row.status] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="desc" label="跟进说明" />
prop="desc"
label="跟进说明"
/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="finance" label="财务记录"> <el-tab-pane name="finance" label="财务记录">
<el-table <el-table :data="item.finance" style="width: 100%">
:data="item.finance" <el-table-column label="日期">
style="width: 100%"
>
<el-table-column
label="日期"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="类型" width="110">
label="类型"
width="110"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ type_arr[scope.row.type] }}</span> <span>{{ type_arr[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="状态" width="120">
label="状态"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.total / 100 }}</span> <span>{{ scope.row.total / 100 }}</span>
</template> </template>
@ -258,7 +442,6 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-dialog> </el-dialog>
<el-dialog title="纯核销" :visible.sync="dialog2Visible"> <el-dialog title="纯核销" :visible.sync="dialog2Visible">
@ -283,13 +466,23 @@
<el-form-item label="订单号:"> <el-form-item label="订单号:">
<el-input v-model="item3.sn" disabled /> <el-input v-model="item3.sn" disabled />
</el-form-item> </el-form-item>
<el-form-item label="流转对象:" style="width: 600px;" prop="flowObj"> <el-form-item label="流转对象:" style="width: 600px" prop="flowObj">
<el-select v-model="item3.flowObj" placeholder="请选择" @change="onChange2"> <el-select
<el-form-item style="display: inline-flex;text-align: left;width: 770px;"> v-model="item3.flowObj"
placeholder="请选择"
@change="onChange2"
>
<el-form-item
style="display: inline-flex; text-align: left; width: 770px"
>
<el-option <el-option
v-for="item in adminList" v-for="item in adminList"
:key="item.value" :key="item.value"
style="width: 250px;display: inline-flex;word-break: break-all;" style="
width: 250px;
display: inline-flex;
word-break: break-all;
"
:label="item.username" :label="item.username"
:value="item.id" :value="item.id"
/> />
@ -299,31 +492,64 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- scope.row.backs&&scope.row.backs.status==2? --> <!-- scope.row.backs&&scope.row.backs.status==2? -->
<el-button v-if="item3.backs&&item3.backs.status==0" type="primary" @click="onCancel(item3.flowObj)"> </el-button> <el-button
<el-button v-else type="primary" @click="onCirculationSave(item3.flowObj)"> </el-button> v-if="item3.backs && item3.backs.status == 0"
type="primary"
@click="onCancel(item3.flowObj)"
> </el-button
>
<el-button
v-else
type="primary"
@click="onCirculationSave(item3.flowObj)"
> </el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import Pagination from '@/Wangeditor/Pagination' // import Pagination from '@/Wangeditor/Pagination'
import Pagination from '@/components/PaginationFixed' import Pagination from "@/components/PaginationFixed";
import {orderBack} from '@/api/order' import { orderBack } from "@/api/order";
export default { export default {
name: 'Orderlist', name: "Orderlist",
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
active: 'follow', active: "follow",
types: { 0: '', 1: '', 2: '', 3: 'primary', 4: 'success', 5: 'warning', 6: 'danger', 7: 'info' }, types: {
types2: { 1: 'primary', 2: 'success', 3: 'warning' }, 0: "",
status_arr: ['待跟进', '跟进中', '已核销', '核销失败', '放弃跟单'], 1: "",
type_arr: ['-', '收益', '支出'], 2: "",
3: "primary",
4: "success",
5: "warning",
6: "danger",
7: "info",
},
types2: { 1: "primary", 2: "success", 3: "warning" },
status_arr: ["待跟进", "跟进中", "已核销", "核销失败", "放弃跟单"],
type_arr: ["-", "收益", "支出"],
timetype_arr: {}, timetype_arr: {},
order_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662', '#9d1cb5'], order_status: [
follow_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662'], "#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
"#9d1cb5",
],
follow_status: [
"#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
],
options: [], options: [],
value: null, value: null,
next_follow: null, next_follow: null,
@ -337,9 +563,9 @@ export default {
status: null, status: null,
admin: null, admin: null,
zhubo: null, zhubo: null,
os_status:[] os_status: [],
}, },
item: { next_follow: '', personnel: {}}, item: { next_follow: "", personnel: {} },
follow: [], follow: [],
dialogVisible: false, dialogVisible: false,
@ -349,109 +575,125 @@ export default {
item3: { item3: {
sn: null, sn: null,
backs: null, backs: null,
flowObj:'', flowObj: "",
os: null // 12 3 os: null, // 12 3
}, },
os_arr: { 1: '美团', 2: '快手', 3: '抖音' }, os_arr: { 1: "美团", 2: "快手", 3: "抖音" },
adminList: [], adminList: [],
form: {}, form: {},
rules: { rules: {
flowObj: [ flowObj: [
{ required: true, message: '请选择流转对象', trigger: 'change' } { required: true, message: "请选择流转对象", trigger: "change" },
], ],
} },
} };
}, },
created() { created() {
// this.listQuery.status = this.$route.query.status || null // this.listQuery.status = this.$route.query.status || null
this.listQuery.zhubo = this.$route.query.zhubo || null this.listQuery.zhubo = this.$route.query.zhubo || null;
if (this.$route.query.start && this.$route.query.end) { if (this.$route.query.start && this.$route.query.end) {
this.listQuery.times = [this.$route.query.start, this.$route.query.end] this.listQuery.times = [this.$route.query.start, this.$route.query.end];
} }
this.setQuery('status') this.setQuery("status");
this.setQuery('os_status') this.setQuery("os_status");
this.setQuery('times') this.setQuery("times");
this.getList() this.getList();
this.getShortcutContent() this.getShortcutContent();
this.getAdminList() this.getAdminList();
}, },
methods: { methods: {
setQuery(key) { setQuery(key) {
if (this.$route.query.hasOwnProperty(key)) { if (this.$route.query.hasOwnProperty(key)) {
this.listQuery[key] = this.$route.query[key] this.listQuery[key] = this.$route.query[key];
} else { } else {
this.listQuery[key] = '' this.listQuery[key] = "";
} }
}, },
getList($is_excel) { getList($is_excel) {
this.listQuery.excel = null this.listQuery.excel = null;
if ($is_excel == 1) { if ($is_excel == 1) {
this.listQuery.excel = 1 this.listQuery.excel = 1;
const isdate = this.listQuery.times[0] instanceof Date const isdate = this.listQuery.times[0] instanceof Date;
const params = { const params = {
...this.listQuery, ...this.listQuery,
times: [isdate ? this.listQuery.times[0].toISOString() : '', isdate ? this.listQuery.times[1].toISOString() : ''] times: [
isdate ? this.listQuery.times[0].toISOString() : "",
isdate ? this.listQuery.times[1].toISOString() : "",
],
};
window.open("/admin/order/index?" + this.objectToQuery(params));
return;
} }
window.open('/admin/order/index?' + this.objectToQuery(params)) this.listQuery.status = 4; //todo
return this.$axios
} .get("/admin/order/index", { params: this.listQuery })
this.listQuery.status = 4 //todo .then((response) => {
this.$axios.get('/admin/order/index', { params: this.listQuery }).then(response => { this.list = response.data.data;
this.list = response.data.data this.total = response.data.total;
this.total = response.data.total (this.timetype_arr = response.ext.timetype),
this.timetype_arr = response.ext.timetype, (this.oss = response.ext.oss);
this.oss = response.ext.oss this.listLoading = false;
this.listLoading = false });
})
}, },
objectToQuery(obj) { objectToQuery(obj) {
return Object.keys(obj).map(key => { return Object.keys(obj)
const value = obj[key] .map((key) => {
if (value == undefined || value == null) return '' const value = obj[key];
return encodeURIComponent(key) + '=' + encodeURIComponent(value) if (value == undefined || value == null) return "";
}).join('&') return encodeURIComponent(key) + "=" + encodeURIComponent(value);
})
.join("&");
}, },
onInfo(item) { onInfo(item) {
this.value = null this.value = null;
this.next_follow = null this.next_follow = null;
this.$set(item, 'next_follow', null) this.$set(item, "next_follow", null);
this.item = item this.item = item;
this.active = 'follow' this.active = "follow";
this.$axios.get('/admin/order/info', { params: { id: item.id }}).then(res => { this.$axios
this.item = res.data .get("/admin/order/info", { params: { id: item.id } })
this.dialogVisible = true .then((res) => {
}).catch(err => { this.item = res.data;
this.dialogVisible = true;
}) })
.catch((err) => {});
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getAdminList() { getAdminList() {
this.$axios.get('/admin/admin/index', { params: { limit: 100, status: 1, is_order: 1 }}).then(response => { this.$axios
this.adminList = response.data.data .get("/admin/admin/index", {
this.listLoading = false params: { limit: 100, status: 1, is_order: 1 },
}).catch(err => {
}) })
.then((response) => {
this.adminList = response.data.data;
this.listLoading = false;
})
.catch((err) => {});
}, },
onCirculation(item) { onCirculation(item) {
this.applyVisible = true this.applyVisible = true;
this.item3 = { ...item, os: Number(item.os) } this.item3 = { ...item, os: Number(item.os) };
console.log(this.item3); console.log(this.item3);
if (this.item3.backs && this.item3.backs.admin_id) { if (this.item3.backs && this.item3.backs.admin_id) {
this.item3.flowObj = this.item3.backs.admin_id this.item3.flowObj = this.item3.backs.admin_id;
} else { } else {
this.resetForm('ruleForm') this.resetForm("ruleForm");
} }
}, },
// //
onCirculationSave(to_admin_id) { onCirculationSave(to_admin_id) {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
orderBack({ sn: this.item3.sn, os: this.item3.os, to_admin_id: to_admin_id }).then((res)=>{ orderBack({
this.applyVisible = false sn: this.item3.sn,
this.getList() os: this.item3.os,
}) to_admin_id: to_admin_id,
}).then((res) => {
this.applyVisible = false;
this.getList();
});
} else { } else {
return false; return false;
} }
@ -461,65 +703,92 @@ export default {
onCancel() { onCancel() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
this.$axios.post('/admin/order/backcancel', { id: this.item3.id }).then(res => { this.$axios
this.applyVisible = false .post("/admin/order/backcancel", { id: this.item3.id })
this.getList() .then((res) => {
}).catch(err => { this.applyVisible = false;
console.log(err) this.getList();
}) })
.catch((err) => {
console.log(err);
});
} else { } else {
return false return false;
} }
}); });
}, },
onBack() { onBack() {
this.$axios.post('/admin/order/back', this.item).then(res => { this.$axios
this.dialogVisible = false .post("/admin/order/back", this.item)
this.item = {} .then((res) => {
this.getList() this.dialogVisible = false;
}).catch(err => { this.item = {};
this.getList();
}) })
.catch((err) => {});
}, },
onSave(item) { onSave(item) {
console.log(this.next_follow) console.log(this.next_follow);
this.$axios.post('/admin/order/save', { id: item.id, check_sn: item.check_sn, is_wechat: item.is_wechat, travel_end: item.travel_end, travel_date: item.travel_date, desc: item.desc, status: item.status, next_follow: this.next_follow, personnel: this.item.personnel }).then(res => {
this.dialogVisible = false
this.item = { next_follow: '', personnel: {}}
}).catch(err => {
this.$axios
.post("/admin/order/save", {
id: item.id,
check_sn: item.check_sn,
is_wechat: item.is_wechat,
travel_end: item.travel_end,
travel_date: item.travel_date,
desc: item.desc,
status: item.status,
next_follow: this.next_follow,
personnel: this.item.personnel,
}) })
.then((res) => {
this.dialogVisible = false;
this.item = { next_follow: "", personnel: {} };
})
.catch((err) => {});
}, },
onPass(form) { onPass(form) {
this.$axios.post('/admin/order/pass', { check_sn: form.check_sn }).then(res => { this.$axios
this.dialog2Visible = false .post("/admin/order/pass", { check_sn: form.check_sn })
this.form = {} .then((res) => {
}).catch(err => { this.dialog2Visible = false;
this.form = {};
}) })
.catch((err) => {});
}, },
onChange(from) { onChange(from) {
this.$set(this.item, 'desc', from + (this.item.desc != undefined ? this.item.desc : '')) this.$set(
this.item,
"desc",
from + (this.item.desc != undefined ? this.item.desc : "")
);
}, },
onChange2(from) { onChange2(from) {
this.$set(this.item, 'to_admin_id', from + (this.item.admin_id != undefined ? this.item.admin_id : '')) this.$set(
this.item,
"to_admin_id",
from + (this.item.admin_id != undefined ? this.item.admin_id : "")
);
}, },
handleChange(os) { handleChange(os) {
console.log(os) console.log(os);
}, },
getShortcutContent() { getShortcutContent() {
this.listLoading = true this.listLoading = true;
this.$axios.get('/admin/shortcutContent/list', { params: { page: 1, limit: 50, status: 1 }}).then(response => { this.$axios
for (const r of response.data.data) { .get("/admin/shortcutContent/list", {
this.options.push({ value: r.id, label: r.content }) params: { page: 1, limit: 50, status: 1 },
}
}).catch(() => {
}) })
.then((response) => {
for (const r of response.data.data) {
this.options.push({ value: r.id, label: r.content });
} }
} })
} .catch(() => {});
},
},
};
</script> </script>
<style scoped> <style scoped>

View File

@ -1,14 +1,33 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="listQuery.sn" placeholder="订单号" style="width: 200px;" class="filter-item" /> <el-input
v-model="listQuery.sn"
placeholder="订单号"
style="width: 200px"
class="filter-item"
/>
<el-input v-model="listQuery.mobile" placeholder="手机号" style="width: 200px;" class="filter-item" /> <el-input
v-model="listQuery.mobile"
placeholder="手机号"
style="width: 200px"
class="filter-item"
/>
<el-input v-model="listQuery.zhubo" placeholder="主播" style="width: 100px;" class="filter-item" /> <el-input
v-model="listQuery.zhubo"
placeholder="主播"
style="width: 100px"
class="filter-item"
/>
<el-input v-model="listQuery.admin" placeholder="客服" style="width: 100px;" class="filter-item" /> <el-input
v-model="listQuery.admin"
placeholder="客服"
style="width: 100px"
class="filter-item"
/>
<el-cascader <el-cascader
v-model="listQuery.os_status" v-model="listQuery.os_status"
@ -18,12 +37,14 @@
@change="handleChange" @change="handleChange"
/> />
<el-select v-model="listQuery.status" filterable placeholder="跟进状态" class="filter-item" style="width: 120px;"> <el-select
<el-option v-model="listQuery.status"
key="" filterable
label="请选择" placeholder="跟进状态"
value="" class="filter-item"
/> style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option <el-option
v-for="(v, k) in status_arr" v-for="(v, k) in status_arr"
:key="k" :key="k"
@ -32,12 +53,14 @@
/> />
</el-select> </el-select>
<el-select v-model="listQuery.timetype" filterable placeholder="时间" class="filter-item" style="width: 120px;"> <el-select
<el-option v-model="listQuery.timetype"
key="" filterable
label="请选择" placeholder="时间"
value="" class="filter-item"
/> style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option <el-option
v-for="(v, k) in timetype_arr" v-for="(v, k) in timetype_arr"
:key="k" :key="k"
@ -56,41 +79,95 @@
end-placeholder="结束日期" end-placeholder="结束日期"
/> />
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList"
>
搜索 搜索
</el-button> </el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList(1)"> <el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList(1)"
>
导出 导出
</el-button> </el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="dialog2Visible = true"> <el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="dialog2Visible = true"
>
核单 核单
</el-button> </el-button>
</div> </div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"> <el-table
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" fixed width="200" label="操作"> <el-table-column align="center" fixed width="200" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<el-button :type="scope.row.backs&&scope.row.backs.status==0? types[7] : types[4]" size="small" icon="el-icon-refresh" @click="onCirculation(scope.row)"> <el-button
{{ scope.row.backs&&scope.row.backs.status==0?'流转中':'流转出' }} :type="
scope.row.backs && scope.row.backs.status == 0
? types[7]
: types[4]
"
size="small"
icon="el-icon-refresh"
@click="onCirculation(scope.row)"
>
{{
scope.row.backs && scope.row.backs.status == 0
? "流转中"
: "流转出"
}}
</el-button> </el-button>
<el-button :type="types[scope.row.order_status]" size="small" icon="el-icon-edit" @click="onInfo(scope.row)"> <el-button
:type="types[scope.row.order_status]"
size="small"
icon="el-icon-edit"
@click="onInfo(scope.row)"
>
跟进 跟进
</el-button> </el-button>
<el-button size="small" icon="el-icon-thumb" @click="onOneClickRepair(scope.row)"> <el-button
size="small"
icon="el-icon-thumb"
@click="onOneClickRepair(scope.row)"
>
同步 同步
</el-button> </el-button>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed label="电话" width="120" prop="mobile" /> <el-table-column
align="center"
fixed
label="电话"
width="120"
prop="mobile"
/>
<el-table-column align="center" fixed label="平台" width="80" prop="os_name" /> <el-table-column
align="center"
fixed
label="平台"
width="80"
prop="os_name"
/>
<el-table-column align="center" fixed label="直播" width="60"> <el-table-column align="center" fixed label="直播" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
@ -98,37 +175,80 @@
<el-tag v-else type="info"></el-tag> <el-tag v-else type="info"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed label="客服" width="80" prop="admin.username" /> <el-table-column
align="center"
fixed
label="客服"
width="80"
prop="admin.username"
/>
<el-table-column align="center" label="订单号" width="180" prop="sn" /> <el-table-column align="center" label="订单号" width="180" prop="sn" />
<el-table-column width="138px" align="center" label="下单时间"> <el-table-column width="138px" align="center" label="下单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_at | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="160px" align="center" label="派单时间"> <el-table-column width="160px" align="center" label="派单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.give_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.give_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="状态" width="80"> <el-table-column align="center" label="状态" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:order_status[scope.row.order_status],border:`1px solid ${order_status[scope.row.order_status]}`}" type="primary">{{ scope.row.order_status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: order_status[scope.row.order_status],
border: `1px solid ${order_status[scope.row.order_status]}`,
}"
type="primary"
>
{{ scope.row.order_status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="跟进状态" width="90"> <el-table-column align="center" label="跟进状态" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:follow_status[scope.row.status],border:`1px solid ${follow_status[scope.row.status]}`}" type="primary">{{ scope.row.status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: follow_status[scope.row.status],
border: `1px solid ${follow_status[scope.row.status]}`,
}"
type="primary"
>
{{ scope.row.status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="500px" label="标题" prop="product_name" /> <el-table-column
<el-table-column width="500px" align="center" label="跟进备注" prop="remark" /> align="center"
width="500px"
label="标题"
prop="product_name"
/>
<el-table-column
width="500px"
align="center"
label="跟进备注"
prop="remark"
/>
<el-table-column align="center" label="联系人" width="120" prop="contact" /> <el-table-column
align="center"
label="联系人"
width="120"
prop="contact"
/>
<!-- <el-table-column align="center" label="微信" width="80"> <!-- <el-table-column align="center" label="微信" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -138,13 +258,15 @@
<el-table-column width="138px" align="center" label="出行时间"> <el-table-column width="138px" align="center" label="出行时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.travel_date | parseTime('{y}-{m}-{d}') }}</span> <span>{{ scope.row.travel_date | parseTime("{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="138px" align="center" label="最后跟进时间"> <el-table-column width="138px" align="center" label="最后跟进时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.last_follow | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.last_follow | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -154,7 +276,12 @@
<i v-if="scope.row.is_check == 2" class="el-icon-close" /> <i v-if="scope.row.is_check == 2" class="el-icon-close" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="138px" label="分类" prop="category_desc" /> <el-table-column
align="center"
width="138px"
label="分类"
prop="category_desc"
/>
<el-table-column align="center" label="总金额" width="120"> <el-table-column align="center" label="总金额" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -162,11 +289,23 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="80px" label="人数" prop="quantity" /> <el-table-column
<el-table-column align="center" label="主播" width="80" prop="anchor.username" /> align="center"
width="80px"
label="人数"
prop="quantity"
/>
<el-table-column
align="center"
label="主播"
width="80"
prop="anchor.username"
/>
<el-table-column width="138px" align="center" label="修改时间"> <el-table-column width="138px" align="center" label="修改时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.update_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.update_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -199,27 +338,51 @@
{{ item.mobile }} {{ item.mobile }}
</el-form-item> </el-form-item>
<el-form-item label="下单时间"> <el-form-item label="下单时间">
{{ item.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }} {{ item.create_at | parseTime("{y}-{m}-{d} {h}:{i}") }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="人员"> <el-form-item label="人员">
<el-row> <el-row>
<el-col :span="3">大人</el-col> <el-col :span="3">大人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.adult" name="adult" placeholder="大人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.adult"
name="adult"
placeholder="大人"
/></el-col>
<el-col :span="3">老人</el-col> <el-col :span="3">老人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.old" name="old" placeholder="老人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.old"
name="old"
placeholder="老人"
/></el-col>
<el-col :span="3">小孩</el-col> <el-col :span="3">小孩</el-col>
<el-col :span="5"><el-input v-model="item.personnel.child" name="child" placeholder="小孩" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.child"
name="child"
placeholder="小孩"
/></el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="item.status !== 1" label="核销码"> <el-form-item v-if="item.status !== 1" label="核销码">
<el-input v-model="item.check_sn" name="check_sn" placeholder="请输入平台核销码" /> <el-input
v-model="item.check_sn"
name="check_sn"
placeholder="请输入平台核销码"
/>
</el-form-item> </el-form-item>
<el-form-item label="加微信" v-if="item.status !== 2"> <el-form-item label="加微信" v-if="item.status !== 2">
<el-checkbox v-model="item.is_wechat" :true-label="1" :false-label="0">已加微信</el-checkbox> <el-checkbox
v-model="item.is_wechat"
:true-label="1"
:false-label="0"
>已加微信</el-checkbox
>
</el-form-item> </el-form-item>
<el-form-item label="出游日期"> <el-form-item label="出游日期">
@ -245,12 +408,13 @@
placeholder="选择日期时间" placeholder="选择日期时间"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="跟进状态"> <el-form-item label="跟进状态">
<template v-for="(v, k) in status_arr"> <template v-for="(v, k) in status_arr">
<el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{ v }}</el-radio> <el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{
v
}}</el-radio>
</template> </template>
</el-form-item> </el-form-item>
<!-- <el-form-item label="快捷跟进" style="width: 600px;"> <!-- <el-form-item label="快捷跟进" style="width: 600px;">
@ -270,7 +434,6 @@
<el-form-item label="跟进说明"> <el-form-item label="跟进说明">
<el-input v-model="item.desc" type="textarea" /> <el-input v-model="item.desc" type="textarea" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -279,63 +442,38 @@
<el-tabs v-model="active" type="border-card"> <el-tabs v-model="active" type="border-card">
<el-tab-pane name="follow" label="跟进记录"> <el-tab-pane name="follow" label="跟进记录">
<el-table :data="item.follow" style="width: 100%">
<el-table <el-table-column label="日期" width="138">
:data="item.follow"
style="width: 100%"
>
<el-table-column
label="日期"
width="138"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="跟进人" width="110" prop="name" />
label="跟进人" <el-table-column label="状态" width="80">
width="110"
prop="name"
/>
<el-table-column
label="状态"
width="80"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ status_arr[scope.row.status] }}</span> <span>{{ status_arr[scope.row.status] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="desc" label="跟进说明" />
prop="desc"
label="跟进说明"
/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="finance" label="财务记录"> <el-tab-pane name="finance" label="财务记录">
<el-table <el-table :data="item.finance" style="width: 100%">
:data="item.finance" <el-table-column label="日期">
style="width: 100%"
>
<el-table-column
label="日期"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="类型" width="110">
label="类型"
width="110"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ type_arr[scope.row.type] }}</span> <span>{{ type_arr[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="状态" width="120">
label="状态"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.total / 100 }}</span> <span>{{ scope.row.total / 100 }}</span>
</template> </template>
@ -343,7 +481,6 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-dialog> </el-dialog>
<el-dialog title="纯核销" :visible.sync="dialog2Visible"> <el-dialog title="纯核销" :visible.sync="dialog2Visible">
@ -368,13 +505,23 @@
<el-form-item label="订单号:"> <el-form-item label="订单号:">
<el-input v-model="item3.sn" disabled /> <el-input v-model="item3.sn" disabled />
</el-form-item> </el-form-item>
<el-form-item label="流转对象:" style="width: 600px;" prop="flowObj"> <el-form-item label="流转对象:" style="width: 600px" prop="flowObj">
<el-select v-model="item3.flowObj" placeholder="请选择" @change="onChange2"> <el-select
<el-form-item style="display: inline-flex;text-align: left;width: 770px;"> v-model="item3.flowObj"
placeholder="请选择"
@change="onChange2"
>
<el-form-item
style="display: inline-flex; text-align: left; width: 770px"
>
<el-option <el-option
v-for="item in adminList" v-for="item in adminList"
:key="item.value" :key="item.value"
style="width: 250px;display: inline-flex;word-break: break-all;" style="
width: 250px;
display: inline-flex;
word-break: break-all;
"
:label="item.username" :label="item.username"
:value="item.id" :value="item.id"
/> />
@ -384,31 +531,64 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- scope.row.backs&&scope.row.backs.status==2? --> <!-- scope.row.backs&&scope.row.backs.status==2? -->
<el-button v-if="item3.backs&&item3.backs.status==0" type="primary" @click="onCancel(item3.flowObj)"> </el-button> <el-button
<el-button v-else type="primary" @click="onCirculationSave(item3.flowObj)"> </el-button> v-if="item3.backs && item3.backs.status == 0"
type="primary"
@click="onCancel(item3.flowObj)"
> </el-button
>
<el-button
v-else
type="primary"
@click="onCirculationSave(item3.flowObj)"
> </el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import Pagination from '@/Wangeditor/Pagination' // import Pagination from '@/Wangeditor/Pagination'
import Pagination from '@/components/PaginationFixed' import Pagination from "@/components/PaginationFixed";
import {orderBack} from '@/api/order' import { orderBack } from "@/api/order";
export default { export default {
name: 'Orderlist', name: "Orderlist",
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
active: 'follow', active: "follow",
types: { 0: '', 1: '', 2: '', 3: 'primary', 4: 'success', 5: 'warning', 6: 'danger', 7: 'info' }, types: {
types2: { 1: 'primary', 2: 'success', 3: 'warning' }, 0: "",
status_arr: ['待跟进', '跟进中', '已核销', '核销失败', '放弃跟单'], 1: "",
type_arr: ['-', '收益', '支出'], 2: "",
3: "primary",
4: "success",
5: "warning",
6: "danger",
7: "info",
},
types2: { 1: "primary", 2: "success", 3: "warning" },
status_arr: ["待跟进", "跟进中", "已核销", "核销失败", "放弃跟单"],
type_arr: ["-", "收益", "支出"],
timetype_arr: {}, timetype_arr: {},
order_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662', '#9d1cb5'], order_status: [
follow_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662'], "#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
"#9d1cb5",
],
follow_status: [
"#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
],
options: [], options: [],
value: null, value: null,
next_follow: null, next_follow: null,
@ -422,9 +602,9 @@ export default {
status: null, status: null,
admin: null, admin: null,
zhubo: null, zhubo: null,
os_status:[] os_status: [],
}, },
item: { next_follow: '', personnel: {}}, item: { next_follow: "", personnel: {} },
follow: [], follow: [],
dialogVisible: false, dialogVisible: false,
@ -434,109 +614,131 @@ export default {
item3: { item3: {
sn: null, sn: null,
backs: null, backs: null,
flowObj:'', flowObj: "",
os: null // 12 3 os: null, // 12 3
}, },
os_arr: { 1: '美团', 2: '快手', 3: '抖音' }, os_arr: { 1: "美团", 2: "快手", 3: "抖音" },
adminList: [], adminList: [],
form: {}, form: {},
rules: { rules: {
flowObj: [ flowObj: [
{ required: true, message: '请选择流转对象', trigger: 'change' } { required: true, message: "请选择流转对象", trigger: "change" },
], ],
}
}
}, },
created() { };
},
async created() {
// this.listQuery.status = this.$route.query.status || null // this.listQuery.status = this.$route.query.status || null
this.listQuery.zhubo = this.$route.query.zhubo || null this.listQuery.zhubo = this.$route.query.zhubo || null;
if (this.$route.query.start && this.$route.query.end) { if (this.$route.query.start && this.$route.query.end) {
this.listQuery.times = [this.$route.query.start, this.$route.query.end] this.listQuery.times = [this.$route.query.start, this.$route.query.end];
} }
this.setQuery('status') this.setQuery("status");
this.setQuery('os_status') this.setQuery("os_status");
this.setQuery('times') this.setQuery("times");
this.getList() await this.getList();
this.getShortcutContent() this.$nextTick(() => {
this.getAdminList() let arr = this.list.map((res) => {
return res.id;
});
this.onOneClickRepair({ id: arr.join() });
});
this.getShortcutContent();
this.getAdminList();
}, },
methods: { methods: {
setQuery(key) { setQuery(key) {
if (this.$route.query.hasOwnProperty(key)) { if (this.$route.query.hasOwnProperty(key)) {
this.listQuery[key] = this.$route.query[key] this.listQuery[key] = this.$route.query[key];
} else { } else {
this.listQuery[key] = '' this.listQuery[key] = "";
} }
}, },
getList($is_excel) { async getList($is_excel) {
this.listQuery.excel = null this.listQuery.excel = null;
if ($is_excel == 1) { if ($is_excel == 1) {
this.listQuery.excel = 1 this.listQuery.excel = 1;
const isdate = this.listQuery.times[0] instanceof Date const isdate = this.listQuery.times[0] instanceof Date;
const params = { const params = {
...this.listQuery, ...this.listQuery,
times: [isdate ? this.listQuery.times[0].toISOString() : '', isdate ? this.listQuery.times[1].toISOString() : ''] times: [
} isdate ? this.listQuery.times[0].toISOString() : "",
window.open('/admin/order/index?' + this.objectToQuery(params)) isdate ? this.listQuery.times[1].toISOString() : "",
return ],
};
window.open("/admin/order/index?" + this.objectToQuery(params));
return;
} }
this.$axios.get('/admin/order/index', { params: this.listQuery }).then(response => { await this.$axios
this.list = response.data.data .get("/admin/order/index", { params: this.listQuery })
this.total = response.data.total .then((response) => {
this.timetype_arr = response.ext.timetype, this.list = response.data.data;
this.oss = response.ext.oss this.total = response.data.total;
this.listLoading = false (this.timetype_arr = response.ext.timetype),
}) (this.oss = response.ext.oss);
this.listLoading = false;
});
}, },
objectToQuery(obj) { objectToQuery(obj) {
return Object.keys(obj).map(key => { return Object.keys(obj)
const value = obj[key] .map((key) => {
if (value == undefined || value == null) return '' const value = obj[key];
return encodeURIComponent(key) + '=' + encodeURIComponent(value) if (value == undefined || value == null) return "";
}).join('&') return encodeURIComponent(key) + "=" + encodeURIComponent(value);
})
.join("&");
}, },
onInfo(item) { onInfo(item) {
this.value = null this.value = null;
this.next_follow = null this.next_follow = null;
this.$set(item, 'next_follow', null) this.$set(item, "next_follow", null);
this.item = item this.item = item;
this.active = 'follow' this.active = "follow";
this.$axios.get('/admin/order/info', { params: { id: item.id }}).then(res => { this.$axios
this.item = res.data .get("/admin/order/info", { params: { id: item.id } })
this.dialogVisible = true .then((res) => {
}).catch(err => { this.item = res.data;
this.dialogVisible = true;
}) })
.catch((err) => {});
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getAdminList() { getAdminList() {
this.$axios.get('/admin/admin/index', { params: { limit: 100, status: 1, is_order: 1 }}).then(response => { this.$axios
this.adminList = response.data.data .get("/admin/admin/index", {
this.listLoading = false params: { limit: 100, status: 1, is_order: 1 },
}).catch(err => {
}) })
.then((response) => {
this.adminList = response.data.data;
this.listLoading = false;
})
.catch((err) => {});
}, },
onCirculation(item) { onCirculation(item) {
this.applyVisible = true this.applyVisible = true;
this.item3 = { ...item, os: Number(item.os) } this.item3 = { ...item, os: Number(item.os) };
console.log(this.item3); console.log(this.item3);
if (this.item3.backs && this.item3.backs.admin_id) { if (this.item3.backs && this.item3.backs.admin_id) {
this.item3.flowObj = this.item3.backs.admin_id this.item3.flowObj = this.item3.backs.admin_id;
} else { } else {
this.resetForm('ruleForm') this.resetForm("ruleForm");
} }
}, },
// //
onCirculationSave(to_admin_id) { onCirculationSave(to_admin_id) {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
orderBack({ sn: this.item3.sn, os: this.item3.os, to_admin_id: to_admin_id }).then((res)=>{ orderBack({
this.applyVisible = false sn: this.item3.sn,
this.getList() os: this.item3.os,
}) to_admin_id: to_admin_id,
}).then((res) => {
this.applyVisible = false;
this.getList();
});
} else { } else {
return false; return false;
} }
@ -546,81 +748,111 @@ export default {
onCancel() { onCancel() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
this.$axios.post('/admin/order/backcancel', { id: this.item3.id }).then(res => { this.$axios
this.applyVisible = false .post("/admin/order/backcancel", { id: this.item3.id })
this.getList() .then((res) => {
}).catch(err => { this.applyVisible = false;
console.log(err) this.getList();
}) })
.catch((err) => {
console.log(err);
});
} else { } else {
return false return false;
} }
}); });
}, },
onBack() { onBack() {
this.$axios.post('/admin/order/back', this.item).then(res => { this.$axios
this.dialogVisible = false .post("/admin/order/back", this.item)
this.item = {} .then((res) => {
this.getList() this.dialogVisible = false;
}).catch(err => { this.item = {};
this.getList();
}) })
.catch((err) => {});
}, },
onSave(item) { onSave(item) {
console.log(this.next_follow) console.log(this.next_follow);
this.$axios.post('/admin/order/save', { id: item.id, check_sn: item.check_sn, is_wechat: item.is_wechat, travel_end: item.travel_end, travel_date: item.travel_date, desc: item.desc, status: item.status, next_follow: this.next_follow, personnel: this.item.personnel }).then(res => {
this.dialogVisible = false
this.item = { next_follow: '', personnel: {}}
}).catch(err => {
this.$axios
.post("/admin/order/save", {
id: item.id,
check_sn: item.check_sn,
is_wechat: item.is_wechat,
travel_end: item.travel_end,
travel_date: item.travel_date,
desc: item.desc,
status: item.status,
next_follow: this.next_follow,
personnel: this.item.personnel,
}) })
.then((res) => {
this.dialogVisible = false;
this.item = { next_follow: "", personnel: {} };
})
.catch((err) => {});
}, },
onPass(form) { onPass(form) {
this.$axios.post('/admin/order/pass', { check_sn: form.check_sn }).then(res => { this.$axios
this.dialog2Visible = false .post("/admin/order/pass", { check_sn: form.check_sn })
this.form = {} .then((res) => {
}).catch(err => { this.dialog2Visible = false;
this.form = {};
}) })
.catch((err) => {});
}, },
onChange(from) { onChange(from) {
this.$set(this.item, 'desc', from + (this.item.desc != undefined ? this.item.desc : '')) this.$set(
this.item,
"desc",
from + (this.item.desc != undefined ? this.item.desc : "")
);
}, },
onChange2(from) { onChange2(from) {
this.$set(this.item, 'to_admin_id', from + (this.item.admin_id != undefined ? this.item.admin_id : '')) this.$set(
this.item,
"to_admin_id",
from + (this.item.admin_id != undefined ? this.item.admin_id : "")
);
}, },
handleChange(os) { handleChange(os) {
console.log(os) console.log(os);
}, },
getShortcutContent() { getShortcutContent() {
this.listLoading = true this.listLoading = true;
this.$axios.get('/admin/shortcutContent/list', { params: { page: 1, limit: 50, status: 1 }}).then(response => { this.$axios
for (const r of response.data.data) { .get("/admin/shortcutContent/list", {
this.options.push({ value: r.id, label: r.content }) params: { page: 1, limit: 50, status: 1 },
}
}).catch(() => {
}) })
.then((response) => {
for (const r of response.data.data) {
this.options.push({ value: r.id, label: r.content });
}
})
.catch(() => {});
}, },
onOneClickRepair(item) { onOneClickRepair(item) {
this.$axios.post('/admin/order/oneClickRepair', { id: item.id}).then(res => { this.$axios
this.dialogVisible = false .post("/admin/order/oneClickRepair", { id: item.id })
.then((res) => {
this.dialogVisible = false;
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '同步完成', message: "同步完成",
type: 'success' type: "success",
}); });
this.getList() this.getList();
}).catch(err => { })
.catch((err) => {
this.$notify.error({ this.$notify.error({
title: "错误", title: "错误",
message: err message: err,
}) });
}) });
} },
} },
} };
</script> </script>
<style scoped> <style scoped>

View File

@ -1,12 +1,134 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container">
<el-input
v-model="listQuery.sn"
placeholder="订单号"
style="width: 200px"
class="filter-item"
/>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"> <el-input
v-model="listQuery.mobile"
placeholder="手机号"
style="width: 200px"
class="filter-item"
/>
<el-table-column align="center" fixed label="电话" width="120" prop="mobile" /> <el-input
v-model="listQuery.zhubo"
placeholder="主播"
style="width: 100px"
class="filter-item"
/>
<el-table-column align="center" fixed label="平台" width="80" prop="os_name" /> <el-input
v-model="listQuery.admin"
placeholder="客服"
style="width: 100px"
class="filter-item"
/>
<el-cascader
v-model="listQuery.os_status"
placeholder="平台状态"
:options="oss"
class="filter-item"
@change="handleChange"
/>
<el-select
v-model="listQuery.status"
filterable
placeholder="跟进状态"
class="filter-item"
style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option
v-for="(v, k) in status_arr"
:key="k"
:label="v"
:value="k"
/>
</el-select>
<el-select
v-model="listQuery.timetype"
filterable
placeholder="时间"
class="filter-item"
style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option
v-for="(v, k) in timetype_arr"
:key="k"
:label="v"
:value="k"
/>
</el-select>
<el-date-picker
v-model="listQuery.times"
class="filter-item"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束日期"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList"
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList(1)"
>
导出
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="dialog2Visible = true"
>
核单
</el-button>
</div>
<el-table
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column
align="center"
fixed
label="电话"
width="120"
prop="mobile"
/>
<el-table-column
align="center"
fixed
label="平台"
width="80"
prop="os_name"
/>
<el-table-column align="center" fixed label="直播" width="60"> <el-table-column align="center" fixed label="直播" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
@ -14,37 +136,80 @@
<el-tag v-else type="info"></el-tag> <el-tag v-else type="info"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed label="客服" width="80" prop="admin.username" /> <el-table-column
align="center"
fixed
label="客服"
width="80"
prop="admin.username"
/>
<el-table-column align="center" label="订单号" width="180" prop="sn" /> <el-table-column align="center" label="订单号" width="180" prop="sn" />
<el-table-column width="138px" align="center" label="下单时间"> <el-table-column width="138px" align="center" label="下单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_at | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="160px" align="center" label="派单时间"> <el-table-column width="160px" align="center" label="派单时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.give_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.give_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="状态" width="80"> <el-table-column align="center" label="状态" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:order_status[scope.row.order_status],border:`1px solid ${order_status[scope.row.order_status]}`}" type="primary">{{ scope.row.order_status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: order_status[scope.row.order_status],
border: `1px solid ${order_status[scope.row.order_status]}`,
}"
type="primary"
>
{{ scope.row.order_status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="跟进状态" width="90"> <el-table-column align="center" label="跟进状态" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="padding: 1px 5px; border-radius: 3px;" :style="{color:follow_status[scope.row.status],border:`1px solid ${follow_status[scope.row.status]}`}" type="primary">{{ scope.row.status_name }}</div> <div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: follow_status[scope.row.status],
border: `1px solid ${follow_status[scope.row.status]}`,
}"
type="primary"
>
{{ scope.row.status_name }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="500px" label="标题" prop="product_name" /> <el-table-column
<el-table-column width="500px" align="center" label="跟进备注" prop="remark" /> align="center"
width="500px"
label="标题"
prop="product_name"
/>
<el-table-column
width="500px"
align="center"
label="跟进备注"
prop="remark"
/>
<el-table-column align="center" label="联系人" width="120" prop="contact" /> <el-table-column
align="center"
label="联系人"
width="120"
prop="contact"
/>
<!-- <el-table-column align="center" label="微信" width="80"> <!-- <el-table-column align="center" label="微信" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -54,13 +219,15 @@
<el-table-column width="138px" align="center" label="出行时间"> <el-table-column width="138px" align="center" label="出行时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.travel_date | parseTime('{y}-{m}-{d}') }}</span> <span>{{ scope.row.travel_date | parseTime("{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="138px" align="center" label="最后跟进时间"> <el-table-column width="138px" align="center" label="最后跟进时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.last_follow | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.last_follow | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -70,7 +237,12 @@
<i v-if="scope.row.is_check == 2" class="el-icon-close" /> <i v-if="scope.row.is_check == 2" class="el-icon-close" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="138px" label="分类" prop="category_desc" /> <el-table-column
align="center"
width="138px"
label="分类"
prop="category_desc"
/>
<el-table-column align="center" label="总金额" width="120"> <el-table-column align="center" label="总金额" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -78,11 +250,23 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="80px" label="人数" prop="quantity" /> <el-table-column
<el-table-column align="center" label="主播" width="80" prop="anchor.username" /> align="center"
width="80px"
label="人数"
prop="quantity"
/>
<el-table-column
align="center"
label="主播"
width="80"
prop="anchor.username"
/>
<el-table-column width="138px" align="center" label="修改时间"> <el-table-column width="138px" align="center" label="修改时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.update_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.update_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -115,27 +299,51 @@
{{ item.mobile }} {{ item.mobile }}
</el-form-item> </el-form-item>
<el-form-item label="下单时间"> <el-form-item label="下单时间">
{{ item.create_at | parseTime('{y}-{m}-{d} {h}:{i}') }} {{ item.create_at | parseTime("{y}-{m}-{d} {h}:{i}") }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="人员"> <el-form-item label="人员">
<el-row> <el-row>
<el-col :span="3">大人</el-col> <el-col :span="3">大人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.adult" name="adult" placeholder="大人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.adult"
name="adult"
placeholder="大人"
/></el-col>
<el-col :span="3">老人</el-col> <el-col :span="3">老人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.old" name="old" placeholder="老人" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.old"
name="old"
placeholder="老人"
/></el-col>
<el-col :span="3">小孩</el-col> <el-col :span="3">小孩</el-col>
<el-col :span="5"><el-input v-model="item.personnel.child" name="child" placeholder="小孩" /></el-col> <el-col :span="5"
><el-input
v-model="item.personnel.child"
name="child"
placeholder="小孩"
/></el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item v-if="item.status !== 1" label="核销码"> <el-form-item v-if="item.status !== 1" label="核销码">
<el-input v-model="item.check_sn" name="check_sn" placeholder="请输入平台核销码" /> <el-input
v-model="item.check_sn"
name="check_sn"
placeholder="请输入平台核销码"
/>
</el-form-item> </el-form-item>
<el-form-item label="加微信" v-if="item.status !== 2"> <el-form-item label="加微信" v-if="item.status !== 2">
<el-checkbox v-model="item.is_wechat" :true-label="1" :false-label="0">已加微信</el-checkbox> <el-checkbox
v-model="item.is_wechat"
:true-label="1"
:false-label="0"
>已加微信</el-checkbox
>
</el-form-item> </el-form-item>
<el-form-item label="出游日期"> <el-form-item label="出游日期">
@ -161,12 +369,13 @@
placeholder="选择日期时间" placeholder="选择日期时间"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="跟进状态"> <el-form-item label="跟进状态">
<template v-for="(v, k) in status_arr"> <template v-for="(v, k) in status_arr">
<el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{ v }}</el-radio> <el-radio v-if="k > 0" v-model="item.status" :label="k" border>{{
v
}}</el-radio>
</template> </template>
</el-form-item> </el-form-item>
<!-- <el-form-item label="快捷跟进" style="width: 600px;"> <!-- <el-form-item label="快捷跟进" style="width: 600px;">
@ -186,7 +395,6 @@
<el-form-item label="跟进说明"> <el-form-item label="跟进说明">
<el-input v-model="item.desc" type="textarea" /> <el-input v-model="item.desc" type="textarea" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -195,63 +403,38 @@
<el-tabs v-model="active" type="border-card"> <el-tabs v-model="active" type="border-card">
<el-tab-pane name="follow" label="跟进记录"> <el-tab-pane name="follow" label="跟进记录">
<el-table :data="item.follow" style="width: 100%">
<el-table <el-table-column label="日期" width="138">
:data="item.follow"
style="width: 100%"
>
<el-table-column
label="日期"
width="138"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="跟进人" width="110" prop="name" />
label="跟进人" <el-table-column label="状态" width="80">
width="110"
prop="name"
/>
<el-table-column
label="状态"
width="80"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ status_arr[scope.row.status] }}</span> <span>{{ status_arr[scope.row.status] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="desc" label="跟进说明" />
prop="desc"
label="跟进说明"
/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="finance" label="财务记录"> <el-tab-pane name="finance" label="财务记录">
<el-table <el-table :data="item.finance" style="width: 100%">
:data="item.finance" <el-table-column label="日期">
style="width: 100%"
>
<el-table-column
label="日期"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.create_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{
scope.row.create_time | parseTime("{y}-{m}-{d} {h}:{i}")
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="类型" width="110">
label="类型"
width="110"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ type_arr[scope.row.type] }}</span> <span>{{ type_arr[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="状态" width="120">
label="状态"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.total / 100 }}</span> <span>{{ scope.row.total / 100 }}</span>
</template> </template>
@ -259,7 +442,6 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-dialog> </el-dialog>
<el-dialog title="纯核销" :visible.sync="dialog2Visible"> <el-dialog title="纯核销" :visible.sync="dialog2Visible">
@ -284,13 +466,23 @@
<el-form-item label="订单号:"> <el-form-item label="订单号:">
<el-input v-model="item3.sn" disabled /> <el-input v-model="item3.sn" disabled />
</el-form-item> </el-form-item>
<el-form-item label="流转对象:" style="width: 600px;" prop="flowObj"> <el-form-item label="流转对象:" style="width: 600px" prop="flowObj">
<el-select v-model="item3.flowObj" placeholder="请选择" @change="onChange2"> <el-select
<el-form-item style="display: inline-flex;text-align: left;width: 770px;"> v-model="item3.flowObj"
placeholder="请选择"
@change="onChange2"
>
<el-form-item
style="display: inline-flex; text-align: left; width: 770px"
>
<el-option <el-option
v-for="item in adminList" v-for="item in adminList"
:key="item.value" :key="item.value"
style="width: 250px;display: inline-flex;word-break: break-all;" style="
width: 250px;
display: inline-flex;
word-break: break-all;
"
:label="item.username" :label="item.username"
:value="item.id" :value="item.id"
/> />
@ -300,31 +492,64 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- scope.row.backs&&scope.row.backs.status==2? --> <!-- scope.row.backs&&scope.row.backs.status==2? -->
<el-button v-if="item3.backs&&item3.backs.status==0" type="primary" @click="onCancel(item3.flowObj)"> </el-button> <el-button
<el-button v-else type="primary" @click="onCirculationSave(item3.flowObj)"> </el-button> v-if="item3.backs && item3.backs.status == 0"
type="primary"
@click="onCancel(item3.flowObj)"
> </el-button
>
<el-button
v-else
type="primary"
@click="onCirculationSave(item3.flowObj)"
> </el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import Pagination from '@/Wangeditor/Pagination' // import Pagination from '@/Wangeditor/Pagination'
import Pagination from '@/components/PaginationFixed' import Pagination from "@/components/PaginationFixed";
import {orderBack} from '@/api/order' import { orderBack } from "@/api/order";
export default { export default {
name: 'Orderlist', name: "Orderlist",
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
active: 'follow', active: "follow",
types: { 0: '', 1: '', 2: '', 3: 'primary', 4: 'success', 5: 'warning', 6: 'danger', 7: 'info' }, types: {
types2: { 1: 'primary', 2: 'success', 3: 'warning' }, 0: "",
status_arr: ['待跟进', '跟进中', '已核销', '核销失败', '放弃跟单'], 1: "",
type_arr: ['-', '收益', '支出'], 2: "",
3: "primary",
4: "success",
5: "warning",
6: "danger",
7: "info",
},
types2: { 1: "primary", 2: "success", 3: "warning" },
status_arr: ["待跟进", "跟进中", "已核销", "核销失败", "放弃跟单"],
type_arr: ["-", "收益", "支出"],
timetype_arr: {}, timetype_arr: {},
order_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662', '#9d1cb5'], order_status: [
follow_status: ['#9e9f9c', '#04bcd9', '#fc9904', '#1193f4', '#48b14b', '#eb1662'], "#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
"#9d1cb5",
],
follow_status: [
"#9e9f9c",
"#04bcd9",
"#fc9904",
"#1193f4",
"#48b14b",
"#eb1662",
],
options: [], options: [],
value: null, value: null,
next_follow: null, next_follow: null,
@ -338,9 +563,9 @@ export default {
status: null, status: null,
admin: null, admin: null,
zhubo: null, zhubo: null,
os_status:[] os_status: [],
}, },
item: { next_follow: '', personnel: {}}, item: { next_follow: "", personnel: {} },
follow: [], follow: [],
dialogVisible: false, dialogVisible: false,
@ -350,111 +575,127 @@ export default {
item3: { item3: {
sn: null, sn: null,
backs: null, backs: null,
flowObj:'', flowObj: "",
os: null // 12 3 os: null, // 12 3
}, },
os_arr: { 1: '美团', 2: '快手', 3: '抖音' }, os_arr: { 1: "美团", 2: "快手", 3: "抖音" },
adminList: [], adminList: [],
form: {}, form: {},
rules: { rules: {
flowObj: [ flowObj: [
{ required: true, message: '请选择流转对象', trigger: 'change' } { required: true, message: "请选择流转对象", trigger: "change" },
], ],
} },
} };
}, },
created() { created() {
// this.listQuery.status = this.$route.query.status || null // this.listQuery.status = this.$route.query.status || null
this.listQuery.zhubo = this.$route.query.zhubo || null this.listQuery.zhubo = this.$route.query.zhubo || null;
if (this.$route.query.start && this.$route.query.end) { if (this.$route.query.start && this.$route.query.end) {
this.listQuery.times = [this.$route.query.start, this.$route.query.end] this.listQuery.times = [this.$route.query.start, this.$route.query.end];
} }
this.setQuery('status') this.setQuery("status");
this.setQuery('os_status') this.setQuery("os_status");
this.setQuery('times') this.setQuery("times");
this.getList() this.getList();
this.getShortcutContent() this.getShortcutContent();
this.getAdminList() this.getAdminList();
}, },
methods: { methods: {
setQuery(key) { setQuery(key) {
if (this.$route.query.hasOwnProperty(key)) { if (this.$route.query.hasOwnProperty(key)) {
this.listQuery[key] = this.$route.query[key] this.listQuery[key] = this.$route.query[key];
} else { } else {
this.listQuery[key] = '' this.listQuery[key] = "";
} }
}, },
getList($is_excel) { getList($is_excel) {
this.listQuery.excel = null this.listQuery.excel = null;
if ($is_excel == 1) { if ($is_excel == 1) {
this.listQuery.excel = 1 this.listQuery.excel = 1;
const isdate = this.listQuery.times[0] instanceof Date const isdate = this.listQuery.times[0] instanceof Date;
const params = { const params = {
...this.listQuery, ...this.listQuery,
times: [isdate ? this.listQuery.times[0].toISOString() : '', isdate ? this.listQuery.times[1].toISOString() : ''] times: [
} isdate ? this.listQuery.times[0].toISOString() : "",
window.open('/admin/order/index?' + this.objectToQuery(params)) isdate ? this.listQuery.times[1].toISOString() : "",
return ],
};
window.open("/admin/order/index?" + this.objectToQuery(params));
return;
} }
this.listQuery.os_status = [4,2] //todo 使 this.listQuery.os_status = [4, 2]; //todo 使
this.$axios.get('/admin/order/index', { params: this.listQuery }).then(response => { this.$axios
this.list = response.data.data .get("/admin/order/index", { params: this.listQuery })
this.total = response.data.total .then((response) => {
this.timetype_arr = response.ext.timetype, this.list = response.data.data;
this.oss = response.ext.oss this.total = response.data.total;
this.listLoading = false (this.timetype_arr = response.ext.timetype),
}) (this.oss = response.ext.oss);
this.listLoading = false;
});
}, },
objectToQuery(obj) { objectToQuery(obj) {
return Object.keys(obj).map(key => { return Object.keys(obj)
const value = obj[key] .map((key) => {
if (value == undefined || value == null) return '' const value = obj[key];
return encodeURIComponent(key) + '=' + encodeURIComponent(value) if (value == undefined || value == null) return "";
}).join('&') return encodeURIComponent(key) + "=" + encodeURIComponent(value);
})
.join("&");
}, },
onInfo(item) { onInfo(item) {
this.value = null this.value = null;
this.next_follow = null this.next_follow = null;
this.$set(item, 'next_follow', null) this.$set(item, "next_follow", null);
this.item = item this.item = item;
this.active = 'follow' this.active = "follow";
this.$axios.get('/admin/order/info', { params: { id: item.id }}).then(res => { this.$axios
this.item = res.data .get("/admin/order/info", { params: { id: item.id } })
this.dialogVisible = true .then((res) => {
}).catch(err => { this.item = res.data;
this.dialogVisible = true;
}) })
.catch((err) => {});
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getAdminList() { getAdminList() {
this.$axios.get('/admin/admin/index', { params: { limit: 100, status: 1, is_order: 1 }}).then(response => { this.$axios
this.adminList = response.data.data .get("/admin/admin/index", {
this.listLoading = false params: { limit: 100, status: 1, is_order: 1 },
}).catch(err => {
}) })
.then((response) => {
this.adminList = response.data.data;
this.listLoading = false;
})
.catch((err) => {});
}, },
onCirculation(item) { onCirculation(item) {
this.applyVisible = true this.applyVisible = true;
this.item3 = { ...item, os: Number(item.os) } this.item3 = { ...item, os: Number(item.os) };
console.log(this.item3); console.log(this.item3);
if (this.item3.backs && this.item3.backs.admin_id) { if (this.item3.backs && this.item3.backs.admin_id) {
this.item3.flowObj = this.item3.backs.admin_id this.item3.flowObj = this.item3.backs.admin_id;
} else { } else {
this.resetForm('ruleForm') this.resetForm("ruleForm");
} }
}, },
// //
onCirculationSave(to_admin_id) { onCirculationSave(to_admin_id) {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
orderBack({ sn: this.item3.sn, os: this.item3.os, to_admin_id: to_admin_id }).then((res)=>{ orderBack({
this.applyVisible = false sn: this.item3.sn,
this.getList() os: this.item3.os,
}) to_admin_id: to_admin_id,
}).then((res) => {
this.applyVisible = false;
this.getList();
});
} else { } else {
return false; return false;
} }
@ -464,65 +705,92 @@ export default {
onCancel() { onCancel() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
this.$axios.post('/admin/order/backcancel', { id: this.item3.id }).then(res => { this.$axios
this.applyVisible = false .post("/admin/order/backcancel", { id: this.item3.id })
this.getList() .then((res) => {
}).catch(err => { this.applyVisible = false;
console.log(err) this.getList();
}) })
.catch((err) => {
console.log(err);
});
} else { } else {
return false return false;
} }
}); });
}, },
onBack() { onBack() {
this.$axios.post('/admin/order/back', this.item).then(res => { this.$axios
this.dialogVisible = false .post("/admin/order/back", this.item)
this.item = {} .then((res) => {
this.getList() this.dialogVisible = false;
}).catch(err => { this.item = {};
this.getList();
}) })
.catch((err) => {});
}, },
onSave(item) { onSave(item) {
console.log(this.next_follow) console.log(this.next_follow);
this.$axios.post('/admin/order/save', { id: item.id, check_sn: item.check_sn, is_wechat: item.is_wechat, travel_end: item.travel_end, travel_date: item.travel_date, desc: item.desc, status: item.status, next_follow: this.next_follow, personnel: this.item.personnel }).then(res => {
this.dialogVisible = false
this.item = { next_follow: '', personnel: {}}
}).catch(err => {
this.$axios
.post("/admin/order/save", {
id: item.id,
check_sn: item.check_sn,
is_wechat: item.is_wechat,
travel_end: item.travel_end,
travel_date: item.travel_date,
desc: item.desc,
status: item.status,
next_follow: this.next_follow,
personnel: this.item.personnel,
}) })
.then((res) => {
this.dialogVisible = false;
this.item = { next_follow: "", personnel: {} };
})
.catch((err) => {});
}, },
onPass(form) { onPass(form) {
this.$axios.post('/admin/order/pass', { check_sn: form.check_sn }).then(res => { this.$axios
this.dialog2Visible = false .post("/admin/order/pass", { check_sn: form.check_sn })
this.form = {} .then((res) => {
}).catch(err => { this.dialog2Visible = false;
this.form = {};
}) })
.catch((err) => {});
}, },
onChange(from) { onChange(from) {
this.$set(this.item, 'desc', from + (this.item.desc != undefined ? this.item.desc : '')) this.$set(
this.item,
"desc",
from + (this.item.desc != undefined ? this.item.desc : "")
);
}, },
onChange2(from) { onChange2(from) {
this.$set(this.item, 'to_admin_id', from + (this.item.admin_id != undefined ? this.item.admin_id : '')) this.$set(
this.item,
"to_admin_id",
from + (this.item.admin_id != undefined ? this.item.admin_id : "")
);
}, },
handleChange(os) { handleChange(os) {
console.log(os) console.log(os);
}, },
getShortcutContent() { getShortcutContent() {
this.listLoading = true this.listLoading = true;
this.$axios.get('/admin/shortcutContent/list', { params: { page: 1, limit: 50, status: 1 }}).then(response => { this.$axios
for (const r of response.data.data) { .get("/admin/shortcutContent/list", {
this.options.push({ value: r.id, label: r.content }) params: { page: 1, limit: 50, status: 1 },
}
}).catch(() => {
}) })
.then((response) => {
for (const r of response.data.data) {
this.options.push({ value: r.id, label: r.content });
} }
} })
} .catch(() => {});
},
},
};
</script> </script>
<style scoped> <style scoped>

View File

@ -38,7 +38,7 @@ module.exports = {
}, },
proxy: { proxy: {
'/dev-api': { // 接口地址 以 api开头的都走下面的配置 '/dev-api': { // 接口地址 以 api开头的都走下面的配置
target: 'http://192.168.1.8:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
ws: true, // 是否支持 websocket 请求 支持 ws: true, // 是否支持 websocket 请求 支持
changeOrigin: true, // 是否启用跨域 changeOrigin: true, // 是否启用跨域
pathRewrite: { pathRewrite: {