Commit bea03aa8 by zhangquan

广联核赔

1 parent 0181795e
...@@ -430,4 +430,35 @@ const delCaseApi = params => { ...@@ -430,4 +430,35 @@ const delCaseApi = params => {
}) })
} }
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, batchPassApi, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getExportUrlApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo, getFollowPersonList, delFollowPerson, addFollowPerson, getMerchantSubList, delCaseApi } const getDjClaimsDetailApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.get.claims.detail'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 定损审核接口
const checkDjOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.audit.for.lossAssessment'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔审核
const checkDjClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.gl.audit.for.claims'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, batchPassApi, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getExportUrlApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo, getFollowPersonList, delFollowPerson, addFollowPerson, getMerchantSubList, delCaseApi, getDjClaimsDetailApi, checkDjOrderApi, checkDjClaimsOrderApi }
...@@ -86,6 +86,26 @@ const statusList = [ ...@@ -86,6 +86,26 @@ const statusList = [
{ {
confId: 25, confId: 25,
confName: '核赔不通过' confName: '核赔不通过'
},
{
confId: 32,
confName: '待受理'
},
{
confId: 33,
confName: '待定损'
},
{
confId: 35,
confName: '定损不通过'
},
{
confId: 34,
confName: '定损通过'
},
{
confId: 3,
confName: '已支付'
} }
] ]
export default { export default {
...@@ -95,6 +115,22 @@ export default { ...@@ -95,6 +115,22 @@ export default {
orderCount: {}, orderCount: {},
buttonList: [ buttonList: [
{ {
type: 'el-button',
name: row => {
return '定损审核'
},
condition: row => {
return [33].includes(row.scope.status)
},
attrs: {
type: 'text',
fn: '定损审核'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'GLButton', type: 'GLButton',
name: row => { name: row => {
return '去处理' return '去处理'
...@@ -116,7 +152,7 @@ export default { ...@@ -116,7 +152,7 @@ export default {
return '查看' return '查看'
}, },
condition: row => { condition: row => {
return row.scope.status != 19 return row.scope.status != 19 && row.scope.status != 33
}, },
attrs: { attrs: {
type: 'text', type: 'text',
...@@ -470,6 +506,19 @@ export default { ...@@ -470,6 +506,19 @@ export default {
}, },
// 1.新增 2.查看 3.重新提交 4.去处理 5.运营经理审核 6 核赔审核 // 1.新增 2.查看 3.重新提交 4.去处理 5.运营经理审核 6 核赔审核
handleEdit(editNo, row) { handleEdit(editNo, row) {
const title = this.jumpTitle(editNo)
if (row.source == 3) {
const params = {
editNo,
isGH: true,
contractNo: row.contractNo,
orderId: row.id,
status: row.status
}
const temp = encodeURIComponent(JSON.stringify(params))
this.$router.push({ path: '/djClaims/djOrder/' + temp, query: { $title: title } })
return
}
let urlParam = { let urlParam = {
editNo, editNo,
isGH: this.showGh, isGH: this.showGh,
...@@ -482,7 +531,6 @@ export default { ...@@ -482,7 +531,6 @@ export default {
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
} }
const temp = encodeURIComponent(JSON.stringify(urlParam)) const temp = encodeURIComponent(JSON.stringify(urlParam))
const title = this.jumpTitle(editNo)
this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } }) this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
}, },
handleOkFn() { handleOkFn() {
......
<template>
<div :style="{ 'margin-top': +marginTop + 'px' }" class="box">
<div v-if="title" class="header" :style="{ cursor: openBtn ? 'pointer' : 'unset' }" @click.stop="showBody()">
<i v-if="openBtn" class="el-icon-caret-right" :class="{ trans: open }"></i>
{{ title }}
<div style="float:right">
<slot name="right"></slot>
</div>
</div>
<div v-if="!openBtn || open" class="main-wrap">
<slot></slot>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'card',
data() {
return {
open: false
}
},
props: {
title: {
type: String,
default: ''
},
openBtn: {
type: Boolean,
default: false
},
marginTop:{
tyep: Number|String,
default: 16
}
},
mounted() {},
methods:{
showBody(){
if(!this.openBtn) return
this.open = !this.open
}
}
}
</script>
<style lang="scss" scoped>
.box {
background-color: #fff;
.header {
height: 58px;
background-color: #fff;
line-height: 58px;
padding: 0 20px;
box-sizing: border-box;
font-family: inherit;
font-size: 16px;
color: #333333;
// font-weight: 600;
}
.main-wrap {
border-top: 1px solid #e5e5e5;
padding: 20px;
height: 100%;
position: relative;
}
}
.header .trans {
transform: rotate(90deg);
}
.header .el-icon-caret-right {
transition: transform 0.3s ease 0s;
}
</style>
<template>
<div>
<Card title="案件补充说明">
<div class="explanation">
<div class="explanation-item" v-for="(item, idx) in supplementListTemp" :key="idx">
<div class="explanation-list">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :disabled="isCheck || isDisabled || item.operation == 1" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" maxlength="200" type="textarea" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!isCheck && supplementListTemp.length > 1 && item.operation != 1" @click="handleDel(idx)"></i>
<div class="follow-list" @click="showFollow">跟进记录</div>
</div>
<div class="operator">
<div>操作人:{{ item.operationUser ? item.operationUser : '--' }}</div>
<div>操作时间:{{ item.operationTime ? item.operationTime : '--' }}</div>
</div>
</div>
</div>
<div v-if="!isCheck && !isDisabled" class="add-explanation" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span>
</div>
</Card>
<!-- 跟进记录 -->
<GLDialog :title="followDialogTitle" mode="mid" :close-on-press-escape="false" :close-on-click-modal="false" :visible.sync="followDialog" bef :okText="followOkText" @onOk="toAddFollw" @onCancel="closeFollow">
<template v-if="!followEditStatus">
<div class="wrap_time_line">
<templatece v-if="!followResult">
<el-timeline reverse="true">
<el-timeline-item :class="[{ spec: !index }]" v-for="(item, index) in followListData" :key="index" :timestamp="item.createdDate">
{{ item.content }}
</el-timeline-item>
</el-timeline>
</templatece>
<template v-else>
<div style="margin-top: 60px; text-align: center">暂无跟进记录</div>
</template>
</div>
</template>
<template v-if="followEditStatus">
<div class="wrap_time_line">
<div class="col">
<div class="label">
<span style="color: #eb4e4e">*</span>
<span>具体描述:</span>
</div>
<div class="fill">
<el-input maxlength="200" style="width: 432px" type="textarea" :rows="3" placeholder="请输入" v-model="followContent"></el-input>
</div>
</div>
</div>
</template>
</GLDialog>
</div>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
import * as dayjs from 'dayjs'
export default {
name: 'explanation',
data() {
return {
followDialog: false,
followListData: [],
followDialogTitle: '跟进记录',
followOkText: '新增',
followEditStatus: false,
followContent: '',
followResult: false,
curentFollowInfo:'',
supplementListTemp:[{ content: '' }]
}
},
components: {
Card
},
props: {
supplementList: {
type: Array,
default: function () {
return [{ content: '' }]
}
},
isCheck:Boolean,
isDisabled:Boolean,
operatorName:String,
id:Number
},
mounted() {
},
watch:{
supplementList:{
deep:true,
handler(val){
this.supplementListTemp = val
val.forEach(item=>{
item.operationTime = dayjs( item.operationTime).format('YYYY-MM-DD HH:mm:ss')
})
},
immediate:true
}
},
methods: {
showFollow() {
this.followDialog = true
this.curentFollowInfo = {
id:this.id,
operatorName:this.operatorName
}
this.followListData = []
this.getFollowList(this.curentFollowInfo)
},
closeFollow() {
if (this.followEditStatus) {
// 切换
this.followDialogTitle = '跟进记录'
this.followEditStatus = false
this.followOkText = '新增'
} else {
// 关闭弹窗
this.followDialog = false
this.curentFollowInfo = null
this.followOkText = '新增'
}
},
toAddFollw() {
if (!this.followEditStatus) {
// 切换新增
this.followDialogTitle = '新增记录'
this.followOkText = '提交'
this.followEditStatus = true
} else {
// 切换查看
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.createFollow()
}
},
createFollow() {
let para = {
claimsId: this.curentFollowInfo.id,
content: this.followContent,
createdBy: this.curentFollowInfo.operatorName
}
this.$apis.claims.addGHClaimFollowsListApi(para).then(res => {
this.followDialogTitle = '跟进记录'
this.followOkText = '新增'
this.followEditStatus = false
this.getFollowList(this.curentFollowInfo)
this.$message({
message: '新增成功',
type: 'success'
})
})
},
getFollowList(row) {
this.$apis.claims.getGHClaimFollowsListApi({ claimsId: row.id }).then(res => {
res.forEach(el => {
el.createdDate = dayjs(el.createdDate).format('YYYY-MM-DD HH:mm:ss')
})
this.followListData = res || []
this.followResult = res.length ? false : true
})
},
handleDel(idx) {
this.$delete(this.supplementListTemp, idx)
},
addExplanation() {
const idx = this.supplementListTemp.length
const newObj = { claimsId: this.supplementListTemp[idx - 1].claimsId, content: '' }
this.$set(this.supplementListTemp, idx, newObj)
}
}
}
</script>
<style lang="scss" scoped>
.explanation {
.explanation-item {
margin-bottom: 20px;
&:last-child {
margin-bottom: 10px;
}
}
.explanation-list {
position: relative;
display: flex;
/deep/ .el-textarea {
width: 580px;
}
.label {
width: 154px;
font-size: 14px;
font-weight: 400;
line-height: 32px;
color: #333;
text-align: right;
flex-shrink: 0;
}
}
.del {
color: #c6c6c6;
font-size: 16px;
margin-left: 10px;
cursor: pointer;
margin-top: 28px;
}
}
.add-explanation {
color: #5850ff;
display: flex;
align-items: center;
margin-left: 154px;
cursor: pointer;
.el-icon-circle-plus-outline {
font-size: 20px;
margin-right: 6px;
}
span {
font-size: 12px;
}
}
.operator {
font-size: 12px;
color: #666666;
display: flex;
justify-content: space-between;
margin-left: 154px;
width: 580px;
margin-top: 4px;
margin-bottom: 20px;
}
.follow-list {
font-size: 14px;
color: #5850ff;
bottom: 0;
position: absolute;
left: 742px;
cursor: pointer;
}
</style>
<template>
<GLDialog :destroy-on-close="isdestroy" :close-on-click-modal="false" title="跟进人配置" mode="mid" :visible.sync="isFollowSync" :before-close="handleCancel">
<GLTable :hasPage="false" :hasNum="true" :tableData="followListData" :tableParams="followTableParams">
<div slot="followName" slot-scope="scope">
<el-form v-if="scope.scope.followName == ''">
<el-form-item style="margin-bottom: 0px">
<el-input v-model="followName" placeholder="请输入" maxlength="5"></el-input>
</el-form-item>
</el-form>
<span v-else>{{ scope.scope.followName }}</span>
</div>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.scope, scope.index)">删除</el-button>
</div>
</GLTable>
<div class="add-wrap" @click="addLine">
<i class="el-icon-circle-plus-outline add-icon"></i>
添加
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel">取消</el-button>
<el-button type="primary" size="small" @click="handleSave">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
data() {
return {
isdestroy: true,
followListData: [],
followName: '',
followTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '跟进人',
prop: 'followName',
addHtml: 'followName'
},
{
label: '操作',
prop: '',
width: 80,
fixed: 'right',
addHtml: 'table-btns'
}
]
}
}
},
props: {
isFollowSync: {
type: Boolean,
default: false
}
},
created() {
this.getFollowPersonList()
},
methods: {
getFollowPersonList() {
this.$apis.claims
.getFollowPersonList({
pageSize: 10000,
pageNum: 1
})
.then(res => {
this.followListData = res.list
})
},
addLine() {
if (this.followListData.length > 0 && this.followListData[this.followListData.length - 1].followName == '') {
return
}
this.followName = ''
this.followListData.push({ followName: '' })
},
handleSave() {
if (this.followListData[this.followListData.length - 1].followName == '' && this.followName == '') {
this.$message({
type: 'error',
message: '请输入跟进人'
})
return
}
if (this.followName) {
this.$apis.claims.addFollowPerson({ followName: this.followName }).then(res => {
this.$message({
type: 'success',
message: '添加成功!'
})
})
}
this.$emit('handleClose')
},
handleCancel() {
// this.isFollowSync = false
this.$emit('handleClose')
},
handleCalculate() {},
//删除
handleDelete(data, index) {
if (data.id) {
this.$confirm('确定要删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
if (data.id) {
this.$apis.claims.delFollowPerson({ id: data.id }).then(res => {})
this.followListData.splice(index, 1)
}
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.followListData.splice(index, 1)
}
}
}
}
</script>
<style scoped lang="scss">
.add-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #5850ff;
margin-top: 10px;
cursor: pointer;
.add-icon {
margin-right: 6px;
font-size: 20px;
color: #5850ff;
}
}
</style>
<template>
<div class="">
<div class="container">
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
<div class="wrap" v-for="(imgItem, imgKey) in list" :key="imgKey">
<span class="title">
<i v-if="imgItem.status == 1" class="el-icon-success success"></i>
<i v-if="imgItem.status == 2" class="el-icon-error error"></i>
<span>{{ imgItem.title }}</span>
<el-tooltip v-if="imgItem.tip" class="item" effect="dark" :content="imgItem.tip" placement="top">
<i v-if="imgItem.tip" class="el-icon-question question"></i>
</el-tooltip>
</span>
<div :class="['img-box', { 'has-img': imgItem.url, 'error-img': imgItem.status == 2, 'success-img': imgItem.status == 1 }]">
<!-- <img v-if="!imgItem.url" class="back-img" fit="cover" :src="url" alt="" @click="clickImg(imgKey)" /> -->
<img v-if="!imgItem.url" class="add-btn" :src="cameraUrl" alt="" @click="clickImg(imgKey)" />
<img v-else class="need-img" fit="cover" :src="imgItem.url" alt="" />
<div class="mask">
<i class="el-icon-view" @click="handlePreview(imgItem.url)"></i>
<i class="el-icon-delete" @click="handleDel(imgKey)"></i>
</div>
<div class="error-tip" v-if="imgItem.status == 2">
<el-popover placement="top-start" width="200" trigger="hover" :content="imgItem.reason || '--'">
<span slot="reference">{{ imgItem.reason || '--' }}</span>
</el-popover>
</div>
</div>
<slot name="footer" :scope="{ imgItem, imgKey }"></slot>
</div>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import url from '@/assets/images/idCard.png'
// import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'imgList',
props:{
list:{
type: Array
}
},
data() {
return {
url,
cameraUrl,
dialogImageUrl: '',
dialogVisible: false,
activeName: 'base'
}
},
components: {
// glsxCombiForm
},
mounted() {
},
methods: {
handlePreview(url) {
this.dialogImageUrl = url;
this.dialogVisible = true;
},
handleDel(key){
this.list[key].url = ''
this.list[key].status = ''
},
clickImg(type) {
this.$refs.input.click();
},
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.beforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
console.log(res,'resss')
})
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
display: flex;
flex-wrap: wrap;
position: relative;
.file {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.wrap {
margin: 0 16px 16px 0;
.title {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
.success {
color: #2cca74;
margin-right: 5px;
}
.error {
color: #eb4e4e;
margin-right: 5px;
}
.question {
color: #999;
cursor: pointer;
margin-left: 5px;
}
}
.has-img:hover {
.mask {
display: block;
}
}
.error-img {
border: 1px solid #ff5257 !important;
}
.success-img {
border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.img-box {
margin-top: 8px;
height: 135px;
width: 216px;
border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px;
position: relative;
background-color: #f5f5f5;
.error-tip {
width: 100%;
background: rgba(255, 82, 87, 0.7);
position: absolute;
height: 54px;
line-height: 16px;
bottom: 0;
border-radius: 0 0 4px 4px;
z-index: 10;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
font-family: PingFangSC-Regular, PingFang SC;
font-size: 14px;
padding: 5px 10px;
display: -webkit-box;
box-sizing: border-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.need-img,
.mask {
position: absolute;
left: 0;
bottom: 0;
top: 0;
right: 0;
z-index: 2;
}
.mask {
display: none;
background: rgba(0, 0, 0, 0.5);
z-index: 9;
text-align: center;
line-height: 135px;
border-radius: 4px;
i {
color: #c6c6c6;
cursor: pointer;
font-size: 16px;
&:first-child {
margin-right: 12px;
}
}
}
.add-btn {
position: absolute;
width: 60px;
height: 60px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
cursor: pointer;
}
img {
width: 100%;
height: 100%;
border-radius: 4px;
}
}
}
}
</style>
<template>
<Card title="其他信息" class="" openBtn>
<div class="other-info" v-for="(item, idx) in form" :key="idx">
<span class="title">{{ item.parentTitle }}</span>
<div class="info-wrap">
<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>
</Card>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
export default {
name: 'otherInfo',
props: {
otherInfoData: Object
},
data() {
return {
form: [
{
parentTitle: '店面信息',
li: [
{
key: 'merchantName',
label: '店面名称:'
},
{
key: 'merchantPhone',
label: '店面联系方式:'
},
{
key: 'merchantAddr',
label: '店面地址:'
},
{
key: 'sapCode',
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: {
Card
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.other-info {
list-style: none;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 22px;
color: #333333;
margin-bottom: 16px;
.info-wrap {
background: #f9f9f9;
padding: 20px;
li {
display: inline-block;
line-height: 22px;
padding: 10px 0;
text-align: center;
width: 500px;
.label {
color: #666666;
}
}
}
}
</style>
<template>
<div class="warning-contianer">
<div class="title">预警信息</div>
<div class="widget">
<template v-for="(item, index) in list">
<div :key="index" class="element">
<label class="label">风险预警{{ index + 1 }}:</label>
<div class="wrap">
<div class="cell">
<label class="cell-label">预警原因:</label>
<div class="cell-value">{{ matchResultDesc[item.matchResult] }}</div>
</div>
<div class="cell">
<label class="cell-label">具体描述:</label>
<div class="cell-value">{{ item.matchResultDesc }}</div>
</div>
<div class="cell">
<label class="cell-label">核实情况说明:</label>
<el-input :disabled="isWatchOrder || item.matchType==1" @input="inputExplain" class="input-value" v-model="item.verifyResultDesc" type="textarea" placeholder="请输入核实后的情况说明" show-word-limit maxlength="100"></el-input>
</div>
<div class="cell">
<label class="cell-label">核实资料补充:</label>
<div class="inner">
<div class="image_group">
<template v-if="item.accountVerifyImagesList.length">
<div v-for="(imgItem, i) in item.accountVerifyImagesList" :key="i" class="imagBox">
<img class="imgItem" :src="imgItem.verifyImage" alt="" />
<div class="img_mask">
<i @click="handlePictureCardPreview(imgItem.verifyImage)" class="el-icon-zoom-in"></i>
<i v-if="!isWatchOrder&&item.matchType!=1" @click="toDeleteImg(index, i)" class="el-icon-delete"></i>
</div>
</div>
</template>
<div class="upload-value">
<el-upload :disabled="isWatchOrder || item.matchType==1" list-type="picture" class="upload_item" action="#" :before-upload="e => beforeAvatarUpload(e)" :on-remove="e => handleRemove(e, index)" :http-request="e => httpRequest(e, index)">
<img class="img" slot="default" :src="upload_img" alt="" />
</el-upload>
</div>
</div>
<p class="tips">图片格式为jpg,jpeg,png,大小10M以内</p>
</div>
</div>
</div>
</div>
</template>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import upload_img from '@/assets/images/upload.png'
export default {
name: 'wraning',
components: {},
data() {
return {
upload_img,
dialogVisible: false,
matchResultDesc: {
1: '支付账号异常',
2: '金额过大'
}
}
},
props: {
list: Array,
isWatchOrder: Boolean
},
mounted() {},
methods: {
inputExplain() {
this.$emit('getWarningData', this.list)
},
toDeleteImg(index, i) {
this.list[index].accountVerifyImagesList.splice(i, 1)
this.$emit('getWarningData', this.list)
},
handlePictureCardPreview(url) {
this.dialogImageUrl = url
this.dialogVisible = true
},
beforeAvatarUpload(e) {
console.log(e)
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 10
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 10
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
httpRequest({ file: e }, index) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
// let progress = ((res.loaded / res.total) * 100).toFixed(2)
// if (progress > 90) {
// progress = 90
// }
})
.then(res => {
if (res.code == 0) {
const url = res.data[0]
this.list[index].accountVerifyImagesList.push({ verifyImage: url })
this.$emit('getWarningData', this.list)
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
}
}
}
</script>
<style lang="scss" scoped>
.warning-contianer {
background: white;
margin: 20px 0 0;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.widget {
padding: 32px 20px;
.element {
display: flex;
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrap {
width: 792px;
background: #f9f9f9;
box-sizing: border-box;
padding: 20px;
.cell {
display: flex;
margin-bottom: 20px;
.cell-label {
width: 134px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
}
.cell-value {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.input-value {
width: 580px;
}
.inner {
.image_group {
display: flex;
flex-wrap: wrap;
.imagBox {
position: relative;
.imgItem {
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 10px;
margin-bottom: 10px;
border: 1px dashed #00000026;
}
.img_mask {
display: none;
}
}
.imagBox:hover {
.img_mask {
display: block;
width: 104px;
height: 104px;
border-radius: 4px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
display: flex;
align-items: center;
justify-content: center;
i {
color: white;
cursor: pointer;
font-weight: 400;
font-size: 21px;
}
i:first-child {
margin-right: 12px;
}
i:last-child {
margin-right: 0;
}
}
}
}
.upload-value {
width: 104px;
height: 104px;
border: 1px dashed #00000026;
border-radius: 4px;
.upload_item {
width: 104px;
height: 104px;
.img {
width: 104px;
height: 104px;
border-radius: 4px;
}
/deep/.el-upload-list--picture {
display: none;
}
}
}
.tips {
font-weight: 400;
font-size: 14px;
color: #999999;
margin-top: 8px;
}
}
}
.cell:last-child {
margin-bottom: 0;
}
}
}
.element:last-child {
margin-bottom: 0;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!