Commit e54f89db by 前端

Merge branch 'v2.8.0' into 'master'

V2.8.0

See merge request !35
2 parents 3a4b8706 dc28124c
......@@ -2671,6 +2671,11 @@
"integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=",
"dev": true
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
},
"check-types": {
"version": "7.4.0",
"resolved": "http://registry.npm.taobao.org/check-types/download/check-types-7.4.0.tgz",
......@@ -3338,6 +3343,11 @@
"which": "^1.2.9"
}
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
},
"crypto-browserify": {
"version": "3.12.0",
"resolved": "http://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz",
......@@ -3722,6 +3732,11 @@
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true
},
"dayjs": {
"version": "1.11.4",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.4.tgz",
"integrity": "sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g=="
},
"de-indent": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",
......@@ -5425,9 +5440,9 @@
}
},
"glsx-vue-common": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/glsx-vue-common/-/glsx-vue-common-1.2.9.tgz",
"integrity": "sha512-oG7tbd5ex0xmcmrBzmYYrRj8aXjFpfBl2/etUqzwHhuSswNl7hAxuhmJxF1JhnOoOcOjgq/HqIFYtnv3eGt1jw==",
"version": "2.0.5",
"resolved": "https://registry.npmmirror.com/glsx-vue-common/-/glsx-vue-common-2.0.5.tgz",
"integrity": "sha512-YMwjcuc0svvm/nbqnut1E0Obp3JFMfi1Rx/+RU2LGRiVKI0/RQveVYsy7CXbOGgL6hlnIL/GwLCMwJ57qtaWpg==",
"requires": {
"vue": "^2.5.10"
}
......@@ -10309,6 +10324,15 @@
"safe-buffer": "^5.0.1"
}
},
"sha1": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==",
"requires": {
"charenc": ">= 0.0.1",
"crypt": ">= 0.0.1"
}
},
"shallow-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz",
......
......@@ -11,10 +11,12 @@
},
"dependencies": {
"axios": "^0.18.0",
"dayjs": "^1.11.4",
"element-ui": "^2.15.1",
"glsx-vue-common": "^1.2.8",
"glsx-vue-common": "^2.0.5",
"lodash": "^4.17.10",
"sass-loader": "^7.1.0",
"sha1": "^1.1.1",
"vue": "^2.5.17"
},
"devDependencies": {
......
import request from './request'
import Vue from 'vue'
const path = 'merchants.api.'
const addNamelistApi = {
// 根据商户名称和渠道类型查询商户列表
getMerchantsList(data = {}) {
data.method = 'merchants.api.open.findMerchantList'
return request(
data,
'merchants.api.open.findMerchantList',
[],
Vue.prototype.otherUrl
)
},
// 根据商户名称和渠道类型查询商户列表-分页查询
getMerchantsListByPages(data = {}) {
data.method = `${path}menu.findMerchantByPage`
return request(
data,
`${path}menu.findMerchantByPage`,
[],
Vue.prototype.otherUrl
)
},
// 根据商户号查询商户详情
findMerchantDetailByMerchantNo(data = {}) {
data.method = `${path}open.findMerchantDetailByMerchantNo`
return request(
data,
`${path}open.findMerchantDetailByMerchantNo`,
[],
Vue.prototype.otherUrl
)
}
}
export { addNamelistApi }
import request from './request'
const path = 'scrm.api.renewal.insurance.customer.name.list.'
const defaultPath = 'scrm.api.renewal.order.'
const customerApi = {
// 客户名单列表查询
searchCustomerList(data = {}) {
data.method = `${path}get`
return request(data)
},
// 客户名单同步
synchroCustomerList(data = {}) {
data.method = `${path}sync`
return request(data)
},
// 客户名单删除
deleteCustomerList(data = {}) {
data.method = `${path}delete`
return request(data)
},
// 客户名单查看-门店信息
infoCustomerList(data = {}) {
data.method = `${path}merchant.info`
return request(data)
},
// 客户名单查看-导入名单数据详情列表
detailsCustomerList(data = {}) {
data.method = `${path}details`
return request(data)
},
// 客户名单列表导出
exportCustomerList(data = {}) {
data.method = `${path}export`
return request(data)
},
// 添加客户名单
addCustomerList(data = {}) {
data.method = `${path}add`
return request(data, 'post')
},
// 获取订单列表
getOrderList(data = {}) {
data.method = `${defaultPath}list`
return request(data)
},
// 获取订单详情
getOrderDetail(data = {}) {
data.method = `${defaultPath}detail`
return request(data)
},
// 订单列表导出
orderListExport(data = {}) {
data.method = `${defaultPath}list.export`
return request(data)
}
}
export { customerApi }
import request from './request'
const defaultPath = 'scrm.api.renewal.customer.'
// const url = 'http://192.168.3.101:8247/rop-scrm-renewal'
const path = 'scrm.api.renewal.integral.'
const integrateApi = {
// 获取客户认证管理列表
customerList(data = {}) {
data.method = `${defaultPath}list`
return request(data)
},
// 客户认证
authentication(data = {}) {
data.method = `${defaultPath}authentication`
return request(data)
},
// 积分兑换
convert(data = {}) {
data.method = 'scrm.api.renewal.integral.convert'
return request(data)
}
}
// 客户兑换管理列表
const integralExchangeApi = {
integralExchange(data = {}) {
data.method = `${path}convert.record.list`
return request(data)
}
}
// 客户积分管理列表
const integralManageApi = {
integralManage(data = {}) {
data.method = `${path}record.list`
return request(data)
}
}
// 客户积分管理列表导出
const orderExportApi = {
orderExport(data = {}) {
data.method = `${path}record.list.export`
return request(data)
}
}
export { integrateApi, integralExchangeApi, integralManageApi, orderExportApi }
import RequestMethods from './request.methods'
import axios from 'axios'
import qs from 'qs'
// import GlsxVueCommon from 'glsx-vue-common'
import sign from './sign'
import {
GlAxios
} from 'glsx-vue-common'
const request = (params = {}, method = RequestMethods.GET, noSignAttr = [], url = '') => {
params.source = 'glsx-oss-merchant-data'
params.appKey = '48e5e13229b82c1b4e6e8c96151f0637'
params.timestamp = new Date().getTime()
params.v = '1.0.0'
params.format = 'json'
// params.createBy = this.$get_session_config().user.id
var data = sign(params, noSignAttr)
if (url) {
return axios.post(`${url}/router?method=${method}`, qs.stringify(data))
}
return method === RequestMethods.GET ? GlAxios.get('router', {
params: sign(params, noSignAttr)
}) : GlAxios.post('router', data)
}
export default request
const RequestMethods = {
POST: 'post',
GET: 'get',
PUT: 'put',
DELETE: 'delete'
}
export default RequestMethods
import sha1 from 'sha1'
import qs from 'qs'
import _ from 'lodash'
const secret = window.location.href.includes('dj.glsx.com.cn') ? '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' : 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const sign = (params, noSignAttr = []) => {
delete params.sign
var objStr = qs.stringify(_.cloneDeep(params), {
arrayFormat: 'indices',
allowDots: true,
encodeValuesOnly: true
})
var objVal = objStr.split('&')
var realObj = {}
objVal.forEach(item => {
const idx = item.indexOf('=')
realObj[item.split('=')[0]] = decodeURIComponent(item.slice(idx + 1))
})
const keys = Object.keys(realObj).sort()
var str = []
var obj = null
for (const key in realObj) {
obj = realObj[key]
if (obj === null) {
obj = ''
} else if (typeof obj === 'object') {
obj = JSON.stringify(obj)
}
realObj[key] = obj
}
keys.forEach(e => {
!noSignAttr.includes(e) && str.push(e + realObj[e])
})
realObj.sign = sha1(secret + str.join('') + secret).toUpperCase()
return realObj
}
export default sign
import request from './request'
const path = 'merchants.api.accountype.'
const accountApi = {
/** 账户类型分页数据*/
getPageApi(data = {}) {
data.method = `${path}page`
return request(data)
}
}
export { accountApi }
import request from './request'
const uploadApi = {
// 多文件上传接口
multipleUpload(data = {}) {
// 'http://192.168.1.182:8561/rop-scrm-renewal'
data.method = 'scrm.api.renewal.common.upload.common.multiple'
// return request(data, 'scrm.api.equity.common.upload.common.multiple', [], 'http://scrm.test.glsx.com.cn/rop-scrm-renewal')
return request(data, 'post')
}
}
export { uploadApi }
......@@ -9,13 +9,20 @@ import { Request as request } from 'glsx-vue-common'
import '@/styles/index.css'
// 组件
import '@/components'
import { Util } from './common/util'
import _ from 'lodash'
// import _ from 'lodash'
// import axios from 'axios'
Vue.prototype.btn_size = 'mini'
Vue.prototype.$Utils = Util
Vue.use(ElementUI)
var mixin = {
data() {
return {
eventBus: new Vue()
}
},
mounted() {
const _this = this
const theme = new this.$Theme()
......@@ -26,24 +33,52 @@ var mixin = {
},
height() {
return document.height || document.body.offsetHeight // document.documentElement.clientHeight || document.body.clientHeight //
},
translate(params) {
_this.eventBus.$emit('params', params)
}
}
})
connection.promise.then(parent => {
const cfg = _this.$get_session_config()
_this.$$parent = parent
if (cfg) return
parent.getResources().then(config => {
_this.$set_session_config(config)
})
})
},
methods: {
/**
* 页面跳转方法 用法 :
* this.$root.to(['MOCK系统A', '一键导航', '导航数据', 'MOCK数据B', 'localhost'],'1123')
* 或:
* this.$parent.to(['MOCK系统A', '一键导航', '导航数据', 'MOCK数据B', 'localhost'],'1123')
*
* @param {*} path 如: ['一级菜单名称','二级菜单名称','三级菜单名称','四级菜单名称','五级菜单名称']
* @param {*} params 传给下一个页面的参数
*/
to(path, params) {
if (this.$$parent) {
this.$$parent.to(path, params)
} else {
this.$$connection.promise.then(parent => {
parent.to(path, params)
})
}
},
close(title) {
this.$$parent.close(title)
}
}
}
const URL = 'http://oss-config.dev.glsx.com.cn/mock/5be17454f31545347559d499/config'
const URL =
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/renwal-config') => {
return new Promise((resolve, reject) => {
request({ url }).then(res => {
if (res.status === 'success') {
resolve({ 'vue': Vue, 'config': JSON.parse(res.data) })
resolve({ vue: Vue, config: JSON.parse(res.data) })
} else {
reject('ERROR.')
}
......@@ -52,7 +87,7 @@ const getConfig = (url = URL + '/renwal-config') => {
}
/* eslint-disable no-new */
const render = App => {
new Vue({
window.vm = new Vue({
el: '#app',
mixins: [mixin],
render: h => h(App)
......
import Vue from 'vue'
export const Util = {
getExplorer: function() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (
ua.match(/tencenttraveler/) != null ||
ua.match(/qqbrowse/) != null
) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
},
exportFn: function(url) {
console.log(url)
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
console.log(iframe)
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
console.log(document.body)
}
}
export const getExplorer = Util.getExplorer
export const exportFn = Util.exportFn
......@@ -2,7 +2,7 @@
<template>
<div class="d2-table">
<el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
......@@ -26,7 +26,7 @@
width="60px"
label="序号"
type='index'
:index="index=>index+(page.currentPage - 1) * page.pageSize + 1"
:index="index=>index+(page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
......@@ -93,16 +93,15 @@
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:current-page="page[this.pageConf.pageNum]"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal"
:layout="layout"
>
</el-pagination>
</div>
</template>
<script>
export default {
name: 'd2-table',
......@@ -111,10 +110,7 @@ export default {
loading: false,
data: [],
// 页码
page: {
pageSize: 10,
currentPage: 1
},
page: {},
total: 10,
// 排序
sortColum: '',
......@@ -123,12 +119,11 @@ export default {
mutiSelectArr: {}
}
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => []
default: () => {}
},
// 表格数据-外部传入
tableData: {
......@@ -158,6 +153,14 @@ export default {
type: Boolean,
default: true
},
pageConf: {
type: Object,
default: () => ({
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'totalCount'
})
},
// 分页组件配置
layout: {
type: String,
......@@ -211,46 +214,41 @@ export default {
}
}
},
mounted() {
this.page = {}
this.page[this.pageConf.pageSize] = 10
this.page[this.pageConf.pageNum] = 1
const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit)
this.getListApi && this.refreshTable()
},
methods: {
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ''
this.sort = order
this.refreshTable()
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
},
// 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() {
this.$emit('searchChange')
this.refreshTable(true, true)
},
refreshTable(clearMuti = true, resetCurrentPage = false) {
refreshTable(clearMuti = true, resetPageNum = false) {
this.beforeSearchFn().then(res => {
// console.log(res)
// 清空多选
clearMuti && this.clearMutiSelect()
this.loading = true
resetCurrentPage && (this.page.currentPage = 1)
resetPageNum && (this.page.pageNum = 1)
var params = {
...this.page,
...this.searchForm
......@@ -259,35 +257,50 @@ export default {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
this.getListApi(params).then(res => {
this.data = res[this.tableParams.listName]
this.total = res.pagination.totalCount
this.loading = false
}).catch(() => {
this.loading = false
})
this.getListApi(params)
.then(res => {
console.log(res)
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
})
.catch(() => {
this.loading = false
})
})
},
// 找返回值
findVal(res, rankStr, attr) {
var rankList = rankStr.split('.')
if (!rankStr) {
return res
}
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'), attr)
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
this.page[this.pageConf.pageSize] = value
this.getListApi
? this.refreshTable(false)
: this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
this.page[this.pageConf.pageNum] = value
this.getListApi
? this.refreshTable(false)
: this.$emit('refreshTable', this.page)
}
}
}
</script>
<style>
.a-click {
cursor: pointer;
}
.el-table{
margin-bottom: 16px;
}
.el-table .cell {
line-height: 14px;
}
......
body {
overflow: hidden;
overflow: auto;
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
html {
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
hr {
height:1px;
border:0px;
background-color:#e7eaec
}
a,
a:focus,
a:hover {
}
*,
*:before,
*:after {
-webkit-box-sizing: inherit;
box-sizing: inherit;
}
hr {
height: 1px;
border: 0px;
background-color: #e7eaec;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
outline: none;
text-decoration: none;
}
div:focus {
}
div:focus {
outline: none;
}
a:focus,
a:active {
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
//main-container全局样式
.app-main {
}
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.app-main {
overflow: auto;
}
.app-container {
}
.app-container {
padding: 20px;
}
// element
.el-table--medium td {
}
.el-table--medium td {
padding: 4px 0 !important;
}
.el-table .cell {
}
.el-table .cell {
padding: 0 0;
}
}
.dot {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 5px;
vertical-align: middle;
margin-right: 2px;
}
.statusText {
vertical-align: middle;
}
.w-300 {
width: 300px;
}
\ No newline at end of file
<!-- -->
<template>
<div>
<a href="http://www.glsx.com.cn/">广联赛讯主页</a>
</div>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style scoped>
</style>
......@@ -6,8 +6,13 @@
</div>
<ul>
<li>
<a href="../customer/glsx.html" target="_self">
广联赛讯——主页
<a href="../insurance/customer.html" target="_self">
客户名单管理列表
</a>
</li>
<li>
<a href="../insurance/order.html" target="_self">
订单管理列表
</a>
</li>
</ul>
......
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
import Vue from 'vue'
base.getConfig().then(data => {
const { vue, config } = data
Vue.prototype.otherUrl = config.axios.otherURL
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div>
<div>
<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 class="footerBut">
<el-button @click="back">返回</el-button>
</div>
</div>
</template>
<script>
import { customerApi } from '@/api/customer'
export default {
data() {
return {
merchantId: '',
merchantBaseInfo: {
merchantName: '',
mainBrandName: '',
merchantAddress: '',
remark: ''
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total'
},
customerDetailSearchForm: {
id: ''
},
getListApi: customerApi.detailsCustomerList,
customerDetailTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableColumns: [
{
label: '投保人名称',
prop: 'policyHolderName',
width: '120px'
},
{
label: '投保人身份证号',
prop: 'policyHolderIdCard',
width: '170px'
},
{
label: '常用电话',
prop: 'policyHolderPhone',
width: '170px'
},
{
label: '备用电话',
prop: 'sparePhone',
width: '170px'
},
{
label: '其他电话',
prop: 'otherPhone',
width: '170px'
},
{
label: '车牌号',
prop: 'plateNo'
},
{
label: '车架号',
prop: 'carVin',
width: '170px'
},
{
label: '发动机号',
prop: 'engine'
},
{
label: '车辆初登日期',
prop: 'registerDateStr',
width: '170px'
},
{
label: '最新保单日期',
prop: 'policyDateStr',
width: '170px'
},
{
label: '公共型号',
prop: 'publicModel'
},
{
label: '车辆价值',
prop: 'vehicleValue'
},
{
label: '厂家型号',
prop: 'brandModel'
},
{
label: '车主',
prop: 'vehicleOwner'
},
{
label: '车主证件号码',
prop: 'vehicleOwnerIdNo',
width: '170px'
},
{
label: '最新保单商业险保单号',
prop: 'businessPolicyNo',
width: '170px'
},
{
label: '最新保单交强险保单号',
prop: 'compulsoryPolicyNo',
width: '170px'
},
{
label: '最新保单下的商业险出险次数',
prop: 'businessAccidentsNum',
width: '220px'
},
{
label: '最新保单下的交强险出险次数',
prop: 'compulsoryAccidentsNum',
width: '220px'
},
{
label: '备注',
prop: 'remark'
},
{
label: '年化里程',
prop: 'annualMileage'
},
{
label: '车龄',
prop: 'vehicleAge'
},
{
label: '客户状态',
prop: 'customerStatus',
addHtml: 'customerStatus'
}
]
}
}
},
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(merchantId) {
customerApi.infoCustomerList({ id: `${merchantId}` }).then(res => {
this.merchantBaseInfo = res.data
})
}
}
}
</script>
<style>
.mainTitle {
height: 40px;
line-height: 40px;
background: #f7f8fa;
color: #333333;
font-weight: 600;
align-items: center;
padding-left: 16px;
}
.infoBox {
padding: 24px 0px 24px 100px;
color: #333333;
font-size: 14px;
}
.rowline {
display: flex;
align-items: center;
width: 560px;
}
.title {
text-align: right;
min-width: 80px;
}
.footerBut {
position: fixed;
z-index: 100;
bottom: 0;
width: 100%;
text-align: center;
height: 48px;
background-color: #fff;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template >
<div style="margin: 16px">
<el-button
size="small"
class="addList"
type="primary"
@click="gotoNamelist"
>
<i class="el-icon-plus"></i>添加名单</el-button
>
<el-form
size="small"
inline
ref="merchantForm"
:model="merchantSearchForm"
label-width="80px"
class="demo-form-inline"
>
<el-form-item label="商户名称">
<el-input
clearable
v-model="merchantSearchForm.merchantName"
placeholder="请输入商户名称"
></el-input>
</el-form-item>
<el-form-item label="商户号">
<el-input
clearable
v-model="merchantSearchForm.merchantId"
placeholder="请输入商户号"
></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="merchantSearchForm.status" placeholder="请选择状态">
<el-option label="全部" value=""></el-option>
<el-option label="未同步" value="0"></el-option>
<!-- <el-option label="同步中" value="1"></el-option> -->
<el-option label="已同步" value="2"></el-option>
<el-option label="同步失败" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :id="merchantTableParams.btnId"
>查询</el-button
>
<el-button @click="reset">重置</el-button>
</el-form-item>
</el-form>
<d2-table
class="my-row-height"
ref="merchantTable"
:hasNum="true"
:tableParams="merchantTableParams"
:searchForm="merchantSearchForm"
:getListApi="getListApi"
:pageConf="pageConf"
>
<div slot="status" slot-scope="scope">
<div>
{{
scope.scope.status == 0
? '未同步'
: 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
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>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="comfirmDialog(dialogStatus)"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import { customerApi } from '@/api/customer'
export default {
data() {
return {
optionsId: '',
dialogVisible: false,
dialogStatus: '',
dialogVisibleText: '',
merchantSearchForm: {},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total',
},
getListApi: customerApi.searchCustomerList,
merchantTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableColumns: [
{
label: '商户名称',
prop: 'merchantName',
},
{
label: '商户号',
prop: 'merchantId',
},
{
label: '主营品牌',
prop: 'mainBrandName',
},
{
label: '客户数量',
prop: 'customerNumber',
},
{
label: '有效客户数量',
prop: 'validCustomerNumber',
},
{
label: '批次号',
prop: 'batchNo',
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
},
{
label: '创建人',
prop: 'createdBy',
},
{
label: '创建时间',
prop: 'createdDateStr',
},
{
label: '操作',
prop: 'optionBtns',
addHtml: 'optionBtns',
fixed: 'right',
},
],
},
}
},
methods: {
gotoNamelist() {
this.$root.to([
'UBI续保',
'续保',
'保险渠道管理',
'客户名单管理',
'*添加名单',
])
this.$root.close('客户名单管理列表')
},
gotoDetail(id) {
this.$root.to(
['UBI续保', '续保', '保险渠道管理', '客户名单管理', '*查看客户名单'],
{ merchantId: id }
)
},
reset() {
Object.keys(this.merchantSearchForm).forEach((key) => {
this.merchantSearchForm[key] = ''
})
this.$nextTick(() => {
this.$refs.merchantTable.refreshTable()
})
},
handle(type, id) {
this.dialogVisible = true
this.dialogStatus = type
this.optionsId = id
if (type == 'delete') {
this.dialogVisibleText = '删除后不可恢复,是否确认删除?'
} else {
this.dialogVisibleText =
'确定同步后,客户名单会自动发送给对应的保险合作渠道。是否确认同步?'
}
},
async comfirmDialog(type) {
if (type == 'cogradient') {
// 合并
const loading = this.$loading({
lock: true,
text: '同步中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
})
await customerApi.synchroCustomerList({ id: this.optionsId }).then(
(res) => {
loading.close()
if (res.code == '0') {
this.$message.success('同步成功')
} else {
this.$message.error('同步失败')
}
},
(err) => {
loading.close()
this.$message.error(err)
}
)
this.dialogVisible = false
this.$refs.merchantTable.refreshTable()
}
// 删除
if (type == 'delete') {
const loadingDel = this.$loading({
lock: true,
text: '删除中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
})
customerApi.deleteCustomerList({ id: this.optionsId }).then(
(res) => {
loadingDel.close()
if (res.code == '0') {
this.$message.success('删除成功')
this.$refs.merchantTable.refreshTable()
} else {
this.$message.success('删除失败')
}
},
(err) => {
loadingDel.close()
this.$message.error(err)
}
)
this.dialogVisible = false
}
},
},
}
</script>
<style scoped>
.addList {
width: 112px;
background: #1994f9;
border-radius: 2px;
margin-bottom: 16px;
}
.el-icon-plus {
padding-right: 5px;
}
.my-row-height >>> .el-table__body-wrapper .el-table__row {
height: 48px;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- -->
<template>
<div class="order-contentbox">
<div>
<el-form :inline="true" :model="searchForm">
<el-form-item label="订单编号:">
<el-input v-model="searchForm.orderCode" size="small" placeholder="请输入订单编码" oninput ="value=value.replace(/[\u4e00-\u9fa5/\s+/]|[^a-zA-Z0-9\u4E00-\u9FA5]/g,'')"></el-input>
</el-form-item>
<el-form-item label="客户姓名:">
<el-input v-model="searchForm.customerName" size="small" placeholder="请输入客户姓名"></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input v-model="searchForm.mobile" size="small" placeholder="请输入手机号" oninput ="value=value.replace(/[^\d]/g,'')"></el-input>
</el-form-item>
<el-form-item label="车牌号:">
<el-input v-model="searchForm.plateNo" size="small" placeholder="请输入车牌号" oninput ="value=value.replace(/[^a-zA-Z0-9\u4E00-\u9FA5]/g,'')"></el-input>
</el-form-item>
<el-form-item label="所属商户:">
<el-input v-model="searchForm.merchantName" size="small" placeholder="请输入商户名称"></el-input>
</el-form-item>
<el-form-item label="业务归属机构:">
<el-input v-model="searchForm.businessInstitution" size="small" placeholder="请输入业务归属机构"></el-input>
</el-form-item>
<el-form-item label="订单时间:">
<el-date-picker
v-model="orderTime"
type="daterange"
size="small"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleSearch">查询</el-button>
<el-button plain size="small" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="table-top">
<div>订单列表</div>
<el-button class="output-btn" size="small" style="margin-bottom: 20px" @click="handlerOutput">导出</el-button>
</div>
<div>
<d2-table
ref="orderTable"
:searchForm="searchForm"
:getListApi="getListApi"
:tableParams="tableParams"
:pageConf="pageConf"
>
<div slot="totalPremium" slot-scope="scope">
¥{{scope.scope.totalPremium}}
</div>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleViewDetail(scope.scope)">查看</el-button>
</template>
</d2-table>
</div>
</div>
</template>
<script>
import { customerApi } from '@/api/customer'
export default {
data() {
return {
searchForm: {
orderCode: '',
customerName: '',
mobile: '',
plateNo: '',
merchantName: '',
// 订单开始时间
orderDateBegin: '',
// 订单结束事件
orderDateEnd: '',
businessInstitution: ''
},
orderTime: [],
// 表格参数
tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableOption: true,
tableColumns: [
{
label: '订单编号',
prop: 'orderCode',
width: 200
},
{
label: '订单时间',
prop: 'orderDate',
width: 250
},
{
label: '客户姓名',
prop: 'customerName'
},
{
label: '手机号',
prop: 'customerPhone'
},
{
label: '车牌号',
prop: 'plateNo'
},
{
label: '总保费金额',
prop: 'totalPremium',
addHtml: 'totalPremium',
width: 150
},
{
label: '所属商户',
prop: 'merchantName'
},
{
label: '业务归属机构',
prop: 'businessInstitution'
}
]
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total'
},
// 获取订单列表
getListApi: customerApi.getOrderList
}
},
methods: {
// 搜索框搜索
handleSearch() {
if (this.orderTime) {
this.searchForm.orderDateBegin = this.orderTime[0]
this.searchForm.orderDateEnd = this.orderTime[1]
}
console.log(this.searchForm)
this.$refs.orderTable.refreshTable()
},
// 重置搜索框搜索
handleReset() {
this.searchForm = {
orderCode: '',
customerName: '',
customerPhone: '',
plateNo: '',
merchantName: '',
orderDateBegin: '',
orderDateEnd: '',
businessInstitution: ''
}
this.orderTime = ''
this.$nextTick(() => {
this.$refs.orderTable.refreshTable()
})
},
// 跳转查看详情
handleViewDetail(scope) {
console.log(scope)
this.$root.to(
['UBI续保', '续保', '保险渠道管理', '订单管理', '*订单管理详情'],
scope.id
)
},
// 导出
handlerOutput() {
if (this.orderTime) {
this.searchForm.orderDateBegin = this.orderTime[0]
this.searchForm.orderDateEnd = this.orderTime[1]
}
let params = JSON.parse(JSON.stringify(this.searchForm))
customerApi.orderListExport(params).then(res => {
if (res.code == 0) {
this.$Utils.exportFn(res.data)
} else {
this.$message({
type: 'error',
message: '导出失败!'
})
}
})
}
}
}
</script>
<style scoped>
.order-contentbox {
margin: 16px;
padding-bottom: 8px;
}
.table-top {
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
.output-btn {
border-color: #1994f9;
color: #1994f9;
margin-bottom: 0px !important;
}
.el-form-item {
margin-bottom: 16px;
}
>>> .el-dialog__body {
padding: 20px !important;
}
>>> .el-form-item__content {
line-height: 32px !important;
}
>>> .el-form-item__label {
line-height: 32px !important;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div class="contents">
<div class="title">
<span class="title-name">客户信息</span>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div>
<div class="customer-info-title">客户名称:</div>
<span>{{orderInfo.customerName}}</span>
</div>
<div>
<div class="customer-info-title">身份证号:</div>
<span>{{orderInfo.customerIdCard}}</span>
</div>
<div>
<div class="customer-info-title">客户地址:</div>
<span>{{orderInfo.applicantAddress}}</span>
</div>
</div>
<div class="orderinfo-right">
<div>
<div class="customer-info-title">手机号:</div>
<span>{{orderInfo.customerPhone}}</span>
</div>
<div>
<div class="customer-info-title">所属商户:</div>
<span>{{orderInfo.merchantName}}</span>
</div>
</div>
</div>
<div class="title">
<span class="title-name">车辆信息</span>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div>
<div class="customer-info-title">车牌号:</div>
<span>{{orderInfo.plateNo}}</span>
</div>
</div>
<div class="orderinfo-right">
<div>
<div class="customer-info-title">车架号:</div>
<span>{{orderInfo.carVin}}</span>
</div>
</div>
</div>
<div class="title">
<span class="title-name">保险信息</span>
</div>
<div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">商业险保单号:</div>
<span>{{orderInfo.biPolicyNo}}</span>
</div>
<div class="orderinfo-left">
<div class="customer-info-title">商业险保费:</div>
<span>{{orderInfo.biPremium}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">商业险起保日期:</div>
<span>{{orderInfo.biStartDate}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">交强险保单号:</div>
<span>{{orderInfo.ciPolicyNo}}</span>
</div>
<div class="orderinfo-left">
<div class="customer-info-title">交强险保费:</div>
<span>{{orderInfo.ciPremium}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">交强险起保日期:</div>
<span>{{orderInfo.ciStartDate}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">非车险保单号:</div>
<span>{{orderInfo.nonPolicyNo}}</span>
</div>
<div class="orderinfo-left">
<div class="customer-info-title">非车险保费:</div>
<span>{{orderInfo.nonPremium}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">总保费:</div>
<span>{{orderInfo.totalPremium}}</span>
</div>
</div>
</div>
<div class="title">
<span class="title-name">增值服务信息</span>
</div>
<div class="server-info">
<table>
<thead class="table-head">
<td>服务名称</td>
<td>服务代码</td>
<td>服务关联手机号</td>
<td>服务单价</td>
<td>服务数量</td>
<td>服务总价</td>
</thead>
<tbody>
<tr v-for="item in orderInfo.orderServices" :key="item.serviceCode">
<td class="table-head">{{item.serviceName}}</td>
<td>{{item.serviceCode}}</td>
<td>{{item.serviceMobile}}</td>
<td>¥{{item.servicePrice}}</td>
<td>{{item.serviceQuantity}}</td>
<td>¥{{item.totalPrice}}</td>
</tr>
</tbody>
</table>
</div>
<div class="title">
<span class="title-name">订单信息</span>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">订单编号:</div>
<span>{{orderInfo.orderCode}}</span>
</div>
<div class="orderinfo-left">
<div class="customer-info-title">订单时间:</div>
<span>{{orderInfo.orderDate}}</span>
</div>
</div>
<div class="orderinfo-box">
<div class="orderinfo-left">
<div class="customer-info-title">业务归属机构:</div>
<span>{{orderInfo.businessInstitution}}</span>
</div>
</div>
<div class="btn-class">
<el-button size="medium" @click="back">返回</el-button>
</div>
</div>
</template>
<script>
import { customerApi } from '@/api/customer'
export default {
data() {
return {
// 订单信息
orderInfo: {}
}
},
mounted() {
this.$root.eventBus.$on('params', params => {
this.getOrderInfo(params)
})
},
methods: {
// 获取订单详情
getOrderInfo(id) {
let params = { id }
customerApi.getOrderDetail(params).then(res => {
console.log(res)
if (res.code != 0) {
this.$message({
type: 'error',
message: '获取客户信息失败!'
})
return
}
this.orderInfo = res.data
})
},
// 返回
back() {
this.$root.to([
'UBI续保',
'续保',
'保险渠道管理',
'订单管理',
'订单管理列表'
])
}
}
}
</script>
<style scoped>
.contents {
height: 100%;
overflow: auto;
padding: 0 16px;
}
.title {
height: 40px;
line-height: 40px;
background: #f7f8fa;
margin-bottom: 10px;
}
.title-name {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
font-family: PingFangSC-Medium, PingFang SC;
color: #333333;
}
.orderinfo-box {
display: flex;
margin-bottom: 15px;
}
.orderinfo-left,
.orderinfo-right {
width: 50%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.orderinfo-left .customer-info-title,
.orderinfo-right .customer-info-title {
width: 154px;
text-align: right;
display: inline-block;
padding: 5px 0;
}
.server-info {
padding: 20px 20px 40px 20px;
}
.btn-class {
height: 40px;
text-align: center;
margin-bottom: 20px;
}
table {
border: 1px solid #e5e5e5;
border-collapse: collapse;
border-spacing: 0;
text-align: center;
}
td {
border: 1px solid #e5e5e5;
font-size: 14px;
}
td,
th {
padding: 8px 0;
min-width: 170px;
}
.table-head {
background: #f7f8fa;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then((data) => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div class="certificate-box">
<div>
<el-form :inline="true" :model="searchForm">
<el-form-item label="客户姓名:">
<el-input v-model="searchForm.customerName" size="small" placeholder="请输入客户姓名"></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input v-model="searchForm.mobile" size="small" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="车牌号:">
<el-input v-model="searchForm.plateNo" size="small" placeholder="请输入车牌号"></el-input>
</el-form-item>
<el-form-item label="状态:">
<el-select v-model="searchForm.authStatus" size="small" placeholder="全部">
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" :id="tableParams.btnId">查询</el-button>
<el-button plain size="small" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div>
<!-- :tableData="tableData" -->
<d2-table
ref="certificationTable"
:searchForm="searchForm"
:tableParams="tableParams"
:getListApi="getListApi"
:pageConf="pageConf"
>
<div slot="orderCodeList" slot-scope="scope">
<div v-for="item in scope.scope.orderCodeList" :key="item">
<div>{{item}}</div>
</div>
</div>
<div slot="authStatus" slot-scope="scope">
<span v-if="scope.scope.authStatus == 1">
<div class="status-dot2"></div>
已认证
</span>
<span v-if="scope.scope.authStatus == 0">
<div class="status-dot1"></div>
未认证
</span>
</div>
<template slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.authStatus == 0" type="text" @click="handleCertificate(scope.scope)">认证</el-button>
<el-button v-else type="text" @click="handleConversion(scope.scope)">积分兑换</el-button>
</template>
</d2-table>
</div>
<!-- 积分兑换弹框 -->
<el-dialog
title="积分兑换"
:visible.sync="dialogVisible"
width="40%"
@close="closeDialog">
<div class="integral-box">
<div class="integral-left">
<div>客户姓名:</div>
<div>手机号:</div>
<div>车牌号:</div>
<div>开户银行:</div>
<div>银行卡号:</div>
<div>持卡人:</div>
<div class="change-number">兑换积分值:</div>
</div>
<div class="integral-right">
<div>{{conversionInfo.name}}</div>
<div>{{conversionInfo.mobile}}</div>
<div>{{conversionInfo.plateNo}}</div>
<div>{{conversionInfo.bankName}}</div>
<div>{{conversionInfo.bankNo}}</div>
<div>{{conversionInfo.cardName}}</div>
<div>
<el-input size="small" v-model="integralInput" @change="getValue" clearable placeholder="请输入兑换积分值" oninput ="value=value.replace(/^(0+)|[^\d]+/g,'')" maxlength="7"></el-input>
</div>
<span class="tips">备注:1积分价值=1元</span>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog" size="small">取消</el-button>
<el-button type="primary" @click="handelSave" size="small">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { integrateApi } from '@/api/integrate'
const statusOptions = [
{
value: 1,
label: '已认证'
},
{
value: 0,
label: '未认证'
},
{
value: '',
label: '全部'
}
]
export default {
name: 'Certification',
data() {
return {
statusOptions,
searchForm: {
customerName: '',
mobile: '',
plateNo: '',
authStatus: ''
},
// 积分兑换弹框显示
dialogVisible: false,
// 积分兑换信息
conversionInfo: {},
// 积分兑换值
integralInput: '',
getListApi: integrateApi.customerList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableOption: true,
tableColumns: [
{
label: '客户姓名',
prop: 'name'
},
{
label: '手机号',
prop: 'mobile',
width: 150
},
{
label: '车牌号',
prop: 'plateNo'
},
{
label: '开户银行',
prop: 'bankName'
},
{
label: '银行卡号',
prop: 'bankNo',
width: 200
},
{
label: '持卡人',
prop: 'cardName'
},
{
label: '申请时间',
prop: 'createdDate',
width: 200
},
{
label: '关联订单',
prop: 'orderCodeList',
addHtml: 'orderCodeList',
width: 200
},
{
label: '状态',
prop: 'authStatus',
addHtml: 'authStatus'
},
{
label: '认证人',
prop: 'authUserName'
},
{
label: '认证时间',
prop: 'authDate',
width: 200
}
]
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total'
}
}
},
mounted() {},
methods: {
// 重置搜索框搜索
handleReset() {
this.searchForm = {
customerName: '',
mobile: '',
plateNo: '',
authStatus: ''
}
this.$nextTick(() => {
this.$refs.certificationTable.refreshTable()
})
},
// 获取输入积分兑换值
getValue(e) {
this.integralInput = e
},
// 认证
handleCertificate(row) {
console.log(row)
var params = {}
params.userId = row.id
this.$confirm(
'进行认证操作后,即客户符合积分兑换资格。是否确定认证?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
closeOnClickModal: false
}
)
.then(() => {
integrateApi.authentication(params).then(res => {
if (res.code == 0) {
this.$message({
type: 'success',
message: '认证成功!'
})
this.$refs.certificationTable.refreshTable()
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消认证'
})
})
},
// 积分兑换弹框打开
handleConversion(row) {
console.log(row)
this.conversionInfo = row
this.dialogVisible = true
},
// 关闭弹窗
closeDialog() {
this.dialogVisible = false
this.integralInput = ''
this.conversionInfo = {}
},
// 保存积分兑换
handelSave() {
console.log(this.integralInput)
var params = {}
if (this.integralInput) {
params.userId = this.conversionInfo.id
params.amount = this.integralInput
integrateApi.convert(params).then(res => {
console.log(res)
if (res.code == 0) {
this.$message({
type: 'success',
message: '积分兑换成功!'
})
this.closeDialog()
this.$refs.certificationTable.refreshTable()
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
} else {
this.$message({
type: 'info',
message: '请输入积分兑换值'
})
}
}
}
}
</script>
<style scoped>
.certificate-box {
margin: 16px;
padding-bottom: 8px;
}
.integral-box {
display: flex;
}
.integral-left {
width: 30%;
text-align: right;
margin-right: 8px;
}
.integral-left,
.integral-right {
line-height: 40px;
color: #333333;
}
.change-number:before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
.status-dot1 {
display: inline-block;
width: 6px;
height: 6px;
background: #babdc2;
border-radius: 4px;
}
.status-dot2 {
display: inline-block;
width: 6px;
height: 6px;
background: #2cca74;
border-radius: 4px;
}
.warning-text {
margin: 15px 0;
color: #444;
font-size: 15px;
}
.withdraw-warning {
top: 22px !important;
}
.tips {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.el-form-item {
margin-bottom: 16px;
}
>>> .el-form-item__label .el-form-item__content {
line-height: 32px !important;
}
>>> .el-form-item__label {
line-height: 32px !important;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then((data) => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div style="padding: 8px;">
<el-form :inline="true" :model="searchForm">
<el-form-item label="申请单号:">
<el-input
v-model="searchForm.orderCode"
clearable
:size="btn_size"
placeholder="请输入申请单号"
></el-input>
</el-form-item>
<el-form-item label="客户姓名:">
<el-input
v-model="searchForm.name"
clearable
:size="btn_size"
placeholder="请输入客户姓名"
></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input
v-model="searchForm.mobile"
clearable
:size="btn_size"
placeholder="请输入手机号"
></el-input>
</el-form-item>
<el-form-item label="车牌号:">
<el-input
v-model="searchForm.plateNo"
clearable
:size="btn_size"
placeholder="请输入车牌号"
></el-input>
</el-form-item>
<el-form-item label="状态:">
<el-select
v-model="searchForm.status"
clearable
:size="btn_size"
placeholder="全部"
>
<el-option
v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :size="btn_size" :id="tableParams.btnId">查询</el-button>
<el-button :size="btn_size" plain @click="reset">重置</el-button>
</el-form-item>
</el-form>
<d2-table
ref="dictTable"
:tableParams="tableParams"
:searchForm="searchForm"
:getListApi="getListApi"
:pageConf="pageConf"
class="my-row-height"
>
<div slot="status" slot-scope="scope">
<span v-if="scope.scope.status == 1"><span class="status-dot2"></span> 已完成</span>
<span v-if="scope.scope.status == 0"><span class="status-dot1"></span> 初始状态</span>
</div>
</d2-table>
</div>
</template>
<script>
import { integralExchangeApi } from '../../../api/integrate'
const state = [
{
value: '',
label: '全部'
},
{
value: 1,
label: '已完成'
}
]
export default {
name: 'Conversion',
data() {
return {
state,
btn_size: 'small',
searchForm: {
orderCode: '',
name: '',
mobile: '',
plateNo: '',
status: ''
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total'
},
getListApi: integralExchangeApi.integralExchange,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableColumns: [
{
label: '申请单号',
prop: 'orderCode',
width: 180
},
{
label: '积分值',
prop: 'amount'
},
{
label: '客户姓名',
prop: 'name'
},
{
label: '手机号',
prop: 'mobile'
},
{
label: '车牌号',
prop: 'plateNo'
},
{
label: '开户银行',
prop: 'bankName'
},
{
label: '银行卡号',
prop: 'bankNo'
},
{
label: '持卡人',
prop: 'cardName'
},
{
label: '处理人',
prop: 'approverUserName'
},
{
label: '处理时间',
prop: 'approverDate'
},
{
label: '状态',
prop: '',
addHtml: 'status'
}
]
}
}
},
mounted() {},
methods: {
reset() {
this.searchForm = {
orderCode: '',
name: '',
mobile: '',
plateNo: '',
status: ''
}
this.$nextTick(() => {
this.$refs.dictTable.refreshTable()
})
}
}
}
</script>
<style scoped>
.el-form-item {
margin-bottom: 16px;
}
.status-dot1 {
display: inline-block;
width: 6px;
height: 6px;
background: #babdc2;
border-radius: 3px;
}
.status-dot2 {
display: inline-block;
width: 6px;
height: 6px;
background: #2cca74;
border-radius: 3px;
}
.my-row-height >>> .el-table__body-wrapper .el-table__row {
height: 48px;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then((data) => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div style="padding: 8px;">
<el-form :inline="true" :model="searchForm">
<el-form-item label="客户姓名:">
<el-input
v-model="searchForm.name"
clearable
:size="btn_size"
placeholder="请输入客户姓名"
></el-input>
</el-form-item>
<el-form-item label="手机号:">
<el-input
v-model="searchForm.mobile"
clearable
:size="btn_size"
placeholder="请输入手机号"
></el-input>
</el-form-item>
<el-form-item label="车牌号:">
<el-input
v-model="searchForm.plateNo"
clearable
:size="btn_size"
placeholder="请输入车牌号"
></el-input>
</el-form-item>
<el-form-item label="变更类型:">
<el-select
v-model="searchForm.recordType"
clearable
:size="btn_size"
placeholder="全部"
>
<el-option
v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :size="btn_size" :id="tableParams.btnId">查询</el-button>
<el-button :size="btn_size" plain @click="reset">重置</el-button>
</el-form-item>
</el-form>
<span class="list">积分列表</span>
<el-button :size="btn_size" plain type="primary" style="float: right;margin-bottom: 12px;" @click="handleExport">导出</el-button>
<d2-table
ref="dictTable"
:tableParams="tableParams"
:searchForm="searchForm"
:getListApi="getListApi"
:pageConf="pageConf"
class="my-row-height"
>
<div slot="amount" slot-scope="scope">
<span><span>{{scope.scope.beforeAmount > scope.scope.afterAmount ? '-' : '+'}}</span>{{scope.scope.amount}}</span>
</div>
<div slot="recordType" slot-scope="scope">
<span v-if="scope.scope.recordType == 1">系统赠送</span>
<span v-if="scope.scope.recordType == 2">积分兑换</span>
</div>
</d2-table>
</div>
</template>
<script>
import { integralManageApi, orderExportApi } from '../../../api/integrate'
const state = [
{
value:'',
label: '全部'
},
{
value: 1,
label: '系统赠送'
},
{
value: 2,
label: '积分兑换'
}
]
export default {
name: 'Conversion',
data() {
return {
state,
btn_size: 'small',
searchForm: {
name: '',
mobile: '',
plateNo: '',
recordType: ''
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.total'
},
getListApi: integralManageApi.integralManage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableColumns: [
{
label: '客户姓名',
prop: 'name'
},
{
label: '手机号',
prop: 'mobile'
},
{
label: '车牌号',
prop: 'plateNo'
},
{
label: '积分变更值',
prop: '',
addHtml: 'amount'
},
{
label: '变更类型',
prop: '',
addHtml: 'recordType'
},
{
label: '变更时间',
prop: 'createdDate'
},
{
label: '变更人',
prop: 'operator'
},
{
label: '变更前积分值',
prop: 'beforeAmount'
},
{
label: '变更后积分值',
prop: 'afterAmount'
}
]
}
}
},
mounted() {},
methods: {
reset() {
this.searchForm = {
name: '',
mobile: '',
plateNo: '',
recordType: ''
}
this.$nextTick(() => {
this.$refs.dictTable.refreshTable()
})
},
handleExport() {
var params = JSON.parse(JSON.stringify(this.searchForm))
orderExportApi.orderExport(params).then(res => {
if(res.code == 0) {
this.$Utils.exportFn(res.data)
}
})
.catch(error => {
this.$message.error({
type: 'error',
message: error
})
})
}
}
}
</script>
<style scoped>
.list {
font-size: 16px;
font-weight: 500;
color: #333333;
margin-top: 2px;
display: inline-block;
}
.el-form-item {
margin-bottom: 16px;
}
.my-row-height >>> .el-table__body-wrapper .el-table__row {
height: 48px;
}
</style>
<template>
<div>56</div>
</template>
\ No newline at end of file
module.exports = {
index: '主页',
'customer/glsx': '广联赛讯'
'insurance/customer': '广联赛讯'
}
......@@ -21,7 +21,7 @@ module.exports = {
},
devServer: {
port: 8085,
host: 'localhost',
host: '0.0.0.0',
open: true,
proxy: {
'/api': {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!