Commit 29727715 by 前端

Merge branch 'SAAS+V4.51.0-0331' into 'master'

上线合并

See merge request !85
2 parents c2d0a72a d910fd6f
Showing 41 changed files with 4795 additions and 197 deletions
......@@ -2003,6 +2003,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -2011,6 +2056,28 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -11000,6 +11067,11 @@
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
"dev": true
},
"qrcodejs2": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
"integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
},
"qs": {
"version": "6.11.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
......@@ -11564,6 +11636,11 @@
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
"dev": true
},
"rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
},
"rgb-regex": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz",
......@@ -13840,75 +13917,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-quill-editor": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz",
......
......@@ -17,6 +17,7 @@
"glsx-common": "^2.1.0",
"glsx-components": "^1.5.7",
"lodash": "^4.17.21",
"qrcodejs2": "0.0.2",
"rfdc": "^1.4.1",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
......@@ -479,5 +479,107 @@ const exportErrorDataApi = params => {
sign: true
})
}
export default { getOrdersummary, getChannelTypeApi, getSummaryPackage, getSummaryExportApi, getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getNewPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode, getUpdateRecordApi, getBatchTaskListApi, getTaskDetailListApi, createBatchTaskApi, exportErrorDataApi}
const getCityList = params => {
params.method = 'scrm.api.equity.service.claims.area'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//获取核赔详情
const getClaimsDetail = 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,
returnAll: true
})
}
// 查询权益订单其他信息
const getOrderOtherInfo = params => {
params.method = `scrm.api.equity.service.claims.get.other.package.info`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 定损提单
const newSaveWriteOff = params => {
params.method = `scrm.api.equity.service.claims.gl.save.lossAssessment`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 上传图片
const uploadImageApi = params => {
params.method = 'scrm.api.carlife.common.uploadImg'
return http({
url: '/rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
returnAll: true,
noSignAttr: ['file']
})
}
export default {
uploadImageApi,
newSaveWriteOff,
getOrderOtherInfo,
getClaimsDetail,
getCityList,
getOrdersummary,
getChannelTypeApi,
getSummaryPackage,
getSummaryExportApi,
getUserInfoApi,
getCountNoDataApi,
getListApi,
getMerchantApi,
getExportApi,
getPriteApi,
getCarBrandListApi,
getCarChildListApi,
getCarTypeListApi,
getCarSeriesListApi,
getHotlineApi,
getDefaultCarbrandApi,
updateHotlineApi,
updateCarBrandApi,
getProListApi,
getPackageListApi,
getNewPackageListApi,
getEquityApi,
updateEquityApi,
createCodeApi,
getOrderAttrApi,
getAllOrderValueApi,
verifyOrderApi,
checkOrderApi,
updateOrderApi,
uploadImgApi,
backOrderApi,
aduitOrderApi,
judgeSetting,
spaAgressData,
merchantInfo,
dateBycarNo,
activeCodeList,
updateActiveCode,
getUpdateRecordApi,
getBatchTaskListApi,
getTaskDetailListApi,
createBatchTaskApi,
exportErrorDataApi
}
<!-- 弹窗 -->
<template>
<div v-if="showTip" class="table-top-tips">
<div>
<span class="el-icon-warning"></span>
<div>
<slot>{{ content }}</slot>
</div>
</div>
<span class="el-icon-close" @click="showTip = false"></span>
</div>
</template>
<script>
export default {
name: 'title-tip',
data() {
return {}
},
props: {
showTip: {
type: Boolean,
default: true
},
content: {
type: String,
default: '--'
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.table-top-tips {
box-sizing: border-box;
margin-bottom: 16px;
width: 100%;
min-height: 40px;
line-height: 30px;
font-size: 14px;
background-color: #fdf0bb;
border: 1px solid #f9ca78;
padding: 0 16px;
border-radius: 4px;
color: rgba(0, 0, 0, 0.65);
display: flex;
align-items: center;
justify-content: space-between;
&>div{
display: flex;
align-items: center;
}
.el-icon-warning {
color: #f77315;
margin-right: 8px;
}
.el-icon-close {
margin-left: 30px;
color: #666;
cursor: pointer;
}
}
</style>
......@@ -48,6 +48,14 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'addDamage',
path: '/beforeSale/writeOff/addDamage/:id',
component: resolve => require([`@/views/beforeSale/writeOff/addDamage.vue`], resolve),
meta: {
toPage: 'toWriteOffList'
}
},
{
name: 'equitySummary',
path: '/beforeSale/equitySummary',
component: resolve => require([`@/views/beforeSale/equitySummary.vue`], resolve),
......@@ -124,6 +132,6 @@ const staticRoutes = Object.freeze([
path: '/GH/Renew/detail/:id',
component: resolve => require([`@/views/GH/Renew/detail.vue`], resolve),
meta: {}
},
}
])
export default staticRoutes
......@@ -1900,7 +1900,7 @@ export default {
let _list = []
this.copyCustomProductList.forEach(item => {
// 套餐商品不做过滤
if (item.parentId || !item.carHighestPrice || (item.carHighestPrice && _price <= NP.divide(item.carHighestPrice || 0, 100) && _price >= NP.divide(item.carLowestPrice || 0, 100))) {
if (item.parentId || !item.carHighestPrice || (item.carHighestPrice && _price < NP.divide(item.carHighestPrice || 0, 100) && _price >= NP.divide(item.carLowestPrice || 0, 100))) {
_list.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
......
<template>
<div>
<damage :isDetailPage="false" :disabled="curRouteInfo.pageType == 1" :curRouteInfo="curRouteInfo"></damage>
</div>
</template>
<script type="text/ecmascript-6">
import damage from './damage'
export default {
name: 'addDamege',
data() {
return {
activeName: 'writeOff',
curRouteInfo: {}
}
},
components: {
damage
},
created() {
const params = this.$route.params
this.curRouteInfo = JSON.parse(decodeURIComponent(params.id))
console.log(' this.curRouteInfo', this.curRouteInfo)
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div>
<el-tabs class="tabs" v-model="activeName">
<el-tab-pane v-for="item in tabs" :key="item.id" :label="item.name" :name="item.id">
</el-tab-pane>
</el-tabs>
<div v-show="activeName=='damage'">
<damage :curRouteInfo="curRouteInfo" disabled></damage>
</div>
<div v-show="activeName=='writeOff'">
<write-off :curRouteInfo="curRouteInfo" :disabled="curRouteInfo.pageType==1"></write-off>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import damage from './damage'
import writeOff from './writeOff'
export default {
name: 'valuationPricing',
data() {
return {
activeName: 'writeOff',
curRouteInfo:{},
tabs:[
{
id:'writeOff',
name: '核赔信息'
},{
id:'damage',
name: '定损信息'
}
]
}
},
components:{
damage,
writeOff
},
created() {
const params= this.$route.params
this.curRouteInfo = JSON.parse(decodeURIComponent(params.id))
},
methods: {
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.el-tabs__item {
height: 22px !important;
line-height: 10px !important;
font-weight: 400;
font-size: 16px;
}
}
</style>
<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%;
}
}
.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-list" v-for="(item, idx) in supplementList" :key="idx">
<div class="explanation-item">
<label class="label" for="">{{ `说明${idx + 1}:` }}</label>
<el-input :disabled="disabled || item.operation == 1" :placeholder="`请输入说明${idx + 1}`" v-model="item.content" type="textarea" maxlength="200" :rows="3"></el-input>
<i class="el-icon-delete del" v-if="!disabled && supplementList.length > 1 && item.operation != 1" @click="handleDel(idx)"></i>
</div>
<div v-if="item.operation == 1" class="operate-wrap">
<span></span>
<span>操作时间:{{ item.operationTime | formatTime(item.operationTime) }}</span>
</div>
</div>
</div>
<div class="add-explanation" v-if="!disabled" @click="addExplanation">
<i class="el-icon-circle-plus-outline"></i>
<span>新增说明</span>
</div>
</Card>
</div>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
import util from '@/util/util'
export default {
name: 'explanation',
data() {
return {}
},
components: {
Card
},
filters: {
formatTime(time) {
return time ? util.dateFormat(time, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
props: {
supplementList: {
type: Array,
default: function () {
return [{ content: '' }]
}
},
disabled: {
type: Boolean,
default: false
}
},
mounted() {},
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>
<style lang="scss" scoped>
.explanation {
.explanation-list {
margin-bottom: 20px;
&:last-child {
margin-bottom: 10px;
}
}
.operate-wrap {
display: flex;
margin-left: 154px;
width: 580px;
justify-content: space-between;
font-weight: 400;
font-size: 12px;
height: 17px;
line-height: 17px;
margin-top: 4px;
color: #666666;
}
.explanation-item {
display: flex;
// align-items: center;
/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;
}
}
</style>
<template>
<div class="help-service">
<div class="service-code">
<img class="service-img" src="../../image/code.png" />
<p class="title">定损及核赔服务咨询</p>
<!-- <p>在线客服随时咨询</p> -->
<p class="service-phone">189 3890 7441</p>
</div>
<div class="service-hotline">
<img class="service-img" src="../../image/icon-phone.png" />
<p>服 务 热 线</p>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'helpService',
data() {
return {
open: false
}
},
props: {
},
mounted() {},
methods:{
}
}
</script>
<style lang="scss" scoped>
.help-service {
position: fixed;
z-index: 9999;
font-size: 14px;
color: #333333;
top: 10%;
right: 10px;
justify-content: space-between;
width: 200px;
display: flex;
height: 200px;
background: #f3f3f4;
text-align: center;
border: 1px solid rgba(220, 223, 230, 0.5);
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 4px;
}
.service-code {
width: 144px;
display: flex;
flex-direction: column;
background: #fff;
border-radius: 4px 0 0 4px;
.service-img {
width: 124px;
height: 124px;
margin: 10px;
}
p {
margin: 0;
font-size: 14px;
line-height: 20px;
font-weight: 500;
color: #333333;
}
}
.help-service .service-hotline {
border-radius: 0 4px 4px 0;
height: 200px;
background: #00a77b;
width: 50px;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
img {
width: 24px;
height: 24px;
}
p {
writing-mode: vertical-lr;
margin-top: 8px;
}
}
</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" />
<template v-for="(imgItem, imgKey) in list">
<div class="wrap" :key="imgKey" v-if="(imgItem.key == curKey && curKey != 'detail') || (curKey == 'detail' && imgItem.serviceItemCode == curCode && hasLossType(imgItem))">
<span class="title">
<i v-if="imgItem.imgObj.auditStatus === 1" class="el-icon-success success"></i>
<i v-if="imgItem.imgObj.auditStatus === 0" class="el-icon-error error"></i>
<el-tooltip class="item" effect="dark" :content="imgItem.secondClassifyName" placement="top">
<span class="name">{{ imgItem.secondClassifyName }}</span>
</el-tooltip>
<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.imgObj.attachmentFile, 'error-img': imgItem.status == 2, 'success-img': imgItem.status == 1 }]">
<img v-if="!imgItem.imgObj.attachmentFile && imgItem.exampleUrl" class="example-img" fit="cover" :src="imgItem.exampleUrl" alt="" />
<span class="example" v-if="!imgItem.imgObj.attachmentFile && imgItem.exampleUrl" @click.stop="viewExample(imgItem.exampleUrl)">示例</span>
<img v-if="!imgItem.imgObj.attachmentFile" :class="['add-btn', { disabled: disabled }]" :src="cameraUrl" alt="" @click="clickImg(imgItem, imgKey)" />
<img v-else class="need-img" fit="cover" :src="imgItem.imgObj.attachmentFile" alt="" />
<div class="mask">
<i class="el-icon-view" @click="handlePreview(imgItem.imgObj.attachmentFile)"></i>
<!-- 定损不通过&不是其他资料&不是不通过的,则隐藏 -->
<template v-if="!(curRouteInfo.status == 7 && imgItem.imgObj.auditStatus !== 0 && curKey != 'other')">
<!-- 如果是现场照片&客户提交的,则隐藏 -->
<template v-if="!(curKey == 'onSite' && isCustomerCommit)">
<i v-if="!disabled" class="el-icon-delete" @click="handleDel(imgItem, imgKey)"></i>
</template>
</template>
</div>
<div class="error-tip" v-if="imgItem.imgObj.auditStatus === 0">
<el-popover placement="top-start" width="200" trigger="hover" :content="imgItem.imgObj.reasonForFailure || '--'">
<span slot="reference">{{ imgItem.imgObj.reasonForFailure || '--' }}</span>
</el-popover>
</div>
</div>
<slot name="footer" :scope="{ imgItem, imgKey }"></slot>
</div>
</template>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
<image-viewer :z-index="10000" :initial-index="initIdx" v-if="showViewer" :on-close="closeViewer" :url-list="reviewList" />
<!-- <pre-img ref="preImgRef"></pre-img> -->
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import url from '../../image/code.png'
import imageViewer from 'element-ui/packages/image/src/image-viewer';
// import preImg from './preImg'
// import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'imgList',
props:{
list:{
type: Array
},
id: {
type: Number
},
curKey:{
default:'base'
},
curCode:{
default:''
},
curRouteInfo: Object,
disabled:{
type: Boolean,
default: false
},
curLossType:{
type: Array,
default:function(){
return []
}
},
isCustomerCommit:{
type: Boolean,
default: false
},
isWriteOff:{
type: Boolean,
default: false
}
},
computed:{
hasLossType(){
return function(item){
if(this.isWriteOff) return true;
// if(item.secondClassifyName.indexOf('钥匙:')!=0 || item.secondClassifyName.indexOf('车牌:')!=0) return true;
return item.serviceItemCode!='SC0006' || (item.serviceItemCode=='SC0006' && ((item.secondClassifyName.indexOf('钥匙:')===0 && this.curLossType?.includes('3')) || (item.secondClassifyName.indexOf('车牌:')===0 && this.curLossType?.includes('4'))))
}
},
reviewList(){
return this.list?.map(item => {
if(this.curKey == item.key || (this.isWriteOff && item.serviceItemCode == this.curCode)) return item?.imgObj?.attachmentFile
})?.filter(item => !!item)
}
},
data() {
return {
url,
initIdx: 0,
showViewer: false,
cameraUrl,
dialogImageUrl: '',
dialogVisible: false,
curID:'',
curItem: {},
}
},
components: {
imageViewer
// glsxCombiForm
// preImg
},
mounted() {
},
methods: {
closeViewer(){
this.showViewer = false
},
handlePreview(e) {
this.initIdx = this.reviewList?.indexOf(e) || 0
this.showViewer = true
},
viewExample(url){
// this.$refs.preImgRef.preImage(url)
this.dialogImageUrl = url;
this.dialogVisible = true;
},
handleDel(item,idx){
if(item.secondClassifyName == '其他资料'){
this.list.splice(idx, 1)
this.$forceUpdate();
}else{
this.$set(this.list[idx], 'imgObj', {})
}
},
clickImg(item,idx) {
if(this.disabled) return;
this.curID = idx
this.curItem = item
this.$refs.input.click();
},
upload(e){
// let url = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/34/wKgD3mMlXICAbufiAABNO42zIwY122.png'
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.uploadImageApi({ file: base64, fileType: 'image' }).then(res => {
if(res.code == '0' && res.data){
const {id, attachmentCode } = this.curItem
if(this.list[this.curID]?.imgObj?.id){
this.$set(this.list[this.curID].imgObj, 'attachmentFile', url)
}else{
let obj = {
claimsId : this.id,
attachmentCode,
attachmentType: file.name.split('.').pop(),
attachmentFile : res.data,
classifyId : id,
}
this.$set(this.list[this.curID],'imgObj', obj)
}
if(this.curItem.firstClassifyName.indexOf('其他资料')>-1 && this.curItem.secondClassifyName=='其他资料'){
this.list.push({...this.curItem,imgObj:{}})
this.$forceUpdate()
}
}
}).finally(()=>{
this.$refs.input.value = ''
})
}
}
}
}
</script>
<style lang="scss" scoped>
.disabled {
cursor: not-allowed !important;
}
.container {
display: flex;
flex-wrap: wrap;
position: relative;
.file {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.wrap {
margin: 0 16px 16px 0;
.title {
display: flex;
align-items: center;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
.name {
width: 190px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
height: 20px;
}
.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: 5px;
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;
top: 90px;
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: 2;
overflow: hidden;
}
.need-img,
.mask {
position: absolute;
left: 0;
bottom: 0;
top: 0;
right: 0;
z-index: 6;
}
.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;
&:last-child {
margin-left: 12px;
}
}
}
.example {
position: absolute;
display: inline-block;
width: 36px;
height: 18px;
background-color: #e5e5e5;
font-size: 12px;
text-align: center;
right: 8px;
top: 8px;
color: #666;
cursor: pointer;
border-radius: 2px;
z-index: 4;
}
.example-img {
z-index: 3;
}
.add-btn {
position: absolute;
width: 60px;
height: 60px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 5;
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:'店面地址:'
},
]
},
{
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="dask" @click="showPreImg = false" v-if="showPreImg">
<div class="img-wrap">
<el-image class="img" :src="url" fit="contain"></el-image>
<i class="el-icon-circle-close"></i>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'pre-img',
data() {
return {
showPreImg: false,
url:'http://qcimg01.glsx.com.cn:7060/group1/M00/02/3E/wKgD3mMtcAqAYYpJAABtFzfpAMg215.png'
}
},
mounted() {},
methods:{
preImage(url){
this.url = url
this.showPreImg = true
}
}
}
</script>
<style lang="scss" scoped>
.dask {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
display: flex;
justify-content: center;
padding: 50px;
.img-wrap {
position: relative;
width: 100%;
height: 800px;
.img {
width: 100%;
height: 100%;
}
}
}
</style>
<template>
<el-dialog :visible.sync="showDialog" :close-on-click-modal="false" class="my-dialog" top="100px" width="720px" title="温馨提示">
<div class="notice">
<span>订单列表有主管已经审核通过的订单,为不影响核赔,需获得客户的电子签名授权的补偿申请书。</span>
<span>请通知客户在收到系统通知后,及时处理</span>
</div>
<span class="title">操作方法</span>
<div class="wrap">
<div class="desc-itme" v-for="(item, idx) in descList" :key="idx">
<span class="serial">{{ idx + 1 }}</span>
<span class="desc">{{ item }}</span>
<span class="line" v-if="idx != descList.length - 1"></span>
</div>
</div>
<!-- <img class="example" src="http://qcimg01.glsx.com.cn:7060/group1/M00/02/2F/wKgD3mMhQOyADlRGAAaTge2Z02k318.png" alt="" /> -->
</el-dialog>
</template>
<script type="text/ecmascript-6">
export default {
name: 'process-tip',
data() {
return {
descList:['登录小程序','会员权益','选择正在核赔的权益','签名授权'],
showDialog: false
}
},
mounted() {},
methods:{
openTipDialog(val){
this.showDialog = val || false
}
}
}
</script>
<style lang="scss" scoped>
.example {
width: 346px;
height: 688px;
}
.notice {
span {
display: block;
color: #666;
line-height: 20px;
}
}
.title {
color: #333;
font-size: 16px;
margin: 12px 0;
display: block;
}
.wrap {
display: flex;
padding: 30px 0;
background: #f9f9f9;
.desc-itme {
width: 170px;
display: flex;
flex-direction: column;
align-items: center;
height: 68px;
justify-content: space-between;
position: relative;
.serial {
display: inline-block;
color: #fff;
width: 32px;
height: 32px;
border-radius: 50%;
background-color: #00a77b;
text-align: center;
line-height: 32px;
}
.desc {
color: #333;
font-size: 14px;
}
.line {
height: 1px;
width: 110px;
background: #e5e5e5;
position: absolute;
top: 16px;
left: calc(50% + 32px);
}
}
}
</style>
<template>
<div>
<Card title="维修信息">
<glsx-combi-form ref="repairRef" :isInline="false" labelWidth="154px" defaultWidth="350px" :formObj="repairObj" :formData="repairForm">
<div slot="approveAmountSlot" class="amount-wrap">
<div v-for="(item, index) in serviceCodesList" :key="index">
<template v-if="item.checked">
<span class="title">{{ item.serviceItemName }}</span>
<div class="unit-price">
<div>
<el-radio-group disabled v-if="item.serviceItemCode == 'SC0003'" v-model="item.lossType">
<el-radio label="1">全损</el-radio>
<el-radio label="2">局部</el-radio>
</el-radio-group>
<el-checkbox-group disabled v-if="item.serviceItemCode == 'SC0006'" v-model="item.lossType">
<el-checkbox label="3">钥匙</el-checkbox>
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
<div class="show-price">
<label for="">
预估损失金额/元:
<span>{{ item.applyAmount }}</span>
</label>
<label v-if="item.lossAssessmentFlag" for="">
保险公司定损金额/元:
<span>{{ item.lossAssessmentAmount }}</span>
</label>
<label for="">
定损批准金额/元:
<span>{{ item.approveAmount }}</span>
</label>
</div>
</div>
</template>
</div>
<div class="lump-sum">
<span>合计</span>
<span>
<span>
预估损失金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ applyAmountPrice.toFixed(2) }}</span>
元
</span>
&nbsp;&nbsp;&nbsp;
<span>
定损批准金额
<span class="sign">¥&nbsp;</span>
<span class="price">{{ approveAmountPrice.toFixed(2) }}</span>
元
</span>
</span>
</div>
</div>
<div slot="recipientSlot">
<el-radio-group :disabled="disabled" @change="changeObjectType" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
<div class="account-info">
<glsx-combi-form ref="accountRef" :isInline="false" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div>
</div>
</glsx-combi-form>
</Card>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import Card from './card.vue'
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 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'
}
],
accountCityCode: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
cardTypeCode: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
cardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
phone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
}
export default {
name: 'repairInfo',
components: {
Card,
glsxCombiForm
},
props:{
serviceCodesList:{
type:Array
},
accountForm: Object,
disabled:{
type: Boolean,
default: false
}
},
watch: {
'accountForm.objectType': {
handler(newVal, oldVal) {
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal == 0
},
immediate: true
}
},
data() {
return {
pageType: 1,
accountRule,
accountData:[
{
label: '账户类型',
name: 'accountType',
type: 'radio',
optionList: [
{
confId:0,
confName:'对公'
},
{
confId:1,
confName:'对私'
}
],
optionId: 'confId',
optionLabel: 'confName',
isHide:true,
isClear: true,
isDisabled: this.disabled,
handleRadioChange:()=>{}
},
{
label: '开户行名称',
name: 'openBankCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.disabled,
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength:60,
isClear: true,
isDisabled: this.disabled,
},
{
label: '收款账号',
name: 'accountNo',
type: 'input',
maxlength:25,
isClear: true,
isDisabled: this.disabled,
},
{
label: '收款账号所在省市',
name: 'accountCityCode',
type: 'select',
placeholder:'可输入所在市关键词查询',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.disabled,
},
{
label: '收款人证件类型',
name: 'cardTypeCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.disabled,
changeAttr: (e, item)=>{
const target = item.optionList.find(item => item.code == e)
this.accountForm.cardTypeName = target.name
}
},
{
label: '收款人证件号码',
name: 'cardNo',
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.disabled,
},
{
label: '收款人联系电话',
name: 'phone',
type: 'input',
maxlength: 11,
isClear: true,
isDisabled: this.disabled,
},
],
repairObj:{
amount:'',
recipient:''
},
repairForm:[
{
label: '批准金额',
name: 'amount',
addHtml:'approveAmountSlot'
},
{
label: '收款对象',
name: 'recipient',
addHtml:'recipientSlot'
}
]
}
},
computed: {
approveAmountPrice() {
let total = this.serviceCodesList.reduce(function(prev, cur) {
let curPrice = cur.approveAmount
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
},
applyAmountPrice() {
let total = this.serviceCodesList.reduce(function(prev, cur) {
let curPrice = cur.applyAmount
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
}
},
mounted() {
this.getBankList()
},
methods:{
changeObjectType(newVal){
this.$emit('getInfo',newVal)
},
validPrice(e, id, key){
let checkPlan = '' + this.serviceCodesList[id][key]
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.serviceCodesList[id], key , checkPlan)
},
getBankList() {
this.$apis.beforeSale.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
})
},
changePrice(e,id,key){
if(!e.target.value) return;
const len = e.target.value.length
let lastStr = e.target.value.charAt(len-1)
if(lastStr==='.'){
this.$set(this.serviceCodesList[id], key , e.target.value.substr(0 ,len-1))
}
const minPrice = 1
if(Number(e.target.value)<minPrice){
this.$set(this.serviceCodesList[id], key , 1)
}
const maxPrice = 200000
if(Number(e.target.value)>maxPrice){
this.$set(this.serviceCodesList[id], key , maxPrice)
}
},
}
}
</script>
<style lang="scss" scoped>
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
display: inline-block;
color: #333333;
.title {
font-size: 14px;
line-height: 32px;
}
/deep/ .unit-price {
background: #f9f9f9;
padding: 20px;
width: 686px;
list-style: none;
margin-bottom: 10px;
.el-radio-group,
.el-checkbox-group {
margin-left: 90px;
.el-radio__input.is-disabled + span.el-radio__label,
.el-checkbox__input.is-disabled + span.el-checkbox__label {
color: #666;
}
}
.show-price {
display: flex;
box-sizing: border-box;
font-size: 14px;
label {
color: #666666;
flex: 1;
text-align: center;
}
span {
color: #333;
}
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.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;
}
}
}
.account-info {
background-color: #f9f9f9;
padding: 20px 80px 20px 20px;
width: fit-content;
/deep/ .el-form-item:last-child {
margin-bottom: 0;
}
/deep/ .el-form-item__label {
padding: 0;
}
/deep/ .el-select {
.el-input__inner {
vertical-align: bottom !important;
}
}
}
</style>
<template>
<div>
<el-dialog :visible.sync="showDialog" class="my-dialog" width="720px" title="寄件详情">
<div class="sendCard">
<span class="title">邮寄地址</span>
<div class="content">
<p>收件人:权益服务组</p>
<p>联系电话:18938907441</p>
<p>收件地址:广东省深圳市南山区留仙大道3370号南山智园崇文园1号楼14楼</p>
</div>
</div>
<div class="card">
<span class="title">寄件详情(发票右下角备注栏备注客户名+合同号)</span>
<div class="content">
<p>名称: 国任财产保险股份有限公司深圳分公司</p>
<p>纳税人识别号: 914403005503071468</p>
<p>税务登记公司地址: 深圳市罗湖区笋岗街道红岭路与梅园路交汇处招商开元中心一期03地块第一栋B单元24层02-06A</p>
<p>联系电话:0755-88379089</p>
<p>开户行及银行账号: 中国建设银行股份有限公司深圳田背支行 44201618500052507158</p>
</div>
</div>
</el-dialog>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'send-detail',
data() {
return {
}
},
props: {
showDialog:{
type:Boolean,
default:false
}
},
mounted() {},
methods:{
}
}
</script>
<style lang="scss" scoped>
.sendCard {
background: #f9f9f9;
padding: 16px 20px;
&:first-child {
margin-bottom: 16px;
}
.title {
font-size: 16px;
color: #333;
}
.content {
margin-top: 8px;
p {
margin: 0;
line-height: 22px;
font-size: 14px;
color: #666;
}
}
}
</style>
<template>
<div>
<el-tabs class="tabs" v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="item in tabs" :key="item.name" :label="item.label" :name="item.name">
<span slot="label" :class="[{noPassTab:noPass(item.name,'tab')}]"><span v-if="item.isRequire==1" class="required">*</span>{{item.label}}</span>
<div v-if="curCode && activeName=='detail'" class="second-tabs">
<template v-for="ele in detailImgList">
<span :class="[{ active: curCode == ele.serviceItemCode },{'noPass':noPass(ele)}]" :key="ele.serviceItemCode" v-if="ele.checked" @click="changeSecondTab(ele)">{{ ele.serviceItemName }}</span>
</template>
</div>
<span v-if="isWriteOff && curCode =='SC0002' && activeName=='detail'">无附件资料待上传</span>
<img-list :isWriteOff="isWriteOff" :isCustomerCommit="isCustomerCommit" :curLossType="curLossType" :disabled="disabled" :id="id" :curRouteInfo="curRouteInfo" :curKey="activeName" :curCode="curCode" :list="attachmentList"></img-list>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script type="text/ecmascript-6">
import cameraUrl from '@/assets/camera.png'
import write_off from '@/assets/logo.png'
import url from '../../image/code.png'
import imgList from './imgList'
// import Card from './card.vue'
export default {
name: 'uploadMaterial',
props:{
tabs:{
type: Array
},
detailImgList:{
type: Array
},
id: {
type: Number
},
attachmentList:{
type: Array
},
curCodefromParent:{
type: String,
default: ''
},
curRouteInfo: Object,
disabled:{
type: Boolean,
default: false
},
curLossType:{
type: Array,
default:function(){
return []
}
},
isCustomerCommit:{
type: Boolean,
default: false
},
isWriteOff:{
type: Boolean,
default: false
}
},
computed:{
noPass(){
return function(val, type){
const target = this.attachmentList.find(item =>{
if(type=='tab'){
return (val == item.key && item?.imgObj?.auditStatus===0)
}else{
return (item.serviceItemCode == val.serviceItemCode && item?.imgObj?.auditStatus===0 && val.checked)
}
})
return !!target
}
}
},
data() {
return {
url,
cameraUrl,
curCode: '',
write_off,
activeName: 'base'
}
},
components: {
imgList,
// Card
},
mounted() {
const target = this.detailImgList.find(item => item.checked)
this.curCode = target?.serviceItemCode || ''
},
methods: {
handleClick(){
this.$emit('handleClick',this.activeName)
},
setTab(val){
this.activeName = val
},
changeSecondTab(item){
if(item) this.curCode = item.serviceItemCode
},
setActiveTab(){
const target = this.detailImgList.find(item => item.checked)
this.curCode = target?.serviceItemCode || ''
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.el-tabs__item {
height: 45px;
font-size: 16px;
font-weight: 500;
}
}
.second-tabs {
height: 36px;
background: #f8f8f8;
border-radius: 4px;
display: flex;
position: relative;
align-items: center;
padding: 2px;
margin-bottom: 16px;
span {
height: 100%;
display: flex;
align-items: center;
padding: 0 16px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #00a77b;
}
.active {
background-color: #fff;
}
}
.transport-pic {
font-size: 14px;
color: #00a479;
cursor: pointer;
}
.noPass,.noPassTab{
position: relative;
&::before{
content: '';
height: 6px;
width: 6px;
position: absolute;
right: 11px;
background-color: red;
border-radius: 50%;
top: 8px;
}
}
.noPassTab{
&::before{
right: -6px;
top: 0;
}
}
.required {
color: #f56c6c;
margin-right: 4px;
}
</style>
<template>
<div id="writeOff" class="writeOff">
<!-- <helpService></helpService> -->
<title-tip v-if="curRouteInfo.status == 7">定损失败原因:{{ resData.reasonForFailureCode == 1 ? '拒赔' : '资料不清晰' }} {{ resData.reasonForFailure }}</title-tip>
<template v-if="curRouteInfo.pageType == 6 && !isSavePage">
<Card :marginTop="0" title="客户信息">
<glsx-combi-form ref="writeOff" :formRules="checkRule" labelWidth="128px" defaultWidth="308px" :formObj="batchListSearch" :formData="writeOffForm"></glsx-combi-form>
<div class="signal-img">
<p>核销码示意图</p>
<img :src="url" alt="" />
</div>
</Card>
</template>
<template v-if="isSavePage">
<Card title="报案信息(客户提交)" class="custom-info">
<div class="code">
<span>核销码:</span>
<span>{{ customObj.writeOffCode }}</span>
</div>
<glsx-combi-form class="customer" :regionData="regionData" ref="customRef" :isInline="true" :formRules="customRule" labelWidth="154px" defaultWidth="350px" :formObj="customObj" :formData="customForm">
<span slot="addrSlot">{{ customObj.reimbursementProvinceName }}{{ customObj.reimbursementCityName }}{{ customObj.reimbursementCountiesName }}{{ customObj.reimbursementAddr }}</span>
</glsx-combi-form>
</Card>
<Card title="报案信息(店面补充)" class="handler-info">
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm">
<div slot="approveAmountSlot" class="amount-wrap">
<div v-for="(item, index) in serviceCodesList" :key="index">
<template v-if="(curRouteInfo.pageType == 6 && !item.excludeFlag) || (curRouteInfo.pageType != 6 && (item.checked || !item.excludeFlag))">
<template v-if="item.checked || curRouteInfo.status == 5 || curRouteInfo.status == 7 || curRouteInfo.pageType == 6 || curRouteInfo.status == 32">
<el-checkbox :disabled="disabled || (serviceChecked && !item.checked)" v-model="item.checked" @change="changeCheckedStatus(item)">{{ item.serviceItemName }}</el-checkbox>
<div class="unit-wrap">
<el-radio-group :disabled="disabled || !item.checked" v-if="item.serviceItemCode == 'SC0003'" v-model="item.lossType">
<el-radio label="1">全损</el-radio>
<el-radio label="2">局部</el-radio>
</el-radio-group>
<el-checkbox-group :disabled="disabled || !item.checked" @change="changeLossType" v-if="item.serviceItemCode == 'SC0006'" v-model="item.lossType">
<el-checkbox :disabled="item.lossType && item.lossType.length > 0 && !item.lossType.includes('3')" label="3">钥匙</el-checkbox>
<el-checkbox :disabled="item.lossType && item.lossType.length > 0 && !item.lossType.includes('4')" label="4">车牌重置</el-checkbox>
</el-checkbox-group>
<div>
<div class="unit-price">
<label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="13" :disabled="disabled || !item.checked" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" class="unit-price">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input maxlength="13" :disabled="disabled || !item.checked" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入" v-model="item.lossAssessmentAmount"></el-input>
</div>
</div>
</div>
</template>
</template>
</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>
<Card title="上传图片">
<div v-if="!disabled" slot="right" class="transport-pic" @click.stop="transportPic">手机传图</div>
<upload-material :isCustomerCommit="!!isCustomerCommit" :curLossType="curLossType" :disabled="disabled" :curRouteInfo="curRouteInfo" @handleClick="handleClick" ref="materialRef" :id="resData.id" :tabs.sync="tabs" :detailImgList.sync="serviceCodesList" :attachmentList.sync="attachmentList"></upload-material>
</Card>
<explanation :disabled="disabled" :supplementList="resData.supplementList1"></explanation>
<otherInfo :otherInfoData="otherInfoData"></otherInfo>
</template>
<el-dialog :visible.sync="showPicDialog" :close-on-click-modal="false" class="my-dialog pic-dialog" width="576px" title="手机传图">
<span class="T-tip">使用手机浏览器、微信等扫码后,即可用手机上传图片至电脑网页</span>
<span class="B-tip">扫码后手机上传链接时效为10分钟,过期后请重新扫码</span>
<div id="qrcodeId" ref="qrCodeUrl"></div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="getPhoneAttachment">图片已全部上传</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="10%" :title="secondObj.title">
<div class="f-size">
<i class="el-icon-warning"></i>
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isSecondVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="isSecondVisible = false">确 定</el-button>
</span>
</el-dialog>
<div class="btn-box">
<el-button type="default" @click="handleCancel">取消</el-button>
<template v-if="curRouteInfo.status == 5 || curRouteInfo.status == 32 || (curRouteInfo.status == 7 && resData.reasonForFailureCode != 1) || curRouteInfo.pageType == 6">
<el-button v-if="!isSavePage" type="primary" @click="handleNextStep">下一步</el-button>
<template v-else>
<el-button type="primary" @click="handleSave(0)">草稿</el-button>
<el-button type="primary" @click="handleSave(1)">提交</el-button>
</template>
</template>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import QRCode from 'qrcodejs2'
import titleTip from '@/components/titleTip'
import glsxCombiForm from '@/components/glsx-combi-form'
import uploadMaterial from './components/uploadMaterial'
import Card from './components/card.vue'
import explanation from './components/explanation'
// import helpService from './components/helpService'
import otherInfo from './components/otherInfo'
import util from '@/util/util'
import url from '@/assets/write_off.png'
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 tabs = [
{
label: '基础资料',
name: 'base',
isRequire: 1
},
{
label: '定损细节照片',
name: 'detail',
isRequire: 1
},
{
label: '现场照片',
name: 'onSite',
isRequire: 1
},
{
label: '其他资料(非必传)',
name: 'other'
}
]
const tabObj = {
基础资料: 'base',
定损细节照片: 'detail',
现场照片: 'onSite',
'其他资料(非必传)': 'other'
}
export default {
name: 'addwriteOff',
components: {
glsxCombiForm,
uploadMaterial,
explanation,
Card,
// helpService,
otherInfo,
titleTip
},
props: {
curRouteInfo: Object,
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
url,
tabs,
regionData: [],
isSavePage: false,
otherInfoData: {},
batchListSearch: {
writeOffCode: ''
},
curLossType: [],
isSecondVisible: false,
secondObj: {
title: '',
txt: ''
},
errMeg: '',
showPicDialog: false,
resData: {},
checkRule: {
writeOffCode: [
{
validator: (rule, value, callback) => {
let writeOffCodeReg = /^[0-9]{8}$/
return writeOffCodeReg.test(value) ? callback() : callback(new Error('请输入正确的核销码'))
},
trigger: 'change'
},
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('核销码不能为空'))
} else if (this.errMeg) {
callback(new Error(this.errMeg))
} else {
callback()
}
},
trigger: 'blur'
}
]
},
writeOffForm: [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
placeholder: '请输入核销码',
isClear: true
}
],
customObj: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddr: '',
handlerName: '',
handlerPhone: '',
contractNo: '',
reimbursementCountiesCode: '', //出险县区
reimbursementCityCode: '', //出险城市
reimbursementProvinceCode: '',
reimbursementProcess: '',
reimbursementProvinceName: '',
reimbursementCityName: '',
reimbursementCountiesName: '',
reimbursementAddress: []
},
customRule: {
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
reimbursementProcess: [{ required: true, message: '请输入出险经过描述', trigger: 'change' }],
reportDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [{ required: true, message: '请选择出险日期', trigger: 'change' }],
reimbursementAddr: [{ required: true, message: '请输入出险地点', trigger: 'change' }],
reimbursementAddress: [{ 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'
}
]
},
customForm: [
{
label: '报案人',
name: 'reporterName',
type: this.disabled ? 'showTxt' : 'input'
},
{
label: '报案人电话',
name: 'reporterPhone',
type: 'showTxt'
},
{
label: '报案日期',
name: 'reportDate',
type: 'showTxt'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'showTxt'
},
{
label: '出险地点',
name: 'reimbursementAddr',
addHtml: 'addrSlot'
}
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true,
maxlength: 20,
isDisabled: this.disabled
},
{
label: '经办人电话',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true,
isDisabled: this.disabled
},
{
label: '出险经过描述',
name: 'reimbursementProcess',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 200,
isDisabled: this.disabled
},
{
label: '申请核赔服务',
name: 'serviceCodes',
addHtml: 'approveAmountSlot'
}
],
serviceCodesList: [],
explanationObj: {
explanation1: ''
}
}
},
computed: {
totalPrice() {
let total = this.serviceCodesList.reduce(function (prev, cur) {
let curPrice = cur.checked ? cur.applyAmount : 0
return prev + +(curPrice * 100).toFixed(0)
}, 0)
return total / 100
},
serviceChecked() {
return !!this.serviceCodesList.find(item => item.checked)
}
},
created() {},
mounted() {
this.getCityList()
if (this.curRouteInfo.pageType != 6) {
this.batchListSearch.writeOffCode = this.curRouteInfo.writeOffCode
this.batchListSearch.id = this.curRouteInfo.id
this.getDetail()
}
},
watch: {
'customObj.reporterDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reporterDate')
}
},
'customObj.reimbursementDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
methods: {
changeLossType(e) {
this.curLossType = e
// const target = this.serviceCodesList.find(item => item.serviceItemCode == 'SC0006')
// this.$set(target, 'checked',!!target && !!e?.length)
},
updateTimeLimit(newVal, key) {
if (this.resData.isCustomerCommit || this.disabled) return
let limitTime = ''
let endTime = new Date().getTime()
if (util.dateFormat(endTime) === util.dateFormat(new Date(newVal))) {
limitTime = `00:00:00 - ${util.dateFormat(endTime, 'HH:mm:ss')}`
} else {
limitTime = '00:00:00 - 23:59:59'
}
const Item = this.customForm.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
},
getCityList() {
this.$apis.beforeSale
.getCityList({})
.then(res => {
// console.log(res, 'res')
this.regionData = res
})
.catch(error => {
console.log(error)
})
},
changeCustomerForm() {
this.customForm = [
{
label: '报案人',
name: 'reporterName',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isClear: true
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
isClear: true,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reporterDate')
}
}
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isClear: true,
customPickerOptions: {
disabledDate: date => {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isClear: true,
handleChange: cellValue => {
if (cellValue?.length == 3) {
const target = this.regionData.find(item => item.value == cellValue[0])
if (target) {
this.customObj.reimbursementProvinceName = target.label
const cityTarget = target.children.find(item => item.value == cellValue[1])
if (cityTarget) {
this.customObj.reimbursementCityName = cityTarget.label
const countiesTarget = cityTarget.children.find(item => item.value == cellValue[2])
if (countiesTarget) {
this.customObj.reimbursementCountiesName = countiesTarget.label
}
}
}
}
}
},
{
label: '出险详细地点',
name: 'reimbursementAddr',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 200
}
]
},
validPrice(e, id, key) {
let checkPlan = '' + this.serviceCodesList[id][key]
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.serviceCodesList[id], key, checkPlan)
},
changePrice(e, id, key) {
if (!e.target.value) return
const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') {
this.$set(this.serviceCodesList[id], key, e.target.value.substr(0, len - 1))
}
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceCodesList[id], key, 1)
}
const maxPrice = 200000
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceCodesList[id], key, maxPrice)
}
},
transportPic() {
const { writeOffCode } = this.batchListSearch
const { contractNo } = this.resData
let codeList = []
this.serviceCodesList.forEach(item => {
if (item.checked) {
codeList.push(item.serviceItemCode.slice(4))
}
})
if (!codeList.length) {
this.openTip('请先选择一项服务')
return
}
let code = codeList.join('_')
console.log(code)
this.showPicDialog = true
let dom = document.getElementById('qrcodeId')
while (dom && dom.firstChild) {
dom.removeChild(dom.firstChild)
}
let text = `${this.$commonData.baseUrl}/file-uploader-h5/h5#/?type=claims&WRT=${writeOffCode}&cNo=${contractNo}&sId=${this.$commonData.token}&code=${code}&dam=1`
setTimeout(() => {
new QRCode(this.$refs.qrCodeUrl, {
text: text, // 需要转换为二维码的内容
width: 150,
height: 150,
colorDark: '#000000',
colorLight: '#ffffff'
})
})
},
handleClick(val) {
if (val != 'detail') return
const target = this.serviceCodesList.find(item => item.checked)
if (!target) {
this.openTip(`请至少选择一项服务`)
}
},
changeCheckedStatus(e) {
this.$refs?.materialRef?.setActiveTab()
if (e.serviceItemCode == 'SC0006') {
if (e.checked) {
if (!e.lossType?.includes('3')) {
e.lossType?.push('3')
}
} else {
e.lossType = []
}
this.curLossType = [...e.lossType]
}
},
handleNextStep() {
this.$refs.writeOff.$refs.formRef.validate(valid => {
if (valid) {
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.beforeAdd({ writeOffCode }).then(res => {
if (res.code == '0') {
this.handleData(res)
} else {
this.errMeg = res.message
this.$refs.writeOff.$refs.formRef.validate(valid => {
this.gotoValidView('writeOffCode')
this.errMeg = ''
})
}
})
} else {
this.gotoValidView('writeOffCode')
}
})
},
getDetail() {
const { id } = this.batchListSearch
const loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass: 'loadingClass'
})
this.$apis.beforeSale
.getClaimsDetail({ id })
.then(res => {
// console.log(res, 'getClaimsDetail2')
if (res.code == '0') {
this.handleData(res)
} else {
this.openTip(res.message, '错误提示', true)
}
})
.finally(end => {
loading.close()
})
},
handleData(res) {
// console.log('handleData')
this.getOtherInfo(res.data.contractNo)
this.isCustomerCommit = res.data.isCustomerCommit
if (!res.data.isCustomerCommit && !this.disabled) {
this.changeCustomerForm()
}
this.isSavePage = true
this.customObj.reportDate = !res.data.isCustomerCommit && !this.disabled && !res.data['reportDate'] ? new Date() : util.dateFormat(res.data['reportDate'], 'YYYY-MM-DD HH:mm:ss')
this.customObj.reimbursementDate = !res.data.isCustomerCommit && !this.disabled && !res.data['reimbursementDate'] ? new Date() : util.dateFormat(res.data['reimbursementDate'], 'YYYY-MM-DD HH:mm:ss')
const formatKey = ['reportDate', 'reimbursementDate', 'reimbursementAddress']
for (let key in this.customObj) {
if (!formatKey.includes(key)) {
this.customObj[key] = res.data[key] || ''
}
}
let { reimbursementCountiesCode, reimbursementCityCode, reimbursementProvinceCode } = res.data
this.customObj.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
console.log(this.customObj, 'customObj')
//说明list
if (!res.data.supplementList1?.length) {
res.data.supplementList1 = []
res.data.supplementList1.push({ content: '', claimsId: res.data.id })
}
//图片list
const otherItem = res.data.attachmentConfigs1.find(item => item.secondClassifyName == '其他资料')
const otherAttachList = res.data?.attachments1?.filter(target => target.classifyId == otherItem.id) || []
let otherLen = otherAttachList.length
while (otherAttachList && otherLen) {
res.data.attachmentConfigs1.push({ ...otherItem })
otherLen--
}
const attachments1 = res.data?.attachments1?.length ? [...res.data?.attachments1] : []
res.data.attachmentConfigs1.map(item => {
if (tabObj[item.firstClassifyName]) item.key = tabObj[item.firstClassifyName]
const targetIdx = attachments1?.findIndex(target => target.classifyId == item.id)
item.imgObj = targetIdx > -1 ? attachments1[targetIdx] : {}
if (targetIdx > -1) {
attachments1.splice(targetIdx, 1)
}
})
this.attachmentList = [...res.data.attachmentConfigs1]
// this.$forceUpdate()
//服务list
res.data.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.lossAssessmentAmount = item.lossAssessmentAmount && item.lossAssessmentFlag ? (item.lossAssessmentAmount / 100).toFixed(2) : item.lossAssessmentAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
if (item.serviceItemCode == 'SC0003' && !item.lossType) item.lossType = '1'
if (item.serviceItemCode == 'SC0006') {
item.lossType = item.lossType ? item.lossType?.split(',') : []
this.curLossType = [...item.lossType]
}
item.checked = item.checked == 1
})
this.serviceCodesList = [...res.data.itemsList]
this.resData = res.data
},
// 获取其他信息
getOtherInfo(contractNo) {
console.log(contractNo, 'contractNo')
this.$apis.beforeSale.getOrderOtherInfo({ contractNo }).then(res => {
res = res.data
if (res) {
res.expirationDate = res.expirationDate ? res.effectiveDate + ' 至 ' + util.dateFormat(res.expirationDate, 'YYYY-MM-DD HH:mm:ss') : '2019-12-12 23:59:59'
res.billingDate = res.billingDate && util.dateFormat(res.billingDate, 'YYYY-MM-DD HH:mm:ss')
res.invoicePrice = res.invoicePrice ? res.invoicePrice / 100 : 0
this.otherInfoData = { ...res, contractNo }
console.log(this.otherInfoData, 'otherInfoData')
}
})
},
// 获取手机传图
getPhoneAttachment() {
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.getPhoneAttachment({ writeOffCode, type: 1 }).then(res => {
if (res?.attachments1?.length) {
//图片list
let otherList = [],
otherSaveList = []
const otherItem = this.attachmentList.find(item => item.secondClassifyName == '其他资料' && !item?.imgObj?.attachmentFile)
otherSaveList = this.attachmentList.filter(target => target.id == otherItem.id && target?.imgObj?.attachmentFile)
this.attachmentList = this.attachmentList.filter(target => target.id != otherItem.id)
res.attachments1.map(item => {
if (item.classifyId == otherItem.id) {
otherList.push({ ...otherItem, imgObj: item })
}
})
otherList.push(otherItem)
this.attachmentList.map(item => {
if (item.id != otherItem.id) {
const target = res.attachments1.find(ele => ele.classifyId == item.id)
if (target) {
this.$set(item, 'imgObj', target)
}
}
})
this.attachmentList = [...this.attachmentList, ...otherSaveList, ...otherList]
// res.attachments1.map(item => {
// if(item.classifyId==otherItem.id){
// this.attachmentList.push({...otherItem,imgObj:{...item}})
// }else{
// const targget = this.attachmentList.find(target => item.classifyId==target.id)
// if(targget && item?.attachmentFile){
// this.$set(targget,'imgObj',item)
// }
// }
// })
}
this.showPicDialog = false
})
},
getParams(type) {
const attachments1 = []
const itemsList = []
const supplementList1 = []
const checkedCode = []
let customObj = { ...this.customObj }
if (customObj?.reimbursementAddress?.length == 3) {
customObj.reimbursementProvinceCode = customObj.reimbursementAddress[0]
customObj.reimbursementCityCode = customObj.reimbursementAddress[1]
customObj.reimbursementCountiesCode = customObj.reimbursementAddress[2]
}
if (typeof customObj.reimbursementDate != 'string') {
customObj.reimbursementDate = util.dateFormat(customObj.reimbursementDate, 'YYYY-MM-DD HH:mm:ss')
}
if (typeof customObj.reportDate != 'string') {
customObj.reportDate = util.dateFormat(customObj.reportDate, 'YYYY-MM-DD HH:mm:ss')
}
let errorTarget = null
let lasAmountTarget = null
delete customObj.reimbursementAddress
this.serviceCodesList.forEach(ele => {
if (ele.checked) {
checkedCode.push(ele.serviceItemCode)
let { id, serviceItemCode, serviceItemName, writeOffCode, contractNo, approveAmount, lossAssessmentFlag, lossType, claimsId, applyAmount, lossAssessmentAmount } = ele
if (serviceItemCode == 'SC0006' && lossType) lossType = lossType?.join(',')
if (!applyAmount) {
errorTarget = ele
}
if (applyAmount && lossAssessmentFlag && !lossAssessmentAmount) {
lasAmountTarget = ele
}
let lasAmount = lossAssessmentAmount ? Number((lossAssessmentAmount * 100).toFixed(0)) : 0
let ayAmount = applyAmount ? Number((applyAmount * 100).toFixed(0)) : 0
itemsList.push({ id, serviceItemCode, serviceItemName, writeOffCode, contractNo, approveAmount: 0, lossType, claimsId: claimsId || this.resData.id, applyAmount: ayAmount, lossAssessmentAmount: lasAmount })
}
})
if (type == 1 && !itemsList.length) return { error: 'errorTip', tip: `请至少选择一项服务` }
if (type == 1 && errorTarget) return { error: 'errorTip', tip: `请输入${errorTarget.serviceItemName}的预估金额` }
if (type == 1 && lasAmountTarget) return { error: 'errorTip', tip: `请输入${lasAmountTarget.serviceItemName}的保险定损金额` }
for (let i = 0; i < this.attachmentList.length; i++) {
let ele = this.attachmentList[i]
if (ele.key != 'detail' || (ele.key == 'detail' && checkedCode.includes(ele.serviceItemCode))) {
if (ele?.imgObj?.attachmentFile) {
let { secondClassifyName } = ele
let { id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy } = ele.imgObj
if (type == 1 && auditStatus === 0 && this.curRouteInfo.status == 7) {
errorTarget = 'errorFile'
}
console.log(auditStatus, 'auditStatus')
attachments1.push({ id, claimsId: claimsId || this.resData.id, secondClassifyName, attachmentFile, attachmentType, attachmentCode, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy })
} else if (type == 1 && ele.isRequire == 1) {
if (ele.serviceItemCode == 'SC0006') {
if ((ele.secondClassifyName.indexOf('钥匙:') === 0 && this.curLossType?.includes('3')) || (ele.secondClassifyName.indexOf('车牌:') === 0 && this.curLossType?.includes('4'))) {
errorTarget = ele
break
}
} else {
errorTarget = ele
break
}
}
}
}
this.resData.supplementList1.forEach(item => {
let { id, claimsId, content, operation } = item
supplementList1.push({ id: id || '', operation: type == 1 ? 1 : operation || 0, claimsId, content, suppType: 1 })
})
if (errorTarget == 'errorFile') return { error: 'errorTip', tip: `请重新上传审核失败的图片` }
if (type == 1 && errorTarget) return { error: 'errorTip', tip: `请上传${errorTarget.firstClassifyName}中的${errorTarget.secondClassifyName}` }
const params = {
id: this.resData.id,
status: this.resData.status,
operation: type,
applyAmount: parseInt(this.totalPrice * 100),
...customObj,
attachments1,
itemsList,
supplementList1: supplementList1
}
if (type == 1) params.reasonForFailure = ''
return params
},
handleSave(type) {
let target = this.getParams(type)
if (target.error == 'errorTip') {
this.openTip(target.tip)
return
}
this.$refs.customRef.$refs.formRef.validate(valid => {
if (!type || valid) {
this.$refs.handlerRef.$refs.formRef.validate(secondValid => {
if (!type || secondValid) {
let params = { ...target }
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.newSaveWriteOff(params).then(res => {
loading.close()
if (res.code == '0') {
this.$message({
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/claims/index'
})
} else {
this.gotoValidView('writeOff')
this.openTip(res.message, '错误提示', true)
}
})
} else {
this.gotoValidView('reporterName')
}
})
} else {
this.gotoValidView('reporterName')
}
})
},
openTip(txt, title = '错误提示', hide) {
this.secondObj = {
txt,
title
}
this.isSecondVisible = !this.isSecondVisible
if (hide) {
setTimeout(() => {
this.isSecondVisible = false
}, 2200)
}
},
gotoValidView(id) {
document.getElementById(id) && document.getElementById(id).scrollIntoView()
},
handleCancel() {
this.$router.push({
path: '/claims/index'
})
}
}
}
</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;
}
.customer {
width: 1200px;
}
}
.handler-info {
/deep/ #serviceCodes {
display: block;
margin-bottom: 0;
.amount-wrap {
font-family: PingFangSC-Regular, PingFang SC;
width: fit-content;
color: #333333;
.unit-wrap {
background: #f9f9f9;
padding: 20px;
margin-bottom: 10px;
.el-radio-group,
.el-checkbox-group {
margin-left: 30px;
}
.unit-price {
display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
.required {
width: 154px;
text-align: right;
font-weight: 400;
font-size: 14px;
white-space: nowrap;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
}
.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;
}
}
}
}
/deep/ #description {
.el-textarea {
width: 580px !important;
}
}
}
.transport-pic {
font-size: 14px;
// color: #00a479;
cursor: pointer;
}
.signal-img {
margin-left: 128px;
p {
height: 18px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
// color: #00a479;
line-height: 20px;
}
img {
width: 824px;
height: 568px;
}
}
/deep/ .pic-dialog {
.el-dialog__body {
display: flex;
align-items: center;
flex-direction: column;
}
.T-tip {
display: block;
}
.B-tip {
display: block;
margin: 8px 0 16px;
}
.img {
width: 120px;
height: 120px;
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
.tips-dialog .el-icon-success {
margin-right: 10px;
font-size: 22px;
// color: #228b22;
}
.tips-dialog .el-icon-warning {
margin-right: 10px;
font-size: 22px;
color: #f77315;
}
.tips-dialog .el-icon-error {
margin-right: 10px;
font-size: 22px;
color: #f56c6c;
}
.tips-dialog .el-dialog__body {
padding: 10px 15px 20px !important;
}
</style>
<template>
<div id="writeOff" class="writeOff">
<helpService></helpService>
<title-tip v-if="curRouteInfo.status == 10 || curRouteInfo.status == 13">{{ `${curRouteInfo.status == 10 ? '主管审核' : '核赔'}` }}失败原因:{{ resData.reasonForFailureCode == 1 ? '拒赔' : '资料不清晰' }} {{ resData.reasonForFailure }}</title-tip>
<repair-info @getInfo="getInfo" :disabled="disabled" id="repairInfo" ref="repairInfo" :accountForm="accountForm" :serviceCodesList="serviceCodesList"></repair-info>
<Card title="上传图片">
<div v-if="!disabled" slot="right" class="transport-pic" @click.stop="transportPic">手机传图</div>
<upload-material :isWriteOff="true" :curLossType="curLossType" :disabled="disabled" :curRouteInfo="curRouteInfo" ref="materialwRef" :id="resData.id" :tabs.sync="tabs" :detailImgList.sync="serviceCodesList" :attachmentList.sync="attachmentList"></upload-material>
</Card>
<Card title="寄回原件">
<div slot="right" class="transport-pic" @click.stop="openSendDetail">寄件详情</div>
<img-list class="original" disabled :curRouteInfo="curRouteInfo" :id="resData.id" ref="originalRef" curKey="original" :list="originalList"></img-list>
<div class="express-wrap">
<p>寄回发票物流信息</p>
<div class="express-item">
<label class="label" for="">快递公司:</label>
<el-input :disabled="disabled" class="input" size="small" v-model="expressObj.expressName" type="text"></el-input>
</div>
<div class="express-item">
<label class="label" for="">快递单号:</label>
<el-input :disabled="disabled" class="input" size="small" v-model="expressObj.expressNo" type="text"></el-input>
</div>
</div>
</Card>
<explanation :disabled="disabled" :supplementList="resData.supplementList2"></explanation>
<el-dialog :visible.sync="showPicDialog" :close-on-click-modal="false" class="my-dialog pic-dialog" width="576px" title="手机传图">
<span class="T-tip">使用手机浏览器、微信等扫码后,即可用手机上传图片至电脑网页</span>
<span class="B-tip">扫码后手机上传链接时效为10分钟,过期后请重新扫码</span>
<div id="qrcode1Id" ref="qrwCodeUrl"></div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="getPhoneAttachment">图片已全部上传</el-button>
</span>
</el-dialog>
<sendDetail></sendDetail>
<processTip></processTip>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="10%" :title="secondObj.title">
<div class="f-size">
<i class="el-icon-warning"></i>
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isSecondVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="isSecondVisible = false">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="noPassVisibility" width="720px" top="30%" title="审核不通过">
<div class="f-size">
<glsx-combi-form ref="noPassRef" :isInline="false" :formRules="noPassRule" labelWidth="154px" defaultWidth="432px" :formObj="noPassObj" :formData="noPassData"></glsx-combi-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="noPassVisibility = false">取 消</el-button>
<el-button size="small" type="primary" @click="comfirmNoPass(0)">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="showDialog" class="my-dialog" width="720px" title="寄件详情">
<div class="sendCard">
<span class="title">邮寄地址</span>
<div class="content">
<p>收件人:权益服务组</p>
<p>联系电话:18938907441</p>
<p>收件地址:广东省深圳市南山区留仙大道3370号南山智园崇文园1号楼14楼</p>
</div>
</div>
<div class="sendCard">
<span class="title">寄件详情(发票右下角备注栏备注客户名+合同号)</span>
<div class="content">
<p>名称: 国任财产保险股份有限公司深圳分公司</p>
<p>纳税人识别号: 914403005503071468</p>
<p>税务登记公司地址: 深圳市罗湖区笋岗街道红岭路与梅园路交汇处招商开元中心一期03地块第一栋B单元24层02-06A</p>
<p>联系电话:0755-88379089</p>
<p>开户行及银行账号: 中国建设银行股份有限公司深圳田背支行 44201618500052507158</p>
</div>
</div>
</el-dialog>
<div class="btn-box">
<el-button type="default" @click="handleCancel">取消</el-button>
<template v-if="curRouteInfo.status == 8 || curRouteInfo.status == 10 || curRouteInfo.status == 13">
<el-button type="primary" @click="handleSave(0)">草稿</el-button>
<el-button type="primary" @click="handleSave(1)">提交</el-button>
</template>
<template v-if="curRouteInfo.pageType == 4">
<el-button type="primary" @click="noPassVisibility = true">不通过</el-button>
<el-button type="primary" @click="comfirmNoPass(1)">通过</el-button>
</template>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import QRCode from 'qrcodejs2'
import glsxCombiForm from '@/components/glsx-combi-form'
import titleTip from '@/components/titleTip'
import uploadMaterial from './components/uploadMaterial'
import Card from './components/card.vue'
import explanation from './components/explanation'
import helpService from './components/helpService'
import sendDetail from './components/sendDetail'
import processTip from './components/processTip'
import repairInfo from './components/repairInfo'
import util from '@/util/util'
import url from '@/assets/write_off.png'
import imgList from './components/imgList'
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 tabs = [
{
label: '核赔细节照',
name: 'detail',
isRequire: 1
},
{
label: '其他资料',
name: 'other'
}
]
const tabObj = {
'核赔细节照':'detail',
'其他资料':'other'
}
export default {
name: 'applyWriteOff',
components: {
glsxCombiForm,
titleTip,
uploadMaterial,
explanation,
Card,
helpService,
sendDetail,
processTip,
repairInfo,
imgList
},
props:{
curRouteInfo: Object,
disabled:{
type: Boolean,
default: false
}
},
data() {
return {
url,
tabs,
showDialog: false,
noPassVisibility:false,
curLossType:[],
noPassObj: {
reasonForFailure:'',
reasonForFailureCode: ''
},
expressObj: {
expressName: '',
expressNo: ''
},
noPassData: [
{
label: '原因',
name: 'reasonForFailureCode',
type: 'select',
optionList: [
{
confId: 1,
confName: '拒赔'
},
{
confId: 2,
confName: '资料不清晰'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '具体描述',
name: 'reasonForFailure',
type: 'input',
inputType: 'textarea',
rows: 3,
isClear: true,
maxlength: 50
}
],
noPassRule:{
reasonForFailureCode:[{ required: true, message: '请选择不通过原因', trigger: 'change' }],
},
originalTabs:[
{
label: '寄回原件',
name: 'original'
},
],
isSavePage: false,
batchListSearch: {
writeOffCode: ''
},
isSecondVisible:false,
secondObj:{
title:'',
txt:''
},
attachmentList:[],
originalList:[],
errMeg: '',
showPicDialog: false,
resData:{},
accountForm: {
id: '',
merchantId:'',
cardTypeName: '', //证件类型名称
objectType: 0, //收款对象
accountType: 0, //账户类型
openBankCode: '', //开户行名称
accountName: '', //账户名称
accountNo: '', // 收款账号
accountCityCode: '', // 收款账号所在省市
cardTypeCode: '', // 证件类型code
phone: '', // 收款人联系电话
cardNo:'' //证件号码
},
serviceCodesList: [],
explanationObj:{
explanation1:''
},
copyAccInfo0:{},
copyAccInfo1:{
id : '' ,
accountName : '',
cardTypeName:'',
accountCityCode : '',
openBankCode : '',
accountNo : '',
accountType : 0,
cardNo : '',
cardTypeCode : '',
phone : ''
}
}
},
mounted() {
// if(this.curRouteInfo.status==12 ||this.curRouteInfo.status==13 || this.curRouteInfo.status==3 || this.curRouteInfo.status==1){
// const target = this.tabs.find(item=>item.name =='apply')
// if(!target){
// this.tabs.unshift({
// label: '客户签名补偿申请书',
// name: 'apply',
// isRequire: 1
// })
// }
// tabObj['客户签名补偿申请书'] = 'apply'
// }
if(this.curRouteInfo.pageType!=6){
this.batchListSearch.writeOffCode = this.curRouteInfo.writeOffCode
this.handleNextStep()
}
},
methods: {
transportPic(){
const { writeOffCode } = this.batchListSearch
const { contractNo } = this.resData
let codeList = []
this.serviceCodesList.forEach(item => {
if(item.checked){
codeList.push(item.serviceItemCode.slice(4))
}
})
if(!codeList.length){
this.openTip('请先选择一项服务')
return;
}
let code = codeList.join('_')
this.showPicDialog = true
let dom = document.getElementById("qrcode1Id");
while (dom && dom.firstChild) {
dom.removeChild(dom.firstChild);
}
let text = `${this.$commonData.baseUrl}/file-uploader-h5/h5#/?type=claims&WRT=${writeOffCode}&cNo=${contractNo}&sId=${this.$commonData.token}&code=${code}&dam=2`
setTimeout(()=>{
new QRCode(this.$refs.qrwCodeUrl, {
text: text, // 需要转换为二维码的内容
width: 150,
height: 150,
colorDark: '#000000',
colorLight: '#ffffff',
})
})
},
openSendDetail(){
this.showDialog = true
},
handleNextStep() {
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.getClaimsDetail({ writeOffCode }).then(res => {
if (res.code == '0') {
this.isSavePage = true
this.expressObj = {
expressName: res?.data?.expressName,
expressNo: res?.data?.expressNo
}
// 收款对象
const formatKey = ['objectType','accountType']
const bankAccountDTO = res.data.bankAccountDTO || {}
for(let key in this.accountForm){
this.accountForm[key] = bankAccountDTO[key] ? bankAccountDTO[key] : formatKey.includes(key) ? 0 : ''
}
this.getAccountInfo(res.data.contractNo)
//说明list
if(!res.data?.supplementList2?.length){
res.data.supplementList2 = []
res.data.supplementList2.push({content: '',claimsId: res.data.id})
}
//图片list
const otherItem = res.data.attachmentConfigs2.find(item => item.secondClassifyName=='其他资料')
const otherAttachList = res.data?.attachments2?.filter(target => target.classifyId==otherItem.id) || []
let otherLen = otherAttachList.length
while(otherAttachList && otherLen){
res.data.attachmentConfigs2.push({...otherItem})
otherLen --
}
const attachments2 = res.data?.attachments2?.length ? [...res.data?.attachments2] : []
res.data.attachmentConfigs2.map(item => {
if(tabObj[item.firstClassifyName]) item.key = tabObj[item.firstClassifyName]
const targetIdx = attachments2?.findIndex(target => target.classifyId==item.id)
item.imgObj = targetIdx>-1 ? attachments2[targetIdx] : {}
if(targetIdx>-1){
attachments2.splice(targetIdx, 1)
}
})
this.attachmentList = [...res.data.attachmentConfigs2]
res.data.attachmentConfigs3.map(item => {
item.key = 'original'
// const targget = res.data.attachments3.find(target => target.classifyId==item.id)
item.imgObj = {}
})
this.originalList = [...res.data.attachmentConfigs3]
//服务list
res.data.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
item.lossAssessmentAmount = item.lossAssessmentAmount ? (item.lossAssessmentAmount/100).toFixed(2) : item.lossAssessmentAmount
if(item.serviceItemCode == 'SC0003' && !item.lossType) item.lossType= '1'
if(item.serviceItemCode == 'SC0006'){
item.lossType = item.lossType ? item.lossType?.split(',') : []
this.curLossType=[...item.lossType]
}
item.checked = item.checked == 1
})
const targetService = res.data.itemsList.find(item => item.checked)
if(targetService) this.$refs.materialwRef.changeSecondTab(targetService)
this.serviceCodesList = [...res.data.itemsList]
this.$refs.materialwRef.setTab(this.tabs[0]?.name || 'detail')
this.resData = res.data
}else{
this.openTip(res.message,'错误提示',true)
}
})
},
getAccountInfo(contractNo){
if (!contractNo) return
this.$apis.beforeSale.getAccountInfo({ contractNo }).then(res => {
const { id, accountName, accountCityCode, openBankCode, accountNo, accountType, cardNo, cardTypeCode, phone,cardTypeName } = res || {}
// const result = { id, accountName, accountCityCode, openBankCode, accountNo, accountType, cardNo, cardTypeCode, phone }
// this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
this.copyAccInfo0 = { id, accountName, accountCityCode, openBankCode, accountNo, accountType, cardNo, cardTypeCode, phone,cardTypeName }
if(this.accountForm.objectType==0){
this.setAccountInfo(0)
}
})
},
getInfo(val){
if(val==0){
const { accountName, accountCityCode, openBankCode, accountNo, accountType, cardNo, cardTypeCode, phone,cardTypeName } = this.accountForm
this.copyAccInfo1 = { id : this.resData?.bankAccountDTO?.objectType===1 ? this.resData?.bankAccountDTO?.id : '' , accountName, accountCityCode, openBankCode, accountNo, accountType, cardNo, cardTypeCode, phone,cardTypeName }
}
this.setAccountInfo(val)
},
setAccountInfo(val){
if(val==0){
this.accountForm = { ...this.accountForm,...this.copyAccInfo0}
}else{
this.accountForm = { ...this.accountForm,...this.copyAccInfo1}
}
},
// 获取手机传图
getPhoneAttachment(){
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.getPhoneAttachment({ writeOffCode,type:2 }).then(res=>{
if(res?.attachments2?.length){
//图片list
let otherList = [],otherSaveList = [];
const otherItem = this.attachmentList.find(item => item.secondClassifyName=='其他资料' && !item?.imgObj?.attachmentFile )
otherSaveList = this.attachmentList.filter(target => (target.id==otherItem.id && target?.imgObj?.attachmentFile))
this.attachmentList = this.attachmentList.filter(target => target.id!=otherItem.id)
res.attachments2.map(item=>{
if(item.classifyId==otherItem.id){
otherList.push({...otherItem,imgObj:item})
}
})
otherList.push(otherItem)
this.attachmentList.map(item => {
if(item.id!=otherItem.id){
const target = res.attachments2.find(ele => ele.classifyId==item.id)
if(target){
this.$set(item,'imgObj',target)
}
}
})
this.attachmentList = [...this.attachmentList,...otherSaveList,...otherList]
// res.attachments2.map(item => {
// if(item.classifyId==otherItem.id){
// this.attachmentList.push({...otherItem,imgObj:{...item}})
// }else{
// const targget = this.attachmentList.find(target => item.classifyId==target.id)
// if(targget && item?.attachmentFile){
// this.$set(targget,'imgObj',item)
// }
// }
// })
}
this.showPicDialog = false
})
},
getParams(type,pass){
const attachments2 = []
const attachments3 = []
const itemsList = []
const supplementList2 = []
this.serviceCodesList.forEach(ele => {
if(ele.checked){
let {id, serviceItemCode, serviceItemName, lossAssessmentAmount, writeOffCode, contractNo, approveAmount,lossType, claimsId,applyAmount } = ele
if(serviceItemCode == 'SC0006' && lossType) lossType = lossType?.join(',')
let aprice = approveAmount ? Number((approveAmount*100).toFixed(0)) : approveAmount
let apyprice = applyAmount ? Number((applyAmount*100).toFixed(0)) : applyAmount
let lprice = lossAssessmentAmount ? Number((lossAssessmentAmount*100).toFixed(0)) : lossAssessmentAmount
itemsList.push({id, serviceItemCode, serviceItemName, writeOffCode, contractNo, approveAmount:aprice,lossType, claimsId:claimsId || this.resData.id ,applyAmount:apyprice,lossAssessmentAmount: lprice })
}
});
let target = null
// const fileList = [...this.attachmentList, ...this.originalList]
const fileList = [...this.attachmentList]
for(let i=0;i<fileList.length;i++){
let ele = fileList[i]
if(ele?.imgObj?.attachmentFile){
let {secondClassifyName} = ele
let {id, claimsId, attachmentCode, attachmentType, attachmentFile, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy} = ele.imgObj
if(type==1 && auditStatus===0 && (this.curRouteInfo.status == 10 || this.curRouteInfo.status == 13)){
target = 'errorFile'
}
// if(ele.key == 'original'){
// attachments3.push({id, claimsId:claimsId || this.resData.id, secondClassifyName, attachmentFile, attachmentType, attachmentCode, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy})
// }else{
attachments2.push({id, claimsId:claimsId || this.resData.id, secondClassifyName, attachmentFile, attachmentType, attachmentCode, classifyId, attachmentName, auditStatus, reasonForFailure, auditBy})
// }
}else if(type==1 && ele.isRequire==1){
const checkedItem = this.serviceCodesList.find(item => (item.checked && item.serviceItemCode==ele.serviceItemCode))
if(checkedItem){
target = ele
break;
}
}
}
this.resData.supplementList2.forEach(item => {
let {id, claimsId, content, operation } = item
supplementList2.push({id :id || '', operation: type==1? 1 : (operation || 0), claimsId, content , suppType: 2})
})
if(target == 'errorFile') return {error:'errorTip',tip:`请重新上传审核失败的图片`}
if(type==1 && target) return {error:'errorTip',tip:`请上传${target.firstClassifyName}中的${target.secondClassifyName}`}
const {id , writeOffCode} = this.resData
const {expressName, expressNo} = this.expressObj
const params = {
id,
expressName,
expressNo,
writeOffCode,
bankAccount: this.accountForm,
attachments2,
attachments3,
itemsList,
supplementList2: supplementList2
}
if(type!=3){
params.operation = type
}else{
params.auditStatus = pass
params.reasonForFailure = pass==1 ? '' : type
params.status = this.curRouteInfo.status
}
if(type==1) params.reasonForFailure = ''
return params
},
comfirmNoPass(isPass){
if(isPass){
this.toAudit(isPass)
}else{
this.$refs.noPassRef.$refs.formRef.validate(valid=>{
if(valid){
this.toAudit(isPass)
}
})
}
},
toAudit(isPass){
const params = {
id: this.resData.id,
auditStatus : isPass,
status : this.curRouteInfo.status
}
if(isPass!=1){
params.reasonForFailure = this.noPassObj.reasonForFailure
params.reasonForFailureCode = this.noPassObj.reasonForFailureCode
}
this.$apis.beforeSale.auditWriteOff(params).then(res =>{
if (res.code == '0') {
this.$router.push({
path: '/beforeSale/index'
})
}else{
this.openTip(res.message,'错误提示',true)
}
})
},
handleSave(type,pass) {
let target = this.getParams(type,pass)
if(target.error == 'errorTip') {
this.openTip(target.tip)
return;
}
this.$refs.repairInfo.$refs.accountRef.$refs.formRef.validate(valid => {
if (!type || valid) {
let params = {...target}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.saveClaims(params).then(res => {
loading.close()
if (res.code == '0') {
this.$message({
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/beforeSale/index'
})
} else {
this.gotoValidView('writeOff')
this.openTip(res.message,'错误提示',true)
}
})
} else {
this.gotoValidView('repairInfo')
}
})
},
openTip(txt, title = '错误提示',hide){
this.secondObj ={
txt,
title
}
this.isSecondVisible = !this.isSecondVisible
if(hide){
setTimeout(()=>{
this.isSecondVisible = false
}, 2200)
}
},
gotoValidView(id) {
document.getElementById(id) && document.getElementById(id).scrollIntoView()
},
handleCancel() {
this.$router.push({
path: '/beforeSale/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
/deep/ .el-form-item__label {
padding: 0;
}
.transport-pic {
font-size: 14px;
color: #00a479;
cursor: pointer;
}
.original {
/deep/ .add-btn {
display: none;
}
}
/deep/ .pic-dialog {
.el-dialog__body {
display: flex;
align-items: center;
flex-direction: column;
}
.T-tip {
display: block;
}
.B-tip {
display: block;
margin: 8px 0 16px;
}
img {
width: 120px;
height: 120px;
}
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin: 16px 0 20px 0;
}
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
.tips-dialog .el-icon-success {
margin-right: 10px;
font-size: 22px;
color: #228b22;
}
.tips-dialog .el-icon-warning {
margin-right: 10px;
font-size: 22px;
color: #f77315;
}
.tips-dialog .el-icon-error {
margin-right: 10px;
font-size: 22px;
color: #f56c6c;
}
.tips-dialog .el-dialog__body {
padding: 10px 15px 20px !important;
}
.sendCard {
background: #f9f9f9;
padding: 16px 20px;
&:first-child {
margin-bottom: 16px;
}
.title {
font-size: 16px;
color: #333;
}
.content {
margin-top: 8px;
p {
margin: 0;
line-height: 22px;
font-size: 14px;
color: #666;
}
}
}
.express-wrap {
font-weight: 400;
font-size: 14px;
color: #333333;
.express-item {
display: flex;
align-items: center;
margin-bottom: 8px;
.label {
text-align: right;
}
.input {
width: 432px;
}
}
}
</style>
<template>
<div class="writeOff">
<div class="box">
<div class="header title" style="height: 53px; line-height: 53px">
<span style="height: 53px; cursor: pointer; display: flex; align-items: center" @click="back">
<i class="el-icon-arrow-left" style="font-size: 18px"></i>
返回
</span>
</div>
<div class="custom-info">
<p class="title" style="margin-bottom: 20px">报案信息(客户提交)</p>
<div class="info">
<span class="item" v-for="(val, key) in customObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
</div>
</div>
</div>
<div class="box" style="margin-top: 10px">
<div class="header title">报案信息(店面补充)</div>
<div class="handler-info">
<span class="item" v-for="(val, key) in handlerObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
<div class="item service">
<span class="label">申请核赔服务:</span>
<div class="sevice-box">
<div v-for="(item, index) in info.serviceItemsList" :key="index" class="service-item">
{{ item.serviceItemName }}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
export default {
name: 'writeOffDetail',
data() {
return {
info: {},
customObj: {
writeOffCode: '核销码',
nullval: '',
reporterName: '报案人',
reporterPhone: '报案人联系号码',
reporterDate: '报案日期',
reimbursementDate: '出险日期'
},
handlerObj: {
handlerName: '经办人',
handlerPhone: '经办人联系号码'
}
}
},
mounted() {
this.getDetail(this.$route.params)
},
methods: {
getDetail({ id }) {
this.$apis.beforeSale.getWriteOffDetail({ writeOffCode: id }).then(res => {
if (res.code == '0') {
this.info = res.data
}
})
},
back() {
this.$router.push({
path: '/beforeSale/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
.box {
background-color: #fff;
}
p {
margin: 0;
}
.item {
width: 350px;
padding: 15px 0;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
display: inline-block;
margin-right: 120px;
.label {
width: 140px;
text-align: right;
display: inline-block;
}
}
.service {
margin-right: 0 !important;
display: flex;
width: 100%;
.label {
height: 36px;
line-height: 36px;
white-space: nowrap;
}
.sevice-box {
width: 800px;
.service-item {
width: 240px;
height: 36px;
background: #f7f7f7;
border: 1px solid #e9e9e9;
display: inline-flex;
align-items: center;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
padding: 0 12px;
box-sizing: border-box;
margin: 0 20px 20px 0;
}
}
}
.title {
font-family: PingFangSC-Medium;
font-size: 14px;
color: #333333;
font-weight: 700;
}
.header {
border-bottom: 1px solid #eeeeee;
height: 60px;
background-color: #fff;
line-height: 60px;
padding: 0 20px;
}
.custom-info {
height: 220px;
padding: 20px;
box-sizing: border-box;
.info {
width: 950px;
}
}
.handler-info {
padding: 20px;
}
}
</style>
<template>
<div class="writeOff">
<title-tip v-if="$commonData.dirctorAudit != 1">请注意:订单列表还有{{ countData.pendingCount }}单待受理, {{ countData.merchantFailCount }}单 不通过退回处理,{{ countData.toBeSignedCount }}单待客户签名授权。为保障客户权益,请尽快处理哦!</title-tip>
<div class="contain equity-wrap">
<div class="search-wrap">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="230px" :formObj="batchListSearch" :formData="writeOffForm">
<span slot="footer" class="footer-btns">
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset('reset')">重置</el-button>
</span>
</glsx-combi-form>
</div>
<div class="list-wrap">
<div class="operate-wrap">
<span class="title">核赔订单列表</span>
<span>
<el-button size="small" type="primary" @click="handleView({ status: 999 }, 6)">新增核赔</el-button>
<el-button size="small" type="primary" plain @click="handleExport">导出</el-button>
</span>
</div>
<GLTable ref="writeOffTable" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<template v-if="$commonData.dirctorAudit == 1">
<el-button type="text" @click="handleView(scope.scope, 4)">去审核</el-button>
</template>
<template v-else>
<el-button v-if="[1, 3, 6, 9, 12, 29, 30, 31].includes(scope.scope.status) || (scope.scope.status == 7 && scope.scope.statusDesc == '拒赔')" type="text" @click="handleView(scope.scope, 1)">查看</el-button>
<el-button v-if="[5, 8].includes(scope.scope.status)" type="text" @click="handleView(scope.scope, 2)">上传资料</el-button>
<el-button v-if="[10, 13].includes(scope.scope.status) || (scope.scope.status == 7 && scope.scope.statusDesc != '拒赔')" type="text" @click="handleView(scope.scope, 3)">重新提交</el-button>
<el-button v-if="scope.scope.status == 7 && scope.scope.statusDesc == '拒赔'" type="text" @click="uploadExplain(scope.scope)">上传通融说明</el-button>
<el-button v-if="scope.scope.status == 7 && scope.scope.statusDesc == '拒赔'" type="text" @click="downloadExplain(scope.scope)">下载通融说明模板</el-button>
<el-button v-if="[11].includes(scope.scope.status)" type="text" @click="handleView(scope.scope, 5)">签名授权书</el-button>
</template>
</div>
</GLTable>
</div>
</div>
<glsx-dialog class="upload-dialog" title="上传资料" btnSize="small" btnOkLabel="确认" :isVisible.sync="explainObj.fileVisible" width="576px" @confirmDialog="confirmExplainDialog" @closeDialog="cancelExplainDialog">
<div class="upload-wrap">
<label class="label" for="">上传资料:</label>
<div v-if="!explainObj.exceptionImgUrl" class="upload-btn" @click="selectFile">
<img class="img" :src="require('@/assets/add.png')" alt="" />
<span class="name">上传照片</span>
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
</div>
<div class="img-wrap" v-else>
<div class="mask">
<i class="del el-icon-delete" @click="handleDel()"></i>
</div>
<el-image :preview-src-list="[explainObj.exceptionImgUrl]" class="img-url" :src="explainObj.exceptionImgUrl" alt=""></el-image>
</div>
<span class="example">
示例
<div class="example-box">
<el-image class="example-img" :preview-src-list="[exampleUrl]" :src="exampleUrl" alt=""></el-image>
</div>
</span>
<span class="download" @click="downloadExplain()">下载通融模板</span>
</div>
</glsx-dialog>
<process-tip ref="processTip"></process-tip>
<pre-img ref="preImgRef"></pre-img>
</div>
</template>
<script type="text/ecmascript-6">
import exampleUrl from '@/assets/explain-example.png'
import signed from '../image/signed.png'
import glsxCombiForm from '@/components/glsx-combi-form'
import glsxDialog from '@/components/glsx-dialog'
import titleTip from '@/components/titleTip'
import util from '@/util/util'
import processTip from './components/processTip'
import preImg from './components/preImg'
const serviceList = [
{
confId: '',
confName: '全部'
},
{
confId: 1,
confName: '待支付'
},
{
confId: 3,
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: 29,
confName: '已失效'
},
{
confId: 30,
confName: '已删除'
},
{
confId: 31,
confName: '已结束案件'
}
]
export default {
name: 'writeOffList',
data() {
return {
showTip: true,
exampleUrl,
getListApi: this.$apis.beforeSale.getWriteOffList,
batchListSearch: {
searchText: '',
status: '',
activeTime: [],
merchantUpdatedTime: []
},
explainObj: {
fileVisible: false,
exceptionImgUrl: '',
id: ''
},
uploadForm: {
file: ''
},
uploadFormData: [
{
label: '上传资料',
name: 'file',
type: 'upload',
limitSize: 20,
maxPhotoNum: 4,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const targetNameList = file.name.split('.')
const base64 = targetNameList[targetNameList.length - 1] + '@' + imgFile.split(',')[1]
var imgUrl = ''
this.$apis.beforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.uploadFile(res, targetItem)
})
}
}
],
countData:{},
searchForm: {},
writeOffForm: [
{
label: '搜索内容',
name: 'searchText',
type: 'input',
placeholder: '车主姓名 | 核销码 | 合同号',
isClear: true
},
{
label: '服务状态',
name: 'status',
type: 'select',
optionList: serviceList,
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '提交时间',
name: 'activeTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
},
{
label: '门店更新时间',
name: 'merchantUpdatedTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
// 序号、核销码、客户名、合同号、价格区间、门店提交时间、服务名称、操作
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'writeOffCode',
width: 120,
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
},
{
label: '客户名',
prop: 'reporterName',
width: 200,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: 200,
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '价格区间',
prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '门店提交时间',
prop: 'commitTime',
width: 200,
formatter: cellValue => {
return cellValue.commitTime ? util.dateFormat(cellValue.commitTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '门店更新时间',
prop: 'merchantUpdatedDate',
width: 200,
formatter: cellValue => {
return cellValue.merchantUpdatedDate ? util.dateFormat(cellValue.merchantUpdatedDate, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '服务名称',
prop: 'serviceName',
formatter: cellValue => {
return cellValue.serviceName || '-'
},
width: 200,
line:1
},
{
label: '服务状态',
prop: 'status',
width: 120,
formatter: cellValue => {
return serviceList.map(item => item.confId).includes(cellValue.status) ? serviceList.find(item => item.confId == cellValue.status).confName : '-'
}
},
{
label: '状态描述',
prop: 'statusDesc',
formatter: cellValue => {
return cellValue.statusDesc || '-'
},
width: 200,
line: 1
},
{
label: '支付金额/元',
prop: 'paymentAmount',
formatter: cellValue => {
return cellValue.paymentAmount || '-'
},
align:'right',
width: 120
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
}
]
},
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
components: {
glsxCombiForm,
glsxDialog,
titleTip,
processTip,
preImg
},
mounted() {
this.$apis.beforeSale.hasUnsigned({}).then(res => {
if(res?.data && this.$commonData.dirctorAudit!=1){
this.$refs.processTip.openTipDialog(true)
}
})
this.getClaimsCount()
},
methods: {
// 删除通融说明图片
handleDel(){
this.explainObj.exceptionImgUrl = ''
},
downloadExplain(){
try {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', this.$tempUrl)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} catch (error) {
console.log(error)
}
},
selectFile(){
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.uploadImageApi({ file: base64, fileType: 'image' }).then(res => {
if(res.code == '0' && res.data){
this.explainObj.exceptionImgUrl = res.data
}
}).finally(()=>{
this.$refs.input.value = ''
})
}
},
confirmExplainDialog(){
if(!this.explainObj.exceptionImgUrl) return this.$message.error('请上传通融资料')
const {exceptionImgUrl, id} = this.explainObj
this.$apis.beforeSale.applyPassApi({exceptionImgUrl, id}).then(res => {
if(res) {
this.$message.success('操作成功')
this.handleSearch()
this.cancelExplainDialog()
}
})
},
cancelExplainDialog(){
this.explainObj = {
fileVisible: false,
exceptionImgUrl: '',
id: ''
}
},
uploadExplain(row){
this.explainObj.id = row.id
this.explainObj.fileVisible = true
},
handleView(item, type) {
// type 1-查看 2-上传资料 3-重新提交 4-去审核 5-签名 6-新增
let urlParam = {
pageType: type,
status : item.status
}
if(type!=6){
urlParam.writeOffCode = item.writeOffCode
}
const params = encodeURIComponent(JSON.stringify(urlParam))
if((item.preStatus == 6 && item.status==31) || item.status==5 || item.status==6 || item.status==7 || item.status==29 || item.status==30 || item.status==999){
this.$router.push(`/beforeSale/writeOff/addDamage/${params}/`)
}else if(item.status== 11){
this.$refs.preImgRef.preImage(signed)
}else{
this.$router.push(`/beforeSale/writeOff/addWriteOff/${params}/`)
}
},
getClaimsCount(){
if(this.$commonData.dirctorAudit==1) return;
this.$apis.beforeSale.getClaimsCount({isOss:0}).then(res => {
if(res){
this.countData = res
}
})
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchForm = { ...this.setParams() }
resolve()
})
},
setParams() {
const params = {...this.batchListSearch}
if (Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length > 0) {
params.commitTimeStart = this.batchListSearch.activeTime[0] + ' 00:00:00'
params.commitTimeEnd = this.batchListSearch.activeTime[1] + ' 23:59:59'
}
if (Array.isArray(this.batchListSearch.merchantUpdatedTime) && this.batchListSearch.merchantUpdatedTime.length > 0){
params.merchantUpdatedStart = this.batchListSearch.merchantUpdatedTime[0] + ' 00:00:00'
params.merchantUpdatedEnd = this.batchListSearch.merchantUpdatedTime[1] + ' 23:59:59'
}
params.isCharge = this.$commonData.dirctorAudit
delete params.activeTime
delete params.merchantUpdatedTime
return params
},
handleExport() {
const parmas = { ...this.setParams() }
this.$apis.beforeSale.exportWriteOffData(parmas).then(({ code, data, message }) => {
if (code == '0') {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} else {
this.$message.error(message)
}
})
},
handleSearch() {
this.$refs.writeOffTable.refreshTable()
},
handleReset(type) {
this.batchListSearch = {
searchText: '',
status:'',
activeTime: []
}
if (type === 'reset') {
this.handleSearch()
}
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
.equity-wrap {
background-color: #fff;
padding: 20px 0;
.el-button--small {
border-radius: 4px;
}
.search-wrap {
/deep/ .el-form-item {
margin-right: 12px;
}
}
.list-wrap {
padding: 0 20px;
.operate-wrap {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
align-items: center;
.title {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #333333;
}
}
}
}
}
.upload-dialog {
/deep/ .el-dialog__header {
height: 60px;
padding: 0 20px;
line-height: 60px;
border-bottom: 1px solid #e5e5e5;
font-weight: 600;
font-size: 20px;
color: #333333;
.el-icon-close {
font-weight: 600;
font-size: 22px;
color: #666666;
}
}
/deep/ .el-dialog__footer {
border-top: 1px solid #e5e5e5;
height: 64px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
.img-url {
width: 104px;
height: 104px;
border: 1px dashed #00000026;
border-radius: 4px;
}
.upload-wrap {
display: flex;
.label {
width: 154px;
text-align: right;
}
.img-wrap {
position: relative;
height: 104px;
&:hover .mask {
display: block;
}
}
.mask {
display: none;
position: absolute;
left: 0;
right: 0;
top: 0;
left: 0;
z-index: 9;
height: 104px;
border-radius: 4px;
background: rgba($color: #000000, $alpha: 0.4);
text-align: center;
line-height: 104px;
.del {
color: #fff;
font-size: 18px;
cursor: pointer;
}
}
.upload-btn {
width: 104px;
height: 104px;
box-sizing: border-box;
background: #0000000a;
border: 1px dashed #00000026;
border-radius: 4px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
.img {
width: 24px;
height: 24px;
}
.name {
margin-top: 10px;
font-weight: 400;
font-size: 14px;
}
.file {
width: 0;
height: 0;
opacity: 0;
}
}
.example {
margin: 0 12px;
position: relative;
height: fit-content;
&:hover {
.example-box {
display: block;
}
}
.example-box {
background: #ffffff;
border: 1px solid #e4e7ed;
box-sizing: border-box;
box-shadow: 0 4px 12px 0 #00000014;
border-radius: 4px;
position: absolute;
padding: 10px;
display: none;
top: 18px;
.example-img {
width: 304px;
height: 340px;
}
}
}
.download,
.example {
cursor: pointer;
color: #20af89;
}
}
}
</style>
......@@ -3,7 +3,9 @@
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content">
<glsxCombiForm :formDisable="isDisabled" :isInline="false" :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="editFormData"></glsxCombiForm>
<glsxCombiForm :formDisable="isDisabled" :isInline="false" :regionData="regionData" class="edit-form-container"
ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="editFormData">
</glsxCombiForm>
</div>
</div>
......@@ -11,7 +13,8 @@
<div>
<Card title="报案信息(店面补充)" class="handler-info gl-form-page">
<glsx-combi-form :formDisable="isDisabled" ref="handlerRef" :isInline="false" labelWidth="154px" defaultWidth="432px" :formObj="repotData" :formData="handlerForm">
<glsx-combi-form :formDisable="isDisabled" 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>
......@@ -27,14 +30,20 @@
<el-checkbox label="4">车牌重置</el-checkbox>
</el-checkbox-group>
</div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<div class="unit-price"
:class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<div>
<label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')"
@blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额"
v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input :disabled="!item.applyAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
<el-input :disabled="!item.applyAmount" maxlength="10"
@input="validPrice($event, index, 'lossAssessmentAmount')"
@blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额"
v-model="item.lossAssessmentAmount"></el-input>
</div>
</div>
</div>
......@@ -54,19 +63,22 @@
<!-- 上传资料 -->
<div>
<upload-material :lossTypeList.sync="lossTypeList" :isDisabled="isDisabled" :insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
<upload-material :lossTypeList.sync="lossTypeList" :isDisabled="isDisabled"
:insuranceAttachmentConfigs.sync="insuranceAttachmentConfigs"></upload-material>
</div>
<!-- 案件补充说明 -->
<div>
<explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1" :operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
<explanation :isDisabled="isDisabled" :supplementList="repotData.supplementList1"
:operatorName="repotData.updatedBy" :id="repotData.id"></explanation>
</div>
<!-- 待定损和待核赔的时候才显示案件通融说明 -->
<Card v-if="repotData.exceptionImgUrl && (repotData.status == 6 || repotData.status == 12)" title="案件通融说明">
<div class="tr-wrap">
<label class="label" for="">通融说明:</label>
<el-image class="img" :preview-src-list="[repotData.exceptionImgUrl]" :src="repotData.exceptionImgUrl"></el-image>
<el-image class="img" :preview-src-list="[repotData.exceptionImgUrl]"
:src="repotData.exceptionImgUrl"></el-image>
</div>
</Card>
......@@ -232,8 +244,8 @@ export default {
insuranceAttachmentConfigs: Array,
itemList: Array,
otherInfoData: Object,
isDisabled:Boolean,
lossTypeList:Array
isDisabled: Boolean,
lossTypeList: Array
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
......@@ -297,7 +309,7 @@ export default {
this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
if (key == 'lossAssessmentAmount') {
maxPrice = 2000000
}
if (Number(e.target.value) > maxPrice) {
......@@ -315,7 +327,7 @@ export default {
}, 0)
this.repotData.applyAmount = (total / 100).toFixed(2)
},
changeType(e){
changeType(e) {
// if(!e.length){
// this.$message({
// message: '至少选一个服务类型',
......@@ -324,7 +336,7 @@ export default {
// return
// }
this.lossTypeList = e
this.$emit('getCurrentLoosType',e)
this.$emit('getCurrentLoosType', e)
}
}
}
......@@ -333,19 +345,23 @@ export default {
.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;
.loss_wrap {
background: #f9f9f9;
padding: 20px;
.required {
width: 154px;
text-align: right;
......@@ -353,12 +369,14 @@ export default {
font-size: 14px;
}
}
.unit-price {
background: #f9f9f9;
padding: 20px;
// display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
display: inline-block;
......@@ -366,26 +384,32 @@ export default {
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.nopt20 {
padding: 0 20px;
}
.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;
......@@ -394,6 +418,7 @@ export default {
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
......@@ -403,16 +428,19 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
.tr-wrap {
.label {
width: 154px;
......@@ -425,6 +453,7 @@ export default {
line-height: 20px;
margin-top: 6px;
}
.img {
width: 104px;
height: 104px;
......
......@@ -2,7 +2,8 @@
<div class="report-components gl-form-page">
<div class="title">报案信息(客户提交)</div>
<template v-if="[1, 3, 4, 5, 6].includes(pageType) && !renewDisable">
<glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px"
defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType == 1" style="display: inline-block" slot="syncBtn">
<el-button style="margin: 0 12px" type="primary" @click="toSearchOrderDetail">同步</el-button>
<span style="font-weight: 400; color: #666">{{ `同步${isGH ? '核销码关联合同中的' : '合同中'}以下信息,同步后的信息可手动编辑` }}</span>
......@@ -403,6 +404,7 @@ export default {
<style lang="scss" scoped>
.report-components {
background: white;
.title {
padding: 0 20px;
font-size: 16px;
......@@ -413,17 +415,21 @@ export default {
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
/deep/ #reportDate,
/deep/ #internalReimbursementDate,
/deep/ #reimbursementDate {
......@@ -431,6 +437,7 @@ export default {
.el-input__inner {
padding-left: 15px;
}
.el-input__prefix {
right: 5px;
text-align: right;
......@@ -439,26 +446,33 @@ export default {
}
}
}
.detail_pannel {
padding: 20px;
.top_line {
padding: 8px 20px;
background: #f9f9f9;
margin-bottom: 20px;
}
.wrap {
flex-wrap: wrap;
}
.line_widget {
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
.required {
color: #eb4e4e;
font-size: 6px;
margin-right: 4px;
}
.text {
font-size: 14px;
font-weight: 400;
......@@ -466,6 +480,7 @@ export default {
line-height: 20px;
}
}
.value {
width: 348px;
font-size: 14px;
......
......@@ -360,12 +360,12 @@ export default {
activeNameTabs: 'first',
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
{ name: '购置税', key: 'purchaseTax' },
{ name: '折旧费', key: 'depreciation' },
{ name: '商业险保费', key: 'commercialInsurance' },
{ name: '登记费', key: 'registrationFee' },
{ name: '加改装件费用', key: 'retrofits' },
{ name: '代步车费用', key: 'scooterFare' }
]
}
},
......
......@@ -126,6 +126,10 @@ const statusList = [
{
confId: 39,
confName: '资金红冲'
},
{
confId: 40,
confName: '已失效'
}
]
export default {
......@@ -156,7 +160,7 @@ export default {
return '去处理'
},
condition: row => {
return [0, 19].includes(row.scope.status) || ([22, 25].includes(row.scope.status) && row.scope.source != 3)
return [0, 19].includes(row.scope.status) || ([22, 25].includes(row.scope.status) && row.scope.source != 3 && row.scope.source != 4)
},
attrs: {
type: 'text',
......@@ -174,7 +178,7 @@ export default {
condition: row => {
const { status, source } = row.scope
if (status == 2) {
return source != 3
return source != 3 && source != 4
}
return ![19, 33].includes(status)
},
......@@ -187,6 +191,24 @@ export default {
}
},
{
type: 'el-button',
name: row => {
return '上传资料'
},
condition: row => {
// return true;
const { status, source } = row.scope
return [32].includes(status) && source == 4
},
attrs: {
type: 'text',
fn: '上传资料'
},
listeners: {
click: row => this.handleView(row.scope, 2)
}
},
{
type: 'GLButton',
name: row => {
return '重新提交'
......@@ -277,7 +299,7 @@ export default {
mutiSelectName: 'djIndex',
mutiSelectUniqueKey: 'id',
checkSelectable: row => {
return row.source != 3
return row.source != 3 && row.source != 4
},
tableColumns: [
{
......@@ -328,10 +350,10 @@ export default {
},
{
label: '门店提交时间',
prop: 'commitTime',
prop: 'merchantCommitDate',
width: 180,
formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
return cellValue.merchantCommitDate ? dayjs(cellValue.merchantCommitDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
......@@ -531,6 +553,10 @@ export default {
39: {
name: '资金红冲',
color: '#EB4E4E'
},
40: {
name: '已失效',
color: '#C6C6C6'
}
},
isFollowSync: false
......@@ -596,10 +622,34 @@ export default {
handleClose() {
this.isFollowSync = false
},
handleView(item, type) {
// type 1-查看 2-上传资料 3-重新提交 4-去审核 5-签名 6-新增
let urlParam = {
pageType: type,
status: item.status
}
if (type != 6) {
urlParam.writeOffCode = item.writeOffCode
urlParam.id = item.id
}
const params = encodeURIComponent(JSON.stringify(urlParam))
// if ((item.preStatus == 6 && item.status == 31) || item.status == 5 || item.status == 6 || item.status == 7 || item.status == 29 || item.status == 30 || item.status == 999) {
this.$router.push({ path: `/beforeSale/writeOff/addDamage/${params}/` })
// console.log(22222)
// this.$router.push({ path: '/djClaims/djOrder/' })
// this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
// } else if (item.status == 11) {
// this.$refs.preImgRef.preImage(signed)
// } else {
// this.$router.push(`/beforeSale/writeOff/addWriteOff/${params}/`)
// }
},
// 1.新增 2.查看 3.重新提交 4.去处理 5.运营经理审核 6 核赔审核
handleEdit(editNo, row) {
const title = this.jumpTitle(editNo)
if (row && row.source == 3) {
if (row && (row.source == 3 || row.source == 4)) {
const params = {
editNo,
isGH: true,
......@@ -735,11 +785,13 @@ export default {
border: 1px solid #5850ff;
padding: 0 16px;
border-radius: 4px;
.el-icon-warning {
font-size: 16px;
color: #5850ff;
margin-right: 8px;
}
.count_num {
font-size: 14px;
color: #5850ff;
......@@ -748,27 +800,33 @@ export default {
margin: 0 8px;
}
}
.search_container {
background: #ffffff;
padding: 20px 20px 0;
}
.table_widget {
padding: 0px 20px 20px;
background: #ffffff;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.table_top_line {
margin-bottom: 10px;
}
.el-button + .el-button {
margin-left: 8px;
}
/deep/ .el-form {
.el-form-item {
// margin-right: 12px !important;
......
......@@ -32,7 +32,7 @@
<label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input :disabled="!item.applyAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
</div>
......@@ -232,10 +232,31 @@ export default {
insuranceAttachmentConfigs: Array,
itemList: Array,
otherInfoData: Object,
isDisabled:Boolean,
lossTypeList:Array
isDisabled: Boolean,
lossTypeList: Array
},
watch: {
repotData(newVal, oldVal) {
console.log('repotData', newVal)
if (newVal.source == 4) {
let itemIndex = this.editFormData.findIndex(item => item.name === 'contractNo')
console.log(itemIndex)
this.editFormData[itemIndex] = {
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: true
}
// this.$set(this.editFormData[itemIndex], {
// label: '核销码',
// name: 'writeOffCode',
// type: 'input',
// maxlength: 8,
// isDisabled: true
// })
}
},
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
......@@ -266,6 +287,7 @@ export default {
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, key) {
......@@ -297,7 +319,7 @@ export default {
this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if(key == 'lossAssessmentAmount') {
if (key == 'lossAssessmentAmount') {
maxPrice = 2000000
}
if (Number(e.target.value) > maxPrice) {
......@@ -315,7 +337,7 @@ export default {
}, 0)
this.repotData.applyAmount = (total / 100).toFixed(2)
},
changeType(e){
changeType(e) {
// if(!e.length){
// this.$message({
// message: '至少选一个服务类型',
......@@ -324,7 +346,7 @@ export default {
// return
// }
this.lossTypeList = e
this.$emit('getCurrentLoosType',e)
this.$emit('getCurrentLoosType', e)
}
}
}
......@@ -333,19 +355,23 @@ export default {
.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;
.loss_wrap {
background: #f9f9f9;
padding: 20px;
.required {
width: 154px;
text-align: right;
......@@ -353,12 +379,14 @@ export default {
font-size: 14px;
}
}
.unit-price {
background: #f9f9f9;
padding: 20px;
// display: flex;
flex-wrap: nowrap;
margin-bottom: 10px;
.required {
width: 154px;
display: inline-block;
......@@ -366,26 +394,32 @@ export default {
font-weight: 400;
font-size: 14px;
}
.el-input {
width: 432px;
margin-right: 60px;
}
}
.nopt20 {
padding: 0 20px;
}
.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;
......@@ -394,6 +428,7 @@ export default {
}
}
}
.lump-sum {
background: #f9f9f9;
font-size: 14px;
......@@ -403,16 +438,19 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.sign {
font-size: 16px;
color: #ff6d00;
}
.price {
color: #ff6d00;
font-size: 18px;
}
}
}
.tr-wrap {
.label {
width: 154px;
......@@ -425,6 +463,7 @@ export default {
line-height: 20px;
margin-top: 6px;
}
.img {
width: 104px;
height: 104px;
......
......@@ -381,6 +381,7 @@ export default {
<style lang="scss" scoped>
.report-components {
background: white;
.title {
padding: 0 20px;
font-size: 16px;
......@@ -391,17 +392,21 @@ export default {
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
/deep/ #reportDate,
/deep/ #internalReimbursementDate,
/deep/ #reimbursementDate {
......@@ -409,6 +414,7 @@ export default {
.el-input__inner {
padding-left: 15px;
}
.el-input__prefix {
right: 5px;
text-align: right;
......@@ -417,26 +423,33 @@ export default {
}
}
}
.detail_pannel {
padding: 20px;
.top_line {
padding: 8px 20px;
background: #f9f9f9;
margin-bottom: 20px;
}
.wrap {
flex-wrap: wrap;
}
.line_widget {
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
.required {
color: #eb4e4e;
font-size: 6px;
margin-right: 4px;
}
.text {
font-size: 14px;
font-weight: 400;
......@@ -444,6 +457,7 @@ export default {
line-height: 20px;
}
}
.value {
width: 348px;
font-size: 14px;
......
......@@ -200,7 +200,8 @@
<div class="widget">
<div class="title">报案信息(客户提交)</div>
<div class="content pad20">
<div class="code text_14_4_333">核销码:{{ repotData.writeOffCode }}</div>
<div class="code text_14_4_333" v-if="repotData.source == 4">核销码:{{ repotData.writeOffCode }}</div>
<div class="code text_14_4_333" v-if="repotData.source == 3">合同号:{{ repotData.contractNo }}</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">
......@@ -360,12 +361,12 @@ export default {
activeNameTabs: 'first',
srcList: [],
allinjureList: [
{name: '购置税', key: 'purchaseTax'},
{name: '折旧费', key: 'depreciation'},
{name: '商业险保费', key: 'commercialInsurance'},
{name: '登记费', key: 'registrationFee'},
{name: '加改装件费用', key: 'retrofits'},
{name: '代步车费用', key: 'scooterFare'}
{ name: '购置税', key: 'purchaseTax' },
{ name: '折旧费', key: 'depreciation' },
{ name: '商业险保费', key: 'commercialInsurance' },
{ name: '登记费', key: 'registrationFee' },
{ name: '加改装件费用', key: 'retrofits' },
{ name: '代步车费用', key: 'scooterFare' }
]
}
},
......
......@@ -83,7 +83,7 @@ export default {
data() {
return {
damageList: [32, 33, 35, 34],
claimsList: [21, 22, 23, 25, 1, 2, 3],
claimsList: [21, 22, 23, 25, 1, 2, 3],
routeInfo: {},
pageType: 1,
watchData: [], // 查看状态下
......@@ -169,6 +169,7 @@ export default {
// 5 审核+定损 审核+核赔
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
console.log(urlQuery)
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
if (this.routeInfo.orderId) {
......@@ -222,10 +223,12 @@ export default {
attachments3: res.attachments3,
claimsAttachmentConfigs2: res.claimsAttachmentConfigs2,
updatedBy: res.updatedBy,
expressName:res.expressName,
expressNo:res.expressNo,
expressName: res.expressName,
expressNo: res.expressNo,
exceptionImgUrl: res.exceptionImgUrl,
preStatus: res.preStatus
preStatus: res.preStatus,
writeOffCode: res.writeOffCode,
source: res.source
}
// 图片list
......@@ -286,10 +289,10 @@ export default {
item.lossAssessmentAmount = item.lossAssessmentAmount ? (item.lossAssessmentAmount / 100).toFixed(2) : item.lossAssessmentAmount
const priceList = ['purchaseTax', 'depreciation', 'commercialInsurance', 'registrationFee', 'retrofits', 'scooterFare']
priceList.forEach(eleKey => {
item[eleKey] = item[eleKey] ? Number((item[eleKey] / 100).toFixed(2)) : item[eleKey]
item[eleKey] = item[eleKey] ? Number((item[eleKey] / 100).toFixed(2)) : item[eleKey]
})
item.lossTypeList = []
if(item.serviceItemType == 2) {
if (item.serviceItemType == 2) {
item.damageType = item?.damageType ? item.damageType.split(',').map(ele => Number(ele)) : []
}
if (item.serviceItemType == 4 && item.lossType) {
......@@ -418,17 +421,17 @@ export default {
toPassOrder() {
this.isSave = false
const _target = this.itemList?.find(item => item.applyAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount)
if(_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
if (_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
// applyAmount 预估损失金额 approveAmount 定损批准金额
if (this.orderMsg.status == 23 || this.orderMsg.status == 2) {
// const checkList = ['purchaseTax','depreciation','commercialInsurance','registrationFee','retrofits', 'scooterFare']
// 购置税+折旧费+商业险保费+登记费+加改装件费用+代步车费用 至少一个必填
const priceTarget = this.itemList?.find(item => item.serviceItemType == 1 && item.approveAmount > 0 && !item.purchaseTax && !item.depreciation && !item.commercialInsurance && !item.registrationFee && !item.retrofits && !item.scooterFare)
if(priceTarget) return this.$message.error(`${priceTarget.serviceItemName}的购置税、折旧费、商业险保费、登记费、加改装件费用、代步车费用,至少输入一个`)
const priceTarget = this.itemList?.find(item => item.serviceItemType == 1 && item.approveAmount > 0 && !item.purchaseTax && !item.depreciation && !item.commercialInsurance && !item.registrationFee && !item.retrofits && !item.scooterFare)
if (priceTarget) return this.$message.error(`${priceTarget.serviceItemName}的购置税、折旧费、商业险保费、登记费、加改装件费用、代步车费用,至少输入一个`)
// 最少选择一个损伤类型
const injureTarget = this.itemList?.find(item => item.serviceItemType == 2 && item.approveAmount > 0 && !item?.damageType?.length)
if(injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
if (injureTarget) return this.$message.error(`至少选择一个${injureTarget.serviceItemName}的损伤类型`)
const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) {
......@@ -546,7 +549,7 @@ export default {
}
})
},
endCaseFn(){
endCaseFn() {
this.$confirm('确定结束此案件吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -560,7 +563,7 @@ export default {
},
comfirmPass(isEndCase) {
let para = this.handleParams()
para.auditStatus = isEndCase ? 2 : 1 // 2结束案件,1 通过
para.auditStatus = isEndCase ? 2 : 1 // 2结束案件,1 通过
let loading = this.createLoading()
this.$apis.claims.checkDjOrderApi(para).then(res => {
loading.close()
......@@ -794,16 +797,16 @@ export default {
[contractNo]: this.repotData.contractNo,
[approveAmount]: this.handlePrice(item.approveAmount) || 0,
[applyAmount]: this.handlePrice(item.applyAmount) || 0,
[lossAssessmentAmount]: this.handlePrice(item.lossAssessmentAmount) || 0,
[lossAssessmentAmount]: this.handlePrice(item.lossAssessmentAmount) || 0,
[purchaseTax]: this.handlePrice(item.purchaseTax),
[depreciation]: this.handlePrice(item.depreciation),
[commercialInsurance]: this.handlePrice(item.commercialInsurance),
[commercialInsurance]: this.handlePrice(item.commercialInsurance),
[registrationFee]: this.handlePrice(item.registrationFee),
[retrofits]: this.handlePrice(item.retrofits),
[scooterFare]: this.handlePrice(item.scooterFare),
[scooterFare]: this.handlePrice(item.scooterFare),
[claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemType == 4 ? item.lossTypeList.join(',') : item.lossType,
[damageType] : item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
[damageType]: item.serviceItemType == 2 && item?.damageType?.length ? item.damageType.join(',') : ''
}
Object.assign(itemObj, temp)
})
......@@ -858,17 +861,19 @@ export default {
let para = this.savePara()
const name = this.orderMsg.status == 23 || this.orderMsg.status == 2 ? 'saveClaimsCG' : 'saveCG'
let loading = this.createLoading()
this.$apis.claims[name](para).then(res => {
if(res){
this.$message({
message: '保存成功',
type: 'success'
})
this.toBackList()
}
}).finally(end => {
loading.close()
})
this.$apis.claims[name](para)
.then(res => {
if (res) {
this.$message({
message: '保存成功',
type: 'success'
})
this.toBackList()
}
})
.finally(end => {
loading.close()
})
},
// 返回上一页
toBackList() {
......@@ -898,7 +903,7 @@ export default {
if (lastStr === '.') {
this.$set(this.itemList[id], type, e.target.value.substr(0, len - 1))
}
if(type == 'applyAmount'){
if (type == 'applyAmount') {
const minPrice = 1
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], type, 1)
......@@ -934,32 +939,40 @@ export default {
.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;
......@@ -967,6 +980,7 @@ export default {
}
}
}
.btn-box {
display: flex;
justify-content: center;
......@@ -978,11 +992,13 @@ export default {
border-color: #f56c6c;
color: #f56c6c;
}
.danger-btn:hover {
background: #f56c6c;
border-color: #f56c6c;
color: #fff;
}
.danger-btn:focus {
background: #dd6161;
border-color: #dd6161;
......
......@@ -3,30 +3,37 @@
<div class="info">
<div class="global-title">{{ routeInfo.type == 1 ? '新增' : routeInfo.type == 2 ? '查看' : '编辑' }}延保项目</div>
<div class="main-wrap">
<glsx-combi-form ref="serviceForm" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<glsx-combi-form ref="serviceForm" labelWidth="154px" defaultWidth="432px" :isInline="false"
:formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="powerType">
<el-radio-group :disabled="routeInfo.type == 2" v-model="formObj.powerType">
<el-radio v-for="(item, index) in powerTypeList" :label="index" :key="index">{{ item }}</el-radio>
</el-radio-group>
<el-form-item prop="powerTypeOther" style="margin-bottom: 0px" v-if="formObj.powerType == powerTypeList.length - 1">
<el-input class="wid_432" v-model.trim="formObj.powerTypeOther" :disabled="routeInfo.type == 2" placeholder="请输入自定义动力类型" maxlength="50"></el-input>
<el-form-item prop="powerTypeOther" style="margin-bottom: 0px"
v-if="formObj.powerType == powerTypeList.length - 1">
<el-input class="wid_432" v-model.trim="formObj.powerTypeOther" :disabled="routeInfo.type == 2"
placeholder="请输入自定义动力类型" maxlength="50"></el-input>
</el-form-item>
</div>
<div slot="supportPosition">
<el-radio-group :disabled="routeInfo.type == 2" v-model="formObj.supportPosition">
<el-radio v-for="(item, index) in supportPositionList" :label="index" :key="index">{{ item }}</el-radio>
</el-radio-group>
<el-form-item prop="supportPositionOther" style="margin-bottom: 0px" v-if="formObj.supportPosition == supportPositionList.length - 1">
<el-input class="wid_432" v-model="formObj.supportPositionOther" :disabled="routeInfo.type == 2" placeholder="请输入自定义保障部件" maxlength="50"></el-input>
<el-form-item prop="supportPositionOther" style="margin-bottom: 0px"
v-if="formObj.supportPosition == supportPositionList.length - 1">
<el-input class="wid_432" v-model="formObj.supportPositionOther" :disabled="routeInfo.type == 2"
placeholder="请输入自定义保障部件" maxlength="50"></el-input>
</el-form-item>
</div>
<div slot="contractList">
<el-button icon="el-icon-plus" :disabled="routeInfo.type == 2" @click="addContract">选中合同</el-button>
<div class="table-wrap">
<GLTable :hasPage="false" :hasNum="false" :tableData="formObj.contractList" :tableParams="contractTableParams">
<GLTable :hasPage="false" :hasNum="false" :tableData="formObj.contractList"
:tableParams="contractTableParams">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.scope)">预览</el-button>
<el-button type="text" size="small" :disabled="routeInfo.type == 2" @click="handleDelete(scope.scope, scope.index)">删除</el-button>
<el-button type="text" size="small" :disabled="routeInfo.type == 2"
@click="handleDelete(scope.scope, scope.index)">删除</el-button>
</div>
</GLTable>
</div>
......@@ -37,7 +44,8 @@
<el-button v-if="routeInfo.type != 2" type="text" @click="handleSKuEdit">规格组合管理</el-button>
</div>
<div class="speci-box" id="specificationDetailList">
<multipleSpecificationForm ref="multipleSpecificationFormRef" :route-info="routeInfo"></multipleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" :route-info="routeInfo">
</multipleSpecificationForm>
</div>
</div>
</glsx-combi-form>
......@@ -47,7 +55,8 @@
<el-button @click="jumpListPage">取消</el-button>
<el-button v-if="routeInfo.type != 2" type="primary" @click="commit">提交</el-button>
</div>
<contract-dialog v-if="contractObj.visible" @closeDialog="closeContractDialog" @confirm="confirmContractDialog" :contractObj="contractObj"></contract-dialog>
<contract-dialog v-if="contractObj.visible" @closeDialog="closeContractDialog" @confirm="confirmContractDialog"
:contractObj="contractObj"></contract-dialog>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template>
......@@ -469,7 +478,7 @@ export default {
goodsSpecificationList: goodsSpecificationList
}
console.log(params, 'params')
if (params?.goodsSpecificationList?.length > 75) {
if (params?.goodsSpecificationList?.length > 200) {
return this.$message({
type: 'warning',
message: '商品数量过多,无法操作,请确认后重新保存'
......@@ -530,48 +539,61 @@ export default {
<style lang="scss" scoped>
.info {
background: #ffffff;
.main-wrap {
padding: 32px 20px;
.wid_432 {
width: 432px;
display: block;
}
.services-table {
margin-top: 20px;
&:first-child {
margin-top: 0;
}
}
.add-btn {
display: inline-block;
color: #5850ff;
cursor: pointer;
i {
font-size: 20px;
vertical-align: middle;
}
}
.table-wrap {
width: 591px;
margin-top: 10px;
.table-btns {
display: flex;
/deep/ .el-button {
padding: 0;
}
/deep/ .el-button + .el-button {
/deep/ .el-button+.el-button {
margin-left: 10px;
}
}
}
/deep/ .el-radio-group {
line-height: 32px;
.el-radio {
vertical-align: middle;
}
}
}
}
.skuContent {
.add-btns {
display: flex;
......@@ -615,10 +637,12 @@ export default {
}
}
}
.footer-btn {
text-align: center;
margin-top: 16px;
}
/deep/ .el-radio__original {
display: none !important;
}
......
......@@ -88,7 +88,7 @@
<el-input class="cost-input" placeholder="请输入每月投保成本" @input="changePrice($event, gradeFormObj, 'monthlyInsuranceCost')" :disabled="disabled" v-model="gradeFormObj.monthlyInsuranceCost"></el-input>
</div>
<div slot="specConfigSlot">
<ServicesTable :disabled="disabled" class="services-table" v-for="item in gradeList" :key="item.serviceGrade" :tableData="item"></ServicesTable>
<ServicesTable :disabled="disabled" class="services-table" v-for="item in gradeList" :routeInfo="routeInfo" :key="item.serviceGrade" :tableData="item"></ServicesTable>
<div v-if="!disabled" class="add-btn" @click="handleAddGrade">
<i class="el-icon-circle-plus-outline"></i>
新增规格
......@@ -410,6 +410,7 @@ export default {
this.gradeList.forEach(item => {
const { id, serviceGrade, serviceOverview, serviceDetail, salePeriodData, gradeConfigList } = item
let _gradeConfigList = []
if (!gradeConfigList?.length) throw new Error(`请配置规格${serviceGrade}的价格区间`)
gradeConfigList.forEach((ele, eleIdx) => {
let { priceCoefficient, minPrice, maxPrice, childSalePeriodData, computeFlag } = ele
if (this.isEmpty(minPrice) || this.isEmpty(maxPrice) || (this.isEmpty(priceCoefficient) && computeFlag == 0)) {
......
......@@ -38,9 +38,9 @@
</tr>
<tr v-for="(item, index) in tableData.gradeConfigList" :key="index">
<td class="price">
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'minPrice')" :disabled="disabled" v-model="item.minPrice"></el-input>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'minPrice')" :disabled="disabled || (routeInfo.id && !item.addFlag)" v-model="item.minPrice"></el-input>
<span class="sign">-</span>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'maxPrice')" :disabled="disabled" v-model="item.maxPrice"></el-input>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'maxPrice')" :disabled="disabled || (routeInfo.id && !item.addFlag)" v-model="item.maxPrice"></el-input>
</td>
<td><el-switch v-model="item.computeFlag" :active-value="0" @change="changeComputeFlag($event, item, index)" :inactive-value="1" :disabled="disabled"></el-switch></td>
<td>
......@@ -57,7 +57,7 @@
<td :key="eIdx"><el-input v-model="item.childSalePeriodData[eIdx].salesCost" :placeholder="placeholder" @input="changePrice($event, item.childSalePeriodData[eIdx], 'salesCost')" :disabled="disabled"></el-input></td>
</template>
</template>
<td class="del-btn"><span v-if="index > 2 && !disabled" class="btn" @click="delSection(index)">删除</span></td>
<td class="del-btn"><span v-if="!disabled" class="btn" @click="delSection(index)">删除</span></td>
</tr>
<tr>
<td class="add-btn" :colspan="tableData.salePeriodData.length * 2 + 4"><span v-if="!disabled" class="btn" @click="addSection">新增价格区间</span></td>
......@@ -111,6 +111,12 @@ export default {
key: {
type: String,
default: ''
},
routeInfo: {
type: Object,
default: () => {
return {}
}
}
},
data() {
......@@ -188,7 +194,7 @@ export default {
},
addSection() {
// 获取最后一个的最大价格赋值到新增的最小价格
const minPrice = this.tableData.gradeConfigList[this.tableData.gradeConfigList.length - 1].maxPrice
const minPrice = this.tableData.gradeConfigList[this.tableData.gradeConfigList.length - 1]?.maxPrice || ''
const arr = this.tableData.salePeriodData.map(item => {
return { servicePeriod: item.servicePeriod, standardShelfCost: '', standardSalesCost: '', shelfCost: '', salesCost: '' }
})
......@@ -200,16 +206,17 @@ export default {
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: '',
childSalePeriodData: arr
childSalePeriodData: arr,
addFlag: true
}
this.tableData.gradeConfigList.push(sectionItem)
},
delSection(idx) {
const minPrice = this.tableData.gradeConfigList[idx - 1].maxPrice
// const minPrice = this.tableData.gradeConfigList[idx - 1]?.maxPrice
this.tableData.gradeConfigList.splice(idx, 1)
if (this.tableData.gradeConfigList.length > idx) {
this.$set(this.tableData.gradeConfigList[idx], 'minPrice', minPrice)
}
// if (this.tableData.gradeConfigList.length > idx) {
// this.$set(this.tableData.gradeConfigList[idx], 'minPrice', minPrice)
// }
}
}
}
......@@ -270,6 +277,7 @@ export default {
.desc-wrap {
height: 88px;
.desc-td {
height: auto;
padding: 12px 16px;
}
.desc {
......
......@@ -107,7 +107,7 @@ export default {
// from输入框change事件
handleInputChangeFrom(value) {
this.userInputForm = value.replace(/[^0-9.]/g, '').replace(/^(100|[1-9]?\d)(\.\d{0,2})?.*$/, '$1$2')
this.userInputForm = value.replace(/[^0-9.]/g, '').replace(/^(199|1\d{2}|[1-9]?\d)(\.\d{0,2})?.*$/, '$1$2');
},
handleInputChangeFromChange() {
......@@ -122,7 +122,7 @@ export default {
// to输入框change事件
handleInputChangeTo(value) {
this.userInputTo = value.replace(/[^0-9.]/g, '').replace(/^(100|[1-9]?\d)(\.\d{0,2})?.*$/, '$1$2')
this.userInputTo = value.replace(/[^0-9.]/g, '').replace(/^(199|1\d{2}|[1-9]?\d)(\.\d{0,2})?.*$/, '$1$2');
},
handleInputChangeToChange() {
// 看一下this.userInputForm 是否有值,如果有应该比它大
......
......@@ -13,7 +13,8 @@
</span>
</div>
<div>
<el-button type="text" @click="handleSpecsEdit(2, subItem, subIndex)" v-if="routeInfo.type != 2">编辑</el-button>
<el-button type="text" @click="handleSpecsEdit(2, subItem, subIndex)"
v-if="routeInfo.type != 2">编辑</el-button>
<el-button type="text" @click="handleSpecsDelete(subIndex)" v-if="routeInfo.type != 2">删除</el-button>
</div>
</div>
......@@ -21,10 +22,14 @@
<div class="table-wrapper">
<table class="table-spesc" cellspacing="0" cellpadding="0" :style="{ width: `${tableWidth}px` }">
<tbody>
<tr style="background: #f2f4f7; height: 42px; display: flex; align-items: center; justify-content: center">
<td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="checked" @change="handleCheckAllChange" :indeterminate="isIndeterminate"></el-checkbox></td>
<tr
style="background: #f2f4f7; height: 42px; display: flex; align-items: center; justify-content: center">
<td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="checked"
@change="handleCheckAllChange" :indeterminate="isIndeterminate"></el-checkbox></td>
<td style="width: 75px">序号</td>
<td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(subItem, subIndex) in goodsInfoData.specificationDetailList" :title="subItem.specificationName" :key="subIndex">{{ subItem.specificationName }}</td>
<td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden"
v-for="(subItem, subIndex) in goodsInfoData.specificationDetailList"
:title="subItem.specificationName" :key="subIndex">{{ subItem.specificationName }}</td>
<td>
<span class="color-red">*</span>
<span>投保成本/元</span>
......@@ -39,47 +44,71 @@
</td>
<td>
<span>适用车型</span>
<img src="@/assets/icon-edit.png" style="cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle" @click="carTypeSelect(true)" />
<img src="@/assets/icon-edit.png"
style="cursor: pointer; margin-left: 5px; width: 16px; height: 16px; vertical-align: middle"
@click="carTypeSelect(true)" />
</td>
<td style="width: 60px" v-if="routeInfo.type != 2"><span>操作</span></td>
</tr>
</tbody>
</table>
<table class="table-spesc content-table" cellspacing="0" cellpadding="0" :style="{ width: `${tableWidth}px` }">
<table class="table-spesc content-table" cellspacing="0" cellpadding="0"
:style="{ width: `${tableWidth}px` }">
<tbody>
<tr style="border-bottom: 1px solid #e5e5e5; height: 40px; line-height: 40px; display: flex; align-items: center; justify-content: center" v-for="(subItem, subIndex) in filterStatus" :key="subIndex">
<td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="subItem.checked" @change="changeTableCheck"></el-checkbox></td>
<tr
style="border-bottom: 1px solid #e5e5e5; height: 40px; line-height: 40px; display: flex; align-items: center; justify-content: center"
v-for="(subItem, subIndex) in filterStatus" :key="subIndex">
<td style="width: 75px" v-if="routeInfo.type != 2"><el-checkbox v-model="subItem.checked"
@change="changeTableCheck"></el-checkbox></td>
<td style="width: 75px">{{ subIndex + 1 }}</td>
<td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
<td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden"
v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
<td>
<!-- @input="handleTypeInput($event, subIndex)" -->
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty }" v-model.trim="subItem.insuranceCost" @input="handleKilometersInput($event, subIndex)" @blur="handleKilometersBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="投保成本是必填项">
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty }"
v-model.trim="subItem.insuranceCost" @input="handleKilometersInput($event, subIndex)"
@blur="handleKilometersBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty" slot="suffix"
placement="top" title width="90" trigger="hover" content="投保成本是必填项">
<i class="el-icon-warning color-red" slot="reference" />
</el-popover>
</el-input>
</td>
<td>
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.shelfCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.shelfCost) && subItem.shelfCostEmpty }" @input="handleWarrantyPeriodInput($event, subIndex)" @blur="handleWarrantyPeriodBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.shelfCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="上架成本是必填项">
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small"
v-model.trim="subItem.shelfCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.shelfCost) && subItem.shelfCostEmpty }"
@input="handleWarrantyPeriodInput($event, subIndex)"
@blur="handleWarrantyPeriodBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.shelfCost) && subItem.salesCostEmpty" slot="suffix"
placement="top" title width="90" trigger="hover" content="上架成本是必填项">
<i class="el-icon-warning color-red" slot="reference" />
</el-popover>
</el-input>
</td>
<td>
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.salesCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.salesCost) && subItem.salesCostEmpty }" @input="handlePurchasePrice($event, subIndex)" @blur="handlePurchasePriceBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.salesCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="嘀加成本是必填项">
<el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small"
v-model.trim="subItem.salesCost"
:class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.salesCost) && subItem.salesCostEmpty }"
@input="handlePurchasePrice($event, subIndex)" @blur="handlePurchasePriceBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.salesCost) && subItem.salesCostEmpty" slot="suffix"
placement="top" title width="90" trigger="hover" content="嘀加成本是必填项">
<i class="el-icon-warning color-red" slot="reference" />
</el-popover>
</el-input>
</td>
<td class="select">
<el-select ref="chooseProjectName" placeholder="车型" :disabled="routeInfo.type == 2" size="small" multiple collapse-tags :class="{ 'w-200-per': false }" v-model="subItem.seriesConfigList" @focus="carTypeSelect(false, subItem, subIndex)" value-key="seriesId">
<el-option v-for="item in subItem.seriesConfigList" :key="item.vehicleSeriesId" :label="item.vehicleSeriesName" :value="item"></el-option>
<el-select ref="chooseProjectName" placeholder="车型" :disabled="routeInfo.type == 2" size="small"
multiple collapse-tags :class="{ 'w-200-per': false }" v-model="subItem.seriesConfigList"
@focus="carTypeSelect(false, subItem, subIndex)" value-key="seriesId">
<el-option v-for="item in subItem.seriesConfigList" :key="item.vehicleSeriesId"
:label="item.vehicleSeriesName" :value="item"></el-option>
</el-select>
</td>
<td style="width: 60px" v-if="routeInfo.type != 2">
<el-button type="text" :disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0" @click="delspecificationValueList(subItem)">删除</el-button>
<el-button type="text" :disabled="subItem.merchantGoodsInfos && subItem.merchantGoodsInfos.length > 0"
@click="delspecificationValueList(subItem)">删除</el-button>
</td>
</tr>
</tbody>
......@@ -93,27 +122,46 @@
</div>
</div>
</div>
<D2Dialog title="规格" :is-visible.sync="specificationVisible" width="550px" :specificationDetailList="goodsInfoData.specificationDetailList" @confirmDialog="handleSpescConfirm" @closeDialog="handleSpescClose">
<D2Dialog title="规格" :is-visible.sync="specificationVisible" width="550px"
:specificationDetailList="goodsInfoData.specificationDetailList" @confirmDialog="handleSpescConfirm"
@closeDialog="handleSpescClose">
<el-form label-width="120px" :model="spescEditForm" :rules="spescRules" ref="spescRef">
<el-form-item label="规格名称:" prop="specificationName">
<el-input class="w-320" size="small" maxlength="20" v-model="spescEditForm.specificationName" placeholder="请输入规格名" :disabled="disabledSpecificationName"></el-input>
<el-input class="w-320" size="small" maxlength="20" v-model="spescEditForm.specificationName"
placeholder="请输入规格名" :disabled="disabledSpecificationName"></el-input>
</el-form-item>
<div class="selectOpt">
<span class="label">预设规格:</span>
<el-button type="text" class="selectItem" v-for="(item, index) in disabledSkuSelect" @click="handleSelect(item)" :key="index" :class="{ active: item.specificationName == spescEditForm.specificationName || item.disabled }">{{ item.specificationName }}</el-button>
<el-button type="text" class="selectItem" v-for="(item, index) in disabledSkuSelect"
@click="handleSelect(item)" :key="index"
:class="{ active: item.specificationName == spescEditForm.specificationName || item.disabled }">{{
item.specificationName }}</el-button>
</div>
<el-form-item label="规格值:" prop="specificationValueList">
<el-tag style="margin-right: 10px" v-for="(tag, i) in spescEditForm.specificationValueList" :key="i" @click="changeValue(tag, i)" closable @close="handleSpescDelete(tag)">{{ tag.specificationValue }}</el-tag>
<el-tag style="margin-right: 10px" v-for="(tag, i) in spescEditForm.specificationValueList" :key="i"
@click="changeValue(tag, i)" closable @close="handleSpescDelete(tag)">{{ tag.specificationValue }}</el-tag>
<!-- <el-input min="0" max="100" clearable type="number" step="0.0001" class="!w-[120px]" placeholder="输入检测值" v-model="value" @input="value = value.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></el-input> -->
<el-input class="input-new-tag" v-if="specsInputVisible && spescEditForm.type == 0" v-model="spescInputVal" maxlength="20" ref="saveSpescInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<el-input min="0" max="100" type="number" class="input-new-tag" v-else-if="specsInputVisible && spescEditForm.type != 3" v-model="spescInputVal" ref="saveSpescInput" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d).*$/, '$1')" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<input-number-range v-else-if="specsInputVisible && spescEditForm.type == 3" :disabled="false" :precision="num" :spescInputVal="spescInputVal" @confirm="handleInputConfirmMue" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></input-number-range>
<el-input class="input-new-tag" v-if="specsInputVisible && spescEditForm.type == 0" v-model="spescInputVal"
maxlength="20" ref="saveSpescInput" size="small" @keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"></el-input>
<el-input min="0" max="100" type="number" class="input-new-tag"
v-else-if="specsInputVisible && spescEditForm.type != 3" v-model="spescInputVal" ref="saveSpescInput"
@input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d).*$/, '$1')" size="small"
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<input-number-range v-else-if="specsInputVisible && spescEditForm.type == 3" :disabled="false"
:precision="num" :spescInputVal="spescInputVal" @confirm="handleInputConfirmMue"
@input="spescInputVal = spescInputVal.replace(/^(199|1\d{2}|[1-9]?\d)(\.\d{0,2})?.*$/, '$1$2')"></input-number-range>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 规格值</el-button>
</el-form-item>
</el-form>
</D2Dialog>
<brandDialog v-if="brandVisible" ref="brandRef" :relate-store-visible="brandVisible" :store-selected="storeSelected" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></brandDialog>
<skuDialog v-if="skuVisible" ref="brandRef" :relate-store-visible="skuVisible" :goodsSpecificationList="goodsInfoData.goodsSpecificationList" :specificationDetailList="goodsInfoData.specificationDetailList" @handleRelateSkuConfirm="handleRelateSkuConfirm" @handleSkuClose="handleSkuClose"></skuDialog>
<brandDialog v-if="brandVisible" ref="brandRef" :relate-store-visible="brandVisible" :store-selected="storeSelected"
@handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
</brandDialog>
<skuDialog v-if="skuVisible" ref="brandRef" :relate-store-visible="skuVisible"
:goodsSpecificationList="goodsInfoData.goodsSpecificationList"
:specificationDetailList="goodsInfoData.specificationDetailList" @handleRelateSkuConfirm="handleRelateSkuConfirm"
@handleSkuClose="handleSkuClose"></skuDialog>
</div>
</template>
<script>
......@@ -542,9 +590,9 @@ export default {
warningValueMax: '',
warrantyPeriod: '5',
editGoodNameInput: false,
insuranceCost: '', // 投保成本,单位元
shelfCost: '', // 上架成本,单位元
salesCost: '', // salesCost
insuranceCost: '1', // 投保成本,单位元
shelfCost: '1', // 上架成本,单位元
salesCost: '1', // salesCost
seriesConfigList: [],
useStatus: 0
})
......@@ -652,35 +700,43 @@ export default {
.content_box {
font-size: 14px;
margin-top: 10px;
.sepce-box {
margin: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
.specs-item {
color: #666666;
margin-right: 20px;
}
}
.tip-text {
color: #2a58ad;
}
.table-wrapper {
max-height: 450px;
overflow: auto;
.table-spesc {
width: 100%;
text-align: center;
border: 1px solid #e8e8ea;
position: relative;
.table_content {
table-layout: fixed;
border-collapse: separate;
}
tr {
display: flex;
flex-wrap: nowrap;
border-bottom: 1px solid #e8e8ea;
td {
display: inline-block;
text-align: center;
......@@ -689,27 +745,34 @@ export default {
height: 100%;
line-height: 40px;
border-right: 1px solid #e8e8ea;
span {
display: inline-block;
vertical-align: middle;
}
}
td:last-child {
border-right: none;
}
}
.w-150-per {
width: 150px;
.el-input__inner {
padding: 0 10px;
}
}
.w-90-per {
width: 90px;
}
.w-200-per {
width: 200px;
}
.color-red {
color: #eb4e4e;
font-size: 14px;
......@@ -726,38 +789,48 @@ export default {
}
}
}
.input-new-tag {
width: 90px !important;
vertical-align: bottom;
}
.selectOpt {
margin-top: 10px;
.label {
margin-left: 120px;
}
.selectItem {
padding: 8px 4px;
}
.selectItem + .selectItem {
.selectItem+.selectItem {
margin-left: 0px;
}
.active {
color: #999999;
}
}
.select {
::v-deep .el-select .el-tag {
max-width: 75%;
}
}
.w-320 {
width: 320px !important;
}
::v-deep .border-red {
.el-input__inner {
border: 1px solid #eb4e4e;
}
}
::v-deep .service_select_class {
display: none;
}
......
......@@ -309,15 +309,15 @@ export default {
// val.content = ''
let childContent = ''
if (val.recordType == 1) {
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】状态:${val.useStatus ? '禁用' : '启用'},投保成本${val.insuranceCost}元,上架成本${val.shelfCost}元,嘀加成本${val.salesCost}元,`
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】状态:${val.useStatus ? '禁用' : '启用'},投保成本${val.insuranceCost || '-'}元,上架成本${val.shelfCost || '-'}元,嘀加成本${val.salesCost || '-'}元,`
val?.deleteList?.forEach((v, index) => {
childContent = `${v.fieldName}${v.beforeValue}${v.valueUnit || ''}${index < val?.deleteList?.length - 1 ? ',' : ''}`
childContent = `${v.fieldName}${v.beforeValue || '-'}${v.valueUnit || ''}${index < val?.deleteList?.length - 1 ? ',' : ''}`
val.content += childContent
})
} else {
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】`
val?.detailList?.forEach((v, index) => {
childContent = `${v.fieldName}由${v.beforeValue}${v.valueUnit || ''}变为${v.afterValue}${v.valueUnit || ''}${index < val?.detailList?.length - 1 ? ',' : ''}`
childContent = `${v.fieldName}由${v.beforeValue || '-'}${v.valueUnit || ''}变为${v.afterValue || '-'}${v.valueUnit || ''}${index < val?.detailList?.length - 1 ? ',' : ''}`
val.content += childContent
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!