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> <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
</p> ><span>{{ merchantBaseInfo.mainBrandName }}</span>
<p class="rowline"> </p>
<span class="title">商户地址:</span> <p class="rowline">
<span>*************</span> <span class="title">商户地址:</span>
</p> <span>{{ merchantBaseInfo.merchantAddress }}</span>
<p class="rowline"> </p>
<span class="title">备注:</span> <p class="rowline">
<span>*************</span> <span class="title">备注:</span>
</p> <span>{{ merchantBaseInfo.remark }}</span>
</p>
</div>
</div>
<div>
<div class="mainTitle">客户信息</div>
<d2-table
ref="customerDetail"
:hasNum="false"
:tableParams="customerDetailTableParams"
:searchForm="customerDetailSearchForm"
:getListApi="getListApi"
:pageConf="pageConf"
>
<!-- customerStatus -->
<div slot="customerStatus" slot-scope="scope">
<div>
{{
scope.scope.customerStatus == 0
? '完全流失'
: scope.scope.customerStatus == 1
? '在修不在保'
: ''
}}
</div>
</div>
</d2-table>
</div> </div>
</div> </div>
<div> <div class="footerBut">
<div class="mainTitle">客户信息</div> <el-button @click="back">返回</el-button>
<d2-table
ref="customerDetail"
:hasNum="false"
:tableParams="customerDetailTableParams"
:searchForm="customerDetailSearchForm"
:getListApi="getListApi"
:pageConf="pageConf"
>
</d2-table>
</div> </div>
</div> </div>
<div class="footerBut">
<el-button @click="back">返回</el-button>
</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: '操作',
prop: 'optionBtns',
addHtml: 'optionBtns',
fixed: 'right',
}, },
// {
// label: '操作',
// prop: 'optionBtns',
// addHtml: 'optionBtns',
// 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] = ''
})
this.$nextTick(() => {
this.$refs.merchantTable.refreshTable()
})
}, },
handle(type,scope) { 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!