Commit ebe77136 by 前端

Merge branch 'SAAS+V4.53.0-0528' into 'master'

上线合并

See merge request !88
2 parents 17759ee2 ba02a5ac
......@@ -521,6 +521,17 @@ const newSaveWriteOff = params => {
returnAll: true
})
}
// 提交核赔资料接口
const saveClaims = params => {
params.method = 'scrm.api.equity.service.claims.gl.operation.save.claim'
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'
......@@ -543,6 +554,17 @@ const getProductListApi = params => {
sign: true
})
}
// 定损信息查看合同信息
const getContractUrlApi = params => {
params.method = 'scrm.api.equity.service.package.dj.order.print'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
uploadImageApi,
newSaveWriteOff,
......@@ -592,5 +614,7 @@ export default {
getTaskDetailListApi,
createBatchTaskApi,
exportErrorDataApi,
getProductListApi
getProductListApi,
saveClaims,
getContractUrlApi
}
......@@ -88,8 +88,8 @@ export default {
.qr-code-components {
.left_code {
position: absolute;
right: 57px;
bottom: 0px;
right: 73px;
top: 0px;
width: 144px;
height: 201px;
background: #ffffff;
......@@ -108,19 +108,17 @@ export default {
right: 20px;
bottom: 64px;
cursor: pointer;
width: 52px;
height: 201px;
background: #5850ff;
width: 68px;
height: 78px;
background-image: linear-gradient(102deg, #7970FF 0%, #5850FF 98%);
box-shadow: 0 4px 12px 0 #a3a6cc59;
border-radius: 4px;
z-index: 88;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
> img {
width: 20px;
height: 20px;
margin-bottom: 7px;
}
.contact_text {
width: 14px;
line-height: 20px;
font-size: 14px;
font-weight: 400;
......
<template>
<div>
<damage :isDetailPage="false" :disabled="curRouteInfo.pageType == 1" :curRouteInfo="curRouteInfo"></damage>
<!-- 待受理/定损不通过 -->
<div v-if="[32, 35].includes(curRouteInfo.status)">
<damage :isDetailPage="false" :disabled="curRouteInfo.pageType == 1" :curRouteInfo="curRouteInfo"></damage>
</div>
<!-- 定损通过/核赔不通过 -->
<div v-else>
<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>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div>
</template>
<script type="text/ecmascript-6">
import qrCode from '@/components/qr-code'
import damage from './damage'
import writeOff from './writeOff'
export default {
name: 'addDamege',
data() {
return {
activeName: 'writeOff',
curRouteInfo: {}
curRouteInfo:{},
tabs:[
{
id:'writeOff',
name: '核赔信息'
},{
id:'damage',
name: '定损信息'
}
]
}
},
components: {
damage
damage,
writeOff,
qrCode
},
created() {
const params = this.$route.params
......
......@@ -10,11 +10,13 @@
<div v-show="activeName=='writeOff'">
<write-off :curRouteInfo="curRouteInfo" :disabled="curRouteInfo.pageType==1"></write-off>
</div>
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="定损及核赔服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div>
</template>
<script type="text/ecmascript-6">
import damage from './damage'
import writeOff from './writeOff'
import qrCode from '@/components/qr-code'
export default {
name: 'valuationPricing',
data() {
......@@ -34,7 +36,8 @@ export default {
},
components:{
damage,
writeOff
writeOff,
qrCode
},
created() {
const params= this.$route.params
......
......@@ -142,7 +142,24 @@ export default {
this.$set(this.list[idx], 'imgObj', {})
}
},
clickImg(item,idx) {
clickImg(item, idx) {
// const {id, attachmentCode } = item
// if(this.list[idx]?.imgObj?.id){
// this.$set(this.list[idx].imgObj, 'attachmentFile', url)
// }else{
// let obj = {
// claimsId : this.id,
// attachmentCode,
// attachmentType: "png",
// attachmentFile : "https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_collapse_new_common.png",
// classifyId : id,
// }
// this.$set(this.list[idx],'imgObj', obj)
// }
// if(item.firstClassifyName.indexOf('其他资料')>-1 && item.secondClassifyName=='其他资料'){
// this.list.push({...item,imgObj:{}})
// this.$forceUpdate()
// }
if(this.disabled) return;
this.curID = idx
this.curItem = item
......
......@@ -283,7 +283,7 @@ export default {
this.$set(this.serviceCodesList[id], key , checkPlan)
},
getBankList() {
this.$apis.beforeSale.getBankList({}).then(res => {
this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name === 'openBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name === 'accountCityCode')
......@@ -303,7 +303,7 @@ export default {
if(Number(e.target.value)<minPrice){
this.$set(this.serviceCodesList[id], key , 1)
}
const maxPrice = 200000
const maxPrice = 2000000
if(Number(e.target.value)>maxPrice){
this.$set(this.serviceCodesList[id], key , maxPrice)
}
......
......@@ -111,7 +111,7 @@ export default {
/deep/ .el-tabs {
.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
background-color: #FFFFFF;
}
.el-tabs__item {
height: 45px;
......@@ -136,7 +136,7 @@ export default {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #00a77b;
color: #5850ff;
}
.active {
background-color: #fff;
......
......@@ -65,7 +65,7 @@
</glsx-combi-form>
</Card>
<Card title="上传图片">
<div v-if="!disabled" slot="right" class="transport-pic" @click.stop="transportPic">手机传图</div>
<!-- <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>
......@@ -91,7 +91,7 @@
</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">
<template v-if="curRouteInfo.status == 5 || curRouteInfo.status == 32 || curRouteInfo.status == 35 || (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>
......@@ -99,6 +99,8 @@
</template>
</template>
</div>
<!-- 查看合同 -->
<contract-dialog :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
</div>
</template>
<script type="text/ecmascript-6">
......@@ -112,6 +114,7 @@ import explanation from './components/explanation'
import otherInfo from './components/otherInfo'
import util from '@/util/util'
import url from '@/assets/write_off.png'
import contractDialog from '../../djClaims/components/contractDialog.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 tabs = [
{
......@@ -135,9 +138,9 @@ const tabs = [
}
]
const tabObj = {
基础资料: 'base',
定损细节照片: 'detail',
现场照片: 'onSite',
'基础资料': 'base',
'定损细节照片': 'detail',
'现场照片': 'onSite',
'其他资料(非必传)': 'other'
}
export default {
......@@ -149,7 +152,8 @@ export default {
Card,
// helpService,
otherInfo,
titleTip
titleTip,
contractDialog
},
props: {
curRouteInfo: Object,
......@@ -330,7 +334,9 @@ export default {
serviceCodesList: [],
explanationObj: {
explanation1: ''
}
},
contractVisible: false,
pdfUrl: ''
}
},
computed: {
......@@ -367,6 +373,30 @@ export default {
}
},
methods: {
// 查看合同
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getContractUrlApi({ contractNo: this.customObj?.contractNo }).then(res => {
let { code, message } = res
if (code == 0) {
this.pdfUrl = res.data
this.contractVisible = true
} else {
this.$message.error(message)
}
loading.close()
})
},
// 关闭查看合同弹窗
closeDialog() {
this.contractVisible = false
},
changeLossType(e) {
this.curLossType = e
// const target = this.serviceCodesList.find(item => item.serviceItemCode == 'SC0006')
......@@ -508,7 +538,7 @@ export default {
if (Number(e.target.value) < minPrice) {
this.$set(this.serviceCodesList[id], key, 1)
}
const maxPrice = 200000
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceCodesList[id], key, maxPrice)
}
......
<template>
<div id="writeOff" class="writeOff">
<helpService></helpService>
<!-- <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>
<!-- <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>
......@@ -14,7 +14,7 @@
<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>
<p style="margin: 14px 0;">寄回发票物流信息</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>
......@@ -79,7 +79,7 @@
</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">
<template v-if="curRouteInfo.status == 8 || curRouteInfo.status == 10 || curRouteInfo.status == 13 || curRouteInfo.status == 22 || curRouteInfo.status == 25 || curRouteInfo.status == 34">
<el-button type="primary" @click="handleSave(0)">草稿</el-button>
<el-button type="primary" @click="handleSave(1)">提交</el-button>
</template>
......@@ -97,7 +97,7 @@ 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 helpService from './components/helpService'
import sendDetail from './components/sendDetail'
import processTip from './components/processTip'
import repairInfo from './components/repairInfo'
......@@ -128,7 +128,7 @@ export default {
uploadMaterial,
explanation,
Card,
helpService,
// helpService,
sendDetail,
processTip,
repairInfo,
......@@ -254,6 +254,7 @@ export default {
// }
if(this.curRouteInfo.pageType!=6){
this.batchListSearch.writeOffCode = this.curRouteInfo.writeOffCode
this.batchListSearch.id = this.curRouteInfo.id
this.handleNextStep()
}
},
......@@ -292,8 +293,8 @@ export default {
this.showDialog = true
},
handleNextStep() {
const { writeOffCode } = this.batchListSearch
this.$apis.beforeSale.getClaimsDetail({ writeOffCode }).then(res => {
const { writeOffCode, id } = this.batchListSearch
this.$apis.beforeSale.getClaimsDetail({ id }).then(res => {
if (res.code == '0') {
this.isSavePage = true
......@@ -367,7 +368,7 @@ export default {
getAccountInfo(contractNo){
if (!contractNo) return
this.$apis.beforeSale.getAccountInfo({ contractNo }).then(res => {
this.$apis.claims.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 }
......@@ -527,7 +528,7 @@ export default {
this.$apis.beforeSale.auditWriteOff(params).then(res =>{
if (res.code == '0') {
this.$router.push({
path: '/beforeSale/index'
path: '/claims/index'
})
}else{
this.openTip(res.message,'错误提示',true)
......@@ -556,9 +557,7 @@ export default {
message: '保存成功',
type: 'success'
})
this.$router.push({
path: '/beforeSale/index'
})
this.$router.push({ path: '/claims/index' })
} else {
this.gotoValidView('writeOff')
this.openTip(res.message,'错误提示',true)
......@@ -586,7 +585,7 @@ export default {
},
handleCancel() {
this.$router.push({
path: '/beforeSale/index'
path: '/claims/index'
})
}
}
......@@ -599,7 +598,7 @@ export default {
}
.transport-pic {
font-size: 14px;
color: #00a479;
color: #5850ff;
cursor: pointer;
}
......
......@@ -308,10 +308,10 @@ export default {
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if (key == 'lossAssessmentAmount') {
maxPrice = 2000000
}
let maxPrice = 2000000
// if (key == 'lossAssessmentAmount') {
// maxPrice = 2000000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], key, maxPrice)
}
......
......@@ -371,9 +371,9 @@ export default {
this.$set(this.itemsList[id], type, 1)
}
let maxPrice = 2000000
if(type == 'applyAmount' || type == 'approveAmount') {
maxPrice = 200000
}
// if(type == 'applyAmount' || type == 'approveAmount') {
// maxPrice = 200000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemsList[id], type, maxPrice)
}
......
......@@ -379,9 +379,9 @@ export default {
this.$set(this.serviceItemsList[id], key, 1)
}
let maxPrice = 2000000
if(key == 'approveAmount' || key == 'customerApplyAmount') {
maxPrice = 200000
}
// if(key == 'approveAmount' || key == 'customerApplyAmount') {
// maxPrice = 200000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], key, maxPrice)
}
......
......@@ -13,7 +13,7 @@
单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div>
<div class="search_container">
<GLCombiForm :rowNumber="1" ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn()"></GLCombiForm>
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn()"></GLCombiForm>
</div>
<div class="table_widget">
<div class="table_top_line flex_scb">
......@@ -198,7 +198,8 @@ export default {
condition: row => {
// return true;
const { status, source } = row.scope
return [32].includes(status) && source == 4
// c端小程序报案的待受理或定损通过状态的单
return [32, 34].includes(status) && source == 4
},
attrs: {
type: 'text',
......@@ -227,6 +228,23 @@ export default {
{
type: 'GLButton',
name: row => {
return '重新提交'
},
condition: row => {
// c端小程序报案的单是运营经理审核不通过/核赔不通过/定损不通过
return [22, 25, 35].includes(row.scope.status) && row.scope.source == 4
},
attrs: {
type: 'text',
fn: '重新提交'
},
listeners: {
click: row => this.handleView(row.scope, 3)
}
},
{
type: 'GLButton',
name: row => {
return '运营经理审核'
},
condition: row => {
......@@ -264,7 +282,10 @@ export default {
searchForm: {
searchText: '',
statusList: [],
commitDate: ''
commitDate: '',
merchantCommit: '',
merchantUpdate: '',
customerCommit: ''
},
searchParams: {},
searchFormData: [
......@@ -292,6 +313,27 @@ export default {
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
},
{
label: '门店提交时间',
name: 'merchantCommit',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
},
{
label: '门店更新时间',
name: 'merchantUpdate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
},
{
label: '客户提交时间',
name: 'customerCommit',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
tableParams: {
......@@ -349,6 +391,22 @@ export default {
}
},
{
label: '客户提交时间',
prop: 'customerCommitTime',
width: 180,
formatter: cellValue => {
return cellValue.customerCommitTime ? dayjs(cellValue.customerCommitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '门店更新时间',
prop: 'merchantUpdatedDate',
width: 180,
formatter: cellValue => {
return cellValue.merchantUpdatedDate ? dayjs(cellValue.merchantUpdatedDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '门店提交时间',
prop: 'merchantCommitDate',
width: 180,
......@@ -634,7 +692,12 @@ export default {
}
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}/` })
this.$router.push({
// 待受理/定损不通过进入addDamage页面 核赔不通过进入addWriteOff页面
path: `/beforeSale/writeOff/addDamage/${params}/`,
// 待受理/定损通过 上传资料 面包屑title定损不通过/核赔不通过 重新提交
query: { $title: [32, 34].includes(item.status) ? '上传资料' : '重新提交' }
})
// console.log(22222)
// this.$router.push({ path: '/djClaims/djOrder/' })
......@@ -683,7 +746,10 @@ export default {
this.searchForm = {
searchText: '',
statusList: [],
commitDate: ''
commitDate: '',
merchantCommit: '',
merchantUpdate: '',
customerCommit: ''
}
this.getTableData()
},
......@@ -716,11 +782,20 @@ export default {
this.searchForm = { ...this.searchForm, ...searchForm }
}
let params = JSON.parse(JSON.stringify(this.searchForm))
if (Array.isArray(params.commitDate) && params.commitDate.length > 0) {
params.commitTimeStart = dayjs(params.commitDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.commitTimeEnd = dayjs(params.commitDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.commitDate
const dateFields = [
'commitDate',
'merchantCommit',
'merchantUpdate',
'customerCommit'
]
dateFields.forEach(field => {
if (Array.isArray(params[field]) && params[field].length > 0) {
params[`${field}${field != 'merchantCommit' ? 'TimeStart' : 'Start'}`] = dayjs(params[field][0]).format('YYYY-MM-DD') + ' 00:00:00'
params[`${field}${field != 'merchantCommit' ? 'TimeEnd' : 'End'}`] = dayjs(params[field][1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params[field]
})
return params
},
getTableData() {
......
......@@ -61,6 +61,8 @@
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="comfirmNoPass" @onCancel="cancleNoPass">
<glsx-combi-form ref="noPassRef" :isInline="false" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<!-- 查看合同 -->
<contract-dialog v-if="(editForm.contractNo && searchDetailFlag) || pageType != 1" ref="contract-dialog" :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
</div>
</template>
<script>
......@@ -71,6 +73,7 @@ import util from '@/util/util'
import wraning from './components/wraning/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
import contractDialog from '../djClaims/components/contractDialog.vue'
export default {
name: 'order',
components: {
......@@ -78,7 +81,8 @@ export default {
repair,
material,
wraning,
glsxCombiForm
glsxCombiForm,
contractDialog
},
data() {
return {
......@@ -174,7 +178,9 @@ export default {
},
reasonForFailureCode: 1,
isWatchOrder: false,
refitInfo: {}
refitInfo: {},
contractVisible: false,
searchDetailFlag: false
}
},
created() {
......@@ -203,6 +209,30 @@ export default {
},
mounted() {},
methods: {
// 查看合同
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getContractUrlApi({contractNo: this.editForm?.contractNo}).then(res => {
let { code, message } = res
if (code == 0) {
this.pdfUrl = res.data
this.contractVisible = true
} else {
this.$message.error(message)
}
loading.close()
})
},
// 关闭查看合同弹窗
closeDialog() {
this.contractVisible = false
},
// 校验上传资料是否填完
verifyWarningImage() {
if (!this.queryList) {
......@@ -508,6 +538,7 @@ export default {
damageType: []
}
}) || []
this.searchDetailFlag = true
this.getAccountInfo(contractNo)
})
},
......
......@@ -74,6 +74,8 @@
<div>
<other-info :otherInfoData="otherInfoData"></other-info>
</div>
<!-- 查看合同 -->
<contract-dialog ref="contract-dialog" :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
</div>
</template>
<script type="text/ecmascript-6">
......@@ -84,6 +86,7 @@ import Card from '../card.vue'
import uploadMaterial from '../uploadMaterial.vue'
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
import contractDialog from '../contractDialog.vue'
export default {
name: 'checkPage',
components: {
......@@ -91,7 +94,8 @@ export default {
Card,
uploadMaterial,
explanation,
otherInfo
otherInfo,
contractDialog
},
data() {
return {
......@@ -224,7 +228,9 @@ export default {
],
explanationObj: {
explanation1: ''
}
},
contractVisible: false,
pdfUrl: ''
}
},
props: {
......@@ -272,6 +278,30 @@ export default {
this.getCityList()
},
methods: {
// 查看合同
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getContractUrlApi({contractNo: this.repotData?.contractNo}).then(res => {
let { code, message } = res
if (code == 0) {
this.pdfUrl = res.data
this.contractVisible = true
} else {
this.$message.error(message)
}
loading.close()
})
},
// 关闭查看合同弹窗
closeDialog() {
this.contractVisible = false
},
getCityList() {
this.$apis.claims.getCityList({}).then(res => {
this.regionData = res
......@@ -318,10 +348,10 @@ export default {
if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], key, 1)
}
let maxPrice = 200000
if (key == 'lossAssessmentAmount') {
maxPrice = 2000000
}
let maxPrice = 2000000
// if (key == 'lossAssessmentAmount') {
// maxPrice = 2000000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], key, maxPrice)
}
......
......@@ -315,7 +315,7 @@ export default {
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal == 0
if (item) item.isHide = newVal == 0
},
immediate: true
}
......@@ -371,9 +371,9 @@ export default {
this.$set(this.itemsList[id], type, 1)
}
let maxPrice = 2000000
if(type == 'applyAmount' || type == 'approveAmount') {
maxPrice = 200000
}
// if(type == 'applyAmount' || type == 'approveAmount') {
// maxPrice = 200000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemsList[id], type, maxPrice)
}
......
<template>
<!-- 合同内容弹窗 -->
<div>
<div
v-if="isVisible"
class="pdf-preview-container"
:style="containerStyle"
@mousedown="startDrag"
@touchstart.passive="startDrag"
>
<div class="pdf-header" >
<span>{{ title }}</span>
<button class="close-btn" @click="close">×</button>
</div>
<div class="pdf-content">
<iframe
ref="pdfIframe"
:src="pdfUrl"
frameborder="0"
:style="iframeStyle"
></iframe>
</div>
<!-- 八个方向的缩放控制点 -->
<div class="resize-handle n" @mousedown="startResize($event, 'n')"></div>
<div class="resize-handle e" @mousedown="startResize($event, 'e')"></div>
<div class="resize-handle s" @mousedown="startResize($event, 's')"></div>
<div class="resize-handle w" @mousedown="startResize($event, 'w')"></div>
<div class="resize-handle ne" @mousedown="startResize($event, 'ne')"></div>
<div class="resize-handle nw" @mousedown="startResize($event, 'nw')"></div>
<div class="resize-handle se" @mousedown="startResize($event, 'se')"></div>
<div class="resize-handle sw" @mousedown="startResize($event, 'sw')"></div>
</div>
<!-- 功能入口 -->
<div class="point-btn" @click.capture="handleShow">
<img src="../../../assets/view-icon.png" alt="">
<div class="contact_text">查看合同</div>
</div>
</div>
</template>
<script>
export default {
props: {
pdfUrl: {
type: String,
required: true
},
title: {
type: String,
default: '合同预览'
},
initialWidth: {
type: Number,
default: 400
},
initialHeight: {
type: Number,
default: 500
},
initialX: {
type: Number,
default: 800
},
initialY: {
type: Number,
default: 100
},
isVisible: {
type: Boolean,
default: false
},
},
watch: {
isVisible: {
handler(n) {
this.size.width = 400
this.size.height = 500
this.position.x = 800
this.position.y = 100
}
}
},
data() {
return {
position: {
x: this.initialX,
y: this.initialY
},
size: {
width: this.initialWidth,
height: this.initialHeight
},
isDragging: false,
isResizing: false,
startPos: { x: 0, y: 0 },
resizeDirection: null,
startSize: { width: 0, height: 0 }
}
},
computed: {
containerStyle() {
return {
left: `${this.position.x}px`,
top: `${this.position.y}px`,
width: `${this.size.width}px`,
height: `${this.size.height}px`,
transform: this.isDragging ? 'translateZ(0)' : 'none' // 提升拖拽性能
}
},
iframeStyle() {
return {
width: '100%',
height: 'calc(100% - 40px)',
'pointer-events': 'auto'
}
}
},
methods: {
handleShow() {
this.$emit('handleContractPdf', this.isVisible)
},
startDrag(e) {
// 忽略缩放控制点的点击
if (e.target.classList.contains('resize-handle')) return
const clientX = e.clientX || e.touches[0].clientX
const clientY = e.clientY || e.touches[0].clientY
this.isDragging = true
this.startPos = {
x: clientX - this.position.x,
y: clientY - this.position.y
}
this.addEventListeners()
e.preventDefault()
},
startResize(e, direction) {
const clientX = e.clientX || e.touches[0].clientX
const clientY = e.clientY || e.touches[0].clientY
this.isResizing = true
this.resizeDirection = direction
this.startPos = { x: clientX, y: clientY }
this.startSize = { ...this.size }
this.startPosition = { ...this.position }
// 禁用iframe指针事件
this.$refs.pdfIframe.style.pointerEvents = 'none'
this.addEventListeners()
e.stopPropagation()
e.preventDefault()
},
addEventListeners() {
document.addEventListener('mousemove', this.handleMove)
document.addEventListener('touchmove', this.handleMove, { passive: false })
document.addEventListener('mouseup', this.stopMove)
document.addEventListener('touchend', this.stopMove)
},
handleMove(e) {
const clientX = e.clientX || e.touches[0].clientX
const clientY = e.clientY || e.touches[0].clientY
if (this.isDragging) {
this.position = {
x: clientX - this.startPos.x,
y: clientY - this.startPos.y
}
} else if (this.isResizing) {
this.handleResize(clientX, clientY)
}
e.preventDefault()
},
handleResize(clientX, clientY) {
const deltaX = clientX - this.startPos.x
const deltaY = clientY - this.startPos.y
const newSize = { ...this.startSize }
const newPosition = { ...this.startPosition }
// 根据方向调整大小和位置
if (this.resizeDirection.includes('e')) {
newSize.width = Math.max(300, this.startSize.width + deltaX)
}
if (this.resizeDirection.includes('w')) {
const newWidth = Math.max(300, this.startSize.width - deltaX)
newPosition.x = this.startPosition.x + (this.startSize.width - newWidth)
newSize.width = newWidth
}
if (this.resizeDirection.includes('s')) {
newSize.height = Math.max(200, this.startSize.height + deltaY)
}
if (this.resizeDirection.includes('n')) {
const newHeight = Math.max(200, this.startSize.height - deltaY)
newPosition.y = this.startPosition.y + (this.startSize.height - newHeight)
newSize.height = newHeight
}
this.size = newSize
this.position = newPosition
},
stopMove() {
this.isDragging = false
this.isResizing = false
this.resizeDirection = null
if (this.$refs.pdfIframe) {
this.$refs.pdfIframe.style.pointerEvents = 'auto'
}
document.removeEventListener('mousemove', this.handleMove)
document.removeEventListener('touchmove', this.handleMove)
document.removeEventListener('mouseup', this.stopMove)
document.removeEventListener('touchend', this.stopMove)
},
close() {
this.$emit('closeDialog')
}
}
}
</script>
<style scoped lang="scss">
.pdf-preview-container {
position: fixed;
z-index: 9999;
background: white;
border: 1px solid #ccc;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
overflow: hidden;
user-select: none;
touch-action: none;
.pdf-header {
padding: 10px 15px;
background: #f5f5f5;
border-bottom: 1px solid #ddd;
cursor: move;
display: flex;
justify-content: space-between;
align-items: center;
.close-btn {
background: none;
border: none;
font-size: 25px;
cursor: pointer;
padding: 0 5px;
line-height: 1;
}
.close-btn:hover {
color: #5850ff;
}
}
.pdf-content {
flex: 1;
cursor: move;
overflow: hidden;
}
/* 缩放控制点样式 */
.resize-handle {
position: absolute;
background: transparent;
z-index: 10;
}
.resize-handle.n {
top: 0;
left: 10px;
right: 10px;
height: 10px;
cursor: ns-resize;
}
.resize-handle.e {
top: 10px;
right: 0;
bottom: 10px;
width: 10px;
cursor: ew-resize;
}
.resize-handle.s {
bottom: 0;
left: 10px;
right: 10px;
height: 10px;
cursor: ns-resize;
}
.resize-handle.w {
top: 10px;
left: 0;
bottom: 10px;
width: 10px;
cursor: ew-resize;
}
.resize-handle.ne {
top: 0;
right: 0;
width: 15px;
height: 15px;
cursor: ne-resize;
}
.resize-handle.nw {
top: 0;
left: 0;
width: 15px;
height: 15px;
cursor: nw-resize;
}
.resize-handle.se {
bottom: 0;
right: 0;
width: 15px;
height: 15px;
cursor: se-resize;
}
.resize-handle.sw {
bottom: 0;
left: 0;
width: 15px;
height: 15px;
cursor: sw-resize;
}
}
.point-btn{
position: fixed;
right: 20px;
bottom: 410px;
cursor: pointer;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
width: 68px;
height: 78px;
background-image: linear-gradient(178deg, #F3F3FF 0%, #FFFFFF 100%);
border: 1px solid #FFFFFF;
box-shadow: 0 4px 12px 0 #a3a6cc59;
border-radius: 4px;
img{
width: 24px;
height: 24px;
margin-bottom: 6px;
}
.contact_text {
font-size: 12px;
font-weight: 500;
color: #5850FF;
}
}
</style>
\ No newline at end of file
......@@ -379,9 +379,9 @@ export default {
this.$set(this.serviceItemsList[id], key, 1)
}
let maxPrice = 2000000
if(key == 'approveAmount' || key == 'customerApplyAmount') {
maxPrice = 200000
}
// if(key == 'approveAmount' || key == 'customerApplyAmount') {
// maxPrice = 200000
// }
if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], key, maxPrice)
}
......
......@@ -253,6 +253,28 @@ export default {
// this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[index], img)
},
touploadOther() {
// let otherObj = {}
// let copy = null
// otherObj.attachmentFile = 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_collapse_new_common.png'
// otherObj.auditStatus = null
// otherObj.attachmentType = 'png'
// if (this.otherUploadIndex != null) {
// this.insuranceAttachmentConfigs[this.currentIndx].allImages[this.otherUploadIndex] = otherObj
// this.$forceUpdate()
// } else {
// otherObj.id = null
// otherObj.attachmentName = null
// otherObj.auditStatus = null
// otherObj.reasonForFailure = null
// otherObj.auditBy = null
// otherObj.classifyId = this.classifyId
// otherObj.attachmentCode = 4
// this.insuranceAttachmentConfigs[this.currentIndx].allImages.push(otherObj)
// }
// this.uploadObj.img.attachmentList[0].attachmentFile = 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_collapse_new_common.png'
// this.uploadObj.img.attachmentList[0].auditStatus = null
// this.$set(this.insuranceAttachmentConfigs[this.currentIndx].secondClassifyList[this.uploadObj.index], this.uploadObj.img)
// return
this.isUploadOther = true
this.otherUploadIndex = null
},
......
......@@ -338,18 +338,22 @@
</el-tabs>
</div>
</template>
<!-- 查看合同 -->
<contract-dialog v-show="activeNameTabs == 'first'" :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
</div>
</template>
<script type="text/ecmascript-6">
import explanation from '../explanation.vue'
import otherInfo from '../otherInfo.vue'
import wraning from '../wraning/index.vue'
import contractDialog from '../contractDialog.vue'
export default {
name: 'watchPage',
components: {
explanation,
otherInfo,
wraning
wraning,
contractDialog
},
data() {
return {
......@@ -367,7 +371,9 @@ export default {
{ name: '登记费', key: 'registrationFee' },
{ name: '加改装件费用', key: 'retrofits' },
{ name: '代步车费用', key: 'scooterFare' }
]
],
contractVisible: false,
pdfUrl: ''
}
},
props: {
......@@ -395,6 +401,30 @@ export default {
}
},
methods: {
// 查看合同
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getContractUrlApi({contractNo: this.repotData?.contractNo}).then(res => {
let { code, message } = res
if (code == 0) {
this.pdfUrl = res.data
this.contractVisible = true
} else {
this.$message.error(message)
}
loading.close()
})
},
// 关闭查看合同弹窗
closeDialog() {
this.contractVisible = false
},
selectServices(index) {
this.currentServicesIndex = index
},
......
......@@ -910,7 +910,7 @@ export default {
}
}
const maxPrice = 200000
const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], type, maxPrice)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!