parent
706cd977d3
commit
cdeb743fe6
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:visible.sync="dialogVisible"
|
||||
:title="title"
|
||||
>
|
||||
<el-table
|
||||
v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column prop="avatarLink" label="头像" width="80">
|
||||
<template slot-scope="scope">
|
||||
<img :src="getAvatar(scope.row)" class="avatar" style="width: 40px; height: 40px; border-radius: 50%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nickName" label="姓名" width="180"></el-table-column>
|
||||
<el-table-column prop="phone" label="电话" min-width="180"></el-table-column>
|
||||
<!-- <el-table-column prop="address" label="地址"></el-table-column> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="goChangeUser" >经纪人转移</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
<BrokerChange ref="brokerChange" :oldBroker="queryParams.brokerId" @changeUser="changeUser"></BrokerChange>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageListClueVisitsNum } from "@/api/biz/clue";
|
||||
import BrokerChange from "./BrokerChange";
|
||||
|
||||
|
||||
export default {
|
||||
name: 'ClientList',
|
||||
components: { BrokerChange },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
title: '经纪人客户',
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hasOrder: '1',
|
||||
dataType: '0',
|
||||
brokerId: '',
|
||||
},
|
||||
list: [],
|
||||
currentRow: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(row) {
|
||||
this.currentRow = row || {};
|
||||
this.list = [];
|
||||
this.queryParams.brokerId = this.currentRow.userId;
|
||||
this.dialogVisible = true;
|
||||
this.getList();
|
||||
},
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getAvatar(row) {
|
||||
if (!row.avatarLink) {
|
||||
return require("@/assets/images/profile.jpg");
|
||||
}
|
||||
if (row.avatarLink.indexOf('http') === 0) {
|
||||
return row.avatarLink;
|
||||
}
|
||||
return process.env.VUE_APP_BASE_API + row.avatarLink;
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
pageListClueVisitsNum(this.queryParams).then(response => {
|
||||
this.list = response.rows || [];
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
goChangeUser() {
|
||||
this.$refs.brokerChange.show();
|
||||
},
|
||||
changeUser() {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div ref="list">
|
||||
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch" label-width="95px" >
|
||||
<el-form-item label="经纪人" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
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-table v-loading="loading" :data="userList" @sort-change="handleSortChange" :height="340" ref="table"
|
||||
@selection-change="handleSelectionChange" row-key="id" :highlight-current-row="true" @row-click="handleRowClick" >
|
||||
<el-table-column label="经纪人" prop="userName" sortable='custom' min-width="200px"/>
|
||||
<el-table-column label="真实姓名" prop="realName" sortable='custom' min-width="200px"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
size="small"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
layout=" prev, pager,next"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
listUser
|
||||
} from "@/api/system/user";
|
||||
import AutoTableHeight from '@/views/broker/AutoTableHeight';
|
||||
import {changeUserStatus} from "@/api/system/user";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "DfBroker",
|
||||
mixins: [AutoTableHeight],
|
||||
dicts: ["df_broker_staus","sys_yes_no"],
|
||||
components: {Treeselect},
|
||||
data() {
|
||||
return {
|
||||
readonly:false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中名字
|
||||
names: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 代理商经纪表格数据
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
status: undefined,
|
||||
deptId: undefined,
|
||||
userType: "jj",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
brokerName: [
|
||||
{required: true, message: "代理商名称不能为空", trigger: "blur"}
|
||||
],
|
||||
isInstitution: [
|
||||
{required: true, message: "是否机构不能为空", trigger: "blur"}
|
||||
],
|
||||
staus: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
clearSelection() {
|
||||
this.resetQuery();
|
||||
},
|
||||
tenantIdnormalizer(node, instanceId) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.brokerName,
|
||||
children: node.children
|
||||
}
|
||||
},
|
||||
// 点击行
|
||||
handleRowClick(row) {
|
||||
this.$emit('row-click', row);
|
||||
},
|
||||
/** 查询代理商经纪列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.isBroker = "Y";
|
||||
listUser(this.queryParams).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
});
|
||||
// listBrokerByTree().then(response => {
|
||||
// this.brokerOptions = response.data;
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
parentId: null,
|
||||
brokerName: null,
|
||||
brokerAddress: null,
|
||||
brokerDesc: null,
|
||||
orderNum: null,
|
||||
chargePerson: null,
|
||||
contactPhone: null,
|
||||
email: null,
|
||||
isInstitution: null,
|
||||
staus: null,
|
||||
remark: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//排序
|
||||
handleSortChange(col) {
|
||||
this.$sortBy(col, this.queryParams);
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.names = selection.map(item => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog title="选择用户进行添加" :visible.sync="open" width="70%" append-to-body :close-on-click-modal="false">
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="登录账号" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入登录账号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input
|
||||
v-model="queryParams.phonenumber"
|
||||
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-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column type="index" width="50" align="center" :index="customIndex" /> -->
|
||||
<el-table-column label="登录账号" align="center" key="userName" prop="userName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" min-width="120" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="saving" type="primary" @click="submitForm" >确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUser, updateBroker,listByNotBroker } from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: 'NoBrokerUser',
|
||||
data() {
|
||||
return {
|
||||
open: false,
|
||||
loading: false,
|
||||
saving: false,
|
||||
userList: [],
|
||||
list: [],
|
||||
total: 0,
|
||||
queryParams: { pageNum: 1, pageSize: 10, hasBroker: '0' },
|
||||
currentBrokerId: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(brokerId) {
|
||||
this.currentBrokerId = brokerId;
|
||||
this.list = [];
|
||||
this.open = true;
|
||||
this.resetQuery();
|
||||
},
|
||||
cancel() {
|
||||
this.open = false;
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listByNotBroker(this.queryParams).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.list = val;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = { pageNum: 1, pageSize: 10, hasBroker: '0' };
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
submitForm() {
|
||||
if (!this.currentBrokerId || this.list.length === 0) {
|
||||
return;
|
||||
}
|
||||
this.saving = true;
|
||||
updateBroker({
|
||||
brokerId: this.currentBrokerId,
|
||||
userIds: this.list.map(item => item.userId)
|
||||
}).then(response => {
|
||||
this.saving = false;
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.open = false;
|
||||
this.$emit('success');
|
||||
}).catch(e => {
|
||||
this.saving = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@ -1,280 +1,31 @@
|
||||
<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="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入客户id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="经纪id" prop="brokerId">
|
||||
<el-input
|
||||
v-model="queryParams.brokerId"
|
||||
placeholder="请输入经纪id"
|
||||
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="['user:broker: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="['user:broker: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="['user:broker: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="['user:broker:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="brokerList" @sort-change="handleSortChange" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" sortable='custom' />
|
||||
<el-table-column label="客户id" align="center" prop="userId" sortable='custom' />
|
||||
<el-table-column label="经纪id" align="center" prop="brokerId" sortable='custom' />
|
||||
<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="['user:broker:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['user:broker:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
hide-on-single-page
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改客户经纪对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="70%" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入客户id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经纪id" prop="brokerId">
|
||||
<el-input v-model="form.brokerId" placeholder="请输入经纪id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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>
|
||||
<my-page :left-style="{width: '20vw'}">
|
||||
<template slot="left">
|
||||
<DfBroker ref="dfBroker" style="height: 100%;width:100%;" @row-click="handleRowClick"></DfBroker>
|
||||
</template>
|
||||
<BrokerUserVo ref="brokerUser" :extraHeight="100" style="height: 97%;margin-left: 8px;" :rowData="rowData"></BrokerUserVo>
|
||||
</my-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageListBroker, getBroker, delBroker, addBroker, updateBroker } from "@/api/user/broker";
|
||||
import BrokerUserVo from './components/BrokerUser.vue';
|
||||
import DfBroker from './components/DfBroker.vue';
|
||||
|
||||
export default {
|
||||
name: "Broker",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中名字
|
||||
names: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户经纪表格数据
|
||||
brokerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
brokerId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userId: [
|
||||
{ required: true, message: "客户id不能为空", trigger: "blur" }
|
||||
],
|
||||
brokerId: [
|
||||
{ required: true, message: "经纪id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询客户经纪列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
pageListBroker(this.queryParams).then(response => {
|
||||
this.brokerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
brokerId: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//排序
|
||||
handleSortChange(col) {
|
||||
this.$sortBy(col, this.queryParams);
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.names = 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;
|
||||
getBroker(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) {
|
||||
updateBroker(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBroker(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
const names = row.id || this.names;
|
||||
this.$modal.confirm('是否确认删除客户经纪为"' + names + '"的数据项?').then(function() {
|
||||
return delBroker(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('user/broker/export', {
|
||||
...this.queryParams
|
||||
}, `broker_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
export default {
|
||||
name: "UserBroker",
|
||||
components: {
|
||||
BrokerUserVo,
|
||||
DfBroker,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rowData: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleRowClick(row) {
|
||||
this.rowData = row;// 在父组件中接收到子组件传递过来的 row 数据
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in new issue