Commit e8c604c3 by 杨北旺

提交理赔代码

1 parent 0fbd1014
......@@ -124,4 +124,195 @@ const getAccountInfo = params => {
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
/**广汇端---接口 */
// 获取核赔列表接口
const getGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.gh.list'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 新增跟进记录
const addGHClaimFollowsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.followLog.create'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取跟进记录
const getGHClaimFollowsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.followLog.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出核赔列表
const exportGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.gh.list.export'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 运营端核赔订单审核通用接口
const checkGHClaimsListApi = params => {
params.method = 'scrm.api.equity.service.claims.operate.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 历史赔付记录
const getGHhistoryListApi = params => {
params.method = 'scrm.api.equity.mini.service.claims.history.records.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取定损和核赔详情
const getGHClaimsDetailApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.detail.new'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单资料获取
const getGHattachmentApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.attachment.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单手机传图资料获取
const getGHPhoneImageApi = params => {
params.method = 'scrm.api.equity.service.claims.merchant.phone.attachment'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单获取订单数
const getGHCountApi = params => {
params.method = 'scrm.api.equity.service.claims.gh.list.count'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 图片上传
const uploadImgApi = params => {
params.method = 'scrm.api.carlife.common.uploadImg'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
// 获取其他资料
const getOrderOherInfo = params => {
params.method = 'scrm.api.equity.service.claims.merchant.package.info'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损审核接口
const checkOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.draft.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔审核
const checkClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 撤销审核
const cancelClaims = params => {
params.method = 'scrm.api.equity.service.claims.audit.cancel'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损保存草稿
const saveCG = params => {
params.method = 'scrm.api.equity.service.claims.merchant.lossDeter.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔保存草稿
const saveClaimsCG = params => {
params.method = 'scrm.api.equity.service.claims.merchant.claims.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 上传签名
const saveSign = params => {
params.method = 'scrm.api.equity.mini.service.claims.confirm'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {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 }
......@@ -167,15 +167,18 @@
padding: 20px;
// box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
}
.equity-wrap .contain .el-table__empty-text {
display: inline-block;
width: 64px;
height: 41px;
}
.fr-mr0 {
float: right;
margin-right: 0px !important;
}
// 单行省略
.ellipsis-1 {
overflow: hidden;
......@@ -184,9 +187,11 @@
-o-text-overflow: ellipsis;
/* for Opera */
}
.mb10 {
margin-bottom: 10px;
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 {
overflow: hidden;
......@@ -211,6 +216,7 @@
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.el-scrollbar__bar.is-horizontal {
height: 10px !important;
left: 10px;
......@@ -291,6 +297,7 @@
margin: 0 0 30px 0;
padding-left: 8px;
}
// .app {
// background: #f4f5fa;
// padding: 0px 0 20px 0;
......@@ -305,17 +312,20 @@
.el-cascader-menu {
max-height: 250px;
}
.primary_plain_btn {
.el-button--primary.is-plain {
color: #5850ff;
background-color: #fff;
border-color: #5850ff;
}
.el-button--primary.is-plain:hover {
color: #7973ff;
background-color: #fff;
border-color: #7973ff;
}
.el-button--primary.is-plain:active {
color: #3a32e1;
background-color: #fff;
......@@ -325,6 +335,7 @@
.el-loading-mask {
.el-loading-spinner {
.el-icon-loading,
.el-loading-text {
color: #5850ff;
......@@ -332,6 +343,139 @@
}
}
// 核赔订单详情样式
.order-container-page {
.widget {
background: white;
.title {
padding: 15px 20px;
border-bottom: 1px solid #e5e5e5;
}
.content {
.code {
padding: 8px 20px;
background: #f9f9f9;
}
.pannel {
.line {
margin-top: 20px;
.label {
width: 154px;
text-align: right;
}
.value {
width: 432px;
}
}
}
.element_wrap {
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 16px;
font-weight: 400;
color: #333333;
}
.pannel {
.wrapper {
margin-bottom: 16px;
.name {
font-size: 16px;
font-weight: 400;
color: #333333;
margin-bottom: 8px;
}
.messag {
width: 686px;
// height: 60px;
background: #f9f9f9;
box-sizing: border-box;
padding: 0 20px;
.ms {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.price {
color: #333333;
}
}
.pannel_box {
width: 686px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
display: flex;
flex-wrap: wrap;
.line {
margin-bottom: 20px;
.lab {
font-size: 14px;
font-weight: 400;
color: #666666;
text-align: right;
width: 154px;
}
.tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
}
}
.total {
padding: 12px 20px;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
.pad20 {
padding: 20px;
}
}
.flex_wrap {
display: flex;
flex-wrap: wrap;
}
.text_14_4_333 {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.text_14_4_666 {
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
// .equity-wrap table {
// width: 98%;
// color: #666666;
......@@ -373,4 +517,4 @@
.el-form-item {
margin: 0 !important;
}
}
}
\ No newline at end of file
......@@ -12,10 +12,10 @@ let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
// request.baseURL = 'https://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
// request.baseURL = 'http://192.168.1.165:7226'
// request_brand.baseURL = 'http://192.168.1.165:7226'
request.baseURL = 'https://scrm.dev.glsx.com.cn'
request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// request.baseURL = 'http://192.168.1.53:7226'
// request_brand.baseURL = 'http://192.168.1.53:7226'
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -23,10 +23,10 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
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_brand = new common.Http({ response, request: request_brand, 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: 'scrm-base-9ff7f674-bf61-4ca5-ae43-6c493ac13f31-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-27c02d95-51f9-4576-86a9-70ba0f4d76e4-rop' } })
// 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 = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-ed690cff-685f-43db-9670-912cac0af9a6-rop' } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-ed690cff-685f-43db-9670-912cac0af9a6-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
......
<template>
<div>
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content">
<glsxCombiForm :isInline="false" :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="editFormData"></glsxCombiForm>
</div>
</div>
<!-- 报案信息(店面补充) -->
<div>
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="handlerForm">
<div slot="approveAmountSlot" class="amount-wrap">
<div v-for="(item, index) in itemList" :key="index">
<el-checkbox @change="selectService" v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ repotData.approveAmount }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
</div>
<!-- 上传资料 -->
<div>
<upload-material :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :supplementList="repotData.supplementList1"></explanation>
</div>
<!-- 其他信息 -->
<div>
<other-info :otherInfoData="otherInfoData"></other-info>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import Card from '../card.vue'
import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
export default {
name: 'checkPage',
components: {
glsxCombiForm,
Card,
uploadMaterial,
explanation,
otherInfo
},
data() {
return {
regionData: [],
editFormData: [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: true
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
label: '报案人',
name: 'reporterName',
type: 'input',
maxlength: 100,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isClear: true,
maxlength: 200,
inputType: 'textarea'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险经过描述',
name: 'reimbursementProcess',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: [],
addHtml: 'approveAmountSlot'
}
],
explanationObj: {
explanation1: ''
}
}
},
props: {
repotData: Object,
insuranceAttachmentConfigs: Array,
itemList: Array,
otherInfoData:Object
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
}
},
'editForm.reimbursementDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
mounted() {
this.getCityList()
},
methods: {
getCityList() {
this.$apis.claims.getCityList({}).then(res => {
this.regionData = res
})
},
updateTimeLimit(newVal, key) {
let limitTime = ''
// 当不是同一天,时间限制为'00:00:00 - 23:59:59',否则'00:00:00 - endTime'
let endTime = new Date().getTime()
if (util.dateFormat(endTime) === util.dateFormat(new Date(newVal))) {
limitTime = `00:00:00 - ${util.dateFormat(new Date(new Date().setHours(new Date().getHours() + 1)), 'HH:mm:ss')}`
} else {
limitTime = '00:00:00 - 23:59:59'
}
const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
},
validPrice(e, id) {
let checkPlan = '' + this.itemList[id].approveAmount
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(this.itemList[id], 'approveAmount', checkPlan)
this.getTotal()
},
changePrice(e, id) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.itemList[id], 'approveAmount', e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'approveAmount', 1)
}
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'approveAmount', maxPrice)
}
this.getTotal()
},
selectService(){
this.getTotal()
},
getTotal() {
let total = this.itemList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
this.repotData.approveAmount = (total/100).toFixed(2)
}
}
}
</script>
<style lang="scss" scoped>
.edit-form-container {
padding: 32px 0 12px;
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
}
}
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.unit-price {
background: #f9f9f9;
padding: 20px;
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-bottom: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
flex-shrink: 0;
display: inline-block;
text-align: right;
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
padding: 0 16px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
</style>
<template>
<div>
<div class="widget">
<div class="title">维修信息</div>
<div class="content pad3220">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="(item,index) in itemsList">
<div :key="index" class="wrapper">
<div class="name">{{item.serviceItemName}}</div>
<div class="messag pad20">
<div class="ms flex_sc">
<div class="ms_lab">预估损失金额/元:</div>
<el-input v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
<div class="ms flex_sc ma20">
<div class="ms_lab">定损批准金额/元:</div>
<el-input v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:{{repotData.applyAmount}}元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:{{repotData.approveAmount}}元</span>
</span>
</div>
</div>
</div>
<div class="element_wrap ma20">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio >{{accountForm.objectType?'其他':'店面'}}</el-radio>
<!-- <el-radio-group disabled @change="changeObjectType" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group> -->
</div>
<div class="pannel_box">
<glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<uploadMaterial :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></uploadMaterial>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
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]{8}$/
import glsxCombiForm from '@/components/glsx-combi-form'
import uploadMaterial from '../uploadMaterial.vue'
export default {
name: 'checkClaimsPage',
components: {
glsxCombiForm,
uploadMaterial
},
data() {
return {
accountRule: {
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
accountNo: [
{
required: true,
validator: (rule, value, callback) => {
let numRef = /^[0-9]{1,25}$/
if (!value) {
callback(new Error('请输入收款账号'))
} else if (numRef.test(value)) {
callback()
} else {
callback(new Error('请输入正确的收款账号'))
}
},
trigger: 'change'
}
],
bankCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
payeeIDCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
payeeIDCardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
payeePhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }],
handlerPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
reimbursementDesc: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }]
},
accountData: [
// {
// label: '账户类型',
// name: 'accountType',
// type: 'radio',
// optionList: [
// {
// confId: 0,
// confName: '对公'
// },
// {
// confId: 1,
// confName: '对私'
// }
// ],
// optionId: 'confId',
// optionLabel: 'confName',
// isHide: true,
// isClear: true,
// },
{
label: '开户行名称',
name: 'openBankCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength: 60,
isClear: true,
},
{
label: '收款账号',
name: 'accountNo',
type: 'input',
maxlength: 25,
isClear: true,
},
{
label: '收款账号所在省市',
name: 'accountCityCode',
type: 'select',
placeholder: '可输入所在市关键词查询',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
},
{
label: '收款人证件类型',
name: 'cardTypeCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
},
{
label: '收款人证件号码',
name: 'cardNo',
type: 'input',
maxlength: 25,
isClear: true,
},
{
label: '收款人联系电话',
name: 'phone',
type: 'input',
maxlength: 15,
isClear: true,
}
]
}
},
props: {
repotData: Object,
accountForm: Object,
itemsList:Array,
insuranceAttachmentConfigs:Array
},
watch: {
'accountForm.objectType': {
handler(newVal, oldVal) {
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal == 0
},
immediate: true
}
},
mounted() {
this.getBankList()
},
methods: {
changeObjectType(newVal) {
this.$emit('changeObjectType', newVal)
},
// 获取银行信息
getBankList() {
this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name === 'openBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name === 'accountCityCode')
accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name === 'cardTypeCode')
IDCardTypeList.optionList = res.cardType
})
}
}
}
</script>
<style lang="scss" scoped>
.pad3220 {
padding: 32px 20px;
}
.pad20 {
padding: 20px !important;
}
.ms_lab {
width: 154px;
text-align: right;
}
.w432 {
width: 432px !important;
}
.ma20 {
margin-top: 20px;
}
</style>
......@@ -2,13 +2,13 @@
<div>
<Card title="案件补充说明">
<div class="explanation">
<div class="explanation-list" v-for="(item, idx) in explanationForm" :key="idx">
<div class="explanation-list" v-for="(item, idx) in supplementList" :key="idx">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :placeholder="`请输入说明${idx + 1}`" v-model="item.content" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="explanationForm.length > 1" @click="handleDel(idx)"></i>
<el-input :disabled="isCheck" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck&&supplementList.length > 1" @click="handleDel(idx)"></i>
</div>
</div>
<div class="add-explanation" @click="addExplanation">
<div v-if="!isCheck" class="add-explanation" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span>
</div>
......@@ -20,49 +20,30 @@ import Card from './card.vue'
export default {
name: 'explanation',
data() {
return {
explanationForm:[
{
name: 'explanation1',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
suffixSlot: 'suffixSlot'
}
]
}
return {}
},
components: {
Card
},
props: {
obj:{
type: Object,
default:function() {
return {explanation1:''}
}
}
supplementList: {
type: Array,
default: function () {
return [{ content: '' }]
}
},
isCheck:Boolean
},
mounted() {},
methods:{
handleDel(idx){
this.$delete(this.explanationForm, idx)
},
addExplanation(){
const idx= this.explanationForm.length
const key = `explanation${idx+1}`
const obj = {
name: key,
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
suffixSlot:'suffixSlot'
}
this.$set(this.explanationForm,idx,obj)
this.$set(this.obj,key,'')
methods: {
handleDel(idx) {
this.$delete(this.supplementList, idx)
},
addExplanation() {
const idx = this.supplementList.length
const newObj = { claimsId: this.supplementList[idx - 1].claimsId, content: '' }
this.$set(this.supplementList, idx, newObj)
}
}
}
</script>
......@@ -98,7 +79,7 @@ export default {
}
.add-explanation {
color: #5850ff;
color: #5850FF;
display: flex;
align-items: center;
margin-left: 154px;
......
<template>
<GLDialog class="gl-form-page gl-form-min" title="快速审核" mode="mid" v-if="visibility" :visible.sync="visibility">
<GLDialog class="gl-form-page gl-form-min" title="快速审核" mode="mid" @onCancel="closeDialog" v-if="visibility" :visible.sync="visibility">
<div class="review-container">
<div class="filter-wrap">
<!-- 筛选树 -->
......@@ -8,7 +8,7 @@
<i class="gl-icon-filter filter-icon" @click.stop="showFilter = !showFilter"></i>
<div v-show="showFilter" ref="closetree" class="tree-wrap">
<div class="filter-tree">
<el-tree @check-change="checkChange" :data="data" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps"></el-tree>
<el-tree @check-change="checkChange" :data="treeBasic" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps"></el-tree>
</div>
<div class="filter-all">
<el-checkbox v-model="checked">全选</el-checkbox>
......@@ -23,26 +23,27 @@
<div id="pic-list" class="pic-list">
<div class="pic-item" v-for="(item, index) in filterImgList" :key="index">
<span class="title">
<div class="name">{{ item.name }}</div>
<i v-if="item.status == 1" class="el-icon-success success"></i>
<i v-if="item.status == 0" class="el-icon-error error"></i>
<div class="name">{{ item.secondClassifyName }}</div>
<i v-if="item.auditStatus == 1" class="el-icon-success success"></i>
<i v-if="item.auditStatus == 0" class="el-icon-error error"></i>
</span>
<div @click="changeCurImg(index)" :class="['pic', { cur: curImg.idx == index }]">
<img :src="item.url" alt="" />
<div @click="changeCurImg(item, index)" :class="['pic', { cur: curImg.idx == index }]">
<img :src="item.attachmentFile" alt="" />
</div>
</div>
</div>
</div>
<!-- 右边大图区 -->
<div class="preview-wrap">
<span>{{ curImg.name }}</span>
<span>{{ curImg.secondClassifyName }}</span>
<div class="preview-oper">
<div class="preview-pic">
<img :src="curImg.url" alt="" />
<div class="mask">
<el-image :preview-src-list="[curImg.attachmentFile]" style="width: 100%; height:100%" :src="curImg.attachmentFile" :fit="fit"></el-image>
<!-- <img :src="curImg.attachmentFile" alt="" /> -->
<!-- <div class="mask">
<i class="gl-icon-eye"></i>
<i class="gl-icon-a-testcaselibrary1"></i>
</div>
</div> -->
</div>
<!-- 按钮区 -->
<div class="pass-btn">
......@@ -65,18 +66,21 @@
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'fastReview',
components:{
components: {
glsxCombiForm
},
props: {
images: Array
},
data() {
return {
checked: true,
showFilter:false,
visibility:false,
showFilter: false,
visibility: false,
imgPassObj: {
desc: ''
},
imgPassForm:[
imgPassForm: [
{
label: '具体描述',
name: 'desc',
......@@ -84,71 +88,57 @@ export default {
inputType: 'textarea',
rows: 3,
isClear: true
},
}
],
curImg:{
},
filterImgList : [],
imgList:[
{
url: 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/30/wKgD3mMigU6AQWekAAAxdFwhNU8306.png',
name:'基础资料:身份证身份证身份证身份证',
status: 1
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png',
name:'111111',
status: 0
},
{
url: 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/30/wKgD3mMigU6AQWekAAAxdFwhNU8306.png',
name:'222222',
status: 0
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png',
name:'333333',
status: 0
}
],
data: [{
curImg: {},
filterImgList: [],
imgList: [],
treeBasic: [
{
id: 1,
label: '资料名称',
children: []
}, {
},
{
id: 2,
label: '处理状态',
children: [{
id: 5,
label: '已审核'
}, {
id: 6,
label: '未审核'
}]
}, {
children: [
{
id: 5,
label: '已审核'
},
{
id: 6,
label: '未审核'
}
]
},
{
id: 3,
label: '审核状态',
children: [{
id: 7,
label: '通过'
}, {
id: 8,
label: '未通过'
}]
}],
children: [
{
id: 7,
label: '通过'
},
{
id: 8,
label: '未通过'
}
]
}
]
}
},
mounted() {
this.filterImgList = [...this.imgList]
this.changeCurImg(0)
document.addEventListener('click',(e)=>{
if(!this.$refs['closetree']?.contains(e.target)){
this.showFilter=false;
this.filterImgList = []
document.addEventListener('click', e => {
if (!this.$refs['closetree']?.contains(e.target)) {
this.showFilter = false
}
})
},
methods:{
methods: {
// changeLeaf(type){
// let idx = this.curImg.idx
// if((type == 'pre' && this.curImg.idx==0) || (type == 'next' && idx==this.imgList.length-1)){
......@@ -161,30 +151,54 @@ export default {
// this.curImg =type == 'next' ? this.imgList[idx+1] : this.imgList[idx-1]
// this.curImg.idx =type == 'next' ? idx + 1 : idx - 1
// },
initDialog(){
handlerData(val) {
let arr = []
val.forEach((el, index) => {
let obj = {
label: el.firstClassifyName,
id: index
}
this.treeBasic[0].children.push(obj)
el.secondClassifyList.forEach(ele => {
ele.attachmentList.forEach(ke => {
if (ke.attachmentFile) {
ke.secondClassifyName = ele.secondClassifyName
arr.push(ke)
}
})
})
})
this.filterImgList = arr
this.curImg = arr[0]
this.curImg.idx = 0
},
closeDialog() {
this.visibility = false
},
initDialog() {
this.visibility = true
this.handlerData(this.images)
},
changeCurImg(index){
if(index>this.filterImgList.length-1 || index<0) return
changeCurImg(item, index) {
if (index > this.filterImgList.length - 1 || index < 0) return
this.curImg = this.filterImgList[index]
this.curImg.idx = index
},
handleApproval(){
handleApproval() {
const idx = this.curImg.idx
this.filterImgList[idx].status = 1
this.changeCurImg(idx+1)
try{
this.changeCurImg(idx + 1)
try {
let scrollH = document.getElementById('pic-list')
scrollH.scrollTop = 135*(idx+1)
}catch(err){
scrollH.scrollTop = 135 * (idx + 1)
} catch (err) {
console.log(err)
}
},
checkChange(){
const list = this.imgList.filter(item => {
})
this.filterImgList = [...this.imgList]
checkChange(e) {
console.log(e)
// const list = this.imgList.filter(item => {})
// this.filterImgList = [...this.imgList]
}
}
}
......
......@@ -41,7 +41,7 @@ export default {
name: 'imgList',
props:{
list:{
type: Object
type: Array
}
},
data() {
......
<template>
<Card title="其他信息" class="" openBtn>
<div class="other-info">
<span class="title">店面信息</span>
<div class="other-info" v-for="(item, idx) in form" :key="idx">
<span class="title">{{ item.parentTitle }}</span>
<div class="info-wrap">
<li>
<label class="label" for="">店面名称:</label>
<span class="content">深圳奥迪专营店</span>
</li>
<li>
<label class="label" for="">店面名称:</label>
<span class="content">深圳奥迪专营店</span>
</li>
<li>
<label class="label" for="">店面名称:</label>
<span class="content">深圳奥迪专营店</span>
<li v-for="sonItem in item.li" :key="sonItem.key">
<label class="label" for="">{{ sonItem.label }}</label>
<span class="content">{{ otherInfoData[sonItem.key] || '--' }}</span>
</li>
</div>
</div>
......@@ -23,31 +15,100 @@
import Card from './card.vue'
export default {
name: 'otherInfo',
props: {
otherInfoData: Object
},
data() {
return {
open: false
form: [
{
parentTitle: '店面信息',
li: [
{
key: 'merchantName',
label: '店面名称:'
},
{
key: 'merchantPhone',
label: '店面联系方式:'
},
{
key: 'merchantAddr',
label: '店面地址:'
}
]
},
{
parentTitle: '产品详情',
li: [
{
key: 'packageName',
label: '产品名称:'
},
{
key: 'contractNo',
label: '合同编号:'
},
{
key: 'effectiveDate',
label: '生效时间:'
},
{
key: 'servicePeriod',
label: '服务期限:'
},
{
key: 'expirationDate',
label: '起止时间:'
}
]
},
{
parentTitle: '客户信息',
li: [
{
key: 'customerName',
label: '客户姓名:'
},
{
key: 'customerPhone',
label: '电话号码:'
},
{
key: 'customerAddr',
label: '联系地址:'
}
]
},
{
parentTitle: '车辆信息',
li: [
{
key: 'vin',
label: '车架号:'
},
{
key: 'brandAndShape',
label: '品牌车型:'
},
{
key: 'billingDate',
label: '新车开票日期:'
},
{
key: 'invoicePrice',
label: '车辆购置价:'
}
]
}
]
}
},
components:{
components: {
Card
},
props: {
title: {
type: String,
default: ''
},
openBtn: {
type: Boolean,
default: false
},
marginTop:{
tyep: Number|String,
default: 16
}
},
mounted() {},
methods:{
}
methods: {}
}
</script>
<style lang="scss" scoped>
......@@ -56,16 +117,18 @@ export default {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 32px;
line-height: 22px;
color: #333333;
margin-bottom: 16px;
.info-wrap {
background: #f9f9f9;
padding: 20px;
li {
display: inline-block;
line-height: 32px;
padding: 20px 0;
line-height: 22px;
padding: 10px 0;
text-align: center;
width: 520px;
width: 500px;
.label {
color: #666666;
}
......
......@@ -3,83 +3,88 @@
<Card title="上传图片">
<el-button type="text" slot="right" @click.stop="handleReview">快速审核</el-button>
<el-tabs class="tabs" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane v-for="item in tabs" :key="item.name" :label="item.label" :name="item.name">
<img-list :list="baseImgObj">
<div slot="footer">
<div class="pass-btn">
<el-button type="text" size="small">通过</el-button>
<el-button type="text" size="small">不通过</el-button>
<el-button type="text" size="small">上传</el-button>
<el-tab-pane v-for="(item, index) in insuranceAttachmentConfigs" :key="index" :label="item.firstClassifyName">
<!-- <div v-if="item.firstClassifyName.indexOf('定损') != -1" class="service_line_wrap flex_sc">
<el-checkbox-group v-model="checkList">
<template v-for="(service, serviceIndex) in item.secondClassifyList">
<div :key="serviceIndex" class="line_box">
<el-checkbox :label="service.serviceItemName"></el-checkbox>
</div>
</template>
</el-checkbox-group>
</div> -->
<div v-if="item.firstClassifyName.indexOf('其他') == -1" class="image_container">
<div v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].secondClassifyList" :key="i" class="img_box">
<div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div>
<div class="title flex_sc">
<i v-if="img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<div class="">{{ img.secondClassifyName }}</div>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="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" />
<div v-if="img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
</div>
<div class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</div>
<div v-else class="image_container">
<div v-for="(img, i) in insuranceAttachmentConfigs[currentIndx].allImages" :key="i" class="img_box">
<div class="title">
<i v-if="img.auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.auditStatus == 0" class="el-icon-error error"></i>
<span>图片{{ i + 1 }}</span>
</div>
<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>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div>
</div>
<div class="footer_btn">
<el-button style="margin-left: 39px" @click="toHandlerImage(img, i, 1)" type="text">通过</el-button>
<el-button @click="toHandlerImage(img, i, 0)" type="text">不通过</el-button>
<div @click="toHandlerImage(img, i, 2)" class="up_wrap">
<span>上传</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</img-list>
<div class="img_box">
<div class="title">
<span>图片上传</span>
</div>
<div @click="touploadOther" class="img_pannel uplpad_pannel flex_cc">
<img :src="cameraUrl" style="width: 40px; height: 40px" />
<input type="file" class="file_1" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</Card>
<fast-review ref="fastReviewDialog"></fast-review>
<fast-review :images.sync="insuranceAttachmentConfigs" ref="fastReviewDialog"></fast-review>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="submitForm" @onCancel="cancelDialog">
<div>
<glsx-combi-form ref="imgPassRef" :isInline="false" labelWidth="90px" defaultWidth="184px" :formObj="imgPassObj" :formData="imgPassForm"></glsx-combi-form>
</div>
</GLDialog>
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import write_off from '@/assets/logo.png'
import url from '@/assets/images/idCard.png'
import imgList from './imgList'
import Card from './card.vue'
import fastReview from './fastReview'
const tabs = [
{
label: '基础资料',
name: 'base'
},
{
label: '定损细节照片',
name: 'detail'
},
{
label: '现场照片',
name: 'onSite'
},
{
label: '其他资料(非必传)',
name: 'other'
}
]
const baseImgObj ={
front: {
title:'身份证人像面',
url:'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png',
status: 1
},
end:{
title:'身份证国徽面',
url:'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png',
status: 2,
reason: '图片不清晰图片不清清晰图片不清晰图片不清晰图片不清晰图片不清晰图片不清晰图片不不清晰图片不清晰图片不清晰图片不清晰图片不清晰图片不清晰图片不清晰图片不清晰'
},
drive: {
title:'驾驶证',
url:'',
status: ''
},
drive2:{
title:'行驶证',
url: '',
tip:'正本及副证年审合格页面,出险时车辆在年审有效期内',
status: ''
},
group: {
title:'人车合照',
url:'',
tip: '须清晰体现车牌、车辆全貌',
status: ''
},
frame: {
title:'前挡车架号',
url:'',
tip: '车架号清晰可见',
status: ''
}
}
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'uploadMaterial',
data() {
......@@ -87,25 +92,95 @@ export default {
url,
cameraUrl,
write_off,
tabs,
baseImgObj,
activeName: 'base',
activeName: '0',
currentIndx: 0,
showNoPassDialog: false,
imgPassObj: {
desc: ''
},
imgPassForm: [
{
label: '具体描述',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
}
],
checkList: []
}
},
components: {
imgList,
glsxCombiForm,
Card,
fastReview
},
mounted() {
props: {
insuranceAttachmentConfigs: Array
},
mounted() {},
methods: {
changeTabs(){
console.log(45645)
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
},
handleReview(){
handleReview() {
this.$refs.fastReviewDialog.initDialog()
},
toHandlerImage(img, index, type) {
this.uploadObj = {
img,
index
}
this.isUploadOther = false
if (type == 2) return
if (type == 1) {
img.attachmentList[0].auditStatus = type
return
}
if (type == 0) {
this.imgPassObj.desc = img.attachmentList[0].reasonForFailure
this.showNoPassDialog = true
}
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[index], img)
},
touploadOther() {
this.isUploadOther = true
},
upload(e) {
let otherObj = {
...this.insuranceAttachmentConfigs[this.currentIndx].allImages[0]
}
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 => {
if (this.isUploadOther) {
otherObj.attachmentFile = res
otherObj.auditStatus = null
otherObj.attachmentType = file.name.split('.').pop()
this.insuranceAttachmentConfigs[this.currentIndx].allImages.push(otherObj)
return
}
this.uploadObj.img.attachmentList[0].attachmentFile = res
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
})
}
},
submitForm() {
this.uploadObj.img.attachmentList[0].auditStatus = 0
this.uploadObj.img.attachmentList[0].reasonForFailure = this.imgPassObj.desc
this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
this.cancelDialog()
},
cancelDialog() {
this.imgPassObj.desc = ''
this.showNoPassDialog = false
}
}
}
......@@ -117,6 +192,104 @@ export default {
top: 14px;
z-index: 2;
}
.tab_wrapper {
box-sizing: border-box;
padding: 20px;
}
.service_line_wrap {
padding: 16px 0;
}
.image_container {
display: flex;
flex-wrap: wrap;
.img_box {
margin-bottom: 16px;
margin-right: 16px;
.service_title {
margin: 8px 0;
}
.title {
font-size: 14px;
font-weight: 400;
color: #333333;
}
// .tip{
// width: 60%;
// overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
// }
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.img_pannel {
width: 216px;
height: 135px;
margin: 8px 0;
border: 1px solid #e5e5e5;
background: #f5f5f5;
position: relative;
border-radius: 4px;
.errMsg {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
min-height: 44px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
z-index: 10;
}
}
.uplpad_pannel {
background: #f5f5f5;
.file_1 {
position: absolute;
opacity: 0;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
}
.errBorder {
border: 1px solid #ff5257;
}
.footer_btn {
display: flex;
align-items: center;
// justify-content: center;
.up_wrap {
position: relative;
font-size: 14px;
font-weight: 400;
color: #5850ff;
margin-left: 20px;
cursor: pointer;
.file {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 28px;
height: 23px;
z-index: 10;
}
}
}
.marlr20 {
margin-left: 20px;
}
}
}
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
......
<template>
<div>
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content pad20">
<div class="code text_14_4_333">核销码:{{ repotData.writeOffCode }}</div>
<div class="pannel flex_wrap">
<div v-for="(item, index) in watchData" :key="index" class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>{{ item.name }}</span>
</div>
<div class="value text_14_4_333">{{ item.value }}</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">报案信息(店面补充)</div>
<div class="content pad20">
<div class="pannel flex_wrap">
<div class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>经办人:</span>
</div>
<div class="value text_14_4_333">{{ repotData.handlerName }}</div>
</div>
<div class="line flex_sc">
<div class="label text_14_4_666">
<span style="color: #eb4e4e">*</span>
<span>经办人联系号码:</span>
</div>
<div class="value text_14_4_333">{{ repotData.handlerPhone }}</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">维修信息</div>
<div class="content pad20">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="(item, index) in itemsList">
<div :key="index" class="wrapper">
<div class="name">{{ item.serviceItemName }}</div>
<div style="height: 36px" class="messag flex_scb">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:{{ repotData.applyAmount || 0 }}元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:{{ repotData.approveAmount || 0 }}元</span>
</span>
</div>
</div>
</div>
<div v-if="repotData.bankAccountDTO" class="element_wrap ma21">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio value="1" label="1">{{repotData.bankAccountDTO.objectType?'其他':'店面'}}</el-radio>
</div>
<div class="pannel_box">
<template v-for="(item, index) in accountList">
<div :key="index" class="line flex_sc">
<div class="lab">
<span style="color: #eb4e4e">*</span>
<span>{{ item.name }}</span>
</div>
<div class="tip" style="width: 160px">{{ item.value }}</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="widget ma16">
<div class="title">上传资料</div>
<div class="cotent pad20">
<el-tabs class="tabs" v-model="activeName" @tab-click="changeTabs">
<el-tab-pane v-for="(item, index) in images" :key="index" :label="item.firstClassifyName">
<div v-if="item.firstClassifyName.indexOf('其他') == -1" class="image_container">
<div v-for="(img, i) in images[currentIndx].secondClassifyList" :key="i" class="img_box">
<template v-if="img.attachmentList.length">
<div v-if="img.serviceItemName" class="service_title">{{ img.serviceItemName }}</div>
<div class="title_tip">
<i v-if="img.attachmentList[0].auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.attachmentList[0].auditStatus == 0" class="el-icon-error error"></i>
<span>{{ img.secondClassifyName }}</span>
</div>
<div class="img_pannel flex_cc" :class="[{ errBorder: img.attachmentList[0].auditStatus == 0 }]">
<el-image :preview-src-list="[img.attachmentList[0].attachmentFile]" v-if="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" />
<div v-if="img.attachmentList[0].auditStatus == 0" class="errMsg flex_cc">{{ img.attachmentList[0].reasonForFailure }}</div>
</div>
</template>
</div>
</div>
<div v-else class="image_container">
<div v-for="(img, i) in images[currentIndx].allImages" :key="i" class="img_box">
<div class="title_tip">
<i v-if="img.auditStatus == 1" class="el-icon-success success"></i>
<i v-else-if="img.auditStatus == 0" class="el-icon-error error"></i>
<span>图片{{ i + 1 }}</span>
</div>
<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>
<img v-else :src="cameraUrl" style="width: 40px; height: 40px" />
<div v-if="img.auditStatus == 0" class="errMsg flex_cc">{{ img.reasonForFailure }}</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isCheck="true" :supplementList="repotData.supplementList1"></explanation>
</div>
<!-- 其他信息 -->
<div>
<other-info :otherInfoData="otherInfoData"></other-info>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
export default {
name: 'watchPage',
components: {
explanation,
otherInfo
},
data() {
return {
currentIndx: 0,
activeName: '0'
}
},
props: {
repotData: Object,
watchData: Array,
accountList: Array,
itemsList: Array,
images: Array,
otherInfoData:Object
},
mounted() {},
methods: {
changeTabs(e) {
this.activeName = e.index.toString()
this.currentIndx = e.index
}
}
}
</script>
<style lang="scss" scoped>
.ma16 {
margin-top: 16px;
}
.ma21 {
margin-top: 21px;
}
.image_container {
display: flex;
flex-wrap: wrap;
.img_box {
margin-bottom: 16px;
margin-right: 16px;
.service_title {
margin: 8px 0;
}
.title_tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.img_pannel {
width: 216px;
height: 135px;
margin: 8px 0;
border: 1px solid #e5e5e5;
background: #f5f5f5;
position: relative;
border-radius: 4px;
.errMsg {
background: rgba(255, 82, 87, 0.5);
position: absolute;
left: 0;
right: 0;
bottom: 0;
min-height: 44px;
font-size: 12px;
font-weight: 400;
color: #ffffff;
z-index: 10;
}
}
.uplpad_pannel {
background: #f5f5f5;
.file_1 {
position: absolute;
opacity: 0;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
}
.errBorder {
border: 1px solid #ff5257;
}
.footer_btn {
display: flex;
align-items: center;
justify-content: center;
.up_wrap {
position: relative;
font-size: 14px;
font-weight: 400;
color: #5850ff;
margin-left: 20px;
cursor: pointer;
.file {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 28px;
height: 23px;
z-index: 10;
}
}
}
.marlr20 {
margin-left: 20px;
}
}
}
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.el-tabs__item {
height: 45px;
font-size: 16px;
font-weight: 500;
}
.pass-btn {
width: 216px;
display: flex;
padding: 0 20px;
box-sizing: border-box;
justify-content: space-around;
.el-button {
margin: 0;
}
}
}
</style>
......@@ -7,11 +7,11 @@
<div class="header_info_widget">
<span class="el-icon-warning"></span>
请注意:订单列表还有
<span class="count_num">0</span>
<span class="count_num">{{ orderCount.lossToBeDeterminedCount }}</span>
单待定损
<span class="count_num">0</span>
<span class="count_num">{{ orderCount.pendingClaimCount }}</span>
单待核赔
<span class="count_num">0</span>
<span class="count_num">{{ orderCount.ossFailCount }}</span>
单不通过退回处理,为保障客户权益,请尽快处理哦!
<!-- <span class="count_num">{{ orderCount.toBeCommitCount || 0 }}</span>
单待提交国任,
......@@ -31,6 +31,10 @@
</div>
</div>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -38,15 +42,66 @@
</div>
<!-- 历史赔付记录 -->
<GLDialog :hasFooter="false" title="历史赔付记录" mode="mid" :visible.sync="historyDialog">
<GLTable :hasPage="false" :tableParams="historyTableParams">
<GLDialog :close-on-press-escape="false" :close-on-click-modal="false" :hasFooter="false" title="历史赔付记录" mode="big" :visible.sync="historyDialog">
<GLTable :hasPage="false" :tableData="historyListData" :tableParams="historyTableParams">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="historybuttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</GLDialog>
</GLDialog>
<!-- 跟进记录 -->
<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>
<!-- 上传签名授权书 -->
<GLDialog title="上传图片" mode="mid" :visible.sync="showUpload" @onOk="toUploadSignImg" @onCancel="closeUpload">
<div class="iamge_widget">
<div class="label">客户签名:</div>
<el-image :preview-src-list="[signImage]" v-if="signImage" style="width: 104px; height: 104px; border-radius: 4px; margin-right: 8px" :src="signImage" :fit="fit"></el-image>
<div class="upload flex_ccc">
<i class="el-icon-plus"></i>
<span class="tet">上传照片</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
</div>
</GLDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
//服务状态:0-待提交国任 1-待支付 2-校验不通过 3-支付成功 4-支付失败
const statusList = [
{
confId: '',
......@@ -71,12 +126,64 @@ const statusList = [
{
confId: 4,
confName: '支付失败'
},
{
confId: 5,
confName: '待受理'
},
{
confId: 6,
confName: '待定损'
},
{
confId: 7,
confName: '定损不通过'
},
{
confId: 8,
confName: '定损通过'
},
{
confId: 9,
confName: '待主管审核'
},
{
confId: 10,
confName: '主管审核不通过'
},
{
confId: 11,
confName: '待客户签字授权'
},
{
confId: 12,
confName: '待核赔'
},
{
confId: 13,
confName: '核赔不通过'
},
{
confId: 14,
confName: '核赔通过'
}
]
const tableStatus = ['待提交国任', '待支付', '校验不通过', '支付成功', '支付失败', '待受理', '待定损', '定损不通过', '定损通过', '待主管审核', '主管审核不通过', '待客户签字授权', '待核赔', '核赔不通过', '核赔通过']
const colors = ['#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#FDB757', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', '#2CCA74']
// 操作对应状态
const WATCH = [5, 7, 13, 8, 9, 10, 11, 1, 3] // 查看
const FOLLOW_HISTORY = [5, 6, 12, 7, 13, 8, 9, 10, 11, 2, 1, 3] //跟进记录和历史赔付
const CHECK = [6, 12] // 审核
const RE_SUMBIT = [2] //重新提交
const RETURN_IT = [7, 13] // 撤销
const UPLOAD_INFO = [11] // 上传资料
export default {
name: 'index',
data() {
return {
signImage: '',
showUpload: false,
tableStatus,
orderCount: {},
buttonList: [
{
......@@ -84,6 +191,9 @@ export default {
name: row => {
return '审核'
},
condition: row => {
return CHECK.includes(row.scope.status)
},
attrs: {
type: 'text'
},
......@@ -96,11 +206,14 @@ export default {
name: row => {
return '撤销'
},
condition: row => {
return RETURN_IT.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => () => {}
click: row => this.toReturnOrder(row.scope)
}
},
{
......@@ -108,11 +221,14 @@ export default {
name: row => {
return '跟进记录'
},
condition: row => {
return FOLLOW_HISTORY.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => () => {}
click: row => this.showFollow(row.scope)
}
},
{
......@@ -120,39 +236,29 @@ export default {
name: row => {
return '历史赔付'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.showHistory()
}
},
{
type: 'el-button',
name: row => {
return '上传'
condition: row => {
return FOLLOW_HISTORY.includes(row.scope.status)
},
attrs: {
type: 'text'
},
listeners: {
click: row => () => {}
click: row => this.showHistory(row)
}
},
{
type: 'GLButton',
type: 'el-button',
name: row => {
return '去处理'
return '上传资料'
},
condition: row => {
return [0].includes(row.scope.status)
return UPLOAD_INFO.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '去处理'
type: 'text'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
click: row => this.touploadSign(row.scope)
}
},
{
......@@ -161,7 +267,7 @@ export default {
return '查看'
},
condition: row => {
return [1, 3, 4].includes(row.scope.status)
return WATCH.includes(row.scope.status)
},
attrs: {
type: 'text',
......@@ -177,18 +283,18 @@ export default {
return '重新提交'
},
condition: row => {
return [2].includes(row.scope.status)
return RE_SUMBIT.includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '重新提交'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
click: row => this.handleEdit(6, row.scope)
}
}
],
getListApi: this.$apis.claims.getclaimsList,
getListApi: this.$apis.claims.getGHClaimsListApi,
sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -208,7 +314,8 @@ export default {
name: 'searchText',
type: 'input',
isClear: true,
maxlength: 200
maxlength: 200,
placeholder: '客户|合同号|报案号'
// isHide: true
},
{
......@@ -301,7 +408,7 @@ export default {
{
label: '价格区间',
prop: 'priceSection',
width: 100,
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
......@@ -334,11 +441,12 @@ export default {
{
label: '服务状态',
prop: 'status',
width: 120,
formatter: cellValue => {
if (!cellValue) return '-'
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
}
width: 200,
addHtml: 'colorStatus'
// formatter: cellValue => {
// if (!cellValue) return '-'
// return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
// }
},
{
label: '状态描述',
......@@ -350,28 +458,28 @@ export default {
}
},
{
label: '申请金额',
prop: 'applyAmoumt',
width: 100,
label: '申请金额/元',
prop: 'applyAmount',
width: 150,
align: 'right',
formatter: cellValue => {
return cellValue.applyAmoumt || '-'
return cellValue.applyAmount || '-'
}
},
{
label: '批准金额',
label: '批准金额/元',
prop: 'approvalAmount',
width: 100,
width: 150,
align: 'right',
formatter: cellValue => {
return cellValue.approvalAmount || '-'
}
},
{
label: '支付金额',
label: '支付金额/元',
prop: 'paymentAmount',
align: 'right',
width: 100,
width: 150,
formatter: cellValue => {
return cellValue.paymentAmount || '-'
}
......@@ -387,92 +495,187 @@ export default {
{
label: '操作',
prop: '',
width: 170,
width: 230,
fixed: 'right',
addHtml: 'table-btns'
}
]
},
historyDialog:false,
historyTableParams:{
historyDialog: false,
historyTableParams: {
listName: 'list',
tableOption: false,
tableColumns:[
tableColumns: [
{
label: '申请时间',
prop: 'applyDate',
width: 180,
prop: 'merchantCommitDate',
width: 200,
formatter: cellValue => {
return cellValue.merchantCommitDate ? dayjs(cellValue.merchantCommitDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '申请服务',
prop: 'applyService',
width: 180,
prop: 'serviceName',
width: 200,
line: 1
},
{
label: '服务状态',
prop: 'applyStatus',
width: 180,
addHtml:'status'
prop: 'status',
width: 200,
addHtml: 'colorStatus'
},
{
label: '支付金额/元',
minWidth: 180,
prop: 'payPrice',
prop: 'paymentAmount',
formatter: cellValue => {
return cellValue.paymentAmount || '--'
}
},
{
label: '核销码',
width: 180,
prop: 'writeOffCode',
prop: 'writeOffCode'
},
{
label: '操作',
prop: '',
width: 110,
width: 80,
fixed: 'right',
addHtml: 'table-btns'
}
]
}
},
historybuttonList: [
{
type: 'el-button',
name: row => {
return '详情'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
}
],
historyListData: [],
followDialog: false,
followListData: [],
followDialogTitle: '跟进记录',
followOkText: '新增',
followEditStatus: false,
followContent: '',
followResult: false,
colors
}
},
created() {
this.diffHost()
this.getClaimsCount()
},
mounted() {
// this.handleUploadBefore()
},
mounted() {},
methods: {
showHistory(){
showFollow(row) {
this.followDialog = true
this.curentFollowInfo = row
this.followListData = []
this.getFollowList(row)
},
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
})
},
getHistoryList(contractNo) {
this.$apis.claims.getGHhistoryListApi({ contractNo }).then(res => {
this.historyListData = res || []
})
},
showHistory(row) {
this.historyDialog = true
this.getHistoryList(row.scope.contractNo)
},
getClaimsCount() {
this.$apis.claims.getclaimsCount({}).then(res => {
this.$apis.claims.getGHCountApi({}).then(res => {
this.orderCount = res
})
},
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1
// if (!this.showGh) this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
},
// 1.新增 2.查看 3.重新提交 4.去处理 5.审核
// 1.新增 2.查看 6.重新提交 4.去处理 5.审核
handleEdit(editNo, row) {
let urlParam = {
editNo,
// isGH: this.showGh,
isGH: true,
contractNo: editNo == 1 ? '' : row.contractNo, // 嘀加的用合同号
orderId: editNo == 1 ? '' : row.id
}
if (this.showGh) {
// 广汇的用核销码
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
let urlParam = {}
if (editNo != 1 && editNo != 6) {
urlParam = {
editNo,
isGH: true,
writeOffCode: row.writeOffCode,
orderId: row.id,
status: row.status
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/ghOrder/' + temp })
} else {
urlParam = {
editNo,
isGH: true,
writeOffCode: editNo == 6 ? row.writeOffCode : '',
orderId: editNo == 6 ? row.writeOffCode : '',
status: editNo == 6 ? row.writeOffCode : ''
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp })
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/ghOrder/' + temp })
},
handleOkFn() {
this.getParams()
......@@ -506,7 +709,7 @@ export default {
},
exportList() {
const parmas = { ...this.getParams() }
this.$apis.claims.exportClaimsData(parmas).then(data => {
this.$apis.claims.exportGHClaimsListApi(parmas).then(data => {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
......@@ -514,6 +717,65 @@ export default {
document.body.appendChild(a)
a.click()
})
},
toReturnOrder(row) {
let para = {
id: row.id,
auditStatus: -1,
status: row.status
}
this.$confirm('是否确认撤销?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.claims.cancelClaims(para).then(res => {
this.$refs.equityRef.refreshTable()
if (res) {
this.$message({
message: '撤销成功',
type: 'success'
})
}
})
})
},
touploadSign(row) {
this.showUpload = true
this.uploadItem = row
},
toUploadSignImg() {
this.saveSignImge()
this.closeUpload()
},
closeUpload() {
this.showUpload = false
},
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.signImage = res
})
}
},
saveSignImge() {
let para = {
writeOffCode: this.uploadItem.writeOffCode,
signUrl: this.signImage
}
this.$apis.claims.saveSign(para).then(res => {
this.$message({
message: '上传成功',
type: 'success'
})
this.getTableData()
})
}
}
}
......@@ -562,6 +824,65 @@ export default {
.el-button + .el-button {
margin-left: 8px;
}
.wrap_time_line {
.col {
margin-top: 30px;
display: flex;
}
.label {
width: 154px;
font-size: 14px;
font-weight: 400;
color: #333333;
text-align: right;
}
.el-timeline-item:first-child {
/deep/ .el-timeline-item__node {
background: #5850ff !important;
}
}
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.iamge_widget {
margin-top: 20px;
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #333333;
}
.upload {
width: 104px;
height: 104px;
font-size: 14px;
font-weight: 400;
color: #666666;
background: rgba(0, 0, 0, 0.04);
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
position: relative;
.tet {
margin-top: 13px;
}
.file {
position: absolute;
width: 104px;
height: 104px;
left: 0;
top: 0;
opacity: 0;
z-index: 2;
cursor: pointer;
}
}
}
// /deep/ .el-form {
// .el-form-item {
......
<template>
<div id="writeOff" class="writeOff">
<Card title="报案信息(客户提交)" class="custom-info">
<div class="code">
<span>核销码:</span>
<span>{{ customObj.writeOffCode }}</span>
<div class="order-container-page">
<template v-if="pageType == 2">
<WatchData :otherInfoData.sync="otherInfoData" :images="insuranceAttachmentConfigs" :itemsList.sync="itemList" :repotData.sync="repotData" :accountList.sync="accountList" :watchData.sync="watchData"></WatchData>
</template>
<template v-else-if="pageType == 5 && routeInfo.status < 11">
<CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</template>
<template v-else-if="pageType == 5 && routeInfo.status > 10">
<div class="tab_wrap">
<el-tabs v-model="activeName">
<el-tab-pane class="bg" label="核赔信息" name="first">
<CheckClaims @changeObjectType="changeObjectType" :insuranceAttachmentConfigs.sync="claimsAttachmentConfigs" :repotData.sync="repotData" :itemsList.sync="itemList" :accountForm.sync="accountForm"></CheckClaims>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">
<CheckData :otherInfoData.sync="otherInfoData" :itemList.sync="itemList" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs" :repotData.sync="repotData"></CheckData>
</el-tab-pane>
</el-tabs>
</div>
<glsx-combi-form ref="customRef" :formRules="customRule" labelWidth="154px" defaultWidth="350px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
</Card>
</template>
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" slot-scope="scope" class="amount-wrap">
<div v-for="(item, index) in scope.scope.optionList" :key="index">
<el-checkbox v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ totalPrice.toFixed(2) }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
<!-- 上传图片 -->
<upload-material></upload-material>
<!-- 底部按钮 -->
<div v-if="pageType != 2" class="btn-box">
<el-button plain class="btn-three" @click="toBackList">取消</el-button>
<el-button plain class="btn-three" @click="toSaveOrder">保存</el-button>
<el-button plain @click="toNoPassOrder">不通过</el-button>
<el-button type="primary" @click="toPassOrder">通过</el-button>
</div>
<!-- 案件补充说明 -->
<explanation :obj="explanationObj"></explanation>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
<!-- 弹窗 -->
<!-- 其他信息 -->
<other-info></other-info>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" v-if="showNoPassDialog" :visible.sync="showNoPassDialog" @onOk="submitForm(2)" @onCancel="cancelDialog(2)">
<glsx-combi-form ref="noPassRef" :isInline="false" :formRules="noPassRule" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="comfirmNoPass" @onCancel="cancleNoPass">
<glsx-combi-form ref="noPassRef" :isInline="false" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<GLDialog class="gl-form-page gl-form-min" title="审核通过,请输入批准金额" mode="mid" v-if="showPassedDialog" :visible.sync="showPassedDialog" @onOk="submitForm(1)" @onCancel="cancelDialog(1)">
<GLDialog class="gl-form-page gl-form-min" title="审核通过,请输入批准金额" mode="mid" :visible.sync="showPassedDialog" @onOk="comfirmPass" @onCancel="canclePass">
<div class="passed-wrap">
<div class="passed-item" v-for="(item, index) in testServiceList" :key="index">
<div class="passed-item" v-for="(item, index) in itemList" :key="index">
<span class="name">{{ item.serviceItemName }}</span>
<div class="set-price">
<li>
......@@ -52,84 +44,69 @@
</li>
<li>
<label for="">定损批准金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.applyAmount"></el-input>
</li>
</div>
</div>
</div>
</GLDialog>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
<div class="btn-box">
<el-button plain class="btn-three" @click="handleCancel">取消</el-button>
<el-button plain class="btn-three" @click="handleCancel">保存</el-button>
<el-button plain @click="handleVerify(2)">不通过</el-button>
<el-button type="primary" @click="handleVerify(1)">通过</el-button>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs'
import WatchData from './components/watch/index.vue'
import CheckData from './components/check/index.vue'
import CheckClaims from './components/checkClaims/index.vue'
import qrCode from '@/components/qr-code'
import uploadMaterial from './components/uploadMaterial'
import otherInfo from './components/otherInfo.vue'
import explanation from './components/explanation'
import Card from './components/card.vue'
import util from '@/util/util'
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]{8}$/
const testServiceList = [
{
"serviceItemCode" : "SC0002",
"serviceItemName" : "车辆置换补偿服务",
"approveAmount" : null,
"checked":false
}, {
"serviceItemCode" : "SC0005",
"serviceItemName" : "轮胎更换补偿服务",
"approveAmount" : null,
"checked":false
}, {
"serviceItemCode" : "SC0006",
"serviceItemName" : "钥匙及车牌重置服务",
"approveAmount" : null,
"checked":false
}, {
"serviceItemCode" : "SC0007",
"serviceItemName" : "玻璃太阳膜更换补偿服务",
"approveAmount" : null,
"checked":false
}, {
"serviceItemCode" : "SC0009",
"serviceItemName" : "车辆补漆补偿服务",
"approveAmount" : null,
"checked":false
}, {
"serviceItemCode" : "SC0011",
"serviceItemName" : "代步车费用补偿服务",
"approveAmount" : null,
"checked":false
}
]
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'addwriteOff',
name: 'ghOrder',
components: {
glsxCombiForm,
WatchData,
CheckData,
CheckClaims,
qrCode,
uploadMaterial,
otherInfo,
explanation,
Card
glsxCombiForm
},
data() {
return {
testServiceList,
routeInfo: {},
pageType: 1,
watchData: [], // 查看状态下
accountList: [],
repotData: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddr: '',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
activeName: 'first',
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
// 弹窗
showNoPassDialog: false,
showPassedDialog: false,
noPassObj:{
reason:'',
desc:''
noPassObj: {
reason: '',
desc: ''
},
noPassForm:[
noPassForm: [
{
label: '原因:',
name: 'reason',
......@@ -144,318 +121,540 @@ export default {
inputType: 'textarea',
rows: 3,
isClear: true
},
],
customRule: {
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
description:[{ required: true, message: '请输入出险经过描述', trigger: 'change' }],
reporterDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [{ required: true, message: '请选择出险日期', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险地点', trigger: 'change' }],
reporterPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
handlerPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
]
},
customObj: {
writeOffCode: 'dasdasdasd',
reporterName: '张权',
reporterPhone: '13097951885',
reporterDate: '2020-10-12',
reimbursementDate: '2020-10-12',
reimbursementAddr: '深圳市南山南苑借调dsa打算',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
customForm: [
{
label: '报案人',
name: 'reporterName',
type: 'showTxt'
},
{
label: '报案人电话',
name: 'reporterPhone',
type: 'showTxt'
},
{
label: '报案日期',
name: 'reporterDate',
type: 'showTxt'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'showTxt'
},
{
label: '出险地点',
name: 'reimbursementAddr',
type: 'showTxt'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险经过描述',
name: 'description',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: testServiceList,
addHtml: 'approveAmountSlot',
}
],
explanationObj:{
explanation1:''
}
}
},
computed: {
totalPrice() {
const target = this.handlerForm.find(item => item.name=='serviceCodes')
let total = target.optionList.reduce(function(prev, cur) {
let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
testServiceList: [],
insuranceAttachmentConfigs: [],
itemList: [],
otherInfoData: {},
claimsAttachmentConfigs: []
}
},
mounted() {
// 获取页面传参:主要是编辑状态和订单状态
// 5 审核+定损 审核+核赔
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.writeOffCode) {
this.getDetailData(this.routeInfo.writeOffCode)
}
},
methods: {
validPrice(e,id){
const target = this.handlerForm.find(item => item.name=='serviceCodes')
let checkPlan = '' + target.optionList[id].approveAmount
checkPlan = checkPlan.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(target.optionList[id], 'approveAmount' , checkPlan)
},
changePrice(e,id){
if(!e.target.value) return;
const len = e.target.value.length
let lastStr = e.target.value.charAt(len-1)
if(lastStr==='.'){
this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1))
}
const minPrice = 1
if(Number(e.target.value)<minPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , 1)
}
const maxPrice = 2000000
if(Number(e.target.value)>maxPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice)
}
},
handleSave() {
console.log(this.explanationForm,this.explanationObj)
// this.$refs.customRef.$refs.formRef.validate(valid => {
// if (valid) {
// this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
// if (secondValid) {
// let params = {...this.customObj}
// params.reimbursementDate = util.dateFormat(this.customObj.reimbursementDate, 'YYYY-MM-DD HH:mm:ss')
// params.reporterDate = util.dateFormat(this.customObj.reporterDate, 'YYYY-MM-DD HH:mm:ss')
// this.$apis.beforeSale.saveWriteOff({ ...params }).then(res => {
// if (res.code == '0') {
// this.$message({
// message: '保存成功',
// type: 'success'
// })
// this.$router.push({
// path: '/beforeSale/index'
// })
// } else {
// this.gotoValidView('writeOff')
// this.$message({
// message: res.message,
// type: 'error'
// })
// }
// })
// } else {
// this.gotoValidView('reporterName')
// }
// })
// } else {
// this.gotoValidView('reporterName')
// }
// })
},
gotoValidView(id) {
document.getElementById(id) && document.getElementById(id).scrollIntoView()
},
handleCancel() {
this.$router.push({
path: '/beforeSale/index'
// 获取订单详情
getDetailData(writeOffCode) {
this.$apis.claims.getGHClaimsDetailApi({ writeOffCode }).then(res => {
if (!res.supplementList1?.length) {
res.supplementList1 = []
res.supplementList1.push({ content: '', claimsId: res.id })
}
this.orderMsg = {
id: res.id,
status: res.status
}
this.repotData = {
writeOffCode: res.writeOffCode,
reporterName: res.reporterName,
reporterPhone: res.reporterPhone,
reportDate: dayjs(res.reportDate).format('YYYY-MM-DD HH:mm:ss'),
reimbursementDate: dayjs(res.reimbursementDate).format('YYYY-MM-DD HH:mm:ss'),
reimbursementAddr: res.reimbursementAddr,
handlerName: res.handlerName,
handlerPhone: res.handlerPhone,
serviceCodes: [],
reimbursementProvinceName: res.reimbursementProvinceName || '',
reimbursementCityName: res.reimbursementCityName || '',
reimbursementCountiesName: res.reimbursementCountiesName || '',
contractNo: res.contractNo,
reimbursementAddress: [res.reimbursementProvinceCode, res.reimbursementCityCode, res.reimbursementCountiesCode],
reimbursementProvinceCode: res.reimbursementProvinceCode,
reimbursementCityCode: res.reimbursementCityCode,
reimbursementCountiesCode: res.reimbursementCountiesCode,
reimbursementProcess: res.reimbursementProcess,
approveAmount: res.approveAmount ? (res.approveAmount / 100).toFixed(2) : res.approveAmount,
applyAmount: res.applyAmount ? (res.applyAmount / 100).toFixed(2) : res.applyAmount,
supplementList1: res.supplementList1,
supplementList2: res.supplementList2,
bankAccountDTO: res.bankAccountDTO,
attachments1: res.attachments1,
attachments2: res.attachments2,
attachments3: res.attachments3
}
// 图片list
res.insuranceAttachmentConfigs.map(item => {
let arr = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
arr.push(ele)
})
})
item.allImages = arr
}
// if (item.firstClassifyName.indexOf('定损') != -1) {
// item.secondClassifyList.forEach((el, index) => {
// })
// }
})
res.claimsAttachmentConfigs.map(item => {
let arr = []
if (item.firstClassifyName.indexOf('其他') != -1) {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
arr.push(ele)
})
})
item.allImages = arr
} else {
item.secondClassifyList.forEach(el => {
if (!el.attachmentList.length) {
el.attachmentList.forEach(ele => {
;(ele.auditStatus = null), (ele.attachmentFile = '')
ele.reasonForFailure = ''
})
}
})
}
})
this.insuranceAttachmentConfigs = res.insuranceAttachmentConfigs
this.claimsAttachmentConfigs = res.claimsAttachmentConfigs
// 服务list
res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
this.$set(item, 'checked', true)
})
this.itemList = res.itemsList
this.handlerWatch(this.repotData, 1)
this.handlerWatch(res.bankAccountDTO, 2)
// this.getAccountInfo(res.contractNo)
this.getOtherInfo(res.contractNo)
if (res.bankAccountDTO) {
this.accountForm = res.bankAccountDTO
}
})
},
handleVerify(val){
// val == 1 通过 ,2 不通过
if( val==1 ){
this.showPassedDialog = true
}else{
this.showNoPassDialog = true
// 处理查看状态下数据展示
handlerWatch(obj, type) {
if (type == 1) {
this.watchData = [
{
name: '报案人:',
value: obj.reporterName
},
{
name: '报案人电话:',
value: obj.reporterPhone
},
{
name: '报案日期:',
value: obj.reportDate
},
{
name: '出险日期:',
value: obj.reimbursementDate
},
{
name: '出险地点:',
value: obj.reimbursementProvinceName + obj.reimbursementCityName + obj.reimbursementCountiesName + obj.reimbursementAddr
}
]
} else if (type == 2) {
if (!obj) return
this.accountList = [
{
name: '开户行名称:',
value: obj.openBankName
},
{
name: '账户名称:',
value: obj.accountName
},
{
name: '收款账号:',
value: obj.accountNo
},
{
name: '收款账号所在省市:',
value: obj.accountCityName
},
{
name: '收款人证件类型:',
value: obj.cardTypeName
},
{
name: '收款人证件号码:',
value: obj.cardNo
},
{
name: '收款人联系电话:',
value: obj.phone
}
]
}
},
submitForm(val){
changeObjectType(newVal) {
console.log(newVal)
// if (newVal === 1) {
// this.saveObj.objectType = newVal
// delete this.saveObj.handlerName
// delete this.saveObj.handlerPhone
// this.accountForm = { ...this.accountForm, ...this.saveObj }
// } else {
// this.saveObj = { ...this.accountForm }
// this.getAccountInfo(this.editForm.contractNo)
// }
},
// 获取收款对象数据
// getAccountInfo(contractNo) {
// if (!contractNo) return
// this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
// const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
// const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
// this.accountForm = { ...this.accountForm, ...result }
// if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
// if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
// })
// },
submitForm(val) {
// val == 1 通过 ,2 不通过
this.cancelDialog(val)
},
cancelDialog(val){
cancelDialog(val) {
// val == 1 通过 ,2 不通过
if( val==1 ){
if (val == 1) {
this.showPassedDialog = false
}else{
} else {
this.showNoPassDialog = false
}
},
}
}
</script>
<style lang="scss" scoped>
.writeOff {
/deep/ .el-form-item__label {
padding: 0;
}
.custom-info {
.code {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
line-height: 36px;
width: 100%;
height: 36px;
margin-bottom: 20px;
padding: 0 20px;
background: #f9f9f9;
}
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
}
}
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.unit-price {
background: #f9f9f9;
padding: 20px;
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
// 获取其他信息
getOtherInfo(contractNo) {
this.$apis.claims.getOrderOherInfo({ contractNo }).then(res => {
if (res) {
res.expirationDate = res.expirationDate ? dayjs(res.expirationDate).format('YYYY-MM-DD HH:mm:ss') + ' 至 ' + res.effectiveDate : '2019-12-12 23:59:59'
res.billingDate = res.billingDate && dayjs(res.billingDate).format('YYYY-MM-DD HH:mm:ss')
this.otherInfoData = { ...res, contractNo }
}
})
},
// 通过订单
toPassOrder() {
if (this.orderMsg.status == 12) {
this.hepeiPass()
return
}
.el-input {
width: 432px;
margin-right: 60px;
this.showPassedDialog = true
},
handleJieGpu(type) {
let target = {}
let arr = []
if (type == 3) {
this.repotData.attachments3.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
obj.auditStatus = 1
arr.push(obj)
})
return arr
}
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-bottom: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
if (type == 2) {
this.repotData.attachments2.forEach(el => {
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = el
let obj = { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy }
obj.auditStatus = 1
arr.push(obj)
})
return arr
}
if (type == 4) {
let { id, merchantId, cardTypeName, objectType, accountType, openBankCode, accountName, accountNo, accountCityCode, cardTypeCode, phone, cardNo } = this.accountForm
target = { id, merchantId, cardTypeName, objectType, accountType, openBankCode, accountName, accountNo, accountCityCode, cardTypeCode, phone, cardNo }
return target
}
},
hepeiPass() {
let obj = this.handlerServices()
let exobj = this.handlerExplain()
let para = {
...this.orderMsg,
attachments3: this.handleJieGpu(3),
attachments2: this.handleJieGpu(2),
...obj,
...exobj,
bankAccount: this.handleJieGpu(4),
auditStatus: 1,
reasonForFailure: '',
writeOffCode: this.repotData.writeOffCode
}
this.$apis.claims.checkClaimsOrderApi(para).then(res => {
this.$message({
message: '审核成功',
type: 'success'
})
})
},
comfirmPass() {
let para = this.handleParams()
para.auditStatus = 1
this.$apis.claims.checkOrderApi(para).then(res => {
if (res) {
this.$message({
message: '审核成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
}
label {
width: 154px;
flex-shrink: 0;
display: inline-block;
text-align: right;
})
},
canclePass() {
this.showPassedDialog = false
},
// 不通过
toNoPassOrder() {
this.showNoPassDialog = true
},
comfirmNoPass() {
console.log(this.noPassObj)
let para = this.handleParams()
para.auditStatus = 0
para.reasonForFailure = this.noPassObj.reason + this.noPassObj.desc
this.$apis.claims.checkOrderApi(para).then(res => {
if (res) {
this.$message({
message: '审核成功',
type: 'success'
})
this.$router.push({ path: '/claims/ghIndex' })
}
})
// this.cancleNoPass()
},
cancleNoPass() {
this.showNoPassDialog = false
},
// 处理定损提交参数
handleParams() {
let itemsObj = this.handlerServices()
let imageObj = this.hanlerImg()
let explainObj = {}
if (this.orderMsg.status != 12) {
explainObj = this.handlerExplain()
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
padding: 0 16px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
let para = {
...explainObj,
...imageObj,
...itemsObj,
...this.orderMsg,
writeOffCode: this.repotData.writeOffCode,
contractNo: this.repotData.contractNo,
reporterName: this.repotData.reporterName,
reporterPhone: this.repotData.reporterPhone,
reportDate: this.repotData.reportDate,
reimbursementDate: this.repotData.reimbursementDate,
handlerName: this.repotData.handlerName,
handlerPhone: this.repotData.handlerPhone,
reimbursementCountiesCode: this.repotData.reimbursementCountiesCode,
reimbursementCityCode: this.repotData.reimbursementCityCode,
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount,
signatureAuth: this.repotData.signatureAuth || ''
}
.price {
color: #ff6d00;
font-size: 18px;
return para
},
// 案件补充说明
handlerExplain() {
let obj = {}
if (this.orderMsg.status == 12) {
this.repotData.supplementList2.forEach((item, index) => {
let idx = `supplementList2[${index}].id`
let claimsId = `supplementList2[${index}].claimsId`
let content = `supplementList2[${index}].content`
let suppType = `supplementList2[${index}].suppType`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType
}
Object.assign(obj, temp)
})
} else {
this.repotData.supplementList1.forEach((item, index) => {
let idx = `supplementList1[${index}].id`
let claimsId = `supplementList1[${index}].claimsId`
let content = `supplementList1[${index}].content`
let suppType = `supplementList1[${index}].suppType`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[content]: item.content,
[suppType]: item.suppType
}
Object.assign(obj, temp)
})
}
return obj
},
// 图片数据处理
hanlerImg() {
let imgs = []
if (this.orderMsg.status == 12) {
this.claimsAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
})
})
} else {
this.insuranceAttachmentConfigs.forEach((item, index) => {
item.secondClassifyList.forEach(el => {
el.attachmentList.forEach(ele => {
ele.secondClassifyName = el.secondClassifyName
imgs.push(ele)
})
})
})
}
let obj = {}
let type = this.orderMsg.status == 12 ? 2 : 1
imgs.forEach((item, index) => {
let idx = `attachments${type}[${index}].id`
let claimsId = `attachments${type}[${index}].claimsId`
let secondClassifyName = `attachments${type}[${index}].secondClassifyName`
let attachmentCode = `attachments${type}[${index}].attachmentCode`
let attachmentFile = `attachments${type}[${index}].attachmentFile`
let attachmentType = `attachments${type}[${index}].attachmentType`
let attachmentName = `attachments${type}[${index}].attachmentName`
let auditStatus = `attachments${type}[${index}].auditStatus`
let reasonForFailure = `attachments${type}[${index}].reasonForFailure`
let auditBy = `attachments${type}[${index}].auditBy`
let classifyId = `attachments${type}[${index}].classifyId`
let temp = {
[idx]: item.id,
[claimsId]: this.orderMsg.id,
[secondClassifyName]: item.secondClassifyName,
[attachmentCode]: item.attachmentCode,
[attachmentFile]: item.attachmentFile,
[attachmentType]: item.attachmentType,
[attachmentName]: item.attachmentName,
[auditStatus]: item.auditStatus,
[reasonForFailure]: item.reasonForFailure,
[auditBy]: item.auditBy,
[classifyId]: item.classifyId
}
Object.assign(obj, temp)
})
return obj
},
// 服务项目数据处理
handlerServices() {
let itemObj = {}
this.itemList.forEach((item, index) => {
let idx = `itemsList[${index}].id`
let serviceItemCode = `itemsList[${index}].serviceItemCode`
let serviceItemName = `itemsList[${index}].serviceItemName`
let writeOffCode = `itemsList[${index}].writeOffCode`
let contractNo = `itemsList[${index}].contractNo`
let approveAmount = `itemsList[${index}].approveAmount`
let applyAmount = `itemsList[${index}].applyAmount`
let claimsId = `itemsList[${index}].claimsId`
let lossType = `itemsList[${index}].lossType`
let temp = {
[idx]: item.id,
[serviceItemCode]: item.serviceItemCode,
[serviceItemName]: item.serviceItemName,
[writeOffCode]: this.repotData.writeOffCode,
[contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? Number(item.approveAmount) * 100 : 0,
[applyAmount]: item.applyAmount ? Number(item.applyAmount) * 100 : 0,
[claimsId]: this.orderMsg.id,
// [createdDate]: item.id,
// [createdBy]: item.createdBy,
// [updatedDate]: item.createdDate,
// [updatedBy]: item.updatedBy,
// [deletedFlag]: item.deletedFlag,
[lossType]: item.lossType
}
Object.assign(itemObj, temp)
})
return itemObj
},
// 保存草稿参数
savePara() {
// const operation = this.orderMsg.status == 12 ? 2 : 0
const operation = 0
let itemObj = this.handlerServices()
let imgObj = this.hanlerImg()
let explainObj = this.handlerExplain()
let para = {
...itemObj,
...imgObj,
...explainObj,
operation,
...this.orderMsg,
writeOffCode: this.repotData.writeOffCode,
contractNo: this.repotData.contractNo,
reporterName: this.repotData.reporterName,
reporterPhone: this.repotData.reporterPhone,
reportDate: this.repotData.reportDate,
reimbursementDate: this.repotData.reimbursementDate,
handlerName: this.repotData.handlerName,
handlerPhone: this.repotData.handlerPhone,
reimbursementCountiesCode: this.repotData.reimbursementCountiesCode,
reimbursementCityCode: this.repotData.reimbursementCityCode,
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount
}
let claims = {
operation,
...itemObj,
...explainObj,
...this.orderMsg,
attachments3: this.handleJieGpu(3),
attachments2: this.handleJieGpu(2),
bankAccount: this.handleJieGpu(4),
writeOffCode: this.repotData.writeOffCode
}
return this.orderMsg.status == 12 ? claims : para
},
// 保存订单
toSaveOrder() {
let para = this.savePara()
const name = this.orderMsg.status == 12 ? 'saveClaimsCG' : 'saveCG'
this.$apis.claims[name](para).then(res => {
this.$message({
message: '保存成功',
type: 'success'
})
this.toBackList()
})
},
// 返回上一页
toBackList() {
this.$router.push({ path: '/claims/ghIndex' })
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
}
</script>
<style lang="scss" scoped>
.passed-wrap {
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
......@@ -492,9 +691,10 @@ export default {
}
}
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
</style>
</style>
\ No newline at end of file
<template>
<div id="writeOff" class="writeOff">
<div v-if="false">
<template v-if="routeInfo.status != 12 && routeInfo.status != 14">
<!-- 非新建核赔订单详情 -->
<Card title="报案信息(客户提交)" class="custom-info">
<div class="code">
<span>核销码:</span>
<span>{{ customObj.writeOffCode }}</span>
</div>
<glsx-combi-form ref="customRef" :formRules="customRule" labelWidth="154px" defaultWidth="350px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
</Card>
<!-- 定损店面补充 -->
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" slot-scope="scope" class="amount-wrap">
<div v-for="(item, index) in scope.scope.optionList" :key="index">
<el-checkbox v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ totalPrice.toFixed(2) }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
<!-- 上传图片 -->
<upload-material></upload-material>
<!-- 案件补充说明 -->
<explanation :obj="explanationObj"></explanation>
<!-- 其他信息 -->
<other-info></other-info>
<div class="btn-box">
<el-button plain class="btn-three" @click="handleCancel">取消</el-button>
<el-button plain class="btn-three" @click="handleCancel">保存</el-button>
<el-button plain @click="handleVerify(2)">不通过</el-button>
<el-button type="primary" @click="handleVerify(1)">通过</el-button>
</div>
</template>
<!-- 定损后到待核赔 -->
<template v-else>
<div class="tab_wrap">
<el-tabs v-model="activeName" @tab-click="changeTab">
<el-tab-pane class="bg" label="核赔信息" name="first">
<div class="widget">
<div class="title">维修信息</div>
<div class="content">
<div class="element_wrap">
<div class="label">批准金额:</div>
<div class="pannel">
<template v-for="index in 1">
<div :key="index" class="wrapper">
<div class="name">权益套餐A</div>
<div class="messag flex_scb">
<div class="ms">
<span>预估损失金额/元:</span>
<span class="price">888</span>
</div>
<div class="ms">
<span>定损批准金额:</span>
<span class="price">6666</span>
</div>
</div>
</div>
</template>
<div class="total flex_scb">
<span>合计</span>
<span>
<span>预估损失金额:2160元</span>
<span style="margin: 0 10px">|</span>
<span>定损批准金额:1800元</span>
</span>
</div>
</div>
</div>
<div class="element_wrap martop21">
<div class="label">收款对象:</div>
<div class="pannel">
<div class="wrapper">
<div class="name">
<el-radio value="1" label="1">店面</el-radio>
</div>
<div class="pannel_box">
<template v-for="index in 9">
<div :key="index" class="line flex_sc">
<div class="lab">
<span style="color: #eb4e4e">*</span>
<span>开户行名称:</span>
</div>
<div class="tip">招商银行泰阳支行</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">定损信息</el-tab-pane>
</el-tabs>
</div>
</template>
</div>
<template v-if="routeInfo.status != 12 && routeInfo.status != 14">
<div class="order_container">
<div class="report">
<report ref="reportRef" :isGH="true" :pageType="3" :editForm.sync="editForm"></report>
</div>
<div class="report store">
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" slot-scope="scope" class="amount-wrap">
<div v-for="(item, index) in scope.scope.optionList" :key="index">
<el-checkbox v-model="item.checked">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-price">
<label class="required" for="">预计损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ totalPrice.toFixed(2) }}</span>
元
</span>
</div>
</div>
</glsx-combi-form>
</Card>
</div>
<div class="upload">
<upload-material></upload-material>
</div>
<div class="buchong">
<explanation :obj="explanationObj"></explanation>
</div>
<div class="other">
<other-info></other-info>
</div>
</div>
</template>
<!-- tab切换 -->
<template v-else>
<div class="tab_wrap">
<el-tabs v-model="activeName" @tab-click="changeTab">
<el-tab-pane class="bg" label="核赔信息" name="first">
<repair ref="repairRef" :needStore="false" @changeObjectType="changeObjectType" :isGH="true" :pageType="3" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
</el-tab-pane>
<el-tab-pane class="bg" label="定损信息" name="second">定损信息</el-tab-pane>
</el-tabs>
</div>
</template>
<!-- 底部按钮 -->
<div class="btn-box">
<el-button plain class="btn-three" @click="handleCancel">取消</el-button>
<el-button plain class="btn-three" @click="handleCancel">保存</el-button>
<el-button plain @click="handleVerify(2)">不通过</el-button>
<el-button type="primary" @click="handleVerify(1)">通过</el-button>
</div>
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" v-if="showNoPassDialog" :visible.sync="showNoPassDialog" @onOk="submitForm(2)" @onCancel="cancelDialog(2)">
<glsx-combi-form ref="noPassRef" :isInline="false" :formRules="noPassRule" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<GLDialog class="gl-form-page gl-form-min" title="审核通过,请输入批准金额" mode="mid" v-if="showPassedDialog" :visible.sync="showPassedDialog" @onOk="submitForm(1)" @onCancel="cancelDialog(1)">
<div class="passed-wrap">
<div class="passed-item" v-for="(item, index) in testServiceList" :key="index">
<span class="name">{{ item.serviceItemName }}</span>
<div class="set-price">
<li>
<label for="">预计损失金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</li>
<li>
<label for="">定损批准金额/元:</label>
<el-input size="small" maxlength="10" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</li>
</div>
</div>
</div>
</GLDialog>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import qrCode from '@/components/qr-code'
import uploadMaterial from './components/uploadMaterial'
import otherInfo from './components/otherInfo.vue'
import explanation from './components/explanation'
import Card from './components/card.vue'
import report from './components/report.vue'
import repair from './components/repair.vue'
import util from '@/util/util'
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]{8}$/
const testServiceList = [
{
serviceItemCode: 'SC0002',
serviceItemName: '车辆置换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0005',
serviceItemName: '轮胎更换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0006',
serviceItemName: '钥匙及车牌重置服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0007',
serviceItemName: '玻璃太阳膜更换补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0009',
serviceItemName: '车辆补漆补偿服务',
approveAmount: null,
checked: false
},
{
serviceItemCode: 'SC0011',
serviceItemName: '代步车费用补偿服务',
approveAmount: null,
checked: false
}
]
export default {
name: 'addwriteOff',
components: {
glsxCombiForm,
qrCode,
uploadMaterial,
otherInfo,
explanation,
Card,
report,
repair
},
data() {
return {
// 报案
editForm: {
contractNo: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddress: '',
reporterName: '',
reporterPhone: '',
writeOffCode: '',
reimbursementAddr: '',
reimbursementProvinceCode: '',
reimbursementCityCode: '',
reimbursementCountiesCode: ''
},
// 维修
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
tabs: ['核赔信息', '定损信息'],
activeName: 'first',
testServiceList,
showNoPassDialog: false,
showPassedDialog: false,
noPassObj: {
reason: '',
desc: ''
},
noPassForm: [
{
label: '原因:',
name: 'reason',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '具体描述:',
name: 'desc',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
}
],
customRule: {
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
description: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }],
reporterDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [{ required: true, message: '请选择出险日期', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险地点', trigger: 'change' }],
reporterPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
handlerPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
]
},
customObj: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reporterDate: '',
reimbursementDate: '',
reimbursementAddr: '',
handlerName: '',
handlerPhone: '',
serviceCodes: []
},
customForm: [
{
label: '报案人',
name: 'reporterName',
type: 'showTxt'
},
{
label: '报案人电话',
name: 'reporterPhone',
type: 'showTxt'
},
{
label: '报案日期',
name: 'reporterDate',
type: 'showTxt'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'showTxt'
},
{
label: '出险地点',
name: 'reimbursementAddr',
type: 'showTxt'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '出险经过描述',
name: 'description',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true
},
{
label: '申请核赔服务',
name: 'serviceCodes',
type: 'checkbox',
border: true,
optionList: testServiceList,
addHtml: 'approveAmountSlot'
}
],
explanationObj: {
explanation1: ''
},
routeInfo: {},
serviceItemsList: []
}
},
computed: {
totalPrice() {
const target = this.handlerForm.find(item => item.name == 'serviceCodes')
let total = target.optionList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.approveAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
}
},
mounted() {
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
// urlQuery.status = 12
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.writeOffCode) {
this.getDetailData(this.routeInfo.writeOffCode)
// this.getOrderZLData(this.routeInfo.writeOffCode)
// this.getPhoneData(this.routeInfo.writeOffCode)
}
},
methods: {
changeTab(tab) {},
changeObjectType(newVal) {
if (newVal === 1) {
this.saveObj.objectType = newVal
delete this.saveObj.handlerName
delete this.saveObj.handlerPhone
this.accountForm = { ...this.accountForm, ...this.saveObj }
} else {
this.saveObj = { ...this.accountForm }
this.getAccountInfo(this.editForm.contractNo)
}
},
validPrice(e, id) {
const target = this.handlerForm.find(item => item.name == 'serviceCodes')
let checkPlan = '' + target.optionList[id].approveAmount
checkPlan = checkPlan
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace(/^\./g, '')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(target.optionList[id], 'approveAmount', checkPlan)
},
changePrice(e, id) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.serviceItemsList[id], 'approveAmount', e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', 1)
}
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', maxPrice)
}
},
handleSave() {
console.log(this.explanationForm, this.explanationObj)
// this.$refs.customRef.$refs.formRef.validate(valid => {
// if (valid) {
// this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
// if (secondValid) {
// let params = {...this.customObj}
// params.reimbursementDate = util.dateFormat(this.customObj.reimbursementDate, 'YYYY-MM-DD HH:mm:ss')
// params.reporterDate = util.dateFormat(this.customObj.reporterDate, 'YYYY-MM-DD HH:mm:ss')
// this.$apis.beforeSale.saveWriteOff({ ...params }).then(res => {
// if (res.code == '0') {
// this.$message({
// message: '保存成功',
// type: 'success'
// })
// this.$router.push({
// path: '/beforeSale/index'
// })
// } else {
// this.gotoValidView('writeOff')
// this.$message({
// message: res.message,
// type: 'error'
// })
// }
// })
// } else {
// this.gotoValidView('reporterName')
// }
// })
// } else {
// this.gotoValidView('reporterName')
// }
// })
},
gotoValidView(id) {
document.getElementById(id) && document.getElementById(id).scrollIntoView()
},
handleCancel() {
this.$router.push({
path: '/beforeSale/index'
})
},
handleVerify(val) {
// val == 1 通过 ,2 不通过
if (val == 1) {
this.showPassedDialog = true
} else {
this.showNoPassDialog = true
}
},
submitForm(val) {
// val == 1 通过 ,2 不通过
this.cancelDialog(val)
},
cancelDialog(val) {
// val == 1 通过 ,2 不通过
if (val == 1) {
this.showPassedDialog = false
} else {
this.showNoPassDialog = false
}
},
// 获取订单详情
getDetailData(writeOffCode) {
this.$apis.claims.getGHClaimsDetailApi({ writeOffCode }).then(res => {
this.editForm.reimbursementAddress = []
const { itemsList, contractNo, writeOffCode, reporterName, reporterPhone, reportDate, reimbursementDate, reimbursementAddr, reimbursementCityCode, reimbursementCountiesCode, reimbursementProvinceCode, reimbursementCityName, reimbursementCountiesName, reimbursementProvinceName } = res
this.editForm.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
let obj = {
contractNo,
reportDate,
reimbursementDate,
reporterName,
reporterPhone,
writeOffCode,
reimbursementAddr,
reimbursementCityCode,
reimbursementCountiesCode
}
Object.assign(this.editForm, obj)
this.serviceItemsList = itemsList
this.getAccountInfo(contractNo)
})
},
// 点击同步,获取收款人信息
getAccountInfo(contractNo) {
if (!contractNo) return
this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
/deep/ .el-form-item__label {
padding: 0;
}
.custom-info {
.code {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
line-height: 36px;
width: 100%;
height: 36px;
margin-bottom: 20px;
padding: 0 20px;
background: #f9f9f9;
}
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
}
}
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.unit-price {
background: #f9f9f9;
padding: 20px;
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.dialog-unit {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-bottom: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
flex-shrink: 0;
display: inline-block;
text-align: right;
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
padding: 0 16px;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
}
.passed-wrap {
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
.passed-item {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.name {
font-size: 14px;
}
.set-price {
background: #f9f9f9;
padding: 20px;
list-style: none;
margin-top: 10px;
li {
margin-bottom: 20px;
display: flex;
align-items: center;
&:last-child {
margin-bottom: 0;
}
label {
width: 154px;
display: inline-block;
text-align: right;
}
}
.el-input {
width: 284px;
margin-right: 60px;
}
}
}
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
// 核赔信息
.order_container {
}
.tab_wrap {
.widget {
background: white;
.title {
padding: 15px 20px;
border-bottom: 1px solid #e5e5e5;
}
.content {
box-sizing: border-box;
padding: 32px 20px;
.element_wrap {
display: flex;
.label {
width: 154px;
text-align: right;
font-size: 16px;
font-weight: 400;
color: #333333;
}
.pannel {
.wrapper {
margin-bottom: 16px;
.name {
font-size: 16px;
font-weight: 400;
color: #333333;
margin-bottom: 8px;
}
.messag {
width: 686px;
height: 60px;
background: #f9f9f9;
box-sizing: border-box;
padding: 0 20px;
.ms {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.price {
color: #333333;
}
}
.pannel_box {
width: 686px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
display: flex;
flex-wrap: wrap;
.line {
margin-bottom: 20px;
.lab {
font-size: 14px;
font-weight: 400;
color: #666666;
text-align: right;
width: 154px;
}
.tip {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
}
}
}
.total {
padding: 12px 20px;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
.martop21 {
margin-top: 21px;
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!