Commit 8b471dc8 by 匡雅琴

Merge branch 'v2.8.0' into wuwx_2.8.0

2 parents a62d46b7 f4c5eb09
import request from './request'
const path = 'merchants.api.menu.'
const addNamelistApi = {
// 根据商户名称和渠道类型查询商户列表
getMerchantsList(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
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 }
\ 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
......@@ -298,6 +298,9 @@ export default {
.a-click {
cursor: pointer;
}
.el-table{
margin-bottom: 16px;
}
.el-table .cell {
line-height: 14px;
}
......
<template>
<div>
<div>
<div>
<div>
<div class="mainTitle">基本信息</div>
<div class="infoBox">
<p class="rowline">
<span class="title">所属商户:</span>
<span>*************</span>
</p>
<p class="rowline">
<span class="title">主营品牌:</span><span>*************</span>
</p>
<p class="rowline">
<span class="title">商户地址:</span>
<span>*************</span>
</p>
<p class="rowline">
<span class="title">备注:</span>
<span>*************</span>
</p>
<div>
<div class="mainTitle">基本信息</div>
<div class="infoBox">
<p class="rowline">
<span class="title">所属商户:</span>
<span>{{ merchantBaseInfo.merchantName }}</span>
</p>
<p class="rowline">
<span class="title">主营品牌:</span
><span>{{ merchantBaseInfo.mainBrandName }}</span>
</p>
<p class="rowline">
<span class="title">商户地址:</span>
<span>{{ merchantBaseInfo.merchantAddress }}</span>
</p>
<p class="rowline">
<span class="title">备注:</span>
<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 class="mainTitle">客户信息</div>
<d2-table
ref="customerDetail"
:hasNum="false"
:tableParams="customerDetailTableParams"
:searchForm="customerDetailSearchForm"
:getListApi="getListApi"
:pageConf="pageConf"
>
</d2-table>
<div class="footerBut">
<el-button @click="back">返回</el-button>
</div>
</div>
<div class="footerBut">
<el-button @click="back">返回</el-button>
</div>
</div>
</template>
<script>
......@@ -45,148 +58,157 @@ import { customerApi } from '@/api/customer'
export default {
data() {
return {
customerDetailForm: {
enableStatus: '',
merchantId: '',
merchantBaseInfo: {
merchantName: '',
mainBrandName: '',
merchantAddress: '',
remark: '',
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count',
totalCount: 'data.total',
},
tableData: [
{
id: 1,
dictName: 'dsfd',
},
],
// getListApi: dictApi.findDictType,
customerDetailSearchForm: {
id: '',
},
getListApi: customerApi.detailsCustomerList,
customerDetailTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.data',
listName: 'data.list',
tableColumns: [
{
label: '投保人名称',
prop: 'id',
width:'120px'
prop: 'policyHolderName',
width: '120px',
},
{
label: '投保人身份证号',
prop: 'dictName',
width:'170px'
prop: 'policyHolderIdCard',
width: '170px',
},
{
label: '常用电话',
prop: 'dictType',
prop: 'policyHolderPhone',
width: '170px',
},
{
label: '备用电话',
prop: 'remark',
prop: 'sparePhone',
width: '170px',
},
{
label: '其他电话',
prop: 'enableStatus',
addHtml: 'status',
prop: 'otherPhone',
width: '170px',
},
{
label: '车牌号',
prop: 'createdDate',
prop: 'plateNo',
},
{
label: '车架号',
prop: 'enableStatus',
addHtml: 'status',
prop: 'carVin',
width: '170px',
},
{
label: '发动机号',
prop: 'createdDate',
prop: 'engine',
},
{
label: '车辆初登日期',
prop: 'createdDate',
width:'170px'
prop: 'registerDateStr',
width: '170px',
},
{
label: '最新保单日期',
prop: 'enableStatus',
addHtml: 'status',
width:'170px'
prop: 'policyDateStr',
width: '170px',
},
{
label: '公共型号',
prop: 'createdDate',
prop: 'publicModel',
},
{
label: '车辆价值',
prop: 'createdDate',
prop: 'vehicleValue',
},
{
label: '厂家型号',
prop: 'enableStatus',
addHtml: 'status',
prop: 'brandModel',
},
{
label: '车主',
prop: 'createdDate',
prop: 'vehicleOwner',
},
{
label: '车主证件号码',
prop: 'createdDate',
width:'170px'
prop: 'vehicleOwnerIdNo',
width: '170px',
},
{
label: '最新保单商业险保单号',
prop: 'enableStatus',
addHtml: 'status',
width:'170px'
prop: 'businessPolicyNo',
width: '170px',
},
{
label: '最新保单交强险保单号',
prop: 'createdDate',
width:'170px'
prop: 'compulsoryPolicyNo',
width: '170px',
},
{
label: '最新保单下的商业险出险次数',
prop: 'createdDate',
width:'220px'
prop: 'businessAccidentsNum',
width: '220px',
},
{
label: '最新保单下的交强险出险次数',
prop: 'enableStatus',
width:'220px'
prop: 'compulsoryAccidentsNum',
width: '220px',
},
{
label: '备注',
prop: 'createdDate',
prop: 'remark',
},
{
label: '年化里程',
prop: 'createdDate',
prop: 'annualMileage',
},
{
label: '车龄',
prop: 'enableStatus',
addHtml: 'status',
prop: 'vehicleAge',
},
{
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() {
this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理'])
},
// 客户名单查看-导入门店信息
getcustomerInfo(){
let params = {}
customerApi.infoCustomerList(params).then(res =>{
console.log(res)
getcustomerInfo(merchantId) {
customerApi.infoCustomerList({ id: `${merchantId}` }).then((res) => {
this.merchantBaseInfo = res.data
})
}
}
},
},
}
</script>
......@@ -200,7 +222,7 @@ export default {
align-items: center;
padding-left: 16px;
}
.infoBox{
.infoBox {
padding: 24px 0px 24px 100px;
color: #333333;
font-size: 14px;
......@@ -210,7 +232,7 @@ export default {
align-items: center;
width: 560px;
}
.title{
.title {
text-align: right;
width: 80px;
}
......
<template>
<div>
<el-button class="addList" type="primary" @click="gotoNamelist">
<div style="margin:16px">
<el-button size="small" class="addList" type="primary" @click="gotoNamelist">
<i class="el-icon-plus"></i>添加名单</el-button
>
<el-button type="text" @click="gotoDetail">查看</el-button>
<el-form
inline="true"
size="small"
inline
ref="merchantForm"
:model="merchantSearchForm"
label-width="80px"
......@@ -48,13 +48,46 @@
:getListApi="getListApi"
:pageConf="pageConf"
>
<!-- <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handle('cogradient', scope.scope)"
<div slot="status" slot-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 type="text" @click="gotoDetail">查看</el-button>
<el-button type="text" @click="handle('delete')">删除</el-button>
</div> -->
<el-button
v-if="
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>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
<span>{{ dialogVisibleText }}</span>
......@@ -73,27 +106,17 @@ import { customerApi } from '@/api/customer'
export default {
data() {
return {
optionsId: '',
dialogVisible: false,
dialogStatus: '',
dialogVisibleText:
'确定同步后,客户名单会自动发送给对应的保险合作渠道。是否确认同步?',
dialogVisibleText:'',
merchantSearchForm: {
merchantName: '',
merchantId: '',
status: '',
},
// DICTSTATUS: this.$Constants.DICT_STATUS,
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total',
},
// tableData: [
// {
// id: 1,
// dictName: 'list',
// },
// ],
getListApi: customerApi.searchCustomerList,
merchantTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -122,22 +145,22 @@ export default {
{
label: '状态',
prop: 'status',
addHtml: 'status',
},
{
label: '创建人',
prop: 'createdBy',
},
{
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 {
])
},
gotoDetail() {
this.$root.to([
'ubi续保',
'续保',
'保险渠道管理',
'客户名单管理',
'*查看客户名单',
])
gotoDetail(id) {
this.$root.to(
['ubi续保', '续保', '保险渠道管理', '客户名单管理', '*查看客户名单'],
{ merchantId: id }
)
},
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.dialogStatus = type
this.optionsId = id
if (type == 'delete') {
this.dialogVisibleText = '删除后不可恢复,是否确认删除?'
}else{
this.dialogVisibleText = '确定同步后,客户名单会自动发送给对应的保险合作渠道。是否确认同步?'
}
},
comfirmDialog(type) {
if (type == 'cogradient') {
// 合并
customerApi.synchroCustomerList({ id: scope.id }).then(
customerApi.synchroCustomerList({ id: this.optionsId }).then(
(res) => {
this.$message.success('合并成功')
console.log(res)
this.$message.success('同步成功')
},
(err) => {
this.$message.error('合并失败')
this.$message.error('同步失败')
}
)
this.dialogVisible = false
}
// 删除
if (type == 'delete') {
customerApi.deleteCustomerList({ id: scope.id }).then(
customerApi.deleteCustomerList({ id: this.optionsId }).then(
(res) => {
console.log(res)
this.$message.success('删除成功')
this.$refs.merchantTable.refreshTable()
},
(err) => {
this.$message.error('删除失败')
}
)
this.dialogVisible = false
}
},
},
}
</script>
<style scoped>
*{
margin: 0;
padding: 0;
}
.addList {
width: 112px;
background: #1994f9;
border-radius: 2px;
margin-bottom: 24px;
margin-bottom: 16px;
}
.el-icon-plus {
padding-right: 5px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!