Commit 94e26c78 by 杨北旺

解决冲突

2 parents 5530968e 35f72887
Showing 84 changed files with 3848 additions and 265 deletions
This diff could not be displayed because it is too large.
...@@ -8,12 +8,14 @@ ...@@ -8,12 +8,14 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^1.0.2",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^2.1.0",
"glsx-components": "^1.5.2", "glsx-components": "^1.5.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
...@@ -32,9 +34,12 @@ ...@@ -32,9 +34,12 @@
"eslint-plugin-prettier": "^3.1.1", "eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"number-precision": "^1.6.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"snabbdom": "^3.5.1",
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1",
"vue-quill-editor": "^3.0.6",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
}, },
"browserslist": [ "browserslist": [
......
import { http } from '@/main'
const defaultPath = 'scrm.api.equity.service.'
const url = 'rop-scrm-equity/router'
const getcodeList = params => {
params.method = `${defaultPath}claims.code.list`
return http({
url,
method: 'POST',
data: params
})
}
const uploadCodeFile = params => {
params.method = `${defaultPath}claims.code.batchGenerateCodeByExcel`
return http({
url,
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const exportInvalidClaimsCodeApi = params => {
params.method =`${defaultPath}claims.code.exportInvalidClaimsCode`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const createCode = params => {
params.method =`${defaultPath}claims.code.batchGenerateCodeByHand`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getcodeList,
uploadCodeFile,
exportInvalidClaimsCodeApi,
createCode
}
\ No newline at end of file \ No newline at end of file
...@@ -25,8 +25,20 @@ const downLoads = params => { ...@@ -25,8 +25,20 @@ const downLoads = params => {
data: params data: params
}) })
} }
const getTypelistApi = params => {
params.method =`${defaultPath}service.package.select.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getWorryBatcnList, getWorryBatcnList,
addCards, addCards,
downLoads downLoads,
getTypelistApi
} }
...@@ -172,6 +172,18 @@ const getPackageListApi = params => { ...@@ -172,6 +172,18 @@ const getPackageListApi = params => {
}) })
} }
// 获取无忧卡套餐列表(新接口) 编辑新增调取新接口,查看调用久接口
const getNewPackageListApi = params => {
params.method = `scrm.api.equity.service.package.dj.list.without.tire`
// params.method = `scrm.api.equity.service.package.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
const getEquityApi = params => { const getEquityApi = params => {
params.method = `scrm.api.equity.service.channel.order.detail` params.method = `scrm.api.equity.service.channel.order.detail`
return http({ return http({
...@@ -381,6 +393,17 @@ const getOrdersummary = params => { ...@@ -381,6 +393,17 @@ const getOrdersummary = params => {
}) })
} }
// 获取汇总渠道类型
const getChannelTypeApi = params => {
params.method = 'scrm.api.equity.service.order.summary.sub.channel.type.list'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取汇总产品列表 // 获取汇总产品列表
const getSummaryPackage = params => { const getSummaryPackage = params => {
params.method = 'scrm.api.equity.service.summary.package' params.method = 'scrm.api.equity.service.summary.package'
...@@ -402,4 +425,14 @@ const getSummaryExportApi = params => { ...@@ -402,4 +425,14 @@ const getSummaryExportApi = params => {
}) })
} }
export default { getOrdersummary, getSummaryPackage, getSummaryExportApi, getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode } const getUpdateRecordApi = params => {
params.method = `scrm.api.equity.service.order.update.details`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getOrdersummary, getChannelTypeApi, getSummaryPackage, getSummaryExportApi, getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getNewPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode, getUpdateRecordApi }
...@@ -259,7 +259,6 @@ const checkOrderApi = params => { ...@@ -259,7 +259,6 @@ const checkOrderApi = params => {
}) })
} }
// 核赔审核 // 核赔审核
const checkClaimsOrderApi = params => { const checkClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.audit' params.method = 'scrm.api.equity.service.claims.audit'
...@@ -282,6 +281,16 @@ const cancelClaims = params => { ...@@ -282,6 +281,16 @@ const cancelClaims = params => {
}) })
} }
// 批量审核
const batchPassApi = params => {
params.method = 'scrm.api.equity.service.claims.auth.batch.pass'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损保存草稿 // 定损保存草稿
const saveCG = params => { const saveCG = params => {
...@@ -348,4 +357,68 @@ const getMerchantApi = params => { ...@@ -348,4 +357,68 @@ const getMerchantApi = params => {
sign: true sign: true
}) })
} }
export default {getMerchantApi,getMidMerchantApi,getBigMerchantApi,saveSign,saveClaimsCG,saveCG,cancelClaims,checkClaimsOrderApi,checkOrderApi,getOrderOherInfo,uploadImgApi,getGHCountApi,getGHPhoneImageApi,getGHattachmentApi,getGHClaimsDetailApi,getGHhistoryListApi,checkGHClaimsListApi,exportGHClaimsListApi,getGHClaimFollowsListApi,addGHClaimFollowsListApi,getGHClaimsListApi,getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
// 获取默认商户的下级商户
const getMerchantSubList = params => {
params.method = 'scrm.api.equity.common.default.merchant.subList'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//广汇续保定损审核接口
const renewalAudit = params => {
params.method = 'scrm.api.equity.service.claims.renewal.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//分页查询理赔跟进人列表
const getFollowPersonList = params => {
params.method = 'scrm.api.equity.service.follow.person.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//删除跟进人记录
const delFollowPerson = params => {
params.method = 'scrm.api.equity.service.follow.person.delete'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 新增理赔跟进人记录
const addFollowPerson = params => {
params.method = 'scrm.api.equity.service.follow.person.insert'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//删除案件
const delCaseApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.delete'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, batchPassApi, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo, getFollowPersonList, delFollowPerson, addFollowPerson, getMerchantSubList, delCaseApi }
import { http } from '@/main' import { http, http_common } from '@/main'
const defaultPath = 'scrm.api.live.' const defaultPath = 'scrm.api.live.'
...@@ -44,7 +44,7 @@ const getZoneList = params => { ...@@ -44,7 +44,7 @@ const getZoneList = params => {
} }
const pictureUpload = params => { const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload' params.method = 'glsx.accounts.biz.common.pictureUpload'
return http({ return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload', url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST', method: 'POST',
data: params, data: params,
......
import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router'
const getBaseContractListApi = params => {
params.method = `scrm.api.equity.service.contract.base.template.list.page`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//获取产品合同更换模板列表
const getContractListApi = params => {
params.method = `scrm.api.equity.service.contract.template.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const saveContractTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getContractDetailApi = params => {
params.method = `scrm.api.equity.service.contract.template.detail`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const printContractApi = params => {
params.method = `scrm.api.equity.service.contract.template.printTest`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const copyTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.copyTemplate`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//更换产品合同模板
const copyBaseTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.base.template.replace`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//批量变更合同模板
const babchCopyTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.batch.copyTemplate`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//批量初始化合同模板
const babchInitTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.batch.initTemplate`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const exportContractApi = params => {
params.method = `scrm.api.equity.service.contract.template.list.export`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getProdContractListApi = params => {
params.method = `scrm.api.equity.service.base.package.list.page`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//产品列表导出
const exportProdContractApi = params => {
params.method = `scrm.api.equity.service.base.package.export`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getContractListApi,
getBaseContractListApi,
saveContractTemplateApi,
getContractDetailApi,
printContractApi,
copyTemplateApi,
copyBaseTemplateApi,
babchCopyTemplateApi,
babchInitTemplateApi,
exportContractApi,
getProdContractListApi,
exportProdContractApi
}
import { http } from '@/main' import { http } from '@/main'
const defaultPath = 'scrm.api.equity.' const defaultPath = 'scrm.api.equity.'
const getConfigList = params => { const getConfigList = params => {
params.method = `${defaultPath}service.merchant.config.pagination.list.get` params.method = `${defaultPath}service.merchant.config.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
const openConfigs = params => { const openConfigs = params => {
params.method = `${defaultPath}service.merchant.config.batch.open` params.method = `${defaultPath}service.merchant.config.batch.open`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
const closeConfigs = params => { const closeConfigs = params => {
params.method = `${defaultPath}service.merchant.config.batch.close` params.method = `${defaultPath}service.merchant.config.batch.close`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
})
})
} }
// 跳转后获取配置 // 跳转后获取配置
const getConfig = params => { const getConfig = params => {
params.method = `${defaultPath}service.merchant.config.get` params.method = `${defaultPath}service.merchant.config.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
// 配置导出 // 配置导出
const exportConfig = params => { const exportConfig = params => {
params.method = `${defaultPath}service.merchant.config.export` params.method = `${defaultPath}service.merchant.config.export`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
//修改配置 //修改配置
const modifyConfig = params => { const modifyConfig = params => {
params.method = `${defaultPath}service.merchant.config.update` params.method = `${defaultPath}service.merchant.config.update`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
//创建配置 //创建配置
const addConfig = params => { const addConfig = params => {
params.method = `${defaultPath}service.merchant.config.create` params.method = `${defaultPath}service.merchant.config.create`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
//分页获取商户配置 //分页获取商户配置
const getStoreConfig = params => { const getStoreConfig = params => {
params.method = `${defaultPath}service.merchant.config.pagination.list.get` params.method = `${defaultPath}service.merchant.config.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
//查询商户配置 //查询商户配置
const selStoreConfig = params => { const selStoreConfig = params => {
params.method = `scrm.api.equity.service.merchant.pagination.list.get` params.method = `scrm.api.equity.service.merchant.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
}
//批量开通销售模式
const batchOpenSaleModeApi = params => {
params.method = `${defaultPath}service.merchant.config.batch.open`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
} }
export default { export default {
getConfigList, getConfigList,
openConfigs, openConfigs,
closeConfigs, closeConfigs,
getConfig, getConfig,
exportConfig, exportConfig,
modifyConfig, modifyConfig,
getStoreConfig, getStoreConfig,
addConfig, addConfig,
selStoreConfig selStoreConfig,
batchOpenSaleModeApi
} }
...@@ -102,7 +102,7 @@ const get4SList = params => { ...@@ -102,7 +102,7 @@ const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant` params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
return http({ return http({
url: 'rop-scrm-carlife/router', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
......
import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router'
const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取权益列表
const getEquityList = params => {
params.method = 'scrm.api.equity.serviceterms.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const exportEquityApi = params => {
params.method = `scrm.api.equity.serviceterms.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getServiceList = params => {
params.method = `scrm.api.equity.serviceterms.itemslist`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const craeteEquity = params => {
params.method = `scrm.api.equity.serviceterms.insert`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const updateEquity = params => {
params.method = `scrm.api.equity.serviceterms.update`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getEquityDetail = params => {
params.method = `scrm.api.equity.serviceterms.detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getServicesItemsList = params => {
params.method = `scrm.api.equity.service.items.pages`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const exportServicesItemsApi = params => {
params.method = `scrm.api.equity.service.items.pages.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const createCommonConfig = params => {
params.method = `scrm.api.equity.service.items.common.config.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getCommonConfig = params => {
params.method = `scrm.api.equity.service.items.common.config.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const addServicesProject = params => {
params.method = `scrm.api.equity.service.items.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getServiceDetailApi = params => {
params.method = `scrm.api.equity.service.items.detail`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getSpecificaListApi = params => {
params.method = `scrm.api.equity.service.items.grade.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const addGradeApi = params => {
params.method = `scrm.api.equity.service.items.grade.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
get4SList,
getEquityList,
exportEquityApi,
getServiceList,
craeteEquity,
updateEquity,
getEquityDetail,
getServicesItemsList,
exportServicesItemsApi,
createCommonConfig,
getCommonConfig,
addServicesProject,
getServiceDetailApi,
getSpecificaListApi,
addGradeApi
}
\ No newline at end of file \ No newline at end of file
import { http } from '@/main'
const defaultPath = 'scrm.api.equity.order.config.'
const url = 'rop-scrm-equity/router'
const getListApi = params => {
params.method = `${defaultPath}page`
return http({
url,
method: 'POST',
data: params
})
}
const importDateApi = params => {
params.method = `${defaultPath}import`
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
const getDetailApi = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const exportDataApi = params => {
params.method = `${defaultPath}fail.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getListApi,
importDateApi,
getDetailApi,
exportDataApi
}
...@@ -33,9 +33,20 @@ const modWorryDetailList = params => { ...@@ -33,9 +33,20 @@ const modWorryDetailList = params => {
returnAll:true returnAll:true
}) })
} }
//清空无忧卡使用状态
const clearWorryStatus = params => {
params.method = `${defaultPath}service.cfc.clear`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll:true
})
}
export default { export default {
getWorryDetailList, getWorryDetailList,
getdetailTotal, getdetailTotal,
selWorryDetailList, selWorryDetailList,
modWorryDetailList modWorryDetailList,
clearWorryStatus
} }
...@@ -519,4 +519,42 @@ ...@@ -519,4 +519,42 @@
.el-form-item { .el-form-item {
margin: 0 !important; margin: 0 !important;
} }
}
.operate_wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table_title {
height: 32px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 32px;
}
.operate_btn {
.export_btn {
margin-left: 8px;
}
}
}
.global-title {
padding: 0 20px;
font-size: 20px;
font-weight: 600;
height: 60px;
line-height: 60px;
border-bottom: 1px solid #d8d8d8;
color: #333;
}
.required-field::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
} }
\ No newline at end of file \ No newline at end of file

6.25 KB | W: | H:

11.4 KB | W: | H:

src/assets/images/idCard.png
src/assets/images/idCard.png
src/assets/images/idCard.png
src/assets/images/idCard.png
  • 2-up
  • Swipe
  • Onion skin

7.08 KB | W: | H:

12 KB | W: | H:

src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
  • 2-up
  • Swipe
  • Onion skin
export function attachmentToHtml(elem, childrenHtml) {
// JS 语法
// 获取附件元素的数据
const { key = '', name = '' } = elem
// 生成 HTML 代码
const html = `<span data-w-e-type="text" data-key="${key}" data-name="${name}">${name}</span>`
return html
}
<template>
<div class="editor-ctnr">
<!-- <div class="extend-bar" v-if="operateList && operateList.length">
<el-button v-for="item in operateList" :key="item.key" class="el-icon-circle-plus extend-icon" @click="insertNodeFn(item)">{{ item.name }}</el-button>
</div> -->
<label v-if="label" for="" :class="['content-label', { 'required-field': required }]">{{ label }}</label>
<div>
<div class="editor" style="border: 1px solid #ccc;">
<Toolbar v-if="hasTool" style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
<Editor style="min-height: 52px; overflow-y: hidden;" @onChange="onChange" v-model="value" :defaultConfig="editorConfig" :mode="mode" @onCreated="onCreated" />
</div>
<div class="extend-bar" v-if="operateList && operateList.length">
<el-button v-for="item in operateList" :key="item.key" class="el-icon-circle-plus extend-icon" @click="insertNodeFn(item)">{{ item.name }}</el-button>
</div>
</div>
</div>
</template>
<script>
import Vue from 'vue'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { Boot, DomEditor } from '@wangeditor/editor'
import { withBreakAndDelete } from './withimage'
Boot.registerPlugin(withBreakAndDelete)
import { attachmentToHtml } from './attachmentToHtml'
const elemToHtmlConf = {
type: 'text', // 新元素的 type ,重要!!!
elemToHtml: attachmentToHtml
}
Boot.registerElemToHtml(elemToHtmlConf)
import { renderAttachment } from './renderAttachment'
const renderElemConf = {
type: 'text', // 新元素 type ,重要!!!
renderElem: renderAttachment
}
Boot.registerRenderElem(renderElemConf)
import { parseAttachmentHtml } from './parseAttachmentHtml'
const parseHtmlConf = {
selector: 'span[data-w-e-type="text"]', // CSS 选择器,匹配特定的 HTML 标签
parseElemHtml: parseAttachmentHtml
}
Boot.registerParseElemHtml(parseHtmlConf)
export default Vue.extend({
components: { Editor, Toolbar },
model: {
prop: 'value',
event: 'change'
},
props: {
required: {
type: Boolean,
default: false
},
hasTool: {
type: Boolean,
default: true
},
value: {
type: Object
},
label: {
type: String,
default: ''
},
operateList: {
type: Array,
default: () => {
return []
}
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
editor: null,
html: '',
toolbarConfig: {
toolbarKeys: ['fontSize', 'lineHeight', 'bold', 'justifyLeft', 'justifyRight', 'justifyCenter', 'underline', 'through', 'color', 'bgColor', 'insertTable', 'undo', 'redo', 'clearStyle']
// toolbarKeys: ['fontSize', 'lineHeight', "justifyLeft","justifyRight", "justifyCenter","justifyJustify", 'underline', 'through', 'color', 'bgColor', 'insertTable', 'undo', 'redo', 'clearStyle']
},
editorConfig: {
placeholder: '请输入内容...'
},
mode: 'simple' // 设置simple,选中文字不会出现hoverBar
}
},
methods: {
onChange(editer) {
this.$emit('change', this.editor.getHtml())
},
onCreated(editor) {
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
},
insertNodeFn(item) {
// event.preventDefault()
const resume = {
// JS 语法
type: 'text',
name: item.name,
key: item.key,
children: [{ text: '' }]
}
this.editor.insertNode(resume)
setTimeout(() => {
this.editor.focus()
this.editor.move(1)
}, 300)
}
},
mounted() {},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() // 组件销毁时,及时销毁编辑器
}
})
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>
<style scoped lang="scss">
.editor-ctnr {
& > div {
width: 100%;
}
width: 100%;
height: 100%;
display: flex;
.editor {
background: #fff;
// /deep/ .w-e-text-container {
// .w-e-hover-bar {
// display: none;
// }
// }
}
.content-label {
flex-shrink: 0;
width: 154px;
display: inline-block;
vertical-align: top;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
}
/deep/ .w-e-text-container {
padding: 10px 5px;
p {
margin: 0;
}
.w-e-text-placeholder {
top: 5px;
left: 14px;
height: 32px;
line-height: 32px;
}
}
}
.extend-bar {
width: 937px;
padding: 0 20px;
line-height: 40px;
background: #fafbfe;
border: 1px solid #ccc;
box-sizing: border-box;
border-radius: 0 0 4px 4px;
border-top: none;
/deep/ .el-button {
border: none;
padding: 0;
margin: 0 16px;
background-color: transparent;
&:hover {
background-color: unset;
}
}
.extend-icon {
cursor: pointer;
&::before {
// font-size: 16px;
margin-right: 4px;
}
font-size: 14px;
color: #3f3b3b;
}
}
</style>
export function parseAttachmentHtml(domElem, children, editor) {
const key = domElem.getAttribute('data-key') || ''
const name = domElem.getAttribute('data-name') || ''
// 生成“附件”元素(按照此前约定的数据结构)
const myResume = {
type: 'text',
name,
key,
children: [{ text: '' }]
}
return myResume
}
import { h } from 'snabbdom'
/**
* 渲染“附件”元素到编辑器
* @param elem 附件元素,即上文的 myResume
* @param children 元素子节点,void 元素可忽略
* @param editor 编辑器实例
* @returns vnode 节点(通过 snabbdom.js 的 h 函数生成)
*/
export function renderAttachment(elem, children, editor) {
const { name = '' } = elem
const Vnode = h(
'span',
{
props: { contentEditable: false },
style: { color: '#5f5efb' }
},
// 子节点
[name]
)
return Vnode
}
import { DomEditor } from '@wangeditor/editor'
export function withBreakAndDelete(editor) {
const { isInline, isVoid } = editor
const newEditor = editor
newEditor.isInline = elem => {
const type = DomEditor.getNodeType(elem)
if (type === 'text') return true
return isInline(elem)
}
newEditor.isVoid = elem => {
const type = DomEditor.getNodeType(elem)
if (type === 'text') return true
return isVoid(elem)
}
return newEditor // 返回 newEditor ,重要!!!
}
<template>
<el-input :value="value" v-bind="$attrs" v-on="{...$listeners}" @blur="blurFn"></el-input>
</template>
<script>
export default {
name: 'FormatInput',
props: ['value','precise','intDigit','maxVal','minVal'],
data() {
return {
}
},
watch:{
value:{
handler(nVal, oVal){
this.inputFn(nVal)
},
deep: true
}
},
mounted(){
},
methods:{
inputFn(e){
e = e ? String(e) : ''
this.intDigit = this.intDigit || 6
this.precise = this.precise || 2
let value = e
if(this.maxVal){
if(+this.maxVal<= +e) value = this.maxVal //加等号是因为 '500' == '500.' 导致多了点
}else{
const intDigitReg = this.intDigit == -1 ? `(^\\d+)(\\.\\d+)?` : `(^\\d{${this.intDigit}})\\d+(\\.\\d+)?`
value = e.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(new RegExp(intDigitReg,'g'), '$1').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(new RegExp(`^(-)*(\\d+)\\.(\\d{${this.precise}}).*$`), this.intDigit == -1 ? '$1$2' : '$1$2.$3')
}
this.$emit('input', value)
},
blurFn(e){
let value = e.target.value
if(this.minVal && +this.minVal>=value) value = this.minVal+''
if(value && value.charAt(value.length-1)=='.') value = value.substr(0 ,value.length-1)
this.$emit('input', value)
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="upload-ctnr">
<label v-if="name" :class="['label',{'required-field': required}]" for="">{{name}}</label>
<div class="upload-wrap" :style="defaultStyle">
<img v-if="url" class="image" :src="url" alt="" />
<div v-else class="add-img">
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
<i class="el-icon-plus add"></i>
<p>上传照片</p>
</div>
<div class="operate" v-if="url">
<div class="btn-wrap">
<i class="el-icon-view" @click="handleLook"></i>
<i v-if="!disabled" class="el-icon-delete del-icon" @click="del"></i>
</div>
</div>
</div>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="url" dialogType="img"></big-view>
</el-dialog>
</div>
</template>
<script>
import bigView from '@/components/big-view'
export default {
name: 'Upload',
components: {
bigView
},
props: {
required: {
type: Boolean,
default: false
},
name: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
url: {
type: String,
default: ''
},
attr: {
type: String,
default: ''
},
defaultStyle: {
type: Object,
default: ()=>{
return {}
}
}
},
data() {
return {
dialogVisibleImg: false
}
},
methods: {
handleLook(){
this.dialogVisibleImg = true
},
upload(e) {
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const base64 = file.name.split('.').pop() + '@' + arrBase64[1]
this.$apis.claims.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.$emit('uploadSuccess', {attr : this.attr, url: res})
})
}
},
del(){
this.$emit('delImage', {attr : this.attr})
}
}
}
</script>
<style lang="scss" scoped>
.upload-ctnr{
display: flex;
.label{
display: inline-block;
vertical-align: top;
width: 154px;
height: 20px;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
box-sizing: border-box;
}
.upload-wrap{
display: inline-flex;
border: 1px dashed #00000026;
box-sizing: border-box;
width: 104px;
height: 104px;
background: #0000000a;
border-radius: 4px;
position: relative;
&:hover{
.operate{
display: block;
}
}
.image{
width: 100%;
height: 100%;
z-index: 2;
position: relative;
}
.add-img{
width: 100%;
height: 100%;
cursor: pointer;
display: inline-flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #666666;
position: relative;
.file{
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
position: absolute;
opacity: 0;
}
.add {
font-size: 18px;
}
p {
height: 32px;
line-height: 32px;
}
}
.operate{
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
border-radius: 4px;
z-index: 5;
.btn-wrap{
color: #fff;
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
.del-icon{
margin-left: 12px;
}
i{
font-size: 16px;
cursor: pointer;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-28 10:12:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 10:25:09
* @FilePath: \live\src\components\big-view\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-panel">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</div>
</template>
<script>
export default {
name: 'view',
data() {
return {
dialogVisibleImg: true
}
},
props: {
dialogType: String,
dialogSrc: String
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
}
</script>
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<el-form :ref="formRef" :disabled="formDisable" :inline="isInline" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form :ref="formRef" :disabled="formDisable" :inline="isInline" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-wrap" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-popover :effect="item.effect ? item.effect : 'dark'" :placement="item.placement || 'top'" width="200" trigger="hover" :content="item.tips">
<span class="tips-icon"></span> <img slot="reference" class="tips-icon" :src="require('@/assets/tip.png')" />
</el-tooltip> </el-popover>
{{ item.label }} :
</span> </span>
<span v-else-if="!item.isHide && item.label" slot="label"> <span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span> <span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
...@@ -63,7 +63,8 @@ ...@@ -63,7 +63,8 @@
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }"> <div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h"> <div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h">
<div class="add" :style="{ top: item.maxPhotoNum == 1 ? '50%' : '40%' }">+</div> <div class="add">+</div>
<div class="add-label">上传图片</div>
<span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span> <span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<input v-if="item.uploadType == 'video'" type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="video/mp4" @change="e => handleUploadChange(e, item)" /> <input v-if="item.uploadType == 'video'" type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="video/mp4" @change="e => handleUploadChange(e, item)" />
<input v-else type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" /> <input v-else type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
...@@ -134,7 +135,7 @@ export default { ...@@ -134,7 +135,7 @@ export default {
}, },
props: { props: {
formDisable:{ formDisable: {
type: Boolean, type: Boolean,
default: false default: false
}, },
...@@ -169,7 +170,7 @@ export default { ...@@ -169,7 +170,7 @@ export default {
}, },
labelPaddingRight: { labelPaddingRight: {
type: Number, type: Number,
default: 15 default: 8
}, },
formData: { formData: {
type: Array, type: Array,
...@@ -326,7 +327,7 @@ export default { ...@@ -326,7 +327,7 @@ export default {
background-color: #fff; background-color: #fff;
} }
/* 提示图标 */ /* 提示图标 */
.glsx-combi-form .tips-block { .glsx-combi-form .tips-wrap {
position: relative; position: relative;
} }
.glsx-combi-form .tips-label { .glsx-combi-form .tips-label {
...@@ -335,16 +336,15 @@ export default { ...@@ -335,16 +336,15 @@ export default {
.glsx-combi-form .tips-icon { .glsx-combi-form .tips-icon {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 12px; width: 14px;
height: 12px; height: 14px;
top: 3px; top: 3px;
right: 14px; right: 14px;
margin-right: 4px; margin-right: 4px;
cursor: pointer; cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%; border-radius: 50%;
} }
.glsx-combi-form .tips-icon::before { /* .glsx-combi-form .tips-icon::before {
content: '?'; content: '?';
position: absolute; position: absolute;
width: 8px; width: 8px;
...@@ -352,7 +352,7 @@ export default { ...@@ -352,7 +352,7 @@ export default {
top: -8px; top: -8px;
left: 1px; left: 1px;
font-size: 10px; font-size: 10px;
} } */
/* .glsx-combi-form .tips { /* .glsx-combi-form .tips {
margin: 0; margin: 0;
} */ } */
...@@ -367,15 +367,17 @@ export default { ...@@ -367,15 +367,17 @@ export default {
color: #999999; color: #999999;
} }
.glsx-combi-form .img-w-h { .glsx-combi-form .img-w-h {
width: 80px; width: 104px;
height: 80px; height: 104px;
box-sizing: border-box;
} }
.glsx-combi-form .activity-img { .glsx-combi-form .activity-img {
position: relative; position: relative;
color: #999999; color: #999999;
background-color: #f7f7f7; background: #0000000a;
border: 1px dotted #d9d9d9; border: 1px dotted #00000026;
cursor: pointer; cursor: pointer;
border-radius: 4px;
} }
.glsx-combi-form .activity-Input { .glsx-combi-form .activity-Input {
...@@ -391,12 +393,21 @@ export default { ...@@ -391,12 +393,21 @@ export default {
.activity-img .add { .activity-img .add {
position: absolute; position: absolute;
top: 40%; top: 30%;
font-size: 40px; font-size: 30px;
left: 50%; left: 50%;
transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0);
} }
.add-label {
position: absolute;
top: 50%;
font-size: 14px;
left: 50%;
white-space: nowrap;
transform: translateX(-50%);
}
.activity-img .number { .activity-img .number {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -408,8 +419,9 @@ export default { ...@@ -408,8 +419,9 @@ export default {
display: none; display: none;
height: 100%; height: 100%;
position: absolute; position: absolute;
width: 80px; width: 104px;
height: 80px; height: 104px;
border-radius: 4px;
left: 0; left: 0;
top: 0; top: 0;
z-index: 2; z-index: 2;
......
...@@ -11,18 +11,24 @@ ...@@ -11,18 +11,24 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(common) {
// console.log(common);
// console.log(utils);
// let params = { moduleName: 'presale', mockUrl: 'https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config',env:'test', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
// return utils.getConfig(params)
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config') // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
//return window.fetch('https://', {}).then(res => res.json()) return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=services')
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return common.utils.getConfig(params)
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -19,3 +19,4 @@ start() ...@@ -19,3 +19,4 @@ start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_brand = params => Vue.prototype.$http_brand(params) export const http_brand = params => Vue.prototype.$http_brand(params)
export const http_common = params => Vue.prototype.$http_common(params)
...@@ -106,6 +106,24 @@ const staticRoutes = Object.freeze([ ...@@ -106,6 +106,24 @@ const staticRoutes = Object.freeze([
path: '/claims/ghOrder/:id', path: '/claims/ghOrder/:id',
component: resolve => require([`@/views/claims/ghOrder.vue`], resolve), component: resolve => require([`@/views/claims/ghOrder.vue`], resolve),
meta: {} meta: {}
} },
{
name: 'addCode',
path: '/addCode/index',
component: resolve => require([`@/views/addCode/index.vue`], resolve),
meta: {}
},
{
name: 'renew',
path: '/GH/Renew/renew',
component: resolve => require([`@/views/GH/Renew/renew.vue`], resolve),
meta: {}
},
{
name: 'detail',
path: '/GH/Renew/detail/:id',
component: resolve => require([`@/views/GH/Renew/detail.vue`], resolve),
meta: {}
},
]) ])
export default staticRoutes export default staticRoutes
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable , GLCombiForm, GLTableButton,GLDialog} from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
...@@ -9,11 +9,15 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -9,11 +9,15 @@ import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog) Vue.use(GLTable)
.use(GLCombiForm)
.use(GLTableButton)
.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig() let { response, request, request_common, request_brand, sign, sign_common, secret } = await fetchConfig(common)
// request.baseURL = 'https://scrm.dev.glsx.com.cn' // request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.dev.glsx.com.cn' // request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// globalState.session.token = 'scrm-base-6358b874-c112-4753-ac00-ec0cce769751-rop'
// request.baseURL = 'http://192.168.1.53:7226' // request.baseURL = 'http://192.168.1.53:7226'
// request_brand.baseURL = 'http://192.168.1.53:7226' // request_brand.baseURL = 'http://192.168.1.53:7226'
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -25,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -25,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
// // Vue.prototype.$defaultStartDate = '2021-07-01' // // Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, headers: { TGT: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } }) // Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } })
......
import NP from 'number-precision'
const gradeObj = {
gradeConfigList: [
{
servicePeriod: '',
priceGrade: '0',
maxPrice: '15',
minPrice: '0',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
{
servicePeriod: '',
priceGrade: '1',
maxPrice: '30',
minPrice: '15',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
{
servicePeriod: '',
priceGrade: '2',
maxPrice: '200',
minPrice: '30',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
],
salePeriodData: [],
serviceGrade: 'A',
serviceOverview: '',
serviceDetail: ''
}
const deepClone = (obj)=> {
// Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj
// Handle Date
if (obj instanceof Date) {
const copy = new Date()
copy.setTime(obj.getTime())
return copy
}
// Handle Array or Object
if ((obj instanceof Array) | (obj instanceof Object)) {
const copy = obj instanceof Array ? [] : {}
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) {
copy[attr] = deepClone(obj[attr])
}
}
return copy
}
throw new Error("Unable to clone obj! Its type isn't supported.")
}
export const addGradeItem = (grade='A' , salePeriodList=[])=>{
let _gradeObj = deepClone(gradeObj)
_gradeObj.serviceGrade = grade
salePeriodList = salePeriodList.sort(function(a,b){return a-b});
_gradeObj.salePeriodData = salePeriodList.map(item=>{
return { servicePeriod: item, standardShelfCost: '', standardSalesCost: ''}
})
console.log(_gradeObj)
return _gradeObj
}
export const handleGradeData = (dataFromApi, salePeriodList=[])=>{
console.log(dataFromApi)
const data = deepClone(dataFromApi)
let arr = []
data.forEach(element => {
const { serviceOverview, serviceDetail, serviceGrade, gradeConfigList, id } = element
let _gradeObj = {
id,
serviceOverview,
serviceDetail,
serviceGrade,
gradeConfigList: []
}
const gradeList = ['0','1','2'] //三个区间等级,后端定义的
gradeList.forEach(item => {
const _target = gradeConfigList.find(o => o.priceGrade == item)
let { id, servicePeriod, maxPrice, minPrice, priceCoefficient } = _target || {}
maxPrice = NP.divide(maxPrice || 0, 1000000)
minPrice = NP.divide(minPrice || 0, 1000000)
_gradeObj.gradeConfigList.push({ servicePeriod, priceGrade: item, maxPrice, minPrice, priceCoefficient, id })
})
salePeriodList = salePeriodList.sort(function(a,b){return a-b})
_gradeObj.salePeriodData = salePeriodList.map(item=>{
const _target = element.gradeConfigList.find( o => o.servicePeriod == item)
return { servicePeriod: item, standardShelfCost: NP.divide(_target?.standardShelfCost || 0, 100), standardSalesCost: NP.divide(_target?.standardSalesCost || 0, 100)}
})
arr.push(_gradeObj)
});
return arr
}
\ No newline at end of file \ No newline at end of file
import { Quill } from 'vue-quill-editor'
const Parchment = Quill.imports.parchment;
const Delta = Quill.imports.delta;
class Label extends Parchment.Embed {
static create(value) {
const node = super.create(value.name);
node.setAttribute('keyName', value.key)
node.innerText = value.name;
node.contentEditable = 'false';
// this._addRemovalButton(node, value.key); //创建额外的标签,比如删除键
return node;
}
static value(node) {
return node.childNodes[0].textContent;
}
static _addRemovalButton(node, key) {
// const button = document.createElement('button');
// button.innerText = 'x';
// button.onclick = () => node.remove();
// button.contentEditable = 'false';
// node.appendChild(button);
// Extra span forces the cursor to the end of the label, otherwise it appears inside the removal button
const span = document.createElement('span');
span.setAttribute('keyName', key)
span.innerText = '';
node.appendChild(span);
}
}
Label.blotName = 'label';
Label.tagName = 'SPAN';
Label.className = 'ql-label';
export default Label
// Quill.register(Label);
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div class="bar-title" @click="changeStatus()">
<i class="el-icon-caret-right btn" v-if="!isExpansion"></i>
<i class="el-icon-caret-bottom btn" v-else></i>
<span class="title">{{name}}</span>
</div>
<slot v-if="isExpansion"></slot>
</div>
</template>
<script>
export default {
name: 'FoldFrame',
props: {
name: {
type: String,
default: ''
}
},
data() {
return {
isExpansion: true
}
},
methods: {
changeStatus(){
this.isExpansion = !this.isExpansion
}
}
}
</script>
<style lang="scss" scoped>
.bar-title{
font-weight: 600;
font-size: 14px;
color: #000000d9;
height: 40px;
line-height: 40px;
padding: 0 20px;
cursor: pointer;
.btn{
margin-right: 9px;
font-size: 16px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<GLDialog bigTitle="选择合同" mode="big" :visible.sync="changeContractObj.visible" :before-close="handleClose" :close-on-click-modal="false" @onOk="handleConfirm" @onCancel="handleClose">
<glsx-combi-form ref="showSearch" labelWidth="105px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="getTable">查询</el-button>
</span>
</glsx-combi-form>
<GLTable :hasNum="false" ref="contractTableRef" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="radioSlot" slot-scope="scope">
<el-radio v-model="curId" :label="scope.scope.id">&nbsp;</el-radio>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</GLDialog>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template>
<script>
const TABLE_HEAD = [
{
label: '',
prop: 'radioSlot',
addHtml: 'radioSlot',
width: '50'
},
{
label: '合同编号',
prop: 'id'
}
]
import url from '@/assets/empty.png'
import pdfDialog from '@/views/beforeSale/pdfDialog'
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'changeContract',
components: {
pdfDialog,
glsxCombiForm
},
props: {
changeContractObj: {
type: Object,
default: () => {}
}
},
data() {
return {
size: 'small',
isPdfVisible: false,
pdfUrl: '',
curId: '',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
getListApi: this.$apis.contractManager.getContractListApi,
searchForm: {
id: '',
templateName: ''
},
buttonList: [
{
type: 'el-button',
name: row => {
return '预览'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
}
],
searchFormData: [
{
label: '合同编号',
name: 'id',
type: 'input',
isClear: true,
isHide: this.changeContractObj.isBase
},
{
label: '合同名称',
name: 'templateName',
type: 'input',
isClear: true,
isHide: !this.changeContractObj.isBase
}
],
tableParams: {
listName: 'list',
tableOption: {
width: '100px'
},
tableColumns: []
}
}
},
created() {
if (this.changeContractObj.isBase) {
this.tableParams.tableColumns = [
...TABLE_HEAD,
{
label: '合同名称',
prop: 'templateName'
}
]
} else {
this.tableParams.tableColumns = [
...TABLE_HEAD,
{
label: '关联商品',
prop: 'packageName'
}
]
}
},
mounted() {},
methods: {
handlePdfClose() {
this.isPdfVisible = !this.isPdfVisible
},
// 预览
handlePdf(row) {
if (this.changeContractObj.isBase) {
this.pdfUrl = row.previewUrl
this.handlePdfClose()
return
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.printContractApi({ packageCode: row.packageCode, merchantId: row.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close()
})
},
beforeSearchFn() {
this.getListApi = this.changeContractObj.isBase ? this.$apis.contractManager.getBaseContractListApi : this.$apis.contractManager.getContractListApi
return new Promise(resolve => {
resolve()
})
},
getTable() {
this.$refs.contractTableRef.refreshTable()
},
handleConfirm() {
if (!this.curId) return this.$message.error('请选择变更模板的合同')
let params = {}
let API = 'babchCopyTemplateApi' //默认为商品合同批量更换接口
if (this.changeContractObj.isBase) {
//产品合同
API = 'copyBaseTemplateApi'
params = {
baseTemplateId: this.curId,
skuPackageCode: this.changeContractObj.skuPackageCode,
skuId: this.changeContractObj.skuId
}
} else {
params = {
sourceId: this.curId
}
if (this.changeContractObj.id) {
//单个商品合同更换
params.targetId = this.changeContractObj.id
API = 'copyTemplateApi'
} else {
params.targetIds = this.changeContractObj.ids
}
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager[API](params)
.then(res => {
if (res) {
this.$message.success('变更模板成功')
this.handleClose()
}
})
.finally(end => {
loading.close()
})
},
handleClose() {
this.$emit('closeDialog')
}
}
}
</script>
<style lang="scss"></style>
<template>
<div class="container">
<GLTabs class="tab" v-model="tabId" :tabPaneList="tabPaneList"></GLTabs>
<template v-if="tabId == '2'">
<goodIndex></goodIndex>
</template>
<template v-else>
<prodIndex></prodIndex>
</template>
</div>
</template>
<script>
import goodIndex from './goodIndex.vue'
import prodIndex from './prodIndex.vue'
export default {
name: 'index',
components: {
goodIndex,
prodIndex
},
beforeRouteEnter(to, from, next) {
next(vm => {
if (from.path.indexOf('/ContractManager/addTmpl') == 0 && from.path.indexOf('skuId') == -1) {
vm.tabId = '2'
}
})
},
data() {
return {
tabId: '1',
tabPaneList: [
{ name: '1', label: '产品合同' },
{ name: '2', label: '商品合同' }
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.tab {
margin-bottom: 16px;
}
</style>
<template>
<div>
<div class="caseDesc-components">
<div class="title">案件补充说明</div>
<div class="list-wrap">
<template v-for="(item,index) in supplementList">
<div :key="index" class="cell">
<div class="widget">
<div class="label">案件说明:</div>
<div class="content">{{item.content}}</div>
</div>
<div class="widget">
<div class="label">提交时间:</div>
<div class="content">{{item.createdDate}}</div>
</div>
</div>
</template>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'caseDesc',
props: {
supplementList:Array
},
components: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.caseDesc-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.list-wrap {
padding: 32px 20px;
.cell {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
.widget {
display: flex;
.label {
width: 154px;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
}
.content {
width: 408px;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #333333;
}
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-28 09:34:05
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 21:17:21
* @FilePath: \scrm-micro-presale\src\views\GH\Renew\components\ClaimsNote\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
<div class="caseDesc-components">
<div class="title">定损记录</div>
<div class="list-wrap">
<el-timeline>
<el-timeline-item v-for="(activity, index) in recordList" :key="index" :color="index==recordList.length-1?'#5850FF':''" :timestamp="activity.createdDate">
<div class="inline">
<div class="content">{{ activity.content }}</div>
<div v-if="activity.operation" class="tip">{{ activity.operation }}</div>
</div>
</el-timeline-item>
</el-timeline>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'claimsNote',
props: {
recordList:Array
},
components: {},
data() {
return {
activities: [
{
content: '门店提交核赔',
timestamp: '2018-04-12 20:46',
color: '#5850FF',
extra: ''
},
{
content: '定损通过',
timestamp: '2018-04-03 20:46',
extra: '批准金额:1000.00元'
},
{
content: '定损不通过',
timestamp: '2018-04-03 20:46',
extra: '资料不全'
},
{
content: '门店上传发票',
timestamp: '2018-04-03 20:46',
extra: ''
}
]
}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.caseDesc-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.list-wrap {
padding: 17px 40px;
.inline {
display: flex;
align-items: center;
.content {
font-weight: 400;
font-size: 14px;
color: #1d2129;
}
.tip {
display: inline;
font-weight: 400;
font-size: 14px;
color: #666666;
margin-left: 8px;
}
}
}
}
</style>
...@@ -115,29 +115,9 @@ export default { ...@@ -115,29 +115,9 @@ export default {
label: '适用类型', label: '适用类型',
name: 'packageCode', name: 'packageCode',
type: 'select', type: 'select',
optionList: [ optionList: [],
{ optionId: 'packageCode',
value: 'PC0005', optionLabel: 'packageName'
label: '盗抢全损无忧'
},
{
value: 'PC0006',
label: '轮胎无忧'
},
{
value: 'PC0007',
label: '整车全损无忧'
},
{
value: 'PC0008',
label: '碰撞无忧'
}
],
optionId: 'value',
optionLabel: 'label',
changeAttr:(e)=>{
this.changePgCode(e)
}
}, },
{ {
type: 'input', type: 'input',
...@@ -169,6 +149,14 @@ export default { ...@@ -169,6 +149,14 @@ export default {
{ {
value: '3', value: '3',
label: '3年' label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
} }
], ],
optionId: 'value', optionId: 'value',
...@@ -226,33 +214,43 @@ export default { ...@@ -226,33 +214,43 @@ export default {
} }
} }
}, },
created() {
this.getTypelist()
},
mounted() {}, mounted() {},
methods: { methods: {
changePgCode(e){ getTypelist(){
const arr = [{ this.$apis.addWorryFree.getTypelistApi({}).then(res => {
value: '1', if(!res?.length) return;
label: '1年' let target = this.addDialogFormData.find(item => item.name == 'packageCode')
}, target.optionList = res
{ })
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
const moreArr = [{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
this.addDialogForm.servicePeriod = ''
}, },
// changePgCode(e){
// const arr = [{
// value: '1',
// label: '1年'
// },
// {
// value: '2',
// label: '2年'
// },
// {
// value: '3',
// label: '3年'
// }]
// const moreArr = [{
// value: '4',
// label: '4年'
// },
// {
// value: '5',
// label: '5年'
// }]
// const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
// target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
// this.addDialogForm.servicePeriod = ''
// },
//批量下载 //批量下载
download(e) { download(e) {
this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => { this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => {
......
<template>
<div class="element">
<label class="element_label">
<span v-if="isRequire" class="require">*</span>
{{ title }}:
</label>
<div class="wrapper">
<div class="upload_wrap">
<!-- 0 是默认上传类型 -->
<template v-if="uploadType == 0">
<template v-if="imagesList.length">
<div v-for="(imgItem, i) in imagesList" :key="i" class="imagBox">
<img class="imgItem" :src="imgItem" alt="" />
<div class="img_mask">
<i @click="handlePictureCardPreview(imgItem)" class="el-icon-zoom-in"></i>
<i v-if="!disabled" @click="toDeleteImg(index, i)" class="el-icon-delete"></i>
</div>
</div>
</template>
<div v-if="!(imagesList.length == limitNum)" class="upload-value">
<el-upload :disabled="disabled" list-type="picture" class="upload_item" action="#" :before-upload="e => beforeAvatarUpload(e)" :on-remove="e => handleRemove(e, index)" :http-request="e => httpRequest(e, index)">
<img class="img" slot="default" :src="upload_img" alt="" />
</el-upload>
</div>
</template>
<!-- 1 代表的是身份证、驾驶证等类型 -->
<template v-if="uploadType == 1">
<template v-for="count in 2">
<div v-if="(count == 1 && cardImg.font) || (count == 2 && cardImg.reverse)" :key="count" class="imagBox wid180">
<img class="imgItem wid180" :src="count == 2 ? cardImg.reverse : cardImg.font" alt="" />
<div class="img_mask wid180">
<i @click="handlePictureCardPreview(count == 2 ? cardImg.reverse : cardImg.font)" class="el-icon-zoom-in"></i>
<i v-if="!disabled" @click="removeCard(count)" class="el-icon-delete"></i>
</div>
</div>
</template>
<template v-for="count in 2">
<div v-if="(count == 1 && !cardImg.font&&!disabled) || (count == 2 && !cardImg.reverse&&!disabled)" :key="count" class="upload-value upload-value-max marRight-13">
<el-upload :disabled="disabled" list-type="picture" class="upload_item" action="#" :before-upload="e => beforeAvatarUpload(e)" :on-remove="e => handleRemove(e, index)" :http-request="e => httpRequest(e, count)">
<img class="img" slot="default" :src="count == 2 ? idCardBack_img : idCard_img" alt="" />
</el-upload>
</div>
</template>
</template>
</div>
<div class="tip">
图片格式为jpg,jpeg,png,大小10M以内
<span v-if="limitNum > 8 && uploadType == 0">,最多可上传{{ limitNum }}张</span>
</div>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import upload_img from '@/assets/beforeSale/upload.png'
import idCard_img from '@/assets/beforeSale/idCard.png'
import idCardBack_img from '@/assets/beforeSale/idCardBack.png'
export default {
name: 'uploadHandler',
props: {
title: {
type: String,
default: '其他'
},
imagesList: Array,
uploadType: {
type: Number,
default: 0
},
limitNum: {
type: Number,
default: 100
},
cardImg: Object,
disabled:Boolean,
isRequire:Boolean
},
data() {
return {
upload_img,
idCard_img,
idCardBack_img,
dialogVisible: false,
hideUpload: false
}
},
mounted() {},
methods: {
toDeleteImg(index, i) {
this.imagesList.splice(i, 1)
this.$emit('getImages', this.imagesList)
},
removeCard(count) {
if (count == 1) {
this.cardImg.font = ''
} else {
this.cardImg.reverse = ''
}
this.$emit('getCardImg', {detail:this.cardImg,type:count})
},
handlePictureCardPreview(url) {
this.dialogImageUrl = url
this.dialogVisible = true
},
beforeAvatarUpload(e) {
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 10
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 10
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
httpRequest({ file: e }, count) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
// let progress = ((res.loaded / res.total) * 100).toFixed(2)
// if (progress > 90) {
// progress = 90
// }
}).then(res => {
if (res.code == 0) {
const url = res.data[0]
if (this.uploadType == 0) {
this.imagesList.push(url)
this.$emit('getImages', this.imagesList)
} else if (this.uploadType == 1) {
if (count == 1) {
this.cardImg.font = url
} else {
this.cardImg.reverse = url
}
this.$emit('getCardImg', {detail:this.cardImg,type:count})
}
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
}
}
}
</script>
<style lang="scss" scoped>
.element {
display: flex;
margin-bottom: 20px;
.element_label {
width: 154px;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
.require {
color: red;
}
}
.wrapper {
width: 650px;
.upload_wrap {
display: flex;
flex-wrap: wrap;
.imagBox {
position: relative;
.imgItem {
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 10px;
margin-bottom: 10px;
border: 1px dashed #00000026;
}
.img_mask {
display: none;
}
}
.imagBox:hover {
.img_mask {
display: block;
width: 104px;
height: 104px;
border-radius: 4px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
display: flex;
align-items: center;
justify-content: center;
i {
color: white;
cursor: pointer;
font-weight: 400;
font-size: 21px;
}
i:first-child {
margin-right: 12px;
}
i:last-child {
margin-right: 0;
}
}
}
}
.upload-value {
width: 104px;
height: 104px;
border: 1px dashed #00000026;
border-radius: 4px;
.upload_item {
width: 104px;
height: 104px;
.img {
width: 104px;
height: 104px;
border-radius: 4px;
}
/deep/.el-upload-list--picture {
display: none;
}
}
}
.upload-value-max {
width: 180px;
.upload_item {
width: 180px;
.img {
width: 180px;
}
}
}
.wid180 {
width: 180px !important;
margin-right: 13px;
}
.marRight-13 {
margin-right: 13px;
}
.tip {
font-weight: 400;
font-size: 14px;
color: #999999;
margin-top: 8px;
}
}
}
</style>
<!-- 权益订单列表 --> <!-- 权益订单列表 -->
<template> <template>
<div class="before-sale"> <div class="before-sale">
<div class="flex m-b-10"> <!-- <div class="flex m-b-10">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
<!-- <GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton> --> </div> -->
<!-- <div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> -->
</div>
<div class="container"> <div class="container">
<div class="find_wrap"> <div class="find_wrap">
<GLCombiForm :key="newKey" ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm :key="newKey" ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -13,7 +11,14 @@ ...@@ -13,7 +11,14 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="table_wrapper"> <div class="table_wrapper">
<el-button plain style="float:right;margin-bottom:10px;" :size="size" @click="handleExport">导出</el-button> <div class="table_top_line flex_scb">
<span>订单列表</span>
<div class="table_top_btn flex_sc">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
<el-button plain size="small" @click="handleExport">导出</el-button>
</div>
</div>
<!-- <el-button plain style="float: right; margin-bottom: 10px" :size="size" @click="handleExport">导出</el-button> -->
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
...@@ -45,6 +50,17 @@ ...@@ -45,6 +50,17 @@
<el-button :size="size" type="primary" @click="handleSecondConfirm">确 定</el-button> <el-button :size="size" type="primary" @click="handleSecondConfirm">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<GLDialog class="dialog_wrap" :hasFooter="false" title="修改记录" mode="mid" :visible.sync="updateDetailVisible" :before-close="handleClose" @onOk="onOk">
<div style="text-align: center;" v-if="!updateList.length">暂无修改记录</div>
<template v-else>
<div class="step-item" v-for="(item, index) in updateList" :key="index">
<span class="circle"></span>
<span class="line"></span>
<p class="value" v-for="ele in item.detailList" :key="ele.id">{{ ele.fieldName }}: {{ ele.beforeValue }} → {{ ele.afterValue }}</p>
<p class="info">{{ item.createdBy }} {{ item.createdDate }}</p>
</div>
</template>
</GLDialog>
</div> </div>
</template> </template>
...@@ -58,6 +74,7 @@ export default { ...@@ -58,6 +74,7 @@ export default {
name: 'equityList', name: 'equityList',
data() { data() {
return { return {
updateList: [],
size: 'small', size: 'small',
newKey: new Date(), newKey: new Date(),
buttonList: [ buttonList: [
...@@ -154,8 +171,24 @@ export default { ...@@ -154,8 +171,24 @@ export default {
listeners: { listeners: {
click: row => this.handleEdit(4, row.scope) click: row => this.handleEdit(4, row.scope)
} }
},
{
type: 'el-button',
name: row => {
return '修改记录'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.viewUpdateDetail(row.scope)
}
} }
], ],
updateDetailVisible: false,
noCancel: true, noCancel: true,
isBlock: true, isBlock: true,
isTipVisible: false, isTipVisible: false,
...@@ -224,6 +257,18 @@ export default { ...@@ -224,6 +257,18 @@ export default {
{ {
label: '车架号', label: '车架号',
name: 'vin' name: 'vin'
},
{
label: '设备号',
name: 'sn'
},
{
label: '卡号',
name: 'cardSeqNo'
},
{
label: '店面名称',
name: 'merchantName'
} }
], ],
handleSelectChange: value => { handleSelectChange: value => {
...@@ -469,6 +514,15 @@ export default { ...@@ -469,6 +514,15 @@ export default {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--' return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
} }
}, },
// {
// label: '退单时间',
// line: 1,
// prop: 'cancelDate',
// width: '130px',
// formatter: cellValue => {
// return cellValue.cancelDate ? dayjs(cellValue.cancelDate).format('YYYY-MM-DD') : '--'
// }
// },
{ {
label: '服务状态', label: '服务状态',
prop: 'orderStatus', prop: 'orderStatus',
...@@ -692,6 +746,14 @@ export default { ...@@ -692,6 +746,14 @@ export default {
}, },
methods: { methods: {
viewUpdateDetail(row) {
this.$apis.beforeSale.getUpdateRecordApi({ equityId: row.id }).then(res => {
if (res) {
this.updateList = res
this.updateDetailVisible = true
}
})
},
getCountNoData() { getCountNoData() {
this.$apis.beforeSale.getCountNoDataApi({}).then(res => { this.$apis.beforeSale.getCountNoDataApi({}).then(res => {
this.countNoData = res this.countNoData = res
...@@ -837,7 +899,8 @@ export default { ...@@ -837,7 +899,8 @@ export default {
let paraFormat = { let paraFormat = {
addOrEdit, addOrEdit,
contractNo: addOrEdit == 1 ? -1 : row.contractNo, contractNo: addOrEdit == 1 ? -1 : row.contractNo,
isSuper: this.userInfo.admin isSuper: this.userInfo.admin,
successDate: row?.successDate ? dayjs(row.successDate).format('YYYY-MM-DD HH:mm:ss') : ''
} }
const urlpara = encodeURIComponent(JSON.stringify(paraFormat)) const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara) addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara)
...@@ -1049,6 +1112,12 @@ export default { ...@@ -1049,6 +1112,12 @@ export default {
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); // box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 0 20px 20px; padding: 0 20px 20px;
} }
.table_top_line {
margin-bottom: 10px;
}
.el-button + .el-button {
margin-left: 8px;
}
.before-sale .m-b-10 { .before-sale .m-b-10 {
margin-bottom: 10px; margin-bottom: 10px;
...@@ -1134,4 +1203,51 @@ export default { ...@@ -1134,4 +1203,51 @@ export default {
.tips-dialog .el-dialog__body { .tips-dialog .el-dialog__body {
padding: 10px 15px 20px !important; padding: 10px 15px 20px !important;
} }
.step-item {
position: relative;
padding-left: 16px;
padding-bottom: 24px;
&:first-child {
.circle {
background: #5850ff;
}
}
&:last-child {
.line {
display: none;
}
}
.circle {
top: 2px;
position: absolute;
display: inline-block;
left: -3px;
width: 7px;
height: 7px;
z-index: 2;
border-radius: 50%;
background: #999999;
}
.line {
top: 2px;
position: absolute;
left: 0;
width: 1px;
height: calc(100% + 4px);
background: #e5e5e5;
}
.value {
font-weight: 400;
font-size: 14px;
color: #333333;
margin-bottom: 4px;
}
.info {
font-weight: 400;
font-size: 12px;
color: #999999;
line-height: 20px;
}
}
</style> </style>
...@@ -27,7 +27,9 @@ export default { ...@@ -27,7 +27,9 @@ export default {
searchForm: { searchForm: {
completionStatus: '', completionStatus: '',
packageCode: '', packageCode: '',
channel: '', subChannel: '',
equippedCardFlag: '',
snFlag: '',
successDate: [], successDate: [],
effectiveDate: [] effectiveDate: []
}, },
...@@ -60,6 +62,14 @@ export default { ...@@ -60,6 +62,14 @@ export default {
name: 'vin' name: 'vin'
}, },
{ {
label: '设备号',
name: 'sn'
},
{
label: '卡号',
name: 'cardSeqNo'
},
{
label: '店面名称', label: '店面名称',
name: 'merchantName' name: 'merchantName'
} }
...@@ -86,14 +96,41 @@ export default { ...@@ -86,14 +96,41 @@ export default {
optionLabel: 'packageName', optionLabel: 'packageName',
optionsName: 'goodsStatusList' optionsName: 'goodsStatusList'
}, },
// {
// label: '渠道',
// name: 'channel',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'channelList'
// },
{ {
label: '渠道', label: '渠道',
name: 'channel', name: 'subChannel',
type: 'select',
optionList: [],
optionId: 'channelTypeValue',
optionLabel: 'channelTypeName',
optionsName: 'subChannelList'
},
{
label: '是否配卡',
name: 'equippedCardFlag',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'cardFlagList'
},
{
label: '是否带设备号',
name: 'snFlag',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'channelList' optionsName: 'snFlagList'
}, },
{ {
label: '提单成功时间', label: '提单成功时间',
...@@ -182,6 +219,38 @@ export default { ...@@ -182,6 +219,38 @@ export default {
} }
}, },
{ {
label: '是否配卡',
prop: 'equippedCardFlag',
width: 100,
formatter: cellValue => {
return cellValue.equippedCardFlag == 1 ? '是' : '否'
}
},
{
label: '卡号',
prop: 'cardSeqNo',
width: '180px',
formatter: cellValue => {
return cellValue.equippedCardFlag == 1 ? cellValue.cardSeqNo : '--'
}
},
{
label: '是否带设备',
prop: 'cardSeqNo',
width: '120px',
formatter: cellValue => {
return cellValue.snFlag == 1 ? '是' : '否'
}
},
{
label: '设备号',
prop: 'sns',
width: '180px',
formatter: cellValue => {
return cellValue.snFlag == 1 ? cellValue.sns : '--'
}
},
{
label: '生效时间', label: '生效时间',
line: 1, line: 1,
prop: 'effectiveDate', prop: 'effectiveDate',
...@@ -190,6 +259,15 @@ export default { ...@@ -190,6 +259,15 @@ export default {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--' return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
} }
}, },
// {
// label: '退单时间',
// line: 1,
// prop: 'cancelDate',
// width: '130px',
// formatter: cellValue => {
// return cellValue.cancelDate ? dayjs(cellValue.cancelDate).format('YYYY-MM-DD') : '--'
// }
// },
{ {
label: '完成状态', label: '完成状态',
prop: 'completionStatus', prop: 'completionStatus',
...@@ -199,6 +277,11 @@ export default { ...@@ -199,6 +277,11 @@ export default {
} }
}, },
{ {
label: '渠道',
prop: 'subChannelTypeName',
width: '170px'
},
{
label: '操作人', label: '操作人',
line: 1, line: 1,
prop: 'updatedBy', prop: 'updatedBy',
...@@ -224,6 +307,27 @@ export default { ...@@ -224,6 +307,27 @@ export default {
confName: '广汇' confName: '广汇'
} }
], ],
subChannelList: [],
cardFlagList: [
{
confId: 1,
confName: '是'
},
{
confId: 2,
confName: '否'
}
],
snFlagList: [
{
confId: 1,
confName: '是'
},
{
confId: 2,
confName: '否'
}
],
completList: [ completList: [
{ {
confId: 2, confId: 2,
...@@ -280,6 +384,10 @@ export default { ...@@ -280,6 +384,10 @@ export default {
} }
}, },
created() {
this.getChannelType()
},
mounted() { mounted() {
this.$apis.beforeSale.getSummaryPackage({}).then(res => { this.$apis.beforeSale.getSummaryPackage({}).then(res => {
this.baseData.goodsStatusList = res this.baseData.goodsStatusList = res
...@@ -288,6 +396,14 @@ export default { ...@@ -288,6 +396,14 @@ export default {
}, },
methods: { methods: {
//获取渠道枚举
getChannelType() {
this.$apis.beforeSale.getChannelTypeApi({}).then(res => {
if (res?.length) {
this.baseData.subChannelList = res
}
})
},
getSelectInputParams() { getSelectInputParams() {
const list = Object.keys(this.searchSelectObj) const list = Object.keys(this.searchSelectObj)
var params = {} var params = {}
...@@ -375,7 +491,9 @@ export default { ...@@ -375,7 +491,9 @@ export default {
this.searchForm = { this.searchForm = {
completionStatus: '', completionStatus: '',
packageCode: '', packageCode: '',
channel: '', subChannel: '',
equippedCardFlag: '',
snFlag: '',
successDate: [], successDate: [],
effectiveDate: [] effectiveDate: []
} }
......
<template>
<div class="upload-contianer">
<div class="title">上传资料</div>
<div class="widget">
<uploadHandler :isRequire="true" :disabled="disabled" @getImages="getImages($event, 'YB0001')" title="购车发票" limitNum="1" :imagesList="uploadMessage.buyCar"></uploadHandler>
<uploadHandler :isRequire="true" :disabled="disabled" @getImages="getImages($event, 'YB0002')" title="合同购买时里程数" limitNum="1" :imagesList="uploadMessage.mileage"></uploadHandler>
<uploadHandler :isRequire="true" :disabled="disabled" @getCardImg="getCardImg" uploadType="1" title="行驶证" :cardImg="cardImg"></uploadHandler>
<uploadHandler :disabled="disabled" @getImages="getImages($event, 'YB0005')" title="其他" limitNum="9" :imagesList="uploadMessage.others"></uploadHandler>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import upload_img from '@/assets/beforeSale/upload.png'
import uploadHandler from './components/UploadHandler.vue'
export default {
name: 'uploadInfo',
components: {
uploadHandler
},
data() {
return {
upload_img,
dialogVisible: false,
attachmentList: [],
license: [{}, {}]
}
},
props: {
uploadMessage: Object,
cardImg: Object,
disabled: Boolean,
imgsQuery: Array
},
mounted() {},
methods: {
getImages(e, code) {
this.handlerData()
if (code === 'YB0005') {
this.others = []
} else if (code === 'YB0001' && !e.length) {
this.buyCar = []
} else if (code === 'YB0002' && !e.length) {
this.mileage = []
}
e.forEach(url => {
let obj = {
attachmentCode: code,
attachmentFile: url,
attachmentType: 'IMG'
}
if (code === 'YB0001') {
this.buyCar = [obj]
} else if (code === 'YB0002') {
this.mileage = [obj]
} else if (code === 'YB0005') {
this.others.push(obj)
}
})
this.getAllImages()
},
getCardImg(e) {
this.handlerData()
const _value = e.detail,
type = e.type
const _attachmentCode = type == 1 ? 'YB0003' : 'YB0004'
const _attachmentFile = type == 1 ? _value.font : _value.reverse
const _obj = {
attachmentCode: _attachmentCode,
attachmentFile: _attachmentFile,
attachmentType: 'IMG'
}
if (!_attachmentFile && type == 1) {
this.license[0] = {}
} else if (!_attachmentFile && type == 2) {
this.license[1] = {}
} else {
this.license[type - 1] = _obj
}
this.getAllImages()
},
getAllImages() {
let attachmentList = [],
_tempArr1 = [],
_tempArr2 = [],
_tempArr3 = [],
_tempArr4 = []
if (this.buyCar) {
this.buyCar.forEach(e => {
_tempArr1.push(e)
})
}
if (this.mileage) {
this.mileage.forEach(e => {
_tempArr2.push(e)
})
}
if (this.others) {
this.others.forEach(e => {
_tempArr3.push(e)
})
}
if (this.license) {
this.license.forEach(e => {
if (e.attachmentFile) {
_tempArr4.push(e)
}
})
}
attachmentList = [..._tempArr1, ..._tempArr2, ..._tempArr3, ..._tempArr4]
this.$emit('getAttachmentList', attachmentList)
},
handlerData() {
if (this.imgsQuery.length && !this.active) {
this.buyCar = []
this.mileage = []
this.license = [{}, {}]
this.others = []
this.imgsQuery.forEach(el => {
if (el.attachmentCode === 'YB0001') {
this.buyCar = [el]
} else if (el.attachmentCode === 'YB0002') {
this.mileage = [el]
} else if (el.attachmentCode === 'YB0003') {
this.license[0] = el
} else if (el.attachmentCode === 'YB0004') {
this.license[1] = el
} else if (el.attachmentCode === 'YB0005') {
this.others.push(el)
}
})
this.active = true
}
}
}
}
</script>
<style lang="scss" scoped>
.upload-contianer {
background: white;
margin: 10px 0 0;
.title {
font-size: 16px;
font-weight: 600;
padding: 15px 20px;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
.widget {
padding: 32px 0px;
}
}
</style>
...@@ -28,8 +28,14 @@ ...@@ -28,8 +28,14 @@
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]"> <div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<label class="required" for="">预估损失金额/元:</label> <div>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input> <label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input :disabled="!item.applyAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
</div>
</div> </div>
</div> </div>
<div class="lump-sum"> <div class="lump-sum">
...@@ -53,9 +59,17 @@ ...@@ -53,9 +59,17 @@
<!-- 案件补充说明 --> <!-- 案件补充说明 -->
<div> <div>
<explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1"></explanation> <explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div> </div>
<!-- 待定损和待核赔的时候才显示案件通融说明 -->
<Card v-if="repotData.exceptionImgUrl && (repotData.status == 6 || repotData.status == 12)" title="案件通融说明">
<div class="tr-wrap">
<label class="label" for="">通融说明:</label>
<el-image class="img" :preview-src-list="[repotData.exceptionImgUrl]" :src="repotData.exceptionImgUrl"></el-image>
</div>
</Card>
<!-- 其他信息 --> <!-- 其他信息 -->
<div> <div>
<other-info :otherInfoData="otherInfoData"></other-info> <other-info :otherInfoData="otherInfoData"></other-info>
...@@ -242,8 +256,8 @@ export default { ...@@ -242,8 +256,8 @@ export default {
const Item = this.editFormData.find(item => item.name === key) const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime) this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
}, },
validPrice(e, id) { validPrice(e, id, key) {
let checkPlan = '' + this.itemList[id].applyAmount let checkPlan = '' + this.itemList[id][key]
checkPlan = checkPlan checkPlan = checkPlan
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
...@@ -256,23 +270,26 @@ export default { ...@@ -256,23 +270,26 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.itemList[id], 'applyAmount', checkPlan) this.$set(this.itemList[id], key, checkPlan)
this.getTotal() this.getTotal()
}, },
changePrice(e, id) { changePrice(e, id, key) {
if (!e.target.value) return if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1) let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') { if (lastStr === '.') {
this.$set(this.itemList[id], 'applyAmount', e.target.value.substr(0, len - 1)) this.$set(this.itemList[id], key, e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'applyAmount', 1) this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
maxPrice = 2000000
} }
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'applyAmount', maxPrice) this.$set(this.itemList[id], key, maxPrice)
} }
this.getTotal() this.getTotal()
}, },
...@@ -327,11 +344,12 @@ export default { ...@@ -327,11 +344,12 @@ export default {
.unit-price { .unit-price {
background: #f9f9f9; background: #f9f9f9;
padding: 20px; padding: 20px;
display: flex; // display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
margin-bottom: 10px; margin-bottom: 10px;
.required { .required {
width: 154px; width: 154px;
display: inline-block;
text-align: right; text-align: right;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
...@@ -383,4 +401,21 @@ export default { ...@@ -383,4 +401,21 @@ export default {
} }
} }
} }
.tr-wrap {
.label {
width: 154px;
display: inline-block;
vertical-align: top;
text-align: right;
height: 20px;
font-size: 14px;
color: #333333;
line-height: 20px;
margin-top: 6px;
}
.img {
width: 104px;
height: 104px;
}
}
</style> </style>
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
<div class="ms_lab">预估损失金额/元:</div> <div class="ms_lab">预估损失金额/元:</div>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input>
</div> </div>
<div v-if="item.lossAssessmentFlag" class="ma20 ms flex_sc">
<div class="ms_lab">保险公司定损金额/元:</div>
<el-input @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" v-model="item.lossAssessmentAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
<div class="ms flex_sc ma20"> <div class="ms flex_sc ma20">
<div class="ms_lab">定损批准金额/元:</div> <div class="ms_lab">定损批准金额/元:</div>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input>
...@@ -84,10 +88,23 @@ ...@@ -84,10 +88,23 @@
</div> </div>
</div> </div>
</div> </div>
<div class="messag">
<div class="ms flex_sc">
<div class="ms_txt">寄件快递公司:</div>
<el-input v-model="repotData.expressName" size="mini" class="w432" disabled></el-input>
</div>
<div class="ms flex_sc ma20">
<div class="ms_txt">寄件快递单号:</div>
<el-input v-model="repotData.expressNo" size="mini" class="w432" disabled></el-input>
</div>
</div>
</div> </div>
</div> </div>
<div> <div>
<explanation :supplementList="repotData.supplementList2"></explanation> <explanation :supplementList="repotData.supplementList2" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div>
<div v-if="accountMatchResultList.length" class="widget">
<wraning style="margin-top: 16px" :isWatchOrder="isWatchOrder" @getWarningData="getWarningData" :list="accountMatchResultList"></wraning>
</div> </div>
</div> </div>
</template> </template>
...@@ -97,12 +114,14 @@ const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9 ...@@ -97,12 +114,14 @@ const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import uploadMaterial from '../uploadMaterial.vue' import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue' import explanation from '../explanation.vue'
import wraning from '../wraning/index.vue'
export default { export default {
name: 'checkClaimsPage', name: 'checkClaimsPage',
components: { components: {
glsxCombiForm, glsxCombiForm,
uploadMaterial, uploadMaterial,
explanation explanation,
wraning
}, },
data() { data() {
return { return {
...@@ -251,7 +270,9 @@ export default { ...@@ -251,7 +270,9 @@ export default {
accountForm: Object, accountForm: Object,
itemsList: Array, itemsList: Array,
insuranceAttachmentConfigs: Array, insuranceAttachmentConfigs: Array,
lossTypeList: Array lossTypeList: Array,
accountMatchResultList: Array,
isWatchOrder: Boolean
}, },
watch: { watch: {
'accountForm.objectType': { 'accountForm.objectType': {
...@@ -314,7 +335,10 @@ export default { ...@@ -314,7 +335,10 @@ export default {
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.itemsList[id], type, 1) this.$set(this.itemsList[id], type, 1)
} }
const maxPrice = 200000 let maxPrice = 200000
if(type == 'lossAssessmentAmount') {
maxPrice = 2000000
}
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.itemsList[id], type, maxPrice) this.$set(this.itemsList[id], type, maxPrice)
} }
...@@ -326,6 +350,22 @@ export default { ...@@ -326,6 +350,22 @@ export default {
return prev + +(curPrice * 100).toFixed(0) return prev + +(curPrice * 100).toFixed(0)
}, 0) }, 0)
this.repotData[type] = (total / 100).toFixed(2) this.repotData[type] = (total / 100).toFixed(2)
},
getWarningData(e) {
if (e) {
let arr = []
e.forEach(el => {
let obj = {
id: el.id,
verifyResultDesc: el.verifyResultDesc,
accountVerifyImagesList: el.accountVerifyImagesList,
matchType: el.matchType
}
arr.push(obj)
})
console.log(arr)
this.$emit('getWarningInfo', arr)
}
} }
} }
} }
...@@ -382,4 +422,9 @@ export default { ...@@ -382,4 +422,9 @@ export default {
} }
} }
} }
.ms_txt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
</style> </style>
...@@ -2,25 +2,73 @@ ...@@ -2,25 +2,73 @@
<div> <div>
<Card title="案件补充说明"> <Card title="案件补充说明">
<div class="explanation"> <div class="explanation">
<div class="explanation-list" v-for="(item, idx) in supplementList" :key="idx"> <div class="explanation-item" v-for="(item, idx) in supplementListTemp" :key="idx">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label> <div class="explanation-list">
<el-input :disabled="isCheck || isDisabled" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input> <label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<i class="el-icon-delete del" v-if="!isCheck&&supplementList.length > 1" @click="handleDel(idx)"></i> <el-input :disabled="isCheck || isDisabled || item.operation == 1" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck && supplementListTemp.length > 1 && item.operation != 1" @click="handleDel(idx)"></i>
<div class="follow-list" @click="showFollow">跟进记录</div>
</div>
<div class="operator">
<div>操作人:{{ item.operationUser ? item.operationUser : '--' }}</div>
<div>操作时间:{{ item.operationTime ? item.operationTime : '--' }}</div>
</div>
</div> </div>
</div> </div>
<div v-if="!isCheck &&!isDisabled" class="add-explanation" @click="addExplanation"> <div v-if="!isCheck && !isDisabled" class="add-explanation" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span> <span>新增说明</span>
</div> </div>
</Card> </Card>
<!-- 跟进记录 -->
<GLDialog :title="followDialogTitle" mode="mid" :close-on-press-escape="false" :close-on-click-modal="false" :visible.sync="followDialog" bef :okText="followOkText" @onOk="toAddFollw" @onCancel="closeFollow">
<template v-if="!followEditStatus">
<div class="wrap_time_line">
<templatece v-if="!followResult">
<el-timeline reverse="true">
<el-timeline-item :class="[{ spec: !index }]" v-for="(item, index) in followListData" :key="index" :timestamp="item.createdDate">
{{ item.content }}
</el-timeline-item>
</el-timeline>
</templatece>
<template v-else>
<div style="margin-top: 60px; text-align: center">暂无跟进记录</div>
</template>
</div>
</template>
<template v-if="followEditStatus">
<div class="wrap_time_line">
<div class="col">
<div class="label">
<span style="color: #eb4e4e">*</span>
<span>具体描述:</span>
</div>
<div class="fill">
<el-input maxlength="200" style="width: 432px" type="textarea" :rows="3" placeholder="请输入" v-model="followContent"></el-input>
</div>
</div>
</div>
</template>
</GLDialog>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import Card from './card.vue' import Card from './card.vue'
import * as dayjs from 'dayjs'
export default { export default {
name: 'explanation', name: 'explanation',
data() { data() {
return {} return {
followDialog: false,
followListData: [],
followDialogTitle: '跟进记录',
followOkText: '新增',
followEditStatus: false,
followContent: '',
followResult: false,
curentFollowInfo:'',
supplementListTemp:[{ content: '' }]
}
}, },
components: { components: {
Card Card
...@@ -34,29 +82,110 @@ export default { ...@@ -34,29 +82,110 @@ export default {
}, },
isCheck:Boolean, isCheck:Boolean,
isDisabled:Boolean, isDisabled:Boolean,
operatorName:String,
id:Number
},
mounted() {
},
watch:{
supplementList:{
deep:true,
handler(val){
this.supplementListTemp = val
val.forEach(item=>{
item.operationTime = dayjs( item.operationTime).format('YYYY-MM-DD HH:mm:ss')
})
},
immediate:true
}
}, },
mounted() {},
methods: { methods: {
showFollow() {
this.followDialog = true
this.curentFollowInfo = {
id:this.id,
operatorName:this.operatorName
}
this.followListData = []
this.getFollowList(this.curentFollowInfo)
},
closeFollow() {
if (this.followEditStatus) {
// 切换
this.followDialogTitle = '跟进记录'
this.followEditStatus = false
this.followOkText = '新增'
} else {
// 关闭弹窗
this.followDialog = false
this.curentFollowInfo = null
this.followOkText = '新增'
}
},
toAddFollw() {
if (!this.followEditStatus) {
// 切换新增
this.followDialogTitle = '新增记录'
this.followOkText = '提交'
this.followEditStatus = true
} else {
// 切换查看
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.createFollow()
}
},
createFollow() {
let para = {
claimsId: this.curentFollowInfo.id,
content: this.followContent,
createdBy: this.curentFollowInfo.operatorName
}
this.$apis.claims.addGHClaimFollowsListApi(para).then(res => {
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.getFollowList(this.curentFollowInfo)
this.$message({
message: '新增成功',
type: 'success'
})
})
},
getFollowList(row) {
this.$apis.claims.getGHClaimFollowsListApi({ claimsId: row.id }).then(res => {
res.forEach(el => {
el.createdDate = dayjs(el.createdDate).format('YYYY-MM-DD HH:mm:ss')
})
this.followListData = res || []
this.followResult = res.length ? false : true
})
},
handleDel(idx) { handleDel(idx) {
this.$delete(this.supplementList, idx) this.$delete(this.supplementListTemp, idx)
}, },
addExplanation() { addExplanation() {
const idx = this.supplementList.length const idx = this.supplementListTemp.length
const newObj = { claimsId: this.supplementList[idx - 1].claimsId, content: '' } const newObj = { claimsId: this.supplementListTemp[idx - 1].claimsId, content: '' }
this.$set(this.supplementList, idx, newObj) this.$set(this.supplementListTemp, idx, newObj)
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.explanation { .explanation {
.explanation-list { .explanation-item {
display: flex;
// align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
&:last-child { &:last-child {
margin-bottom: 10px; margin-bottom: 10px;
} }
}
.explanation-list {
position: relative;
display: flex;
/deep/ .el-textarea { /deep/ .el-textarea {
width: 580px; width: 580px;
} }
...@@ -80,7 +209,7 @@ export default { ...@@ -80,7 +209,7 @@ export default {
} }
.add-explanation { .add-explanation {
color: #5850FF; color: #5850ff;
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 154px; margin-left: 154px;
...@@ -93,4 +222,22 @@ export default { ...@@ -93,4 +222,22 @@ export default {
font-size: 12px; font-size: 12px;
} }
} }
.operator {
font-size: 12px;
color: #666666;
display: flex;
justify-content: space-between;
margin-left: 154px;
width: 580px;
margin-top: 4px;
margin-bottom: 20px;
}
.follow-list {
font-size: 14px;
color: #5850ff;
bottom: 0;
position: absolute;
left: 742px;
cursor: pointer;
}
</style> </style>
<template>
<GLDialog :destroy-on-close="isdestroy" :close-on-click-modal="false" title="跟进人配置" mode="mid" :visible.sync="isFollowSync" :before-close="handleCancel">
<GLTable :hasPage="false" :hasNum="true" :tableData="followListData" :tableParams="followTableParams">
<div slot="followName" slot-scope="scope">
<el-form v-if="scope.scope.followName == ''">
<el-form-item style="margin-bottom: 0px">
<el-input v-model="followName" placeholder="请输入" maxlength="5"></el-input>
</el-form-item>
</el-form>
<span v-else>{{ scope.scope.followName }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.scope, scope.index)">删除</el-button>
</div>
</GLTable>
<div class="add-wrap" @click="addLine">
<i class="el-icon-circle-plus-outline add-icon"></i>
添加
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel">取消</el-button>
<el-button type="primary" size="small" @click="handleSave">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
data() {
return {
isdestroy: true,
followListData: [],
followName: '',
followTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '跟进人',
prop: 'followName',
addHtml: 'followName'
},
{
label: '操作',
prop: '',
width: 80,
fixed: 'right',
addHtml: 'table-btns'
}
]
}
}
},
props: {
isFollowSync: {
type: Boolean,
default: false
}
},
created() {
this.getFollowPersonList()
},
methods: {
getFollowPersonList() {
this.$apis.claims
.getFollowPersonList({
pageSize: 10000,
pageNum: 1
})
.then(res => {
this.followListData = res.list
})
},
addLine() {
if (this.followListData.length > 0 && this.followListData[this.followListData.length - 1].followName == '') {
return
}
this.followName = ''
this.followListData.push({ followName: '' })
},
handleSave() {
if (this.followListData[this.followListData.length - 1].followName == '' && this.followName == '') {
this.$message({
type: 'error',
message: '请输入跟进人'
})
return
}
if (this.followName) {
this.$apis.claims.addFollowPerson({ followName: this.followName }).then(res => {
this.$message({
type: 'success',
message: '添加成功!'
})
})
}
this.$emit('handleClose')
},
handleCancel() {
// this.isFollowSync = false
this.$emit('handleClose')
},
handleCalculate() {},
//删除
handleDelete(data, index) {
if (data.id) {
this.$confirm('确定要删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
if (data.id) {
this.$apis.claims.delFollowPerson({ id: data.id }).then(res => {})
this.followListData.splice(index, 1)
}
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.followListData.splice(index, 1)
}
}
}
}
</script>
<style scoped lang="scss">
.add-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #5850ff;
margin-top: 10px;
cursor: pointer;
.add-icon {
margin-right: 6px;
font-size: 20px;
color: #5850ff;
}
}
</style>
...@@ -4,36 +4,63 @@ ...@@ -4,36 +4,63 @@
<div class="material"> <div class="material">
<div class="material-item" v-for="item in materialData" :key="item.name"> <div class="material-item" v-for="item in materialData" :key="item.name">
<label :class="{ require: item.label }">{{ item.label }}</label> <label :class="{ require: item.label }">{{ item.label }}</label>
<el-upload :disabled="pageType == 2" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item']" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)"> <el-upload :disabled="pageType == 2 || renewDisable" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[ pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item',{'renewDisable':renewDisable&&!materialForm[item.name].length}]" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<!-- <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus"> <!-- <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<p>上传图片</p> <p>上传图片</p>
</i> --> </i> -->
<img v-if="item.name === 'billInfo'" slot="default" :src="upload_img" alt="" /> <img v-if="item.name === 'billInfo'" slot="default" :src="upload_img" alt="" />
<img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" /> <img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" />
<img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" /> <img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" />
<el-button v-if="item.name == 'otherInfo'" slot="default" :disabled="pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button> <el-button v-if="item.name == 'otherInfo'" slot="default" :disabled="renewDisable || pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button>
<div slot="tip" class="remark" v-if="item.name == 'idCard'">身份证人像面</div> <!-- <div slot="tip" class="remark" v-if="item.name == 'idCard'">身份证人像面</div>
<div slot="tip" class="remark" v-if="item.name == 'idCardBack'">身份证国徽面</div> <div slot="tip" class="remark" v-if="item.name == 'idCardBack'">身份证国徽面</div> -->
<div slot="tip" class="file-box" v-if="item.name == 'otherInfo'"> <div slot="tip" class="file-box" v-if="item.name == 'otherInfo'">
<span class="file_tip">支持扩展名:.doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。</span> <span class="file_tip">支持扩展名:.doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。</span>
<template> <template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId"> <div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress <template v-if="!imgItem.mark">
color="#F5F7FA" <el-progress
text-inside color="#F5F7FA"
:format=" text-inside
() => { :format="
return imgItem.name () => {
} return imgItem.name
" }
:percentage="imgItem.progress" "
></el-progress> :percentage="imgItem.progress"
<el-tooltip class="item" effect="dark" content="下载" placement="top"> ></el-progress>
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" /> <el-tooltip class="item" effect="dark" content="下载" placement="top">
</el-tooltip> <img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
<el-tooltip class="item" effect="dark" content="删除" placement="top"> </el-tooltip>
<i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i> <el-tooltip class="item" effect="dark" content="删除" placement="top">
</el-tooltip> <i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div>
</template>
</div>
<!-- 续保图 -->
<div slot="tip" v-if="item.name == 'otherInfo' && isXB" class="file-box xuBao">
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<template v-if="imgItem.mark">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return markMapItem[imgItem.mark]
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2&&!renewDisable" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div> </div>
</template> </template>
</div> </div>
...@@ -62,7 +89,9 @@ export default { ...@@ -62,7 +89,9 @@ export default {
pageType: { pageType: {
type: Number, type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理 default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
} },
isXB: Boolean,
renewDisable:Boolean
}, },
data() { data() {
return { return {
...@@ -100,7 +129,16 @@ export default { ...@@ -100,7 +129,16 @@ export default {
listType: 'fileList', listType: 'fileList',
limit: 20 limit: 20
} }
] ],
markMapItem: {
drivingLicense: '驾驶证',
accident: '事故责任认定书或相关凭证',
vin: '车架号VIN照片',
carAndPeople: '45°车头角度全车照片及人车合照',
vehicleDamage: '车辆受损细节照片',
InsuranceLossStatement: '保险定损单',
repiare:'维修单'
}
} }
}, },
methods: { methods: {
...@@ -220,6 +258,12 @@ export default { ...@@ -220,6 +258,12 @@ export default {
display: none; display: none;
} }
} }
/deep/ .renewDisable {
.el-upload--picture-card {
display: block;
cursor: not-allowed;
}
}
// 上传闪屏问题 // 上传闪屏问题
/deep/.el-upload-list__item.is-ready { /deep/.el-upload-list__item.is-ready {
...@@ -277,7 +321,7 @@ export default { ...@@ -277,7 +321,7 @@ export default {
display: inline-block; display: inline-block;
position: relative; position: relative;
padding-left: 118px; padding-left: 118px;
margin-bottom: 45px; margin-bottom: 20px;
height: 104px; height: 104px;
.require { .require {
position: absolute; position: absolute;
...@@ -286,7 +330,7 @@ export default { ...@@ -286,7 +330,7 @@ export default {
} }
} }
&:nth-child(2) { &:nth-child(2) {
margin-left: 40px; margin-left: 12px;
display: inline-block; display: inline-block;
} }
&:nth-child(3) { &:nth-child(3) {
...@@ -298,7 +342,7 @@ export default { ...@@ -298,7 +342,7 @@ export default {
/deep/.el-upload-list__item, /deep/.el-upload-list__item,
/deep/.el-upload--picture-card { /deep/.el-upload--picture-card {
width: 104px; width: 104px;
margin-right: 20px; margin-right: 12px;
margin-bottom: 15px; margin-bottom: 15px;
p { p {
font-size: 14px; font-size: 14px;
...@@ -342,8 +386,8 @@ export default { ...@@ -342,8 +386,8 @@ export default {
position: absolute; position: absolute;
} }
.file-box { .file-box {
margin-top: 8px;
.file_tip { .file_tip {
margin: 8px 0;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
...@@ -354,6 +398,7 @@ export default { ...@@ -354,6 +398,7 @@ export default {
width: 320px; width: 320px;
position: relative; position: relative;
margin-bottom: 4px; margin-bottom: 4px;
margin-top: 8px;
.download { .download {
width: 20px; width: 20px;
height: 18px; height: 18px;
...@@ -394,6 +439,19 @@ export default { ...@@ -394,6 +439,19 @@ export default {
position: absolute; position: absolute;
} }
} }
.imgTip {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrapper {
display: inline-block;
}
.xbImg {
display: inline-block;
width: 104px;
height: 104px;
}
} }
.require { .require {
width: 118px; width: 118px;
...@@ -410,6 +468,14 @@ export default { ...@@ -410,6 +468,14 @@ export default {
color: #f56c6c; color: #f56c6c;
margin-right: 4px; margin-right: 4px;
} }
.xuBao {
margin-top: 22px;
width: 522px;
min-height: 24px;
}
}
.material-item:last-child {
display: flex;
} }
} }
} }
......
...@@ -35,6 +35,10 @@ export default { ...@@ -35,6 +35,10 @@ export default {
{ {
key: 'merchantAddr', key: 'merchantAddr',
label: '店面地址:' label: '店面地址:'
},
{
key: 'sapCode',
label: '门店代码:'
} }
] ]
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div v-if="isGH" class="report-components gl-form-page"> <div v-if="isGH" class="report-components gl-form-page">
<div class="title">报案信息(店面补充)</div> <div class="title">报案信息(店面补充)</div>
<glsx-combi-form :labelPaddingRight="0" :isInline="false" class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="handlerForm"> <glsx-combi-form :labelPaddingRight="0" :isInline="false" class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="handlerForm">
<!-- <div slot="serviceApply" class="serviceApply_container"> <!-- <div slot="serviceApply" class="serviceApply_container">
<template v-for="(item, index) in serviceItemsList"> <template v-for="(item, index) in serviceItemsList">
<div :key="index" class="wrapper"> <div :key="index" class="wrapper">
...@@ -26,8 +26,16 @@ ...@@ -26,8 +26,16 @@
<div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode"> <div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode">
<p class="name">{{ item.serviceItemName }}</p> <p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap"> <div class="price-wrap">
<label for="">定损批准金额:</label> <label class="label" for="">定损批准金额:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input> <el-input :disabled="pageType == 2 || renewDisable" maxlength="10" @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" placeholder="请输入" v-model="item.approveAmount"></el-input>
</div>
<div v-if="!isGH && !isXB" class="price-wrap">
<label class="label" for="">申请金额:</label>
<el-input :disabled="pageType == 2 || renewDisable || !item.approveAmount" maxlength="10" @input="validPrice($event, index, 'customerApplyAmount')" @blur="changePrice($event, index, 'customerApplyAmount')" placeholder="请输入" v-model="item.customerApplyAmount"></el-input>
</div>
<div v-if="!isXB && item.lossAssessmentFlag" class="price-wrap">
<label class="label" for="">保险公司定损金额:</label>
<el-input :disabled="pageType == 2 || renewDisable || !item.approveAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入" v-model="item.lossAssessmentAmount"></el-input>
</div> </div>
</div> </div>
</template> </template>
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
</div> </div>
<div class="collecter"> <div class="collecter">
<label class="require" for="">收款对象:</label> <label class="require" for="">收款对象:</label>
<el-radio-group @change="changeObjectType" :disabled="pageType == 2" v-model="accountForm.objectType"> <el-radio-group @change="changeObjectType" :disabled="pageType == 2 || renewDisable" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio> <el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio> <el-radio :label="1">其他</el-radio>
</el-radio-group> </el-radio-group>
...@@ -69,10 +77,12 @@ export default { ...@@ -69,10 +77,12 @@ export default {
serviceItemsList: Array, serviceItemsList: Array,
totalPrice: Number, totalPrice: Number,
isGH: Boolean, isGH: Boolean,
isXB: Boolean,
pageType: { pageType: {
type: Number, type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理 default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
} },
renewDisable:Boolean
}, },
components: { components: {
glsxCombiForm glsxCombiForm
...@@ -98,7 +108,7 @@ export default { ...@@ -98,7 +108,7 @@ export default {
optionLabel: 'confName', optionLabel: 'confName',
isHide: true, isHide: true,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '开户行名称', label: '开户行名称',
...@@ -108,7 +118,7 @@ export default { ...@@ -108,7 +118,7 @@ export default {
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '账户名称', label: '账户名称',
...@@ -116,7 +126,7 @@ export default { ...@@ -116,7 +126,7 @@ export default {
type: 'input', type: 'input',
maxlength: 60, maxlength: 60,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '收款账号', label: '收款账号',
...@@ -124,7 +134,7 @@ export default { ...@@ -124,7 +134,7 @@ export default {
type: 'input', type: 'input',
maxlength: 25, maxlength: 25,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '收款账号所在省市', label: '收款账号所在省市',
...@@ -135,7 +145,7 @@ export default { ...@@ -135,7 +145,7 @@ export default {
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '收款人证件类型', label: '收款人证件类型',
...@@ -145,7 +155,7 @@ export default { ...@@ -145,7 +155,7 @@ export default {
optionId: 'code', optionId: 'code',
optionLabel: 'name', optionLabel: 'name',
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '收款人证件号码', label: '收款人证件号码',
...@@ -153,7 +163,7 @@ export default { ...@@ -153,7 +163,7 @@ export default {
type: 'input', type: 'input',
maxlength: 25, maxlength: 25,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '收款人联系电话', label: '收款人联系电话',
...@@ -161,7 +171,7 @@ export default { ...@@ -161,7 +171,7 @@ export default {
type: 'input', type: 'input',
maxlength: 15, maxlength: 15,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
} }
], ],
handlerForm: [ handlerForm: [
...@@ -171,7 +181,7 @@ export default { ...@@ -171,7 +181,7 @@ export default {
type: 'input', type: 'input',
isClear: true, isClear: true,
maxlength: 100, maxlength: 100,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
{ {
label: '经办人联系号码:', label: '经办人联系号码:',
...@@ -179,7 +189,7 @@ export default { ...@@ -179,7 +189,7 @@ export default {
type: 'input', type: 'input',
maxlength: 11, maxlength: 11,
isClear: true, isClear: true,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2 || this.renewDisable
}, },
// { // {
// label: '出险经过描述:', // label: '出险经过描述:',
...@@ -304,8 +314,8 @@ export default { ...@@ -304,8 +314,8 @@ export default {
IDCardTypeList.optionList = res.cardType IDCardTypeList.optionList = res.cardType
}) })
}, },
validPrice(e, id) { validPrice(e, id, key) {
let checkPlan = '' + this.serviceItemsList[id].approveAmount let checkPlan = '' + this.serviceItemsList[id][key]
checkPlan = checkPlan checkPlan = checkPlan
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
...@@ -318,22 +328,25 @@ export default { ...@@ -318,22 +328,25 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.serviceItemsList[id], 'approveAmount', checkPlan) this.$set(this.serviceItemsList[id], key, checkPlan)
}, },
changePrice(e, id) { changePrice(e, id, key) {
if (!e.target.value) return if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1) let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') { if (lastStr === '.') {
this.$set(this.serviceItemsList[id], 'approveAmount', e.target.value.substr(0, len - 1)) this.$set(this.serviceItemsList[id], key, e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', 1) this.$set(this.serviceItemsList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
maxPrice = 2000000
} }
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', maxPrice) this.$set(this.serviceItemsList[id], key, maxPrice)
} }
} }
} }
...@@ -399,7 +412,8 @@ export default { ...@@ -399,7 +412,8 @@ export default {
height: 16px; height: 16px;
} }
.service-item { .service-item {
width: 264px; width: 294px;
box-sizing: border-box;
padding: 10px; padding: 10px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
...@@ -408,17 +422,25 @@ export default { ...@@ -408,17 +422,25 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.name { .name {
font-weight: 600; font-weight: 600;
flex: 1; height: 20px;
margin-bottom: 16px; line-height: 20px;
} }
.price-wrap { .price-wrap {
&:first-child {
margin-top: 0;
}
margin-top: 10px;
display: flex; display: flex;
align-items: center; align-items: baseline;
flex: 1; flex: 1;
label { label {
white-space: nowrap; white-space: nowrap;
display: inline-block;
width: 130px;
flex-shrink: 0;
} }
/deep/ .el-input__inner { /deep/ .el-input__inner {
height: 32px; height: 32px;
......
<template> <template>
<div class="report-components gl-form-page"> <div class="report-components gl-form-page">
<div class="title">报案信息(客户提交)</div> <div class="title">报案信息(客户提交)</div>
<template v-if="[1, 3, 4].includes(pageType)"> <template v-if="[1, 3, 4,5,6].includes(pageType)&&!renewDisable">
<glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType == 1" style="display: inline-block" slot="syncBtn"> <div v-if="pageType == 1" style="display: inline-block" slot="syncBtn">
<el-button style="margin: 0 12px" type="primary" @click="toSearchOrderDetail">同步</el-button> <el-button style="margin: 0 12px" type="primary" @click="toSearchOrderDetail">同步</el-button>
...@@ -44,7 +44,8 @@ export default { ...@@ -44,7 +44,8 @@ export default {
pageType: { pageType: {
type: Number, type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理 default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
} },
renewDisable:Boolean
}, },
data() { data() {
return { return {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="">{{ img.secondClassifyName }}</div> <div class="">{{ img.secondClassifyName }}</div>
</div> </div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]"> <div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image> <el-image :preview-src-list="srcList" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> <img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> --> <!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc"> <div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="">{{ img.secondClassifyName }}</div> <div class="">{{ img.secondClassifyName }}</div>
</div> </div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]"> <div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList.length && img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image> <el-image :preview-src-list="srcList" v-if="img.attachmentList.length && img.attachmentList[0].attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentList[0].attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> <img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> --> <!-- <div v-if="img.attachmentList.length&&img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div> -->
<div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc"> <div v-if="img.attachmentList.length && img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<span>图片{{ i + 1 }}</span> <span>图片{{ i + 1 }}</span>
</div> </div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]"> <div class="img_pannel flex_cc" :class="[{ errBorder: img.auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentFile]" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image> <el-image :preview-src-list="srcList" v-if="img.attachmentFile" style="width: 216px; height: 135px; border-radius: 4px" :src="img.attachmentFile" :fit="fit"></el-image>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" /> <img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<!-- <div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div> --> <!-- <div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div> -->
<div v-if="img.auditStatus == 0" class="errMsg flex_cc"> <div v-if="img.auditStatus == 0" class="errMsg flex_cc">
...@@ -161,7 +161,9 @@ export default { ...@@ -161,7 +161,9 @@ export default {
} }
], ],
currentServicesIndex: 0, currentServicesIndex: 0,
otherUploadIndex: null otherUploadIndex: null,
srcList:[]
} }
}, },
components: { components: {
...@@ -176,7 +178,20 @@ export default { ...@@ -176,7 +178,20 @@ export default {
isClaims: Boolean isClaims: Boolean
}, },
mounted() {}, mounted() {},
watch:{
insuranceAttachmentConfigs(val){
this.getImgList(val[0])
}
},
methods: { methods: {
getImgList(data){
this.srcList=[]
data.secondClassifyList.forEach(item=>{
item.attachmentList.forEach(img=>{
this.srcList.push(img.attachmentFile)
})
})
},
toMutiCheck() { toMutiCheck() {
this.insuranceAttachmentConfigs.forEach((item, index) => { this.insuranceAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(child => { item.secondClassifyList.forEach(child => {
...@@ -192,6 +207,7 @@ export default { ...@@ -192,6 +207,7 @@ export default {
changeTabs(e) { changeTabs(e) {
this.activeName = e.index.toString() this.activeName = e.index.toString()
this.currentIndx = e.index this.currentIndx = e.index
this.getImgList(this.insuranceAttachmentConfigs[this.currentIndx])
}, },
handleReview() { handleReview() {
this.$refs.fastReviewDialog.initDialog() this.$refs.fastReviewDialog.initDialog()
......
<template>
<div class="warning-contianer">
<div class="title">预警信息</div>
<div class="widget">
<template v-for="(item, index) in list">
<div :key="index" class="element">
<label class="label">风险预警{{ index + 1 }}:</label>
<div class="wrap">
<div class="cell">
<label class="cell-label">预警原因:</label>
<div class="cell-value">{{ matchResultDesc[item.matchResult] }}</div>
</div>
<div class="cell">
<label class="cell-label">具体描述:</label>
<div class="cell-value">{{ item.matchResultDesc }}</div>
</div>
<div class="cell">
<label class="cell-label">核实情况说明:</label>
<el-input :disabled="isWatchOrder || item.matchType==1" @input="inputExplain" class="input-value" v-model="item.verifyResultDesc" type="textarea" placeholder="请输入核实后的情况说明" show-word-limit maxlength="100"></el-input>
</div>
<div class="cell">
<label class="cell-label">核实资料补充:</label>
<div class="inner">
<div class="image_group">
<template v-if="item.accountVerifyImagesList.length">
<div v-for="(imgItem, i) in item.accountVerifyImagesList" :key="i" class="imagBox">
<img class="imgItem" :src="imgItem.verifyImage" alt="" />
<div class="img_mask">
<i @click="handlePictureCardPreview(imgItem.verifyImage)" class="el-icon-zoom-in"></i>
<i v-if="!isWatchOrder&&item.matchType!=1" @click="toDeleteImg(index, i)" class="el-icon-delete"></i>
</div>
</div>
</template>
<div class="upload-value">
<el-upload :disabled="isWatchOrder || item.matchType==1" list-type="picture" class="upload_item" action="#" :before-upload="e => beforeAvatarUpload(e)" :on-remove="e => handleRemove(e, index)" :http-request="e => httpRequest(e, index)">
<img class="img" slot="default" :src="upload_img" alt="" />
</el-upload>
</div>
</div>
<p class="tips">图片格式为jpg,jpeg,png,大小10M以内</p>
</div>
</div>
</div>
</div>
</template>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import upload_img from '@/assets/images/upload.png'
export default {
name: 'wraning',
components: {},
data() {
return {
upload_img,
dialogVisible: false,
matchResultDesc: {
1: '支付账号异常',
2: '金额过大'
}
}
},
props: {
list: Array,
isWatchOrder: Boolean
},
mounted() {},
methods: {
inputExplain() {
this.$emit('getWarningData', this.list)
},
toDeleteImg(index, i) {
this.list[index].accountVerifyImagesList.splice(i, 1)
this.$emit('getWarningData', this.list)
},
handlePictureCardPreview(url) {
this.dialogImageUrl = url
this.dialogVisible = true
},
beforeAvatarUpload(e) {
console.log(e)
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 10
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 10
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
httpRequest({ file: e }, index) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
// let progress = ((res.loaded / res.total) * 100).toFixed(2)
// if (progress > 90) {
// progress = 90
// }
})
.then(res => {
if (res.code == 0) {
const url = res.data[0]
this.list[index].accountVerifyImagesList.push({ verifyImage: url })
this.$emit('getWarningData', this.list)
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
}
}
}
</script>
<style lang="scss" scoped>
.warning-contianer {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.widget {
padding: 32px 20px;
.element {
display: flex;
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrap {
width: 792px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
.cell {
display: flex;
margin-bottom: 20px;
.cell-label {
width: 134px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
}
.cell-value {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.input-value {
width: 580px;
}
.inner {
.image_group {
display: flex;
flex-wrap: wrap;
.imagBox {
position: relative;
.imgItem {
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 10px;
margin-bottom: 10px;
border: 1px dashed #00000026;
}
.img_mask {
display: none;
}
}
.imagBox:hover {
.img_mask {
display: block;
width: 104px;
height: 104px;
border-radius: 4px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
display: flex;
align-items: center;
justify-content: center;
i {
color: white;
cursor: pointer;
font-weight: 400;
font-size: 21px;
}
i:first-child {
margin-right: 12px;
}
i:last-child {
margin-right: 0;
}
}
}
}
.upload-value {
width: 104px;
height: 104px;
border: 1px dashed #00000026;
border-radius: 4px;
.upload_item {
width: 104px;
height: 104px;
.img {
width: 104px;
height: 104px;
border-radius: 4px;
}
/deep/.el-upload-list--picture {
display: none;
}
}
}
.tips {
font-weight: 400;
font-size: 14px;
color: #999999;
margin-top: 8px;
}
}
}
.cell:last-child {
margin-bottom: 0;
}
}
}
.element:last-child {
margin-bottom: 0;
}
}
}
</style>
...@@ -582,7 +582,7 @@ export default { ...@@ -582,7 +582,7 @@ export default {
reimbursementCountiesCode reimbursementCountiesCode
} }
Object.assign(this.editForm, obj) Object.assign(this.editForm, obj)
this.serviceItemsList = itemsList this.serviceItemsList = itemsList || []
this.getAccountInfo(contractNo) this.getAccountInfo(contractNo)
}) })
}, },
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
<el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox> <el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox>
</el-form-item> </el-form-item>
</template> </template>
<div class="sale-mode">
<label class="label" for="">销售模式:</label>
<el-radio-group v-model="saleMode">
<el-radio :label="1">批发销售</el-radio>
<el-radio :label="2">驻店零售</el-radio>
</el-radio-group>
</div>
<template v-if="!showGh"> <template v-if="!showGh">
<el-form-item size="small" label="配置可见产品及产品属性"></el-form-item> <el-form-item size="small" label="配置可见产品及产品属性"></el-form-item>
<el-form-item> <el-form-item>
...@@ -91,7 +98,10 @@ ...@@ -91,7 +98,10 @@
<el-checkbox v-model="carefree">优享版</el-checkbox> <el-checkbox v-model="carefree">优享版</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item v-for="item in newPackageList" :key="item.packageCode"> <el-form-item v-for="item in newPackageList" :key="item.packageCode">
<el-checkbox v-model="item.isChecked">{{item.packageName}}</el-checkbox> <el-checkbox v-model="item.isChecked">{{ item.packageName }}</el-checkbox>
<div>
<el-checkbox v-model="item.cardName" true-label="card" false-label="">卡输入</el-checkbox>
</div>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
...@@ -136,6 +146,7 @@ export default { ...@@ -136,6 +146,7 @@ export default {
configTitle:'', configTitle:'',
selectedTable: false, selectedTable: false,
checkPosition: false, checkPosition: false,
saleMode: 1,
tableData: [], tableData: [],
merchantIds: [], merchantIds: [],
selectedList: [], selectedList: [],
...@@ -306,10 +317,11 @@ export default { ...@@ -306,10 +317,11 @@ export default {
merchantId merchantId
} }
if(this.showGh){ if(this.showGh){
para.channel = 2 para.channel = 2
} }
this.$apis.openconfig.getConfig(para).then(res => { this.$apis.openconfig.getConfig(para).then(res => {
res = res || {} res = res || {}
this.saleMode = res.saleMode
this.costPrice = res.openCostPrice == 1 this.costPrice = res.openCostPrice == 1
this.storeSelParams = res this.storeSelParams = res
this.id = res.id this.id = res.id
...@@ -437,13 +449,14 @@ export default { ...@@ -437,13 +449,14 @@ export default {
} }
this.newPackageList.forEach(item=>{ this.newPackageList.forEach(item=>{
if(item.isChecked){ if(item.isChecked){
let {packageCode, packageServicePeriod} = item let {packageCode, packageServicePeriod, cardName} = item
params.push({packageCode, servicePeriod: packageServicePeriod }) params.push({packageCode, servicePeriod: packageServicePeriod, cardName})
} }
}) })
let targetParams = { let targetParams = {
openCostPrice : this.costPrice ? 1 : 0, openCostPrice : this.costPrice ? 1 : 0,
createDetailRequests: params createDetailRequests: params,
saleMode: this.saleMode
} }
if(this.showGh){ if(this.showGh){
delete targetParams.createDetailRequests delete targetParams.createDetailRequests
...@@ -674,6 +687,27 @@ export default { ...@@ -674,6 +687,27 @@ export default {
} }
} }
.sale-mode {
height: 32px;
line-height: 32px;
display: flex;
align-items: center;
.label {
// width: 154px;
display: inline-block;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
&::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
}
.special-config { .special-config {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<!-- <el-button size="small" @click="toggleAll">全选</el-button> --> <!-- <el-button size="small" @click="toggleAll">全选</el-button> -->
<!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> --> <!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> -->
<div style="float: right;" class="primary_plain_btn"> <div style="float: right;" class="primary_plain_btn">
<el-button size="small" plain @click="batchOpenSale()">批量开通驻店零售</el-button>
<el-button size="small" plain @click="batchOperation(1)">批量开通</el-button> <el-button size="small" plain @click="batchOperation(1)">批量开通</el-button>
<el-button size="small" @click="batchOperation(2)">批量关闭</el-button> <el-button size="small" @click="batchOperation(2)">批量关闭</el-button>
<el-button size="small" @click="exportTable">导出</el-button> <el-button size="small" @click="exportTable">导出</el-button>
...@@ -150,6 +151,13 @@ export default { ...@@ -150,6 +151,13 @@ export default {
prop: 'merchantId' prop: 'merchantId'
}, },
{ {
label: '销售模式',
prop: 'saleMode',
formatter: cell => {
return cell.saleMode == 1 ? '批发销售' : '驻店零售'
}
},
{
label: '状态', label: '状态',
prop: 'openFlag', prop: 'openFlag',
formatter: cell => { formatter: cell => {
...@@ -259,6 +267,26 @@ export default { ...@@ -259,6 +267,26 @@ export default {
this.searchForm[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value this.searchForm[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
}, },
batchOpenSale(){
const data = this.$refs.table?.mutiSelectArr?.[this.tableParams.mutiSelectName] || []
if(!data?.length) return this.$message.error('请选择需要开通的商户')
this.$confirm('确定批量开通驻店零售吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
const ids = data.map(item => item.id)
this.$apis.openconfig.batchOpenSaleModeApi({ids, saleMode: 2}).then(res => {
if(res){
this.$message.success('操作成功')
this.$refs.table.refreshTable()
}
})
}
}
})
},
// ['开通', '关闭'] // // ['开通', '关闭'] //
batchOperation(status) { batchOperation(status) {
let { configIndexMutiTable } = this.$refs.table.$refs let { configIndexMutiTable } = this.$refs.table.$refs
...@@ -285,8 +313,7 @@ export default { ...@@ -285,8 +313,7 @@ export default {
this.$confirm(content[status], '提示', { this.$confirm(content[status], '提示', {
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning', type: 'warning'
center: true
}) })
.then(() => { .then(() => {
let target = 'openConfigs' let target = 'openConfigs'
......
<template>
<div class="container">
<div class="main-warp">
<glsx-combi-form ref="submitRef" labelWidth="154px" defaultWidth="284px" :isInline="false" :formObj="formObj" :formData="formData" :formRules="editRule">
<div slot="merchantName">
<el-button v-if="routeInfo.type==1 || (routeInfo.type==3 && routeInfo.merchantId) " class="el-icon-plus" @click="selectMerchant()">选择门店</el-button>
<div
class="merchantNameLabel"
v-if="formObj.merchantName && formObj.merchantId"
>
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ formObj.merchantName }}</div>
</div>
<div v-if="routeInfo.type!=1 && !routeInfo.merchantId">所有门店适用</div>
</div>
<div class="equity-class" slot="selectEquity">
<div class="equity-area" v-for="item in formObj.serviceList" :key="item.serviceCode">
<el-checkbox @change="checkField" v-model="item.checked">{{item.serviceName}}</el-checkbox>
<div v-if="item.checked">
<el-input class="desc" v-model="item.summary" placeholder="请输入概述"></el-input>
<quill-editor class="quill" v-model="item.serviceContent" :options="editorOption"></quill-editor>
</div>
</div>
</div>
</glsx-combi-form>
<select-store
v-if="relateStoreVisible"
ref="relateStore"
:dialogVisible="relateStoreVisible"
:merchantInfo="formObj"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="selectMerchant"
>
</select-store>
</div>
<div v-if="routeInfo.type!=2" class="page-btm-btn">
<el-button class="custom_black" @click="back">取消</el-button>
<el-button type="primary" @click="submit">提交</el-button>
</div>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import selectStore from './components/selectStore.vue'
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
export default {
name: 'addClause',
components:{
glsxCombiForm,
quillEditor,
selectStore
},
data() {
return {
size: 'small',
routeInfo: {},
serviceList: [],
relateStoreVisible: false,
selectedList: [],
editorOption: {
placeholder: '请输入具体条款内容',
modules: {
toolbar: false,
clipboard: {
// 粘贴版,处理粘贴时候的自带样式
matchers: [[Node.ELEMENT_NODE, this.HandleCustomMatcher]],
},
}
},
editRule:{
merchantId: { required: true, message: '请选择门店', trigger: 'change' },
serviceList: { trigger: 'blur', validator: (rule, value, callback) => {
const target = value?.find(item => item.checked)
if (!target) {
callback(new Error("至少选择一个权益"));
} else {
callback();
}
} },
},
formObj: {
merchantId: '',
merchantName: '',
serviceList: []
},
formData: [
{
label: '门店名称:',
name:'merchantId',
addHtml:'merchantName'
},
{
label: '选中权益:',
name:'serviceList',
addHtml:'selectEquity'
}
]
}
},
created() {
const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
if(this.routeInfo?.id) {
this.getServiceDetail()
}else{
this.getServiceList()
}
},
mounted() {
},
methods: {
HandleCustomMatcher(node, Delta) {
// 文字、图片等,从别处复制而来,清除自带样式,转为纯文本
let ops = []
Delta.ops.forEach(op => {
if (op.insert && typeof op.insert === 'string') {
ops.push({
insert: op.insert,
})
}
})
Delta.ops = ops
return Delta
},
getServiceDetail(){
const { id } = this.routeInfo
this.$apis.serviceConfig.getEquityDetail({id}).then(res => {
if(res?.id) {
const { id, merchantId, merchantName, serviceCode, serviceContent, serviceName, summary} = res
let list = [{ checked: true, serviceCode, serviceContent, serviceName, summary }]
this.formObj = {
id,
merchantId,
merchantName,
serviceList: list
}
}
})
},
getServiceList(){
this.$apis.serviceConfig.getServiceList({}).then(res => {
if(res?.length){
this.formObj.serviceList = res.map(item => {
item.checked=false
item.serviceContent = ''
item.summary = ''
return item
})
}
})
},
selectMerchant(){
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm(e = {}){
const {merchantId, merchantName} = e
this.formObj.merchantId = merchantId
this.formObj.merchantName = merchantName
this.$refs.submitRef.$refs.formRef.validateField('merchantId')
this.selectMerchant()
},
checkField(){
this.$refs.submitRef.$refs.formRef.validateField('serviceList')
},
back(){
this.$router.back()
},
editService(){
const { id, merchantId, merchantName, serviceList } = this.formObj
const { serviceCode, serviceContent, serviceName, summary } = serviceList?.[0] || {}
const params = { id, merchantId, merchantName, serviceCode, serviceContent, serviceName, summary}
this.$apis.serviceConfig.updateEquity(params).then(res => {
if(res){
this.$message.success('修改成功')
this.$router.push('/serviceConfig/index')
}
})
},
submit(){
if(this.routeInfo.type!=1 && !this.routeInfo.merchantId){
this.$refs.submitRef.$refs.formRef.validateField('serviceList', valid => {
if(valid) return; //检验单个规则空才是通过
this.addConfigApi()
})
}else{
this.$refs.submitRef.$refs.formRef.validate(valid => {
console.log(222, valid)
if(!valid) return;
this.addConfigApi()
})
}
},
addConfigApi(){
if(this.routeInfo.id){
this.editService()
return;
}
let { merchantId, merchantName } = this.formObj
let serviceIterm = []
this.formObj.serviceList.forEach(item => {
if(item.checked) {
let {serviceCode, serviceContent, serviceName, summary } = item
serviceIterm.push({serviceCode, serviceContent, serviceName, summary })
}
})
let params = {
merchantId,
merchantName,
serviceIterm
}
this.$apis.serviceConfig.craeteEquity(params).then(res => {
if(res?.length){
this.$message.success('操作成功')
this.$router.push('/serviceConfig/index')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.container{
.main-warp{
// height: calc(100vh - 200px);
padding: 32px 20px;
background-color: #fff;
.merchantNameLabel {
width: 510px;
color: #1d1d1d;
// margin-left: 50px;
padding: 16px;
margin-top: 8px;
border: 1px solid #e6e6e6;
border-radius: 8rpx;
background: #f9f9f9;
.merchantName {
box-sizing: border-box;
width: 284px;
height: 32px;
background: #ffffff;
border: 1px solid #e6e6e6;
border-radius: 4px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #999999;
line-height: 32px;
padding: 0 8px;
}
}
.equity-class{
.equity-area{
.desc{
margin-bottom: 10px;
width: 432px;
}
/deep/ .el-checkbox{
display: block;
}
.quill{
width: 580px;
height: 80px;
/deep/ .ql-container{
border-radius: 4px;
border-color: #dcdfe6;
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!