Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a21713e429 | |||
| 466f821a88 | |||
| dc08bdf819 | |||
| 05379dcf5f | |||
| 8c48703349 | |||
| 8185286bf1 | |||
| a7af170360 | |||
| fd6ce7c799 | |||
| d6db947a6f | |||
| 24ed6118f2 |
@@ -31,6 +31,9 @@
|
|||||||
<el-form-item label="品牌车型:" prop="title">
|
<el-form-item label="品牌车型:" prop="title">
|
||||||
{{ form.brandName }}
|
{{ form.brandName }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="补贴金额:" prop="title">
|
||||||
|
{{ form.money }}
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="入池时间:" prop="title">
|
<el-form-item label="入池时间:" prop="title">
|
||||||
{{ form.cluesCtime }}
|
{{ form.cluesCtime }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -121,7 +124,8 @@
|
|||||||
idCardImg: [],
|
idCardImg: [],
|
||||||
pTime: '',
|
pTime: '',
|
||||||
billTime: '',
|
billTime: '',
|
||||||
cluesCtime: ''
|
cluesCtime: '',
|
||||||
|
money: 0
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
editVersion: false,
|
editVersion: false,
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
'/api': {
|
'/api': {
|
||||||
target: process.env.URL,
|
target: process.env.URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^/api/common': '/common' } //路由重写调用公共方法
|
// pathRewrite: { '^/api/common': '/common' } //路由重写调用公共方法
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
VUE_APP_NAME=超级车补管理后台
|
VUE_APP_NAME=超级车补管理后台
|
||||||
VUE_APP_API_BASE_URL=https://hcb.liche.cn/pingan
|
VUE_APP_API_BASE_URL=https://hcb.liche.cn/pingan
|
||||||
# webSocket配置
|
# webSocket配置
|
||||||
VUE_APP_WS_URL=wss://api.ss.haodian.cn/wss
|
VUE_APP_WS_URL=wss://sapi.liche.cn/wss
|
||||||
VUE_APP_WS_PLATFORM=2
|
VUE_APP_WS_PLATFORM=2
|
||||||
|
|||||||
@@ -41,3 +41,10 @@ export async function pageOrgNameList(params) {
|
|||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function pageTeamList(params) {
|
||||||
|
const res = await request.get('/common/teamList', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
|||||||
@@ -99,3 +99,19 @@ export async function exportProduct(params) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券列表
|
||||||
|
* @param params
|
||||||
|
* @returns {Promise<*>}
|
||||||
|
*/
|
||||||
|
export async function pageCouponList(params) {
|
||||||
|
const res = await request.get('/car/product/couponList', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
export async function pageCmmssn(params) {
|
||||||
|
const res = await request.get('/cmmssn/cmmssn/page', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
* @param params 查询条件
|
||||||
|
*/
|
||||||
|
export async function exportCmmssn(params) {
|
||||||
|
const res = await request.get('/cmmssn/cmmssn/export', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateCmmssnSend(data) {
|
||||||
|
const res = await request.put('/cmmssn/cmmssn', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出金额未支付金额大于100的用户
|
||||||
|
* @param params 查询条件
|
||||||
|
*/
|
||||||
|
export async function exportCmmssnLgMoney(params) {
|
||||||
|
const res = await request.get('/cmmssn/cmmssn/exportLgMoney', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
@@ -98,3 +98,16 @@ export async function updateLevel(data) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送优惠券
|
||||||
|
* @param data
|
||||||
|
* @returns {Promise<*>}
|
||||||
|
*/
|
||||||
|
export async function sendCoupon(data) {
|
||||||
|
const res = await request.post('/receiver/clues/sendCoupon', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<!-- 团队选择组件 -->
|
||||||
|
<template>
|
||||||
|
<el-cascader
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
collapse-tags
|
||||||
|
:value="value"
|
||||||
|
:options="regionsData"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
popper-class="ele-pop-wrap-higher"
|
||||||
|
:props="props"
|
||||||
|
@input="updateValue"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { pageTeamList } from '@/api/auto';
|
||||||
|
export default {
|
||||||
|
name: 'TeamSelect',
|
||||||
|
props: {
|
||||||
|
value: Array,
|
||||||
|
placeholder: String,
|
||||||
|
options: Array,
|
||||||
|
valueField: {
|
||||||
|
type: String,
|
||||||
|
validator: (val) => {
|
||||||
|
return !val || val === 'label';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: Object
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 级联选择器数据
|
||||||
|
regionsData: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/* 更新 value */
|
||||||
|
updateValue(value) {
|
||||||
|
this.$emit('input', value);
|
||||||
|
},
|
||||||
|
/* 级联选择器数据 value 处理 */
|
||||||
|
formatData(data) {
|
||||||
|
if (this.valueField === 'label') {
|
||||||
|
return data.map((d) => {
|
||||||
|
const item = {
|
||||||
|
label: d.label,
|
||||||
|
value: d.label
|
||||||
|
};
|
||||||
|
if (d.children) {
|
||||||
|
item.children = d.children.map((c) => {
|
||||||
|
const cItem = {
|
||||||
|
label: c.label,
|
||||||
|
value: c.label
|
||||||
|
};
|
||||||
|
if (c.children) {
|
||||||
|
cItem.children = c.children.map((cc) => {
|
||||||
|
return {
|
||||||
|
label: cc.label,
|
||||||
|
value: cc.label
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return cItem;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 省市区数据筛选 */
|
||||||
|
filterData(data) {
|
||||||
|
return this.formatData(data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
options: {
|
||||||
|
handler(options) {
|
||||||
|
console.log(options);
|
||||||
|
this.regionsData = this.filterData(options ?? []);
|
||||||
|
if (!options) {
|
||||||
|
pageTeamList().then((data) => {
|
||||||
|
this.regionsData = this.filterData(data ?? []);
|
||||||
|
this.$emit('load-data-done', data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -202,7 +202,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/* 清空通知 */
|
/* 清空通知 */
|
||||||
clearNotice() {
|
clearNotice() {
|
||||||
setRead({ type: 'all' })
|
setRead({ type: 'all', isRead: 1 })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.query()
|
this.query()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<!-- 搜索表单 -->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
label-width="77px"
|
||||||
|
class="ele-form-search"
|
||||||
|
@keyup.enter.native="search"
|
||||||
|
@submit.native.prevent
|
||||||
|
>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
||||||
|
<el-form-item label="坐席:">
|
||||||
|
<el-input clearable v-model="where.username" placeholder="请输入"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
||||||
|
<el-form-item label="类型:">
|
||||||
|
<el-select
|
||||||
|
clearable
|
||||||
|
v-model="where.type"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="ele-fluid"
|
||||||
|
>
|
||||||
|
<el-option label="线索" :value="1"/>
|
||||||
|
<el-option label="订单" :value="2"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
||||||
|
<el-form-item label="是否发放:">
|
||||||
|
<el-select
|
||||||
|
clearable
|
||||||
|
v-model="where.ifSend"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="ele-fluid"
|
||||||
|
>
|
||||||
|
<el-option label="否" :value="0"/>
|
||||||
|
<el-option label="是" :value="1"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
|
||||||
|
<el-form-item label="解锁时间:">
|
||||||
|
<el-date-picker
|
||||||
|
unlink-panels
|
||||||
|
v-model="where.dateRange"
|
||||||
|
range-separator="-"
|
||||||
|
type="daterange"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
class="ele-fluid"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
|
||||||
|
<div class="ele-form-actions">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
class="ele-btn-icon"
|
||||||
|
@click="search"
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="reset">重置</el-button>
|
||||||
|
<el-button icon="el-icon-download" type="primary" @click="exportData">未发放金额大于100</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
// 默认表单数据
|
||||||
|
const defaultWhere = {
|
||||||
|
username: '',
|
||||||
|
type: '',
|
||||||
|
ifSend: '',
|
||||||
|
dateRange: ''
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
// 表单数据
|
||||||
|
where: { ...defaultWhere }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 是否开启响应式布局
|
||||||
|
styleResponsive() {
|
||||||
|
return this.$store.state.theme.styleResponsive
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/* 搜索 */
|
||||||
|
search() {
|
||||||
|
this.$emit('search', this.where)
|
||||||
|
},
|
||||||
|
/* 重置 */
|
||||||
|
reset() {
|
||||||
|
this.where = { ...this.defaultWhere }
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
exportData() {
|
||||||
|
this.$emit('exportLgMoney')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,299 @@
|
|||||||
|
<template>
|
||||||
|
<div class="ele-body">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<!-- 搜索表单 -->
|
||||||
|
<cmmssn-search @search="reload" @exportLgMoney="exportLgMoney"/>
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<ele-pro-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:datasource="datasource"
|
||||||
|
:selection.sync="selection"
|
||||||
|
cache-key="systemUserTable"
|
||||||
|
>
|
||||||
|
<!-- 表头工具栏 -->
|
||||||
|
<template v-slot:toolbar>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
class="ele-btn-icon"
|
||||||
|
@click="sendBatch"
|
||||||
|
>
|
||||||
|
批量标记发放
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-download"
|
||||||
|
class="ele-btn-icon"
|
||||||
|
@click="exportData"
|
||||||
|
>
|
||||||
|
导出
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<!-- 操作列 -->
|
||||||
|
<template v-slot:action="{ row }">
|
||||||
|
<el-link
|
||||||
|
v-if="row.ifSend!=='1'"
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
@click="setSend(row)"
|
||||||
|
>
|
||||||
|
标记已发放
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</ele-pro-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CmmssnSearch from './components/cmmssn-search.vue'
|
||||||
|
import { pageCmmssn, exportCmmssn, updateCmmssnSend, exportCmmssnLgMoney } from '@/api/cmmssn/cmmssn'
|
||||||
|
import { utils, writeFile } from 'xlsx'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'cmmssn',
|
||||||
|
components: { CmmssnSearch },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 表格列配置
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
columnKey: 'selection',
|
||||||
|
type: 'selection',
|
||||||
|
width: 50,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'mobile',
|
||||||
|
label: '线索',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
fixed: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'bizName',
|
||||||
|
label: '解锁门店',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
width: 120,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'centerName',
|
||||||
|
label: '中心',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'orgName',
|
||||||
|
label: '机构',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'userName',
|
||||||
|
label: '坐席',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'userCode',
|
||||||
|
label: '坐席工号',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'typeCn',
|
||||||
|
label: '类型',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'unlockTime',
|
||||||
|
label: '解锁时间',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (_row, _column, cellValue) => {
|
||||||
|
return this.$util.toDateString(cellValue)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'orderTime',
|
||||||
|
label: '订单时间',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (_row, _column, cellValue) => {
|
||||||
|
return this.$util.toDateString(cellValue)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'money',
|
||||||
|
label: '佣金',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
resizable: false,
|
||||||
|
showOverflowTooltip: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sendCn',
|
||||||
|
label: '是否发放',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnKey: 'action',
|
||||||
|
label: '操作',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
resizable: false,
|
||||||
|
slot: 'action',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
fixed: 'right'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 表格选中数据
|
||||||
|
selection: [],
|
||||||
|
// 当前编辑数据
|
||||||
|
current: null,
|
||||||
|
// 是否显示编辑弹窗
|
||||||
|
showEdit: false,
|
||||||
|
// 是否显示导入弹窗
|
||||||
|
showImport: false,
|
||||||
|
title: '用户佣金',
|
||||||
|
title1: '未发放佣金大于100用户',
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/* 表格数据源 */
|
||||||
|
datasource({ page, limit, where, order }) {
|
||||||
|
return pageCmmssn({ ...where, ...order, page, limit })
|
||||||
|
},
|
||||||
|
/* 刷新表格 */
|
||||||
|
reload(where) {
|
||||||
|
this.$refs.table.reload({ page: 1, where: where })
|
||||||
|
},
|
||||||
|
/* 打开编辑弹窗 */
|
||||||
|
openEdit(row) {
|
||||||
|
this.current = row
|
||||||
|
this.showEdit = true
|
||||||
|
},
|
||||||
|
exportData() {
|
||||||
|
const loading = this.$loading({ lock: true })
|
||||||
|
this.$refs.table.doRequest(({ where, order }) => {
|
||||||
|
exportCmmssn({ ...where, ...order })
|
||||||
|
.then((data) => {
|
||||||
|
loading.close()
|
||||||
|
const array = [data.columns]
|
||||||
|
data.list.forEach((d) => {
|
||||||
|
let arrayItem = []
|
||||||
|
for (let key in d) {
|
||||||
|
arrayItem.push(d[key])
|
||||||
|
}
|
||||||
|
array.push(arrayItem)
|
||||||
|
})
|
||||||
|
writeFile(
|
||||||
|
{
|
||||||
|
SheetNames: ['Sheet1'],
|
||||||
|
Sheets: {
|
||||||
|
Sheet1: utils.aoa_to_sheet(array)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
this.title + '.xlsx'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
loading.close()
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setSend(row) {
|
||||||
|
if (this.loading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确定要标记【' + row['mobile'] + '】已发放吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true
|
||||||
|
updateCmmssnSend({ ids: [row.id] }).then((res) => {
|
||||||
|
this.$message.success(res)
|
||||||
|
this.reload()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendBatch() {
|
||||||
|
if (!this.selection.length) {
|
||||||
|
this.$message.error('请至少选择一条数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.loading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm('确定要批量标记发放选中数据吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true
|
||||||
|
updateCmmssnSend({ ids: this.selection.map((d) => d.id) }).then((res) => {
|
||||||
|
this.$message.success(res)
|
||||||
|
this.reload()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
exportLgMoney() {
|
||||||
|
const loading = this.$loading({ lock: true })
|
||||||
|
this.$refs.table.doRequest(({ where, order }) => {
|
||||||
|
exportCmmssnLgMoney({ ...where, ...order })
|
||||||
|
.then((data) => {
|
||||||
|
loading.close()
|
||||||
|
const array = [data.columns]
|
||||||
|
data.list.forEach((d) => {
|
||||||
|
let arrayItem = []
|
||||||
|
for (let key in d) {
|
||||||
|
arrayItem.push(d[key])
|
||||||
|
}
|
||||||
|
array.push(arrayItem)
|
||||||
|
})
|
||||||
|
writeFile(
|
||||||
|
{
|
||||||
|
SheetNames: ['Sheet1'],
|
||||||
|
Sheets: {
|
||||||
|
Sheet1: utils.aoa_to_sheet(array)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
this.title1 + '.xlsx'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
loading.close()
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<!-- 用户导入弹窗 -->
|
||||||
|
<template>
|
||||||
|
<ele-modal
|
||||||
|
width="520px"
|
||||||
|
title="发送优惠券"
|
||||||
|
:visible="visible"
|
||||||
|
@update:visible="updateVisible"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="线索编号:" prop="title">
|
||||||
|
<el-input
|
||||||
|
:maxlength="60"
|
||||||
|
v-model="form.sid"
|
||||||
|
placeholder=""
|
||||||
|
readonly
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户手机号:" prop="title">
|
||||||
|
<el-input
|
||||||
|
:maxlength="60"
|
||||||
|
v-model="form.mobile"
|
||||||
|
placeholder=""
|
||||||
|
readonly
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="品牌:">
|
||||||
|
<brand-select
|
||||||
|
v-model="brands"
|
||||||
|
type="provinceCity"
|
||||||
|
:props="{ multiple: false }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="优惠券:" prop="couponId">
|
||||||
|
<el-select v-model="form.couponId" filterable clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in couponList"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.title"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template v-slot:footer>
|
||||||
|
<el-button @click="updateVisible(false)">取消</el-button>
|
||||||
|
<el-button type="primary" :loading="loading" @click="save">
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</ele-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { pageCouponList } from '@/api/car/product'
|
||||||
|
import { sendCoupon } from '@/api/receiver/clues'
|
||||||
|
|
||||||
|
import BrandSelect from '@/components/BrandSelect/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { BrandSelect },
|
||||||
|
props: {
|
||||||
|
// 是否打开弹窗
|
||||||
|
visible: Boolean,
|
||||||
|
// 修改回显的数据
|
||||||
|
data: Object
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const defaultForm = {
|
||||||
|
id: null,
|
||||||
|
cityId: '',
|
||||||
|
sid: '',
|
||||||
|
mobile: '',
|
||||||
|
couponId: ''
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
defaultForm,
|
||||||
|
editVersion: false,
|
||||||
|
form: { ...defaultForm },
|
||||||
|
// 表单验证规则
|
||||||
|
rules: {
|
||||||
|
couponId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择优惠券',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
brands: [],
|
||||||
|
couponList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
save() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
sendCoupon(this.form).then((msg) => {
|
||||||
|
this.$message.success(msg)
|
||||||
|
this.updateVisible(false);
|
||||||
|
}).catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
//加载优惠券
|
||||||
|
loadCouponList() {
|
||||||
|
this.couponList = []
|
||||||
|
this.form.couponId = ''
|
||||||
|
if (this.brands && this.brands.length > 0) {
|
||||||
|
pageCouponList({ brands: this.brands, cityId: this.form.cityId }).then((data) => {
|
||||||
|
this.couponList = data
|
||||||
|
}).catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 更新visible */
|
||||||
|
updateVisible(value) {
|
||||||
|
this.$emit('update:visible', value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
visible(visible) {
|
||||||
|
this.editVersion = false
|
||||||
|
if (visible) {
|
||||||
|
this.editVersion = true
|
||||||
|
if (this.data) {
|
||||||
|
this.$util.assignObject(this.form, {
|
||||||
|
...this.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$refs.form.clearValidate()
|
||||||
|
this.form = { ...this.defaultForm }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
brands() {
|
||||||
|
this.loadCouponList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@@ -131,6 +131,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" v-if="isShowTeamSearch">
|
||||||
|
<el-form-item label="归属团队:">
|
||||||
|
<team-select
|
||||||
|
v-model="where.teamIds"
|
||||||
|
placeholder="请选择团队"
|
||||||
|
class="ele-fluid"
|
||||||
|
:props="{multiple:true}"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="6" :sm="12">
|
<el-col :md="6" :sm="12">
|
||||||
<div class="ele-form-actions">
|
<div class="ele-form-actions">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -147,7 +157,8 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="exportData"
|
@click="exportData"
|
||||||
>导出</el-button
|
>导出
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -182,12 +193,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:brandSeries="{ row }">
|
<template v-slot:brandSeries="{ row }">
|
||||||
<div v-for="(item, index) in row.brandList" :key="index">{{
|
<div v-for="(item, index) in row.brandList" :key="index">{{
|
||||||
item
|
item
|
||||||
}}</div>
|
}}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:status="{ row }">
|
<template v-slot:status="{ row }">
|
||||||
{{ row.statusCn }}
|
{{ row.statusCn }}
|
||||||
<template v-if="row.isUnlock"> <br />{{ row.isUnlock }} </template>
|
<template v-if="row.isUnlock"><br/>{{ row.isUnlock }}</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:level="{ row }">
|
<template v-slot:level="{ row }">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -213,342 +225,362 @@
|
|||||||
>
|
>
|
||||||
拨打电话
|
拨打电话
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
@click="showSendCoupon(row)"
|
||||||
|
>
|
||||||
|
发券
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
|
<send-coupon :visible.sync="visibleSendCoupon" :data="current"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
pageClues,
|
pageClues,
|
||||||
getSearch,
|
getSearch,
|
||||||
callPhone,
|
callPhone,
|
||||||
exportClues,
|
exportClues,
|
||||||
updateLevel
|
updateLevel
|
||||||
} from '@/api/receiver/clues';
|
} from '@/api/receiver/clues'
|
||||||
import RegionsSelect from '@/components/RegionsSelect/index.vue';
|
import RegionsSelect from '@/components/RegionsSelect/index.vue'
|
||||||
import BrandSelect from '@/components/BrandSelect/index.vue';
|
import BrandSelect from '@/components/BrandSelect/index.vue'
|
||||||
import { pageCenterList, pageOrgNameList } from '@/api/auto';
|
import sendCoupon from '@/views/receiver/clues/components/send-coupon.vue'
|
||||||
import { utils, writeFile } from 'xlsx';
|
import { pageCenterList, pageOrgNameList } from '@/api/auto'
|
||||||
|
import { utils, writeFile } from 'xlsx'
|
||||||
|
import TeamSelect from '@/components/teamSelect/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'receiverClues',
|
name: 'receiverClues',
|
||||||
components: { RegionsSelect, BrandSelect },
|
components: { TeamSelect, RegionsSelect, BrandSelect, sendCoupon },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
where: {
|
where: {
|
||||||
title: '',
|
title: '',
|
||||||
citys: [],
|
citys: [],
|
||||||
brands: [],
|
brands: [],
|
||||||
belong: [],
|
belong: [],
|
||||||
userCode: '',
|
userCode: '',
|
||||||
centerNumber: '',
|
centerNumber: '',
|
||||||
orgName: '',
|
orgName: '',
|
||||||
level: ''
|
level: '',
|
||||||
|
teamIds: []
|
||||||
|
},
|
||||||
|
// 表格列配置
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'customer',
|
||||||
|
label: '线索',
|
||||||
|
width: 220,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'left',
|
||||||
|
slot: 'customer'
|
||||||
},
|
},
|
||||||
// 表格列配置
|
{
|
||||||
columns: [
|
prop: 'level',
|
||||||
|
label: '客户等级',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
width: 100,
|
||||||
|
slot: 'level'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'belongUserName',
|
||||||
|
label: '归属',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 150,
|
||||||
|
slot: 'belongUserName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'centerNumber',
|
||||||
|
label: '中心',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
width: 100,
|
||||||
|
slot: 'centerNumber'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'orgName',
|
||||||
|
label: '机构',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
width: 100,
|
||||||
|
slot: 'orgName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'brandSeries',
|
||||||
|
label: '关注车型',
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 200,
|
||||||
|
resizable: false,
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
slot: 'brandSeries'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'statusCn',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
width: 130,
|
||||||
|
slot: 'status'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'poi',
|
||||||
|
label: '所属地区',
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'enTime',
|
||||||
|
label: '入池时间',
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
|
resizable: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'action',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: 170,
|
||||||
|
slot: 'action',
|
||||||
|
fixed: 'right'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 表格选中数据
|
||||||
|
selection: [],
|
||||||
|
// 当前编辑数据
|
||||||
|
current: null,
|
||||||
|
// 是否显示编辑弹窗
|
||||||
|
showEdit: false,
|
||||||
|
// 日期时间选择器快捷项
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [
|
||||||
{
|
{
|
||||||
prop: 'customer',
|
text: '今天',
|
||||||
label: '线索',
|
onClick(picker) {
|
||||||
width: 220,
|
const end = new Date()
|
||||||
align: 'center',
|
const start = new Date()
|
||||||
fixed: 'left',
|
picker.$emit('pick', [start, end])
|
||||||
slot: 'customer'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'level',
|
|
||||||
label: '客户等级',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
width: 100,
|
|
||||||
slot: 'level'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'belongUserName',
|
|
||||||
label: '归属',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
minWidth: 150,
|
|
||||||
slot: 'belongUserName'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'centerNumber',
|
|
||||||
label: '中心',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
width: 100,
|
|
||||||
slot: 'centerNumber'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'orgName',
|
|
||||||
label: '机构',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
width: 100,
|
|
||||||
slot: 'orgName'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'brandSeries',
|
|
||||||
label: '关注车型',
|
|
||||||
align: 'center',
|
|
||||||
minWidth: 200,
|
|
||||||
resizable: false,
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
slot: 'brandSeries'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'statusCn',
|
|
||||||
label: '状态',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
width: 130,
|
|
||||||
slot: 'status'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'poi',
|
|
||||||
label: '所属地区',
|
|
||||||
align: 'center',
|
|
||||||
minWidth: 120
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'enTime',
|
|
||||||
label: '入池时间',
|
|
||||||
align: 'center',
|
|
||||||
minWidth: 100,
|
|
||||||
resizable: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'action',
|
|
||||||
label: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
slot: 'action',
|
|
||||||
fixed: 'right'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// 表格选中数据
|
|
||||||
selection: [],
|
|
||||||
// 当前编辑数据
|
|
||||||
current: null,
|
|
||||||
// 是否显示编辑弹窗
|
|
||||||
showEdit: false,
|
|
||||||
// 日期时间选择器快捷项
|
|
||||||
pickerOptions: {
|
|
||||||
shortcuts: [
|
|
||||||
{
|
|
||||||
text: '今天',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
const start = new Date();
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '昨天',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
const start = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24);
|
|
||||||
end.setTime(end.getTime() - 3600 * 1000 * 24);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '最近一周',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
const start = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '最近一个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
const start = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '最近三个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
const start = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
belongOptions: [],
|
text: '昨天',
|
||||||
statusList: [],
|
onClick(picker) {
|
||||||
centerList: [],
|
const end = new Date()
|
||||||
orgNameList: [],
|
const start = new Date()
|
||||||
levelList: [],
|
start.setTime(start.getTime() - 3600 * 1000 * 24)
|
||||||
title: '线索列表'
|
end.setTime(end.getTime() - 3600 * 1000 * 24)
|
||||||
};
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '最近一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '最近一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '最近三个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
belongOptions: [],
|
||||||
|
statusList: [],
|
||||||
|
centerList: [],
|
||||||
|
orgNameList: [],
|
||||||
|
levelList: [],
|
||||||
|
title: '线索列表',
|
||||||
|
visibleSendCoupon: false,
|
||||||
|
isShowTeamSearch: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadSearch()
|
||||||
|
this.loadCenterList()
|
||||||
|
this.loadOrgNameList()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 是否开启响应式布局
|
||||||
|
styleResponsive() {
|
||||||
|
return this.$store.state.theme.styleResponsive
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadOrgNameList() {
|
||||||
|
pageOrgNameList()
|
||||||
|
.then((data) => {
|
||||||
|
this.orgNameList = data
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
created() {
|
loadCenterList() {
|
||||||
this.loadSearch();
|
pageCenterList()
|
||||||
this.loadCenterList();
|
.then((data) => {
|
||||||
this.loadOrgNameList();
|
this.centerList = data
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
loadSearch() {
|
||||||
// 是否开启响应式布局
|
getSearch()
|
||||||
styleResponsive() {
|
.then((data) => {
|
||||||
return this.$store.state.theme.styleResponsive;
|
this.statusList = data.statusList
|
||||||
|
this.belongOptions = data.belongList
|
||||||
|
this.levelList = data.levelList
|
||||||
|
this.isShowTeamSearch = data.isShowTeamSearch
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/* 下拉按钮点击 */
|
||||||
|
dropClick(command, row) {
|
||||||
|
if (command === 'edit') {
|
||||||
|
this.current = row
|
||||||
|
this.showEdit = true
|
||||||
|
} else if (command === 'brokerage') {
|
||||||
|
this.current = row
|
||||||
|
this.showEditBrokerage = true
|
||||||
|
} else if (command === 'coupon') {
|
||||||
|
const path = '/car/product/coupon'
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$router.push({
|
||||||
|
path,
|
||||||
|
query: row ? { id: row.id, title: row.title } : undefined
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
goDetail(row) {
|
||||||
loadOrgNameList() {
|
const path = '/receiver/clues/detail'
|
||||||
pageOrgNameList()
|
this.$router.push({
|
||||||
.then((data) => {
|
path,
|
||||||
this.orgNameList = data;
|
query: row ? { id: row.id, title: row.title } : undefined
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
},
|
||||||
this.$message.error(e.message);
|
/* 表格数据源 */
|
||||||
});
|
datasource({ page, limit, where, order }) {
|
||||||
},
|
return pageClues({ ...where, ...order, page, limit })
|
||||||
loadCenterList() {
|
},
|
||||||
pageCenterList()
|
/* 刷新表格 */
|
||||||
.then((data) => {
|
reload() {
|
||||||
this.centerList = data;
|
this.$refs.table.reload({ page: 1, where: this.where })
|
||||||
})
|
},
|
||||||
.catch((e) => {
|
/* 重置搜索 */
|
||||||
this.$message.error(e.message);
|
reset() {
|
||||||
});
|
this.where = {}
|
||||||
},
|
this.reload()
|
||||||
loadSearch() {
|
},
|
||||||
getSearch()
|
/* 拨打电话 */
|
||||||
.then((data) => {
|
call(row) {
|
||||||
this.statusList = data.statusList;
|
this.$confirm('确定拨打电话【' + row.mobile + '】吗?', '提示', {
|
||||||
this.belongOptions = data.belongList;
|
type: 'warning'
|
||||||
this.levelList = data.levelList;
|
})
|
||||||
})
|
.then(() => {
|
||||||
.catch((e) => {
|
const loading = this.$loading({ lock: true })
|
||||||
this.$message.error(e.message);
|
callPhone({ id: row.id })
|
||||||
});
|
.then((msg) => {
|
||||||
},
|
loading.close()
|
||||||
/* 下拉按钮点击 */
|
this.$message.success(msg)
|
||||||
dropClick(command, row) {
|
|
||||||
if (command === 'edit') {
|
|
||||||
this.current = row;
|
|
||||||
this.showEdit = true;
|
|
||||||
} else if (command === 'brokerage') {
|
|
||||||
this.current = row;
|
|
||||||
this.showEditBrokerage = true;
|
|
||||||
} else if (command === 'coupon') {
|
|
||||||
const path = '/car/product/coupon';
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$router.push({
|
|
||||||
path,
|
|
||||||
query: row ? { id: row.id, title: row.title } : undefined
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
goDetail(row) {
|
|
||||||
const path = '/receiver/clues/detail';
|
|
||||||
this.$router.push({
|
|
||||||
path,
|
|
||||||
query: row ? { id: row.id, title: row.title } : undefined
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/* 表格数据源 */
|
|
||||||
datasource({ page, limit, where, order }) {
|
|
||||||
return pageClues({ ...where, ...order, page, limit });
|
|
||||||
},
|
|
||||||
/* 刷新表格 */
|
|
||||||
reload() {
|
|
||||||
this.$refs.table.reload({ page: 1, where: this.where });
|
|
||||||
},
|
|
||||||
/* 重置搜索 */
|
|
||||||
reset() {
|
|
||||||
this.where = {};
|
|
||||||
this.reload();
|
|
||||||
},
|
|
||||||
/* 拨打电话 */
|
|
||||||
call(row) {
|
|
||||||
this.$confirm('确定拨打电话【' + row.mobile + '】吗?', '提示', {
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
const loading = this.$loading({ lock: true });
|
|
||||||
callPhone({ id: row.id })
|
|
||||||
.then((msg) => {
|
|
||||||
loading.close();
|
|
||||||
this.$message.success(msg);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
loading.close();
|
|
||||||
this.$message.error(e.message);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
exportData() {
|
|
||||||
const loading = this.$loading({ lock: true });
|
|
||||||
this.$refs.table.doRequest(({ where, order }) => {
|
|
||||||
exportClues({ ...where, ...order })
|
|
||||||
.then((data) => {
|
|
||||||
loading.close();
|
|
||||||
const array = [data.columns];
|
|
||||||
data.list.forEach((d) => {
|
|
||||||
let arrayItem = [];
|
|
||||||
for (let key in d) {
|
|
||||||
arrayItem.push(d[key]);
|
|
||||||
}
|
|
||||||
array.push(arrayItem);
|
|
||||||
});
|
|
||||||
writeFile(
|
|
||||||
{
|
|
||||||
SheetNames: ['Sheet1'],
|
|
||||||
Sheets: {
|
|
||||||
Sheet1: utils.aoa_to_sheet(array)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
this.title + '.xlsx'
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
loading.close();
|
loading.close()
|
||||||
this.$message.error(e.message);
|
this.$message.error(e.message)
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
.catch(() => {
|
||||||
handleLevelChange(value, row) {
|
})
|
||||||
this.$confirm(
|
},
|
||||||
`确定要将【"${row.mobile}"】客户等级修改为"${value}"吗?`,
|
exportData() {
|
||||||
'提示',
|
const loading = this.$loading({ lock: true })
|
||||||
{
|
this.$refs.table.doRequest(({ where, order }) => {
|
||||||
confirmButtonText: '确定',
|
exportClues({ ...where, ...order })
|
||||||
cancelButtonText: '取消',
|
.then((data) => {
|
||||||
type: 'warning'
|
loading.close()
|
||||||
}
|
const array = [data.columns]
|
||||||
)
|
data.list.forEach((d) => {
|
||||||
.then(() => {
|
let arrayItem = []
|
||||||
updateLevel({ id: row.id, level: value })
|
for (let key in d) {
|
||||||
.then((msg) => {
|
arrayItem.push(d[key])
|
||||||
this.$message.success(msg);
|
}
|
||||||
})
|
array.push(arrayItem)
|
||||||
.catch((e) => {
|
})
|
||||||
this.$message.error(e.message);
|
writeFile(
|
||||||
});
|
{
|
||||||
|
SheetNames: ['Sheet1'],
|
||||||
|
Sheets: {
|
||||||
|
Sheet1: utils.aoa_to_sheet(array)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
this.title + '.xlsx'
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((e) => {
|
||||||
// 用户取消操作,恢复原值
|
loading.close()
|
||||||
});
|
this.$message.error(e.message)
|
||||||
}
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleLevelChange(value, row) {
|
||||||
|
this.$confirm(
|
||||||
|
`确定要将【"${row.mobile}"】客户等级修改为"${value}"吗?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
updateLevel({ id: row.id, level: value })
|
||||||
|
.then((msg) => {
|
||||||
|
this.$message.success(msg)
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.$message.error(e.message)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户取消操作,恢复原值
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showSendCoupon(row) {
|
||||||
|
this.current = row
|
||||||
|
this.visibleSendCoupon = true
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::v-deep .el-cascader__tags input::-webkit-input-placeholder {
|
::v-deep .el-cascader__tags input::-webkit-input-placeholder {
|
||||||
color: white;
|
color: white;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<user-search @search="reload" />
|
<user-search @search="reload"/>
|
||||||
<!-- 数据表格 -->
|
<!-- 数据表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -35,85 +35,93 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UserSearch from './components/user-search.vue';
|
import UserSearch from './components/user-search.vue'
|
||||||
import { pageCmmssn } from '@/api/user/cmmssn';
|
import { pageCmmssn } from '@/api/user/cmmssn'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SystemUser',
|
name: 'SystemUser',
|
||||||
components: {
|
components: {
|
||||||
UserSearch
|
UserSearch
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 表格列配置
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'cluesCid',
|
||||||
|
label: '线索编号',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
align: 'center',
|
||||||
|
slot: 'fromCn',
|
||||||
|
width: 220,
|
||||||
|
fixed: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'brandSeries',
|
||||||
|
label: '来源车型',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'typeCn',
|
||||||
|
label: '类型',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'money',
|
||||||
|
label: '金额',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'cluesTime',
|
||||||
|
label: '线索时间',
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
|
resizable: false,
|
||||||
|
showOverflowTooltip: true
|
||||||
|
}, {
|
||||||
|
prop: 'ifSendCn',
|
||||||
|
label: '是否发放',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: 80,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tabPosition: '1',
|
||||||
|
money: 0,
|
||||||
|
showTeam: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/* 表格数据源 */
|
||||||
|
async datasource({ page, limit, where, order }) {
|
||||||
|
where.type = this.tabPosition
|
||||||
|
const result = await pageCmmssn({ ...where, ...order, page, limit })
|
||||||
|
this.money = result.money
|
||||||
|
this.showTeam = result.showTeam
|
||||||
|
return result
|
||||||
},
|
},
|
||||||
data() {
|
/* 刷新表格 */
|
||||||
return {
|
reload(where) {
|
||||||
// 表格列配置
|
this.$refs.table.reload({ page: 1, where: where })
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
prop: 'cluesCid',
|
|
||||||
label: '线索编号',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
align: 'center',
|
|
||||||
slot: 'fromCn'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'brandSeries',
|
|
||||||
label: '来源车型',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
align: 'center',
|
|
||||||
minWidth: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'typeCn',
|
|
||||||
label: '类型',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
minWidth: 80,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'money',
|
|
||||||
label: '金额',
|
|
||||||
showOverflowTooltip: true,
|
|
||||||
minWidth: 80,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'cluesTime',
|
|
||||||
label: '线索时间',
|
|
||||||
align: 'center',
|
|
||||||
minWidth: 100,
|
|
||||||
resizable: false,
|
|
||||||
showOverflowTooltip: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tabPosition: '1',
|
|
||||||
money: 0,
|
|
||||||
showTeam: 0
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
handleOptionChange() {
|
||||||
/* 表格数据源 */
|
console.log(this.tabPosition)
|
||||||
async datasource({ page, limit, where, order }) {
|
this.reload()
|
||||||
where.type = this.tabPosition;
|
},
|
||||||
const result = await pageCmmssn({ ...where, ...order, page, limit });
|
goDetail(row) {
|
||||||
this.money = result.money;
|
const path = row.from.url
|
||||||
this.showTeam = result.showTeam;
|
if (path) {
|
||||||
return result;
|
this.$router.push({
|
||||||
},
|
path
|
||||||
/* 刷新表格 */
|
})
|
||||||
reload(where) {
|
|
||||||
this.$refs.table.reload({ page: 1, where: where });
|
|
||||||
},
|
|
||||||
handleOptionChange() {
|
|
||||||
console.log(this.tabPosition);
|
|
||||||
this.reload();
|
|
||||||
},
|
|
||||||
goDetail(row) {
|
|
||||||
const path = row.from.url;
|
|
||||||
if (path) {
|
|
||||||
this.$router.push({
|
|
||||||
path
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ module.exports = {
|
|||||||
'/pingan': {
|
'/pingan': {
|
||||||
target: process.env.URL,
|
target: process.env.URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^/pingan/common': '/common' } //路由重写调用公共方法
|
// pathRewrite: { '^/pingan/common': '/common' } //路由重写调用公共方法
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user