Commit 8b471dc8 by 匡雅琴

Merge branch 'v2.8.0' into wuwx_2.8.0

2 parents a62d46b7 f4c5eb09
import request from './request' import request from './request'
const path = 'merchants.api.menu.'
const addNamelistApi = { const addNamelistApi = {
// 根据商户名称和渠道类型查询商户列表 // 根据商户名称和渠道类型查询商户列表
getMerchantsList(data = {}) { getMerchantsList(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.open.findMerchantList' data.method = 'merchants.api.open.findMerchantList'
return request(data, 'merchants.api.open.findMerchantList', [], 'http://rop-merchant.dev.glsx.com.cn/rop-merchants') return request(data)
}, },
// 添加客户名单 // 根据商户名称和渠道类型查询商户列表-分页查询
getMerchantsListByPages(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.menu.findMerchantByPage'
return request(data)
},
// 根据商户号查询商户详情
findMerchantDetailByMerchantNo(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return request(data)
}
} }
export { addNamelistApi } export { addNamelistApi }
\ No newline at end of file \ No newline at end of file
import request from './request'
const uploadApi = {
// 多文件上传接口
multipleUpload(data = {}) {
// 'http://192.168.1.182:8561/rop-scrm-renewal'
data.method = 'scrm.api.equity.common.upload.common.multiple'
return request(data)
},
}
export { uploadApi }
\ No newline at end of file \ No newline at end of file
...@@ -298,6 +298,9 @@ export default { ...@@ -298,6 +298,9 @@ export default {
.a-click { .a-click {
cursor: pointer; cursor: pointer;
} }
.el-table{
margin-bottom: 16px;
}
.el-table .cell { .el-table .cell {
line-height: 14px; line-height: 14px;
} }
......
<template> <template>
<div> <div>
<div class="biasicInfo"> <div>
<div> <div>
基本信息 基本信息
<hr /> <hr />
</div> </div>
<div class="biasicInfo">
<el-form <el-form
size="medium"
:model="ruleForm" :model="ruleForm"
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"
...@@ -14,12 +16,17 @@ ...@@ -14,12 +16,17 @@
> >
<el-form-item label="所属商户" prop="merchant"> <el-form-item label="所属商户" prop="merchant">
<el-select <el-select
clearable
filterable
remote
:remote-method="remoteMethod"
v-el-select-loadmore="loadmore"
v-model="ruleForm.merchant" v-model="ruleForm.merchant"
placeholder="请选择商户" placeholder="请选择商户"
@change="selectChange" @change="selectChange"
> >
<el-option <el-option
v-for="(x, i) in merchants" v-for="(x, i) in dataItems"
:key="i" :key="i"
:label="x.merchantName" :label="x.merchantName"
:value="x.merchantName" :value="x.merchantName"
...@@ -54,6 +61,7 @@ ...@@ -54,6 +61,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</div>
<div class="clientInfo"> <div class="clientInfo">
<div> <div>
客户信息 客户信息
...@@ -96,8 +104,7 @@ ...@@ -96,8 +104,7 @@
</div> </div>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
<template v-if="uploadStatus == 'success'"> <template v-if="uploadStatus == 'success'">
<span>数据导入成功!</span> <div>{{ uploadSuccessMsg }}</div>
<p>成功导入{{ upLoadNum }}条客户记录</p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="back">确 定</el-button> <el-button type="primary" @click="back">确 定</el-button>
</span> </span>
...@@ -118,9 +125,19 @@ ...@@ -118,9 +125,19 @@
<script> <script>
import { addNamelistApi } from '@/api/addNamelist' import { addNamelistApi } from '@/api/addNamelist'
import { customerApi } from '@/api/customer' import { customerApi } from '@/api/customer'
import { uploadApi } from '@/api/upload'
export default { export default {
data() { data() {
return { return {
fullscreenLoading: false,
uploadSuccessMsg: '',
marchantNameCopy: '', //存放搜索的商户名
dataItems: [], //下拉框显示的数据
pageData: {
//懒加载相关参数,这里代表从第一条数据开始加载,一次加载40项
pageNum: 1,
pageSize: 40,
},
merchants: [], merchants: [],
upLoadNum: '', upLoadNum: '',
dialogVisible: false, dialogVisible: false,
...@@ -130,6 +147,8 @@ export default { ...@@ -130,6 +147,8 @@ export default {
fileName: '', fileName: '',
hasFileName: false, hasFileName: false,
fileBaseUrl: '', fileBaseUrl: '',
merchantId: '', //商户号
timer: '',
ruleForm: { ruleForm: {
merchant: '', merchant: '',
brand: '', brand: '',
...@@ -148,8 +167,25 @@ export default { ...@@ -148,8 +167,25 @@ export default {
}, },
} }
}, },
async mounted() { mounted() {
await this.merchantList() this.merchantList(this.pageData)
},
directives: {
/** 下拉框懒加载 */
'el-select-loadmore': {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
},
},
}, },
watch: { watch: {
fileName(val) { fileName(val) {
...@@ -157,30 +193,98 @@ export default { ...@@ -157,30 +193,98 @@ export default {
this.hasFile = false this.hasFile = false
} }
}, },
marchantNameCopy(oldVal, newVal) {
if (oldVal !== newVal) {
this.dataItems = []
}
},
'ruleForm.merchant': {
handler(val) {
if (!val) {
this.dataItems = []
this.merchantList({
pageNum: 1,
pageSize: 40,
})
}
},
},
}, },
methods: { methods: {
// 获取商户列表 loadmore() {
merchantList() { this.pageData.pageNum++
const params = { if (this.marchantNameCopy) {
accountType: 1, this.merchantList(this.pageData, this.marchantNameCopy)
} else {
this.merchantList(this.pageData) //类似于分页查询
} }
addNamelistApi.getMerchantsList(params).then((res) => { },
this.merchants = res.data.data.map((val) => { // 获取商户列表
merchantList(val, searchVal = '') {
let accounttypeId = [2]
addNamelistApi
.getMerchantsListByPages({
accounttypeId,
merchantName: searchVal,
...val,
})
.then((res) => {
let arr = res.data.data.data.map((val) => {
return { return {
merchantName: val.merchantName, merchantName: val.merchantName,
merchantBrandCars: val.merchantBrandCars, merchantBrandCars: val.merchantBrandCars,
merchantAddress: val.merchantAddress, merchantAddress: val.merchantAddress,
merchantId: val.merchantNo,
} }
}) })
this.dataItems = [...this.dataItems, ...arr]
})
},
// 远程搜索
async remoteMethod(searchVal) {
if (searchVal !== '') {
this.marchantNameCopy = searchVal
if (this.timer) {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.merchantList(this.pageData, searchVal)
}, 300)
} else {
this.timer = setTimeout(() => {
this.merchantList(this.pageData, searchVal)
}, 300)
}
console.log(this.timer)
} else {
this.dataItems = []
this.merchantList({
pageNum: 1,
pageSize: 40,
}) })
}
}, },
// 根据所选商户获取品牌和地址 // 根据所选商户获取品牌和地址
selectChange(label) { async selectChange(label) {
let obj = this.merchants.filter((el) => { if (label) {
let obj = this.dataItems.filter((el) => {
return el.merchantName == label return el.merchantName == label
}) })
this.$set(this.ruleForm, 'address', obj[0].merchantAddress) this.merchantId = obj[0] && obj[0].merchantId
this.$set(this.ruleForm, 'brand', obj[0].merchantBrandCars) // this.merchantId = 44209941
await addNamelistApi
.findMerchantDetailByMerchantNo({ merchantId: this.merchantId })
.then((res) => {
let brandTreeList = res.data.data && res.data.data.brandTreeList
let brandTreeListName =
brandTreeList && brandTreeList.map((item) => item.name)
this.$set(
this.ruleForm,
'brand',
brandTreeListName && brandTreeListName.toString()
)
})
this.$set(this.ruleForm, 'address', obj[0] && obj[0].merchantAddress)
}
}, },
submitForm() { submitForm() {
if (this.fileName == '') { if (this.fileName == '') {
...@@ -188,7 +292,7 @@ export default { ...@@ -188,7 +292,7 @@ export default {
} }
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (!this.hasFile && valid) { if (!this.hasFile && valid) {
let{ let {
address: merchantAddr, address: merchantAddr,
merchant: merchantName, merchant: merchantName,
brand: mainBrandName, brand: mainBrandName,
...@@ -199,16 +303,26 @@ export default { ...@@ -199,16 +303,26 @@ export default {
merchantName, merchantName,
mainBrandName, mainBrandName,
remark, remark,
merchantId: this.merchantId,
file: this.fileBaseUrl, file: this.fileBaseUrl,
} }
console.log(params)
customerApi.addCustomerList(params).then((res) => { customerApi.addCustomerList(params).then((res) => {
this.dialogVisible =true const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
})
if (res.data.code == '0') {
loading.close()
this.dialogVisible = true
this.uploadStatus = 'success' this.uploadStatus = 'success'
console.log(res) this.uploadSuccessMsg = res.data.data
},err =>{ } else {
this.dialogVisible =true loading.close()
this.dialogVisible = true
this.uploadStatus = 'fail' this.uploadStatus = 'fail'
}
}) })
} else { } else {
return false return false
...@@ -235,24 +349,26 @@ export default { ...@@ -235,24 +349,26 @@ export default {
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = (event) => { reader.onload = (event) => {
this.fileName = file.name
const imgFile = event.target.result const imgFile = event.target.result
const arrBase64 = imgFile.split(',') const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.') const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1] const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.fileBaseUrl = fileUrl let fileList = [{ file: fileUrl, fileType: 'doc' }]
this.fileName = file.name uploadApi.multipleUpload({ fileList }).then((res) => {
// this.$apis.common.pictureUpload({ file: fileUrl }).then(res => { if (res) {
// if (res) { this.fileBaseUrl = res.data.data[0]
// this.importName = file.name }
// this.exportUrl = res })
// this.handleSaveImport()
// }
// this.$refs.file.value = ''
// })
} }
}, },
back() { back() {
this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理']) this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理'])
this.dialogVisible = false
if (this.uploadStatus == 'success') {
this.ruleForm = {}
this.fileName = ''
}
}, },
}, },
} }
...@@ -261,6 +377,7 @@ export default { ...@@ -261,6 +377,7 @@ export default {
<style scoped> <style scoped>
.biasicInfo { .biasicInfo {
width: 500px; width: 500px;
margin-top: 24px;
} }
.el-upload-list__item-name { .el-upload-list__item-name {
border: 1px solid yellow; border: 1px solid yellow;
...@@ -320,4 +437,7 @@ export default { ...@@ -320,4 +437,7 @@ export default {
left: 0px; left: 0px;
font-size: 0px; font-size: 0px;
} }
.el-form-item {
margin-bottom: 20px;
}
</style> </style>
<template> <template>
<div> <div>
<div> <div>
<div> <div>
<div class="mainTitle">基本信息</div> <div class="mainTitle">基本信息</div>
<div class="infoBox"> <div class="infoBox">
<p class="rowline"> <p class="rowline">
<span class="title">所属商户:</span> <span class="title">所属商户:</span>
<span>*************</span> <span>{{ merchantBaseInfo.merchantName }}</span>
</p> </p>
<p class="rowline"> <p class="rowline">
<span class="title">主营品牌:</span><span>*************</span> <span class="title">主营品牌:</span
><span>{{ merchantBaseInfo.mainBrandName }}</span>
</p> </p>
<p class="rowline"> <p class="rowline">
<span class="title">商户地址:</span> <span class="title">商户地址:</span>
<span>*************</span> <span>{{ merchantBaseInfo.merchantAddress }}</span>
</p> </p>
<p class="rowline"> <p class="rowline">
<span class="title">备注:</span> <span class="title">备注:</span>
<span>*************</span> <span>{{ merchantBaseInfo.remark }}</span>
</p> </p>
</div> </div>
</div> </div>
...@@ -31,13 +32,25 @@ ...@@ -31,13 +32,25 @@
:getListApi="getListApi" :getListApi="getListApi"
:pageConf="pageConf" :pageConf="pageConf"
> >
<!-- customerStatus -->
<div slot="customerStatus" slot-scope="scope">
<div>
{{
scope.scope.customerStatus == 0
? '完全流失'
: scope.scope.customerStatus == 1
? '在修不在保'
: ''
}}
</div>
</div>
</d2-table> </d2-table>
</div> </div>
</div> </div>
<div class="footerBut"> <div class="footerBut">
<el-button @click="back">返回</el-button> <el-button @click="back">返回</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -45,148 +58,157 @@ import { customerApi } from '@/api/customer' ...@@ -45,148 +58,157 @@ import { customerApi } from '@/api/customer'
export default { export default {
data() { data() {
return { return {
customerDetailForm: { merchantId: '',
enableStatus: '', merchantBaseInfo: {
merchantName: '',
mainBrandName: '',
merchantAddress: '',
remark: '',
}, },
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.count', totalCount: 'data.total',
}, },
tableData: [ customerDetailSearchForm: {
{ id: '',
id: 1,
dictName: 'dsfd',
}, },
], getListApi: customerApi.detailsCustomerList,
// getListApi: dictApi.findDictType,
customerDetailTableParams: { customerDetailTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.data', listName: 'data.list',
tableColumns: [ tableColumns: [
{ {
label: '投保人名称', label: '投保人名称',
prop: 'id', prop: 'policyHolderName',
width:'120px' width: '120px',
}, },
{ {
label: '投保人身份证号', label: '投保人身份证号',
prop: 'dictName', prop: 'policyHolderIdCard',
width:'170px' width: '170px',
}, },
{ {
label: '常用电话', label: '常用电话',
prop: 'dictType', prop: 'policyHolderPhone',
width: '170px',
}, },
{ {
label: '备用电话', label: '备用电话',
prop: 'remark', prop: 'sparePhone',
width: '170px',
}, },
{ {
label: '其他电话', label: '其他电话',
prop: 'enableStatus', prop: 'otherPhone',
addHtml: 'status', width: '170px',
}, },
{ {
label: '车牌号', label: '车牌号',
prop: 'createdDate', prop: 'plateNo',
}, },
{ {
label: '车架号', label: '车架号',
prop: 'enableStatus', prop: 'carVin',
addHtml: 'status', width: '170px',
}, },
{ {
label: '发动机号', label: '发动机号',
prop: 'createdDate', prop: 'engine',
}, },
{ {
label: '车辆初登日期', label: '车辆初登日期',
prop: 'createdDate', prop: 'registerDateStr',
width:'170px' width: '170px',
}, },
{ {
label: '最新保单日期', label: '最新保单日期',
prop: 'enableStatus', prop: 'policyDateStr',
addHtml: 'status', width: '170px',
width:'170px'
}, },
{ {
label: '公共型号', label: '公共型号',
prop: 'createdDate', prop: 'publicModel',
}, },
{ {
label: '车辆价值', label: '车辆价值',
prop: 'createdDate', prop: 'vehicleValue',
}, },
{ {
label: '厂家型号', label: '厂家型号',
prop: 'enableStatus', prop: 'brandModel',
addHtml: 'status',
}, },
{ {
label: '车主', label: '车主',
prop: 'createdDate', prop: 'vehicleOwner',
}, },
{ {
label: '车主证件号码', label: '车主证件号码',
prop: 'createdDate', prop: 'vehicleOwnerIdNo',
width:'170px' width: '170px',
}, },
{ {
label: '最新保单商业险保单号', label: '最新保单商业险保单号',
prop: 'enableStatus', prop: 'businessPolicyNo',
addHtml: 'status', width: '170px',
width:'170px'
}, },
{ {
label: '最新保单交强险保单号', label: '最新保单交强险保单号',
prop: 'createdDate', prop: 'compulsoryPolicyNo',
width:'170px' width: '170px',
}, },
{ {
label: '最新保单下的商业险出险次数', label: '最新保单下的商业险出险次数',
prop: 'createdDate', prop: 'businessAccidentsNum',
width:'220px' width: '220px',
}, },
{ {
label: '最新保单下的交强险出险次数', label: '最新保单下的交强险出险次数',
prop: 'enableStatus', prop: 'compulsoryAccidentsNum',
width:'220px' width: '220px',
}, },
{ {
label: '备注', label: '备注',
prop: 'createdDate', prop: 'remark',
}, },
{ {
label: '年化里程', label: '年化里程',
prop: 'createdDate', prop: 'annualMileage',
}, },
{ {
label: '车龄', label: '车龄',
prop: 'enableStatus', prop: 'vehicleAge',
addHtml: 'status',
}, },
{ {
label: '客户状态', label: '客户状态',
prop: 'createdDate', prop: 'customerStatus',
addHtml: 'customerStatus',
}, },
], ],
}, },
} }
}, },
methods:{ mounted() {
this.$root.eventBus.$on('params', (params) => {
let merchantId = params.merchantId
this.customerDetailSearchForm.id = merchantId
this.getcustomerInfo(merchantId)
this.$nextTick(() => {
this.$refs.customerDetail.refreshTable()
})
})
},
methods: {
back() { back() {
this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理']) this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理'])
}, },
// 客户名单查看-导入门店信息 // 客户名单查看-导入门店信息
getcustomerInfo(){ getcustomerInfo(merchantId) {
let params = {} customerApi.infoCustomerList({ id: `${merchantId}` }).then((res) => {
customerApi.infoCustomerList(params).then(res =>{ this.merchantBaseInfo = res.data
console.log(res)
}) })
} },
} },
} }
</script> </script>
...@@ -200,7 +222,7 @@ export default { ...@@ -200,7 +222,7 @@ export default {
align-items: center; align-items: center;
padding-left: 16px; padding-left: 16px;
} }
.infoBox{ .infoBox {
padding: 24px 0px 24px 100px; padding: 24px 0px 24px 100px;
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
...@@ -210,7 +232,7 @@ export default { ...@@ -210,7 +232,7 @@ export default {
align-items: center; align-items: center;
width: 560px; width: 560px;
} }
.title{ .title {
text-align: right; text-align: right;
width: 80px; width: 80px;
} }
......
<template> <template>
<div> <div style="margin:16px">
<el-button class="addList" type="primary" @click="gotoNamelist"> <el-button size="small" class="addList" type="primary" @click="gotoNamelist">
<i class="el-icon-plus"></i>添加名单</el-button <i class="el-icon-plus"></i>添加名单</el-button
> >
<el-button type="text" @click="gotoDetail">查看</el-button>
<el-form <el-form
inline="true" size="small"
inline
ref="merchantForm" ref="merchantForm"
:model="merchantSearchForm" :model="merchantSearchForm"
label-width="80px" label-width="80px"
...@@ -48,13 +48,46 @@ ...@@ -48,13 +48,46 @@
:getListApi="getListApi" :getListApi="getListApi"
:pageConf="pageConf" :pageConf="pageConf"
> >
<!-- <div class="table-btns" slot="optionBtns" slot-scope="scope"> <div slot="status" slot-scope="scope">
<el-button type="text" @click="handle('cogradient', scope.scope)" <div>
{{
scope.scope.status == 0
? '未同步'
: scope.scope.status == 1
? '同步中'
: scope.scope.status == 2
? '同步成功'
: '同步失败'
}}
</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<!-- 同步:仅状态=未同步、同步失败的名单可进行同步操作
查看:仅状态=未同步、已同步、同步失败的名单可进行查看操作
删除:仅状态=未同步、同步失败的名单可进行删除操作 -->
<el-button
v-if="scope.scope.status == '0' || scope.scope.status == '3'"
type="text"
@click="handle('cogradient', scope.scope.id)"
>同步</el-button >同步</el-button
> >
<el-button type="text" @click="gotoDetail">查看</el-button> <el-button
<el-button type="text" @click="handle('delete')">删除</el-button> v-if="
</div> --> scope.scope.status == '0' ||
scope.scope.status == '2' ||
scope.scope.status == '3'
"
type="text"
@click="gotoDetail(scope.scope.id)"
>查看</el-button
>
<el-button
v-if="scope.scope.status == '0' || scope.scope.status == '3'"
type="text"
@click="handle('delete', scope.scope.id)"
>删除</el-button
>
</div>
</d2-table> </d2-table>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
<span>{{ dialogVisibleText }}</span> <span>{{ dialogVisibleText }}</span>
...@@ -73,27 +106,17 @@ import { customerApi } from '@/api/customer' ...@@ -73,27 +106,17 @@ import { customerApi } from '@/api/customer'
export default { export default {
data() { data() {
return { return {
optionsId: '',
dialogVisible: false, dialogVisible: false,
dialogStatus: '', dialogStatus: '',
dialogVisibleText: dialogVisibleText:'',
'确定同步后,客户名单会自动发送给对应的保险合作渠道。是否确认同步?',
merchantSearchForm: { merchantSearchForm: {
merchantName: '',
merchantId: '',
status: '',
}, },
// DICTSTATUS: this.$Constants.DICT_STATUS,
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.total', totalCount: 'data.total',
}, },
// tableData: [
// {
// id: 1,
// dictName: 'list',
// },
// ],
getListApi: customerApi.searchCustomerList, getListApi: customerApi.searchCustomerList,
merchantTableParams: { merchantTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -122,22 +145,22 @@ export default { ...@@ -122,22 +145,22 @@ export default {
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status',
}, },
{ {
label: '创建人', label: '创建人',
prop: 'createdBy', prop: 'createdBy',
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDateStr',
}, },
// { {
// label: '操作', label: '操作',
// prop: 'optionBtns', prop: 'optionBtns',
// addHtml: 'optionBtns', addHtml: 'optionBtns',
// fixed: 'right', fixed: 'right',
// }, },
], ],
}, },
} }
...@@ -153,58 +176,72 @@ export default { ...@@ -153,58 +176,72 @@ export default {
]) ])
}, },
gotoDetail() { gotoDetail(id) {
this.$root.to([ this.$root.to(
'ubi续保', ['ubi续保', '续保', '保险渠道管理', '客户名单管理', '*查看客户名单'],
'续保', { merchantId: id }
'保险渠道管理', )
'客户名单管理',
'*查看客户名单',
])
}, },
reset() { reset() {
this.merchantSearchForm = {} Object.keys(this.merchantSearchForm).forEach((key) => {
}, this.merchantSearchForm[key] = ''
handle(type,scope) { })
this.$nextTick(() => {
this.$refs.merchantTable.refreshTable()
})
},
handle(type, id) {
this.dialogVisible = true this.dialogVisible = true
this.dialogStatus = type this.dialogStatus = type
this.optionsId = id
if (type == 'delete') { if (type == 'delete') {
this.dialogVisibleText = '删除后不可恢复,是否确认删除?' this.dialogVisibleText = '删除后不可恢复,是否确认删除?'
}else{
this.dialogVisibleText = '确定同步后,客户名单会自动发送给对应的保险合作渠道。是否确认同步?'
} }
}, },
comfirmDialog(type) { comfirmDialog(type) {
if (type == 'cogradient') { if (type == 'cogradient') {
// 合并 // 合并
customerApi.synchroCustomerList({ id: scope.id }).then( customerApi.synchroCustomerList({ id: this.optionsId }).then(
(res) => { (res) => {
this.$message.success('合并成功') console.log(res)
this.$message.success('同步成功')
}, },
(err) => { (err) => {
this.$message.error('合并失败') this.$message.error('同步失败')
} }
) )
this.dialogVisible = false
} }
// 删除 // 删除
if (type == 'delete') { if (type == 'delete') {
customerApi.deleteCustomerList({ id: scope.id }).then( customerApi.deleteCustomerList({ id: this.optionsId }).then(
(res) => { (res) => {
console.log(res)
this.$message.success('删除成功') this.$message.success('删除成功')
this.$refs.merchantTable.refreshTable()
}, },
(err) => { (err) => {
this.$message.error('删除失败') this.$message.error('删除失败')
} }
) )
this.dialogVisible = false
} }
}, },
}, },
} }
</script> </script>
<style scoped> <style scoped>
*{
margin: 0;
padding: 0;
}
.addList { .addList {
width: 112px; width: 112px;
background: #1994f9; background: #1994f9;
border-radius: 2px; border-radius: 2px;
margin-bottom: 24px; margin-bottom: 16px;
} }
.el-icon-plus { .el-icon-plus {
padding-right: 5px; padding-right: 5px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!