# Conflicts: # ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.javapull/379/head
commit
a778eac754
@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 租研舍管理系统
|
||||
VUE_APP_TITLE = 未信用秒租管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 租研舍管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# 未信用秒租管理系统/生产环境
|
||||
VUE_APP_BASE_API = 'http://124.222.144.55:80/dev-api'
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 租研舍管理系统
|
||||
VUE_APP_TITLE = 未信用秒租管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 租研舍管理系统/测试环境
|
||||
# 未信用秒租管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询渠道配置列表
|
||||
export function listChannel(query) {
|
||||
return request({
|
||||
url: "/system/channel/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询渠道配置详细
|
||||
export function getChannel(id) {
|
||||
return request({
|
||||
url: "/system/channel/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增渠道配置
|
||||
export function addChannel(data) {
|
||||
return request({
|
||||
url: "/system/channel/add",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改渠道配置
|
||||
export function updateChannel(data) {
|
||||
return request({
|
||||
url: "/system/channel/edit",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除渠道配置
|
||||
export function delChannel(id) {
|
||||
return request({
|
||||
url: "/system/channel/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询客户信息列表
|
||||
export function listCustomer(query) {
|
||||
return request({
|
||||
url: "/system/customer/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询客户信息详细
|
||||
export function getCustomer(id) {
|
||||
return request({
|
||||
url: "/system/customer/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增客户信息
|
||||
export function addCustomer(data) {
|
||||
return request({
|
||||
url: "/system/customer",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改客户信息
|
||||
export function updateCustomer(data) {
|
||||
return request({
|
||||
url: "/system/customer",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除客户信息
|
||||
export function delCustomer(id) {
|
||||
return request({
|
||||
url: "/system/customer/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
// 获取商户(机构)的列表
|
||||
export function getAllMerchantList() {
|
||||
return request({
|
||||
url: "/system/customer/getAllMerchantList",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
//获取渠道
|
||||
export function getMerchantChannelList() {
|
||||
return request({
|
||||
url: "/system/merchant/getMerchantChannelList",
|
||||
method: "get",
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询客户申请记录列表
|
||||
export function listLog(query) {
|
||||
return request({
|
||||
url: '/system/log/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询客户申请记录详细
|
||||
export function getLog(id) {
|
||||
return request({
|
||||
url: '/system/log/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增客户申请记录
|
||||
export function addLog(data) {
|
||||
return request({
|
||||
url: '/system/log',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改客户申请记录
|
||||
export function updateLog(data) {
|
||||
return request({
|
||||
url: '/system/log',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除客户申请记录
|
||||
export function delLog(id) {
|
||||
return request({
|
||||
url: '/system/log/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询商户列表
|
||||
export function listMerchant(query) {
|
||||
return request({
|
||||
url: "/system/merchant/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询商户详细
|
||||
export function getMerchant(id) {
|
||||
return request({
|
||||
url: "/system/merchant/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增商户
|
||||
export function addMerchant(data) {
|
||||
return request({
|
||||
url: "/system/merchant/add",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改商户
|
||||
export function updateMerchant(data) {
|
||||
return request({
|
||||
url: "/system/merchant/edit",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除商户
|
||||
export function delMerchant(id) {
|
||||
return request({
|
||||
url: "/system/merchant/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
// 获取商户(机构)的列表
|
||||
export function getAllMerchantList() {
|
||||
return request({
|
||||
url: "/system/customer/getAllMerchantList",
|
||||
method: "get",
|
||||
});
|
||||
}
|
@ -1,58 +1,62 @@
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { isRelogin } from '@/utils/request'
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import { Message } from "element-ui";
|
||||
import NProgress from "nprogress";
|
||||
import "nprogress/nprogress.css";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { isRelogin } from "@/utils/request";
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
NProgress.configure({ showSpinner: false });
|
||||
|
||||
const whiteList = ['/login', '/register']
|
||||
const whiteList = ["/login", "/register"];
|
||||
// const whiteList = ["/login", "/register", "/channel", "/merchant", "/customer"];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start()
|
||||
NProgress.start();
|
||||
if (getToken()) {
|
||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
||||
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' })
|
||||
NProgress.done()
|
||||
if (to.path === "/login") {
|
||||
next({ path: "/" });
|
||||
NProgress.done();
|
||||
} else if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
if (store.getters.roles.length === 0) {
|
||||
isRelogin.show = true
|
||||
isRelogin.show = true;
|
||||
// 判断当前用户是否已拉取完user_info信息
|
||||
store.dispatch('GetInfo').then(() => {
|
||||
isRelogin.show = false
|
||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||
})
|
||||
}).catch(err => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
Message.error(err)
|
||||
next({ path: '/' })
|
||||
})
|
||||
store
|
||||
.dispatch("GetInfo")
|
||||
.then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch("GenerateRoutes").then((accessRoutes) => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
store.dispatch("LogOut").then(() => {
|
||||
Message.error(err);
|
||||
next({ path: "/" });
|
||||
});
|
||||
});
|
||||
} else {
|
||||
next()
|
||||
next();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 没有token
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
|
||||
NProgress.done()
|
||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
|
||||
NProgress.done();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
NProgress.done();
|
||||
});
|
||||
|
@ -0,0 +1,534 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="渠道"
|
||||
prop="channelName">
|
||||
<el-input v-model="queryParams.channelName"
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道签名"
|
||||
prop="channelSign">
|
||||
<el-input v-model="queryParams.channelSign"
|
||||
placeholder="请输入渠道签名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道备注"
|
||||
prop="remark">
|
||||
<el-input v-model="queryParams.remark"
|
||||
placeholder="请输入渠道备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="扣量比" prop="score">
|
||||
<el-input
|
||||
v-model="queryParams.score"
|
||||
placeholder="请输入扣量比"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="推广页名称" prop="htmlName">
|
||||
<el-input
|
||||
v-model="queryParams.htmlName"
|
||||
placeholder="请输入推广页名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="推广页地址" prop="htmlLocation">
|
||||
<el-input
|
||||
v-model="queryParams.htmlLocation"
|
||||
placeholder="请输入推广页地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="可访问IP" prop="ips">
|
||||
<el-input
|
||||
v-model="queryParams.ips"
|
||||
placeholder="请输入可访问IP"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开启关闭时段" prop="period">
|
||||
<el-input
|
||||
v-model="queryParams.period"
|
||||
placeholder="请输入开启关闭时段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10"
|
||||
class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate">修改</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:channel:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:channel:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar> -->
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading"
|
||||
:data="channelList"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection"
|
||||
width="55"
|
||||
align="center" />
|
||||
<el-table-column label="ID"
|
||||
align="center"
|
||||
prop="id" />
|
||||
<el-table-column label="渠道名称"
|
||||
align="center"
|
||||
prop="channelName" />
|
||||
<el-table-column label="渠道签名"
|
||||
align="center"
|
||||
prop="channelSign" />
|
||||
<!-- <el-table-column label="扣量比" align="center" prop="score" /> -->
|
||||
<!-- <el-table-column label="推广页名称" align="center" prop="htmlName" /> -->
|
||||
<el-table-column label="推广地址"
|
||||
align="center"
|
||||
prop="htmlLocation" />
|
||||
<!-- <el-table-column label="可访问IP" align="center" prop="ips" /> -->
|
||||
<!-- <el-table-column label="开启关闭时段" align="center" prop="period" /> -->
|
||||
<el-table-column label="备注"
|
||||
align="center"
|
||||
prop="remark" />
|
||||
<el-table-column label="修改时间"
|
||||
align="center"
|
||||
prop="updateTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)">修改</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:channel:remove']"
|
||||
>删除</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改渠道配置对话框 -->
|
||||
<el-dialog :title="title"
|
||||
:visible.sync="open"
|
||||
width="70"
|
||||
append-to-body>
|
||||
<el-form ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px">
|
||||
<el-form-item label="渠道类型"
|
||||
prop="channelType"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-radio-group v-model="form.channelType">
|
||||
<el-radio label="1">H5</el-radio>
|
||||
<el-radio label="2">联登</el-radio>
|
||||
<el-radio label="3">半流程</el-radio>
|
||||
<el-radio label="4">全流程</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道名称"
|
||||
prop="channelName"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-input v-model="form.channelName"
|
||||
placeholder="请输入渠道名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道签名"
|
||||
prop="channelSign"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-input v-model="form.channelSign"
|
||||
placeholder="请输入渠道签名"
|
||||
disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="扣量比(%)"
|
||||
prop="score"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-input v-model="form.score"
|
||||
placeholder="请输入扣量比"
|
||||
type="number">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="推广页名称"
|
||||
prop="htmlName"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-input v-model="form.htmlName"
|
||||
placeholder="请输入推广页名称" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="推广页地址" prop="htmlLocation">
|
||||
<el-input
|
||||
v-model="form.htmlLocation"
|
||||
placeholder="请输入推广页地址"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="注册页模板"
|
||||
prop="htmlLocation"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-upload :action="action"
|
||||
:headers="uploadHeader"
|
||||
class="avatar-uploader"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess">
|
||||
<el-button size="small"
|
||||
type="primary">点击上传</el-button>
|
||||
<el-input v-model="form.htmlLocation"
|
||||
readonly
|
||||
style="margin-top: 20px" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="可访问IP"
|
||||
prop="ips"
|
||||
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||
<el-input v-model="form.ips"
|
||||
placeholder="请输入可访问IP" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关闭时段"
|
||||
prop="period">
|
||||
<!-- <el-input v-model="form.period" placeholder="请输入开启关闭时段" /> -->
|
||||
<el-checkbox :indeterminate="isIndeterminate"
|
||||
@change="handleCheckAllChange"
|
||||
v-model="checkAll">全选时段</el-checkbox>
|
||||
<div style="margin: 15px 0"></div>
|
||||
<el-checkbox-group v-model="form.period"
|
||||
@change="handleCheckedCitiesChange">
|
||||
<el-checkbox v-for="city in cityOptions"
|
||||
:label="city"
|
||||
:key="city">{{ city }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注"
|
||||
prop="remark">
|
||||
<el-input v-model="form.remark"
|
||||
placeholder="请输入"
|
||||
type="textarea"
|
||||
:rows="2" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer"
|
||||
class="dialog-footer">
|
||||
<el-button type="primary"
|
||||
@click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listChannel,
|
||||
getChannel,
|
||||
delChannel,
|
||||
addChannel,
|
||||
updateChannel,
|
||||
} from "@/api/system/channel";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
name: "Channel",
|
||||
data () {
|
||||
return {
|
||||
action: "/dev-api/file/upload",
|
||||
|
||||
uploadHeader: { Authorization: getToken() },
|
||||
//关闭时间是否全选
|
||||
checkAll: false,
|
||||
checkedCities: [],
|
||||
cityOptions: [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"14",
|
||||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18",
|
||||
"19",
|
||||
"20",
|
||||
"21",
|
||||
"22",
|
||||
"23",
|
||||
],
|
||||
isIndeterminate: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 渠道配置表格数据
|
||||
channelList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
channelName: null,
|
||||
channelSign: null,
|
||||
score: null,
|
||||
htmlName: null,
|
||||
htmlLocation: null,
|
||||
ips: null,
|
||||
period: null,
|
||||
},
|
||||
options: [], //推广页模板
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 上传html
|
||||
handleAvatarSuccess (res, file) {
|
||||
console.log(res.data.name, file);
|
||||
// this.form.htmlLocation = URL.createObjectURL(file.raw);
|
||||
this.$set(this.form, "htmlLocation", res.data.url);
|
||||
},
|
||||
//随机字符串
|
||||
randomString (len, an) {
|
||||
an = an && an.toLowerCase();
|
||||
var str = "",
|
||||
i = 0,
|
||||
min = an == "a" ? 10 : 0,
|
||||
max = an == "n" ? 10 : 62;
|
||||
for (; i++ < len;) {
|
||||
var r = (Math.random() * (max - min) + min) << 0;
|
||||
str += String.fromCharCode((r += r > 9 ? (r < 36 ? 55 : 61) : 48));
|
||||
}
|
||||
return str;
|
||||
},
|
||||
// 关闭时间是否全选
|
||||
handleCheckAllChange (val) {
|
||||
this.form.period = val ? this.cityOptions : [];
|
||||
this.isIndeterminate = false;
|
||||
},
|
||||
handleCheckedCitiesChange (value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll = checkedCount === this.cityOptions.length;
|
||||
this.isIndeterminate =
|
||||
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||
},
|
||||
/** 查询渠道配置列表 */
|
||||
getList () {
|
||||
this.loading = true;
|
||||
listChannel(this.queryParams).then((response) => {
|
||||
this.channelList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel () {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset () {
|
||||
this.form = {
|
||||
id: null,
|
||||
channelName: null,
|
||||
channelSign: null,
|
||||
score: null,
|
||||
htmlName: null,
|
||||
htmlLocation: null,
|
||||
ips: null,
|
||||
period: [],
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery () {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery () {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange (selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd () {
|
||||
this.reset();
|
||||
this.form.channelSign = this.randomString(16);
|
||||
this.open = true;
|
||||
this.title = "添加渠道配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate (row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getChannel(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.form.period = this.form.period.split(",");
|
||||
//全选时段状态
|
||||
let checkedCount = this.form.period.length;
|
||||
this.checkAll = checkedCount === this.cityOptions.length;
|
||||
this.isIndeterminate =
|
||||
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||
this.open = true;
|
||||
this.title = "修改渠道配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
let params = { ...this.form };
|
||||
if (params.period) {
|
||||
params.period = params.period.join(",");
|
||||
}
|
||||
updateChannel(params).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
let params = { ...this.form };
|
||||
if (params.period) {
|
||||
params.period = params.period.join(",");
|
||||
}
|
||||
addChannel(params).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete (row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除渠道配置编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delChannel(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport () {
|
||||
this.download(
|
||||
"system/channel/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`channel_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,482 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label=""
|
||||
prop="phone">
|
||||
<el-input v-model="queryParams.phone"
|
||||
placeholder="请输入手机号或者姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label=""
|
||||
prop="name">
|
||||
<el-select v-model="queryParams.merchantName"
|
||||
placeholder="请选择机构公司(可输入)"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in MerchantList"
|
||||
:key="item.id"
|
||||
:label="item.merchantName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label=""
|
||||
prop="acturlName">
|
||||
<el-select v-model="queryParams.channelName"
|
||||
placeholder="请选择渠道(可输入)"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in merchantChannelList"
|
||||
:key="item.id"
|
||||
:label="item.channelName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label=""
|
||||
prop="time">
|
||||
<el-date-picker v-model="queryParams.time"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label=""
|
||||
prop="city">
|
||||
<el-input v-model="queryParams.city"
|
||||
placeholder="请输入筛选城市"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10"
|
||||
class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:customer:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:customer:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<!-- <right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar> -->
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading"
|
||||
:data="customerList"
|
||||
@selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
|
||||
<el-table-column label="姓名"
|
||||
align="center"
|
||||
prop="acturlName" />
|
||||
<el-table-column label="手机号"
|
||||
align="center"
|
||||
prop="phone" />
|
||||
<el-table-column label="分配机构"
|
||||
align="center"
|
||||
prop="socialSecurity">
|
||||
<template slot-scope="scope">
|
||||
{{findMerchant(scope.row.channelId)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属城市"
|
||||
align="center"
|
||||
prop="city" />
|
||||
<el-table-column label="所属渠道"
|
||||
align="center"
|
||||
prop="channelId">
|
||||
<template slot-scope="scope">
|
||||
{{findChannel(scope.row.channelId)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="推送时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="点击时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)">详细资料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改客户信息对话框 -->
|
||||
<el-dialog title="用户详细资料"
|
||||
:visible.sync="open"
|
||||
width="40%"
|
||||
append-to-body>
|
||||
<el-row :gutter="10"
|
||||
style="padding: 20px 0; font-size: 14px">
|
||||
<el-col :span="12"> 姓名:{{ form.acturlName }} </el-col>
|
||||
<el-col :span="8"> 性别:{{ form.sex == 0 ? "男" : "女" }} </el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10"
|
||||
style="
|
||||
background-color: #e6e8f3;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
"
|
||||
type="flex"
|
||||
justify="space-around">
|
||||
<!-- <el-col :span="4">
|
||||
<div>姓名</div>
|
||||
<div style="margin-top: 15px">程先生</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div>性别</div>
|
||||
<div style="margin-top: 15px">男</div>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<div>所属城市</div>
|
||||
<div style="margin-top: 15px">{{ form.city }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div>年龄</div>
|
||||
<div style="margin-top: 15px">{{ form.age }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div>职业</div>
|
||||
<div style="margin-top: 15px">{{ form.career }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10"
|
||||
style="padding: 20px 0">
|
||||
<h3>用户资质</h3>
|
||||
</el-row>
|
||||
<el-row :gutter="10"
|
||||
style="
|
||||
background-color: #e6e8f3;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
"
|
||||
type="flex"
|
||||
justify="space-around">
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">社保</div>
|
||||
<div style="margin-top: 15px">
|
||||
{{ shebao[this.form.socialSecurity] }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">公积金</div>
|
||||
<div style="margin-top: 15px">
|
||||
{{ shebao[this.form.accumulationFund] }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">房产情况</div>
|
||||
<div style="margin-top: 15px">{{ fangchan[this.form.hourse] }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">车辆情况</div>
|
||||
<div style="margin-top: 15px">{{ chechan[form.car] }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">学历</div>
|
||||
<div style="margin-top: 15px">{{ xueli[form.education] }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10"
|
||||
style="
|
||||
background-color: #e6e8f3;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
"
|
||||
type="flex"
|
||||
justify="space-around">
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">芝麻分</div>
|
||||
<div style="margin-top: 15px">{{ form.zhiMa || 0}}分</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">保单</div>
|
||||
<div style="margin-top: 15px">{{baodan[this.form.guaranteeSlip]}}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">月收入</div>
|
||||
<div style="margin-top: 15px">{{this.form.income || 0}}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">京东白条可用额度</div>
|
||||
<div style="margin-top: 15px">{{ edu[this.form.baiTiao] }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="color: #9c9c9c">蚂蚁花呗可用额度</div>
|
||||
<div style="margin-top: 15px">{{ edu[this.form.huaBei] }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div> -->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listCustomer,
|
||||
getCustomer,
|
||||
delCustomer,
|
||||
addCustomer,
|
||||
updateCustomer,
|
||||
getAllMerchantList,
|
||||
getMerchantChannelList
|
||||
} from "@/api/system/customer";
|
||||
|
||||
export default {
|
||||
name: "Customer",
|
||||
data () {
|
||||
return {
|
||||
options: [
|
||||
{ name: "是", code: 1 },
|
||||
{ name: "否", code: 0 },
|
||||
],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户信息表格数据
|
||||
customerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
shebao: ['未缴纳', "缴纳未满6个月", "缴纳6个月以上"],
|
||||
chechan: ['无车产', '有车产'],
|
||||
fangchan: ["本地无房", "本地全款房", "本地按揭房"],
|
||||
baodan: ["无保单", '缴纳不足一年', "缴纳1年以上", "缴纳2年以上"],
|
||||
zhiye: ["上班族", "公务员/事业单位", "私营业主", "个体户", "其他职业"],
|
||||
xueli: ["初中及以下", "高中", "中专", "大专", "本科", "研究生及以上"],
|
||||
zhimafen: ['无芝麻分', '600分以下', '600-650分', '650-700分', "700分以上"],
|
||||
edu: ["5000以下", "5000-10000", "大于10000"],
|
||||
MerchantList: [],
|
||||
merchantChannelList: []
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getMerchantList()
|
||||
this.getMerchantChannel()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
findChannel (id) {
|
||||
let str = '-'
|
||||
let index = this.merchantChannelList.findIndex(item => item.id == id)
|
||||
if (index != -1) {
|
||||
str = this.merchantChannelList[index].channelName
|
||||
}
|
||||
return str
|
||||
},
|
||||
findMerchant (id) {
|
||||
let str = '-'
|
||||
let index = this.MerchantList.findIndex(item => item.id == id)
|
||||
if (index != -1) {
|
||||
str = this.MerchantList[index].merchantName
|
||||
}
|
||||
return str
|
||||
},
|
||||
//获取渠道
|
||||
getMerchantChannel () {
|
||||
getMerchantChannelList().then(res => {
|
||||
this.merchantChannelList = res.data
|
||||
})
|
||||
},
|
||||
//获取机构 商户
|
||||
getMerchantList () {
|
||||
getAllMerchantList().then(res => {
|
||||
this.MerchantList = res.data
|
||||
})
|
||||
},
|
||||
getList () {
|
||||
this.loading = true;
|
||||
listCustomer(this.queryParams).then((response) => {
|
||||
this.customerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel () {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset () {
|
||||
this.form = {};
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery () {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery () {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange (selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd () {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "用户详细资料";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate (row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getCustomer(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "用户详细资料";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCustomer(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCustomer(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete (row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delCustomer(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport () {
|
||||
this.download(
|
||||
"system/customer/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`customer_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户id" prop="customerId">
|
||||
<el-input
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请输入用户id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户ID" prop="merchantId">
|
||||
<el-input
|
||||
v-model="queryParams.merchantId"
|
||||
placeholder="请输入商户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="channelId">
|
||||
<el-input
|
||||
v-model="queryParams.channelId"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="成交金额 分" prop="price">
|
||||
<el-input
|
||||
v-model="queryParams.price"
|
||||
placeholder="请输入成交金额 分"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:log:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:log:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:log:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:log:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="用户id" align="center" prop="customerId" />
|
||||
<el-table-column label="商户ID" align="center" prop="merchantId" />
|
||||
<el-table-column label="${comment}" align="center" prop="channelId" />
|
||||
<el-table-column label="订单状态 0 已申请 1 注册中 2风控中 3下单中 4 下单成功 5已成交 " align="center" prop="orderStatus" />
|
||||
<el-table-column label="成交金额 分" align="center" prop="price" />
|
||||
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:log:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:log:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改客户申请记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户id" prop="customerId">
|
||||
<el-input v-model="form.customerId" placeholder="请输入用户id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户ID" prop="merchantId">
|
||||
<el-input v-model="form.merchantId" placeholder="请输入商户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="channelId">
|
||||
<el-input v-model="form.channelId" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="成交金额 分" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入成交金额 分" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listLog, getLog, delLog, addLog, updateLog } from "@/api/system/log";
|
||||
|
||||
export default {
|
||||
name: "Log",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户申请记录表格数据
|
||||
logList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
customerId: null,
|
||||
merchantId: null,
|
||||
channelId: null,
|
||||
orderStatus: null,
|
||||
price: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询客户申请记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listLog(this.queryParams).then(response => {
|
||||
this.logList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
customerId: null,
|
||||
merchantId: null,
|
||||
channelId: null,
|
||||
orderStatus: null,
|
||||
price: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加客户申请记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getLog(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改客户申请记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除客户申请记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delLog(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/log/export', {
|
||||
...this.queryParams
|
||||
}, `log_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue