diff --git a/src/api/ebiz/hgb/index.js b/src/api/ebiz/hgb/index.js
new file mode 100644
index 000000000..466b5075a
--- /dev/null
+++ b/src/api/ebiz/hgb/index.js
@@ -0,0 +1,19 @@
+import request from '@/assets/js/utils/request'
+import getUrl from '@/assets/js/utils/get-url'
+
+// 惠桂保数据查询
+export function selectHgb(data) {
+ return request({
+ url: getUrl('/sale/order/selectHgb', 1),
+ method: 'post',
+ data
+ })
+}
+
+export function selectHgbDetail(data) {
+ return request({
+ url: getUrl('/sale/order/getHgbDetail', 1),
+ method: 'post',
+ data
+ })
+}
diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js
index d8ee61a8d..9446e7e5b 100644
--- a/src/assets/js/utils/request.js
+++ b/src/assets/js/utils/request.js
@@ -6,7 +6,6 @@ import MD5 from 'js-md5'
import CacheUtils from '@/assets/js/utils/cacheUtils'
import BusinessCommon from '@/assets/js/business-common'
-
let proposal = [
'/proposal/proposal/list',
'/proposal/proposal/toInsurance',
@@ -97,6 +96,9 @@ let preserve = [
// 个险业绩排行优化
let performanceRanking = ['/data/performance/getComList', '/data/performance/getComPerformance']
+// 惠桂保
+let hgb = ['/sale/order/selectHgb', '/sale/order/getHgbDetail']
+
let whiteList = [
'/customer/agent/getCustomersList',
...proposal,
@@ -108,7 +110,8 @@ let whiteList = [
...preserve,
...productStore,
...renewalManage,
- ...performanceRanking
+ ...performanceRanking,
+ ...hgb
]
// 创建axios实例
@@ -118,90 +121,96 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(
- async config => {
- let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
- if (whiteList.includes(relativePath)) {
- Toast.loading({
- duration: 0, // 持续展示 toast
- forbidClick: true, // 禁用背景点击
- loadingType: 'spinner',
- message: '加载中……'
- })
- }
- /**
- * 请求拦截处理(待添加 判断走统一网关处理)
- */
- if(config.url && /api\/$/.test(config.url.split(configApp.API_VERSION)[0]) && configApp.API_VERSION == 'v2'){
- if(!config.data || config.data == null){
- config.data = {}
- }
- if(!!config.data && config.data != null){
- let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data),configApp.REQ_PWD)
- config.data = {"data": encrypt }
- }
- }
-
- // token 不存在初始化处理
- let token = CacheUtils.getLocItem('token');
- if (!token){
- // 设备类型
- const target = BusinessCommon.device()
- // 安卓or苹果
- if (target.isAndroid || target.isIphone) {
- // eslint-disable-next-line no-undef
- const res = await EWebBridge.webCallAppInJs('getToken')
- CacheUtils.setLocItem('token', JSON.parse(res).token)
- }
- }
-
- config.headers['token'] = CacheUtils.getLocItem('token')
- // 添加请时间戳
- let timeStr = new Date().getTime() + '';
- config.headers['timeStr'] = timeStr;
- config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'));
- return config
- },
- error => {
- // Do something with request error
- Promise.reject(error)
+ async config => {
+ let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
+ if (whiteList.includes(relativePath)) {
+ Toast.loading({
+ duration: 0, // 持续展示 toast
+ forbidClick: true, // 禁用背景点击
+ loadingType: 'spinner',
+ message: '加载中……'
+ })
}
+ /**
+ * 请求拦截处理(待添加 判断走统一网关处理)
+ */
+ if (config.url && /api\/$/.test(config.url.split(configApp.API_VERSION)[0]) && configApp.API_VERSION == 'v2') {
+ if (!config.data || config.data == null) {
+ config.data = {}
+ }
+ if (!!config.data && config.data != null) {
+ let encrypt = AESTools.AESEncrypt(JSON.stringify(config.data), configApp.REQ_PWD)
+ config.data = { data: encrypt }
+ }
+ }
+
+ // token 不存在初始化处理
+ let token = CacheUtils.getLocItem('token')
+ if (!token) {
+ // 设备类型
+ const target = BusinessCommon.device()
+ // 安卓or苹果
+ if (target.isAndroid || target.isIphone) {
+ // eslint-disable-next-line no-undef
+ const res = await EWebBridge.webCallAppInJs('getToken')
+ CacheUtils.setLocItem('token', JSON.parse(res).token)
+ }
+ }
+
+ config.headers['token'] = CacheUtils.getLocItem('token')
+ // 添加请时间戳
+ let timeStr = new Date().getTime() + ''
+ config.headers['timeStr'] = timeStr
+ config.headers['signature'] = MD5(timeStr + CacheUtils.getLocItem('token'))
+ return config
+ },
+ error => {
+ // Do something with request error
+ Promise.reject(error)
+ }
)
// respone拦截器
service.interceptors.response.use(
- response => {
- let res = response.data
- if( configApp.API_VERSION == 'v2' && response.config.url && response.headers['content-type'].match(/application\/json/) && /api\/$/.test(response.config.url.split(configApp.API_VERSION)[0])){
- if(res.response){// 正常情況返回必有response 节点
- res = JSON.parse(AESTools.AESDecrypt(res.response,configApp.REQ_PWD))
- }
+ response => {
+ let res = response.data
+ if (
+ configApp.API_VERSION == 'v2' &&
+ response.config.url &&
+ response.headers['content-type'].match(/application\/json/) &&
+ /api\/$/.test(response.config.url.split(configApp.API_VERSION)[0])
+ ) {
+ if (res.response) {
+ // 正常情況返回必有response 节点
+ res = JSON.parse(AESTools.AESDecrypt(res.response, configApp.REQ_PWD))
}
- Toast.clear()
- if (res.code != 0) {
- if (res.code == 10001 || res.code == 10002) {
- Dialog.confirm({
- confirmButtonText: '重新登录',
- message: '你已被登出,可以取消继续留在该页面,或者重新登录'
- }).then(() => {
- //eslint-disable-next-line
- EWebBridge.webCallAppInJs('bridge', {
- flag: 'login'
- })
- })
- } else {
- //Toast.fail(res.msg)
- }
- return Promise.reject(res)
- } else {
- return res.content
- }
- },
- error => {
- Toast.clear()
- console.log('err' + error) // for debug
- //Toast.fail(error.message)
- return Promise.reject(error)
}
+ Toast.clear()
+ if (res.code != 0) {
+ if (res.code == 10001 || res.code == 10002) {
+ Dialog.confirm({
+ confirmButtonText: '重新登录',
+ message: '你已被登出,可以取消继续留在该页面,或者重新登录'
+ }).then(() => {
+ //eslint-disable-next-line
+ EWebBridge.webCallAppInJs('bridge', {
+ flag: 'login'
+ })
+ })
+ } else {
+ //Toast.fail(res.msg)
+ }
+ return Promise.reject(res)
+ } else {
+ return res.content
+ }
+ },
+ error => {
+ Toast.clear()
+ console.log('err' + error) // for debug
+ //Toast.fail(error.message)
+ return Promise.reject(error)
+ }
)
export default service
diff --git a/src/router/ebiz/hgb.js b/src/router/ebiz/hgb.js
new file mode 100644
index 000000000..926752131
--- /dev/null
+++ b/src/router/ebiz/hgb.js
@@ -0,0 +1,22 @@
+// 惠桂保路由信息
+const HgbIndex = () => import('@/views/ebiz/hgb')
+const Detail = () => import('@/views/ebiz/hgb/Detail')
+export default [
+ {
+ name: 'HgbIndex',
+ path: '/hgb/index',
+ component: HgbIndex,
+ meta: {
+ title: '惠桂保客户清单'
+ }
+ },
+ {
+ name: 'HgbDetail',
+ path: '/hgb/orderDetail/:prtNo',
+ component: Detail,
+ props: true,
+ meta: {
+ title: '保单详情'
+ }
+ }
+]
diff --git a/src/router/ebiz/index.js b/src/router/ebiz/index.js
index cfb208275..e8337c8c8 100644
--- a/src/router/ebiz/index.js
+++ b/src/router/ebiz/index.js
@@ -27,6 +27,7 @@ import attendance from './attendance'
// 开门红业绩
import goodStart from './goodStart'
+import hgb from './hgb'
export default [
...proposal,
@@ -53,5 +54,6 @@ export default [
...performance,
...renewalManage,
...question,
- ...goodStart
+ ...goodStart,
+ ...hgb
] //根据需要进行删减
diff --git a/src/views/ebiz/hgb/Detail.vue b/src/views/ebiz/hgb/Detail.vue
new file mode 100644
index 000000000..8b9e6805d
--- /dev/null
+++ b/src/views/ebiz/hgb/Detail.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ebiz/hgb/index.vue b/src/views/ebiz/hgb/index.vue
new file mode 100644
index 000000000..2f62a21dd
--- /dev/null
+++ b/src/views/ebiz/hgb/index.vue
@@ -0,0 +1,261 @@
+
+
+
惠桂保销售量
+
+
+
+
{{ uncvilNum }}
+
失效单量
+
+
+
+ 惠桂保客户明细
+
+
+
+
+
+
+ | 序号 |
+ 生效日 |
+ 投保人 |
+ 分单号 |
+ 到期日 |
+
+
+
+
+
+ | {{ i + 1 }} |
+
+ {{ data[key] }}
+ |
+
+
+
+ | 暂无数据 |
+
+
+
+
+
+
+
+
+
+
+ 查找
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+