
99 changed files with 6080 additions and 2330 deletions
@ -0,0 +1,522 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu">销售订单</div> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="130px" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">订单编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.concatNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">制单日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售机构</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.orgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">客户信息</div> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">挂靠公司</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.affiliatedCompany }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.payType }} {{ formobj.financePlanValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">开票类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.billingType }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">是否包牌</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.licensePlateValue }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">车型信息</div> |
|||
<el-row> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<el-form-item><span class="addinputInfo" style="margin-left: 0px !important;">{{ formobj.busSalesOrderModel.modelConfig }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">常用配置</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.config }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">更多配置</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.moreConfig }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">特殊配置说明</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.specialConfig }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">合格证公告型号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.publicModel }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="16" class="tlineheightb"> |
|||
<el-form-item><span class="addinputInfo" style="margin-left: 0px !important;">{{ formobj.busSalesOrderModel.publicModelSon }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.busSalesOrderMakeup.topMessage !== ''"> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">上装</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderMakeup.topMessage }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.type == '1'"> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">车架号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.vinNo }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.type == '2'"> |
|||
<el-col :span="24" class="tlineheightb"> |
|||
<div class="span-sty">采购订单编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.linkNo }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.type == '3'"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">需采购</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.quantity }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!-- <div class="title">挂车信息</div>--> |
|||
<!-- <el-row>--> |
|||
<!-- <el-col :span="24">--> |
|||
<!-- <el-form-item><span></span></el-form-item>--> |
|||
<!-- </el-col>--> |
|||
<!-- </el-row>--> |
|||
<div class="title">价格信息</div> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单台整体指导价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.singleGuildPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">主车单台成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderModel.finalPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单台整体成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.singleFinalPrice }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单台折让(元)</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.bigDecimalSing }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">台数</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.quantity }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">车价合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.priceSum }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">计划提车日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.plannedPickUpDate }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">预计提车地点</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderPrice.plannedPickUpLocation }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">保险说明</div> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item><span>{{ formobj.insuranceInfo }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">订金信息</div> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">单台订金</div> |
|||
<el-form-item><span class="addinputInfo">¥{{ formobj.busSalesOrderDeposit.deposit }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">订金合计</div> |
|||
<el-form-item><span class="addinputInfo">¥{{ formobj.busSalesOrderDeposit.depositAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">订金缴纳方式</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderDeposit.depositType }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">需补交订金</div> |
|||
<el-form-item><span class="addinputInfo">¥{{ formobj.busSalesOrderDeposit.makeUpDeposit }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">款项确认书</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 178px;height: 178px;" v-for="(item,index) in formobj.busSalesOrderDeposit.paymentConfirmation" :key="index" :src="item" :preview-src-list="formobj.busSalesOrderDeposit.paymentConfirmation"></el-image></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">订金备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderDeposit.depositRemarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title" v-if="formobj.busSalesOrderDiscountList.length > 0">优惠套餐</div> |
|||
<el-table v-if="formobj.busSalesOrderDiscountList.length > 0" :key="tableKey" :data="formobj.busSalesOrderDiscountList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column label="优惠名称" align="left" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.name }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="价值" align="left" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.price }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="优惠项目说明" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.discountExplain }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="数量" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.num }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="totalValue" label="小计" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.totalValue }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-show="formobj.finPlanState" class="jinrong"> |
|||
<div>金融方案</div> |
|||
<div> |
|||
<el-button type="primary" size="mini" class="btntopblueline" @click="handleLook()">查看</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="title">补充说明</div> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item><span>{{ formobj.notes }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item><el-image style="width: 178px;height: 178px;" v-for="(item,index) in formobj.images" :key="index" :src="item" :preview-src-list="formobj.images"></el-image></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">其它信息</div> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">内部引荐人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">返利备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorMobile }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">单车中介服务费</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">中介服务费合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.middleOneDistributorPriceTotal }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorMobileTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">单车中介服务费</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.distributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">中介服务费合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.busSalesOrderotherMessageDetailsVo.middleTwoDistributorPriceTotal }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<financialschemeInfo ref="divInfo" v-show="viewState == 2" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { fetchDetailsBySid } from '@/api/salesManagement/orderManagement' |
|||
import financialschemeInfo from './financialschemeInfo' |
|||
|
|||
export default { |
|||
name: 'XiaoShouDingDanInfo', |
|||
components: { |
|||
financialschemeInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
tableKey: 0, |
|||
index: 0, |
|||
formobj: { |
|||
sid: '', |
|||
affiliatedCompany: '', |
|||
affiliatedCompanySid: '', |
|||
billNo: '', |
|||
billingType: '', |
|||
billingTypeKey: '', |
|||
busDepositFictitiousList: [], |
|||
busSalesOrderDeposit: [], |
|||
busSalesOrderDiscountList: [], |
|||
busSalesOrderInsurance: [], |
|||
busSalesOrderMakeup: [], |
|||
busSalesOrderModel: [], |
|||
busSalesOrderPrice: [], |
|||
busSalesOrderVehicleList: [], |
|||
busSalesOrderotherMessageDetailsVo: [], |
|||
busSalesVehicleOrderList: [], |
|||
concatNo: '', |
|||
createDate: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
images: [], |
|||
insuranceInfo: '', |
|||
insuranceInfoMessage: '', |
|||
isInsurance: '', |
|||
isTop: '', |
|||
licensePlateKey: '', |
|||
licensePlateValue: '', |
|||
mobile: '', |
|||
nodeState: '', |
|||
notes: '', |
|||
orgName: '', |
|||
orgSid: '', |
|||
payType: '', |
|||
payTypeKey: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
staffName: '', |
|||
staffSid: '', |
|||
taskId: '', |
|||
type: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
finPlanState: false |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.viewTitle = '销售订单' |
|||
fetchDetailsBySid(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
if (this.formobj.busSalesOrderModel.linkNo.length > 0) { |
|||
this.formobj.busSalesOrderModel.linkNo = this.formobj.busSalesOrderModel.linkNo.join('、') |
|||
} else { |
|||
this.formobj.busSalesOrderModel.linkNo = '' |
|||
} |
|||
if (this.formobj.busSalesOrderModel.vinNo.length > 0) { |
|||
this.formobj.busSalesOrderModel.vinNo = this.formobj.busSalesOrderModel.vinNo.join('、') |
|||
} else { |
|||
this.formobj.busSalesOrderModel.vinNo = '' |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
handleLook() { |
|||
this.viewState = 2 |
|||
this.$refs['divInfo'].showInfo(this.formobj.solutionsDetailsssVo) |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'totalValue') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
handleReturn() { |
|||
this.formobj = { |
|||
sid: '', |
|||
affiliatedCompany: '', |
|||
affiliatedCompanySid: '', |
|||
billNo: '', |
|||
billingType: '', |
|||
billingTypeKey: '', |
|||
busDepositFictitiousList: [], |
|||
busSalesOrderDeposit: [], |
|||
busSalesOrderDiscountList: [], |
|||
busSalesOrderInsurance: [], |
|||
busSalesOrderMakeup: [], |
|||
busSalesOrderModel: [], |
|||
busSalesOrderPrice: [], |
|||
busSalesOrderVehicleList: [], |
|||
busSalesOrderotherMessageDetailsVo: [], |
|||
busSalesVehicleOrderList: [], |
|||
concatNo: '', |
|||
createDate: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
images: [], |
|||
insuranceInfo: '', |
|||
insuranceInfoMessage: '', |
|||
isInsurance: '', |
|||
isTop: '', |
|||
licensePlateKey: '', |
|||
licensePlateValue: '', |
|||
mobile: '', |
|||
nodeState: '', |
|||
notes: '', |
|||
orgName: '', |
|||
orgSid: '', |
|||
payType: '', |
|||
payTypeKey: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
staffName: '', |
|||
staffSid: '', |
|||
taskId: '', |
|||
type: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
finPlanState: false |
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
.jinrong { |
|||
padding: 7px; |
|||
font-weight: bold; |
|||
font-size: 16px; |
|||
background-color: #0294d7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
margin-bottom: 1px; |
|||
} |
|||
.tlineheightb { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/deep/ .tlineheightb .el-form-item .el-form-item__content .addinputInfo { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,819 @@ |
|||
<template> |
|||
<div style="margin-top: 2px"> |
|||
<el-form ref="form_obj" :model="finance" class="formaddcopy02"> |
|||
<div class="title titleOne"> |
|||
<div>金融方案</div> |
|||
<div> |
|||
<el-button type="primary" size="mini" :disabled="submitdisabled" class="btntopblueline" @click="handleConfirm">确定</el-button> |
|||
<el-button type="info" size="mini" @click="handleColse">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">是否打包</div> |
|||
<el-form-item> |
|||
<el-radio-group style="font-size: 1px" class="addinputw" @input="isPackChange" v-model="finance.isPack"> |
|||
<el-radio label="1">是</el-radio> |
|||
<el-radio label="0">否</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<div class="span-sty">产品政策</div> |
|||
<el-form-item> |
|||
<el-select v-model="finance.policyName" placeholder="请选择" @change="changePolicy" clearable class="addinputInfo"> |
|||
<el-option v-for="item in policy_list" :key="item.sid" :label="item.name" :value="item.name"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">融资项目</div> |
|||
<el-form-item prop="mainVehicleAmount"> |
|||
<div class="addinputInfo"> |
|||
<span><span class="icon">*</span>主车发票价<el-input v-model="finance.mainVehicleAmount" @input="financingProject" clearable style="width: 100px" placeholder="" @keyup.native="finance.mainVehicleAmount = oninput(finance.mainVehicleAmount, 0)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox @change="financingProject" v-model="finance.accessoriesAmountCb" style="padding-right: 5px"/>配件<el-input v-model="finance.accessoriesAmount" @input="financingProject" clearable style="width: 100px" placeholder="" @keyup.native="finance.accessoriesAmount = oninput(finance.accessoriesAmount, 0)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox @change="financingProject" v-model="finance.trailerAmountCb" style="padding-right: 5px"/>挂车<el-input v-model="finance.trailerAmount" @input="financingProject" clearable style="width: 100px" placeholder="" @keyup.native="finance.trailerAmount = oninput(finance.trailerAmount, 0)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox @change="financingProject" v-model="finance.premiumCb" :disabled="finance.isPack == '0'" style="padding-right: 5px"/>保险<el-input v-model="finance.premium" @input="financingProject" clearable style="width: 100px" placeholder="" @keyup.native="finance.premium = oninput(finance.premium, 0)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox @change="financingProject" v-model="finance.purchaseTaxCb" :disabled="finance.isPack == '0'" style="padding-right: 5px"/>购置税<el-input v-model="finance.purchaseTax" @input="financingProject" clearable style="width: 100px" placeholder="" @keyup.native="finance.purchaseTax = oninput(finance.purchaseTax, 0)"/>元</span> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">融资项目总额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.loanTotal }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">首付比例(%)</div> |
|||
<el-form-item><span class="addinputInfo">{{ finance.downPayRatio }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">首付金额</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw addinputInfo" v-model="finance.downPayAmount" @input="downPayAmountInput" placeholder="" clearable @keyup.native="finance.downPayAmount = oninput(finance.downPayAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">产品贷款金额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.loanAmount }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">产品期数</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.loanPeriod }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款保证金比例(%)</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.bondRatio }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款保证金</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.bondAmount" placeholder="" @input="bondAmountInput" clearable @keyup.native="finance.bondAmount = oninput(finance.bondAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">预计首款还款日</div> |
|||
<el-form-item> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="finance.returnTime" clearable class="addinputw" type="date" placeholder=""/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"></el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">厂家贴息</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.factoryDiscount" placeholder="" clearable @keyup.native="finance.factoryDiscount = oninput(finance.factoryDiscount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贴息用途</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.factoryDiscountUse }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty" v-show="finance.factoryDiscountUseKey == '01'">贴息抵车款</div> |
|||
<el-form-item v-show="finance.factoryDiscountUseKey == '01'"> |
|||
<el-input v-model="finance.discountCar" clearable placeholder="" class="addinputInfo addinputw" @keyup.native="finance.discountCar = oninput(finance.discountCar, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"></el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<el-checkbox v-model="finance.otherPolicyState" style="padding-right: 5px"/> |
|||
其它融 |
|||
</div> |
|||
<div v-if="finance.otherPolicyState"> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">其它融名称</div> |
|||
<el-form-item> |
|||
<el-select v-model="finance.otherPolicyName" placeholder="请选择" @change="changeOtherPolicy" clearable class="addinputInfo"> |
|||
<el-option v-for="item in other_list" :key="item.sid" :label="item.name" :value="item.name"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款金额</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.otherPolicyAmount" placeholder="" clearable @keyup.native="finance.otherPolicyAmount = oninput(finance.otherPolicyAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">期数</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.otherPolicyPeriod }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">年利率(%)</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ finance.otherPolicyYearRatio }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<div class="title">应收明细</div> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款保证金</div> |
|||
<el-form-item><span class="addinputInfo">{{ bondAmounts() }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">保险保证金</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.depositPremium" placeholder="" clearable @keyup.native="finance.depositPremium = oninput(finance.depositPremium, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">落户保证金</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.depositSettle" placeholder="" clearable @keyup.native="finance.depositSettle = oninput(finance.depositSettle, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">服务费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.serviceAmount" placeholder="" clearable @keyup.native="finance.serviceAmount = oninput(finance.serviceAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">代收意外险</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.proxyAccidentPremium" placeholder="" clearable @keyup.native="finance.proxyAccidentPremium = oninput(finance.proxyAccidentPremium, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">上牌费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.registerAmount" placeholder="" clearable @keyup.native="finance.registerAmount = oninput(finance.registerAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">运管费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.operationAmount" placeholder="" clearable @keyup.native="finance.operationAmount = oninput(finance.operationAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">补车价</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.vehOtherPrice" placeholder="" clearable @keyup.native="finance.vehOtherPrice = oninput(finance.vehOtherPrice, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">其它费用</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.otherAmount" placeholder="" clearable @keyup.native="finance.otherAmount = oninput(finance.otherAmount, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<div class="span-sty">其它费用说明</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.otherAmountRemark" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">办理方式选择</div> |
|||
<el-form-item> |
|||
<el-select v-model="finance.dealWay" placeholder="请选择" @change="changeDealWay" clearable class="addinputInfo"> |
|||
<el-option v-for="item in dealWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="6"> |
|||
<div v-if="finance.dealWayKey == '01' && finance.isPack == '0' "> |
|||
<div class="span-sty">代收首年保险费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.proxyPremium" placeholder="" clearable @keyup.native="finance.proxyPremium = oninput(finance.proxyPremium, 0)"/> |
|||
</el-form-item> |
|||
</div> |
|||
<div v-if="finance.dealWayKey == '02' && finance.isPack == '1'"> |
|||
<div class="span-sty">抵顶首年保险费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.offsetPremium" :disabled="!finance.premiumCb || this.finance.premium == ''" placeholder="" clearable @keyup.native="finance.offsetPremium = oninput(finance.offsetPremium, 0)"/> |
|||
</el-form-item> |
|||
</div> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div v-if="finance.dealWayKey == '01' && finance.isPack == '0' "> |
|||
<div class="span-sty">代收购置税</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.proxyPurchasetax" placeholder="" clearable @keyup.native="finance.proxyPurchasetax = oninput(finance.proxyPurchasetax, 0)"/> |
|||
</el-form-item> |
|||
</div> |
|||
<div v-if="finance.dealWayKey == '02' && finance.isPack == '1'"> |
|||
<div class="span-sty">抵顶购置税</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.offsetPurchasetax" :disabled="!finance.purchaseTaxCb || this.finance.purchaseTax == ''" placeholder="" clearable @keyup.native="finance.offsetPurchasetax = oninput(finance.offsetPurchasetax, 0)"/> |
|||
</el-form-item> |
|||
</div> |
|||
</el-col> |
|||
<el-col :span="6"></el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">名义(留购)价</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="finance.nominalPrice" placeholder="" clearable @keyup.native="finance.nominalPrice = oninput(finance.nominalPrice, 0)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item><span class="addinputInfo">注:结清时需缴纳此费用</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { typeValues, selectList, selectListByOther } from '@/api/dictcommons/dictcommons' |
|||
import { calculate } from '@/api/salesManagement/orderManagement' |
|||
|
|||
export default { |
|||
name: 'JinRongFangAn', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
submitdisabled: false, |
|||
dealWay_list: [], |
|||
policy_list: [], |
|||
other_list: [], |
|||
finance: { |
|||
saleOrderSid: '', |
|||
type: '', |
|||
isPack: '', |
|||
policyName: '', |
|||
policySid: '', |
|||
mainVehicleAmount: '', |
|||
accessoriesAmount: '', |
|||
trailerAmount: '', |
|||
purchaseTax: '', |
|||
premium: '', |
|||
loanTotal: '', |
|||
|
|||
accessoriesAmountCb: false, |
|||
trailerAmountCb: false, |
|||
purchaseTaxCb: false, |
|||
premiumCb: false, |
|||
|
|||
downPayRatio: '', |
|||
downPayAmount: '', |
|||
loanAmount: '', |
|||
loanPeriod: '', |
|||
bondRatio: '', |
|||
bondAmount: '', |
|||
factoryDiscount: '', |
|||
factoryDiscountUse: '', |
|||
factoryDiscountUseKey: '', |
|||
policyYearRatio: '', |
|||
loanPayMoney: '', |
|||
loanInterest: '', |
|||
discountCar: '', |
|||
otherPolicyState: false, |
|||
|
|||
otherPolicyName: '', |
|||
otherPolicySid: '', |
|||
otherPolicyAmount: '', |
|||
otherPolicyPeriod: '', |
|||
|
|||
otherPolicyMonthlyRepay: '', |
|||
otherPolicyInterest: '', |
|||
otherPolicyYearRatio: '', |
|||
|
|||
loanDownPay: '', |
|||
downPayAmountsRatio: '', |
|||
loanAmountTotal: '', |
|||
period: '', |
|||
monthlyRepay: '', |
|||
interest: '', |
|||
returnTime: '', |
|||
|
|||
downPayAmounts: '', |
|||
bondAmounts: '', |
|||
depositPremium: '', |
|||
depositSettle: '', |
|||
serviceAmount: '', |
|||
proxyAccidentPremium: '', |
|||
registerAmount: '', |
|||
operationAmount: '', |
|||
vehOtherPrice: '', |
|||
otherAmount: '', |
|||
otherAmountRemark: '', |
|||
dealWay: '', |
|||
dealWayKey: '', |
|||
proxyPremium: '', |
|||
proxyPurchasetax: '', |
|||
proxyTotal: '', |
|||
offsetPremium: '', |
|||
offsetPurchasetax: '', |
|||
offsetTotal: '', |
|||
receivableTotal: '', |
|||
realTotal: '', |
|||
vehTotalPrice: '', |
|||
nominalPrice: '' |
|||
}, |
|||
rules: { |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'dealWay' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.dealWay_list = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
// 输入数字正则 |
|||
oninput(val, limit = 0) { |
|||
val = val.replace(/[^\d]/g, '') // 保留数字 |
|||
val = val.replace(/^00/, '0'); // 开头不能有两个0 |
|||
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 |
|||
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' |
|||
const reg = new RegExp(str) |
|||
if (limit === 0) { |
|||
// 不需要小数点 |
|||
val = val.replace(reg, '$1') |
|||
} else { |
|||
// 通过正则保留小数点后指定的位数 |
|||
val = val.replace(reg, '$1.$2') |
|||
} |
|||
return val |
|||
}, |
|||
showAdd(value) { |
|||
this.finance = JSON.parse(JSON.stringify(value)) |
|||
this.init() |
|||
}, |
|||
showEdit(value) { |
|||
this.finance = JSON.parse(JSON.stringify(value)) |
|||
this.init() |
|||
selectList({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), isPack: this.finance.isPack }).then((resp) => { |
|||
if (resp.success) { |
|||
this.policy_list = resp.data |
|||
} |
|||
}) |
|||
selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid }).then((res) => { |
|||
if (res.success) { |
|||
this.other_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
// 是否打包 |
|||
isPackChange(val) { |
|||
this.finance = { |
|||
saleOrderSid: '', |
|||
type: '', |
|||
isPack: val, |
|||
policyName: '', |
|||
policySid: '', |
|||
mainVehicleAmount: '', |
|||
accessoriesAmount: '', |
|||
trailerAmount: '', |
|||
purchaseTax: '', |
|||
premium: '', |
|||
loanTotal: '', |
|||
|
|||
accessoriesAmountCb: false, |
|||
trailerAmountCb: false, |
|||
purchaseTaxCb: false, |
|||
premiumCb: false, |
|||
|
|||
downPayRatio: '', |
|||
downPayAmount: '', |
|||
loanAmount: '', |
|||
loanPeriod: '', |
|||
bondRatio: '', |
|||
bondAmount: '', |
|||
factoryDiscount: '', |
|||
factoryDiscountUse: '', |
|||
factoryDiscountUseKey: '', |
|||
policyYearRatio: '', |
|||
loanPayMoney: '', |
|||
loanInterest: '', |
|||
discountCar: '', |
|||
otherPolicyState: false, |
|||
|
|||
otherPolicyName: '', |
|||
otherPolicySid: '', |
|||
otherPolicyAmount: '', |
|||
otherPolicyPeriod: '', |
|||
|
|||
otherPolicyMonthlyRepay: '', |
|||
otherPolicyInterest: '', |
|||
otherPolicyYearRatio: '', |
|||
|
|||
loanDownPay: '', |
|||
downPayAmountsRatio: '', |
|||
loanAmountTotal: '', |
|||
period: '', |
|||
monthlyRepay: '', |
|||
interest: '', |
|||
returnTime: '', |
|||
|
|||
downPayAmounts: '', |
|||
bondAmounts: '', |
|||
depositPremium: '', |
|||
depositSettle: '', |
|||
serviceAmount: '', |
|||
proxyAccidentPremium: '', |
|||
registerAmount: '', |
|||
operationAmount: '', |
|||
vehOtherPrice: '', |
|||
otherAmount: '', |
|||
otherAmountRemark: '', |
|||
dealWay: '', |
|||
dealWayKey: '', |
|||
proxyPremium: '', |
|||
proxyPurchasetax: '', |
|||
proxyTotal: '', |
|||
offsetPremium: '', |
|||
offsetPurchasetax: '', |
|||
offsetTotal: '', |
|||
receivableTotal: '', |
|||
realTotal: '', |
|||
vehTotalPrice: '', |
|||
nominalPrice: '' |
|||
} |
|||
selectList({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), isPack: this.finance.isPack }).then((resp) => { |
|||
if (resp.success) { |
|||
this.policy_list = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
// 资方产品政策 |
|||
changePolicy(value) { |
|||
const choose = this.policy_list.filter((item) => item.name === value) |
|||
if (choose.length > 0 && choose !== null) { |
|||
this.finance.policySid = choose[0].sid |
|||
// 从金融产品政策中-- 获取标准年利率 |
|||
this.finance.policyYearRatio = choose[0].yearRatio |
|||
// 从金融产品政策中-- 获取首付比例 |
|||
this.finance.downPayRatio = choose[0].downPayRatio |
|||
// 从金融产品政策中-- 获取期数 |
|||
this.finance.loanPeriod = choose[0].period |
|||
// 从金融产品政策中-- 获取贷款保证金比例 |
|||
this.finance.bondRatio = choose[0].bondRatio |
|||
// 贴息用途赋值 |
|||
this.finance.factoryDiscountUse = '抵利息' |
|||
this.finance.factoryDiscountUseKey = '02' |
|||
selectListByOther({ orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid }).then((res) => { |
|||
if (res.success) { |
|||
this.other_list = res.data |
|||
} |
|||
}) |
|||
} else { |
|||
this.finance.policySid = '' |
|||
} |
|||
}, |
|||
// 主方案 -- 融资项目总额 |
|||
financingProject() { |
|||
if (!this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && !this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) |
|||
} else if (this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && !this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) |
|||
} else if (this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && !this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 挂车 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) |
|||
} else if (this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 保险 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.premium)) |
|||
} else if (this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && !this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 挂车 + 保险 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.premium)) |
|||
} else if (this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && !this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 挂车 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 保险 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.premium)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (!this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && !this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 挂车 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) |
|||
} else if (!this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 挂车 + 保险 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.premium)) |
|||
} else if (!this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && !this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 挂车 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (!this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 挂车 + 保险 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.premium)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (!this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && this.finance.premiumCb && !this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 保险 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.premium)) |
|||
} else if (!this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 保险 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.premium)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (!this.finance.accessoriesAmountCb && !this.finance.trailerAmountCb && !this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} else if (this.finance.accessoriesAmountCb && this.finance.trailerAmountCb && this.finance.premiumCb && this.finance.purchaseTaxCb) { |
|||
// 融资项目总额 = 主车发票价 + 配件 + 挂车 + 保险 + 购置税 |
|||
this.finance.loanTotal = parseInt(this.arguments(this.finance.mainVehicleAmount)) + parseInt(this.arguments(this.finance.accessoriesAmount)) + parseInt(this.arguments(this.finance.trailerAmount)) + parseInt(this.arguments(this.finance.premium)) + parseInt(this.arguments(this.finance.purchaseTax)) |
|||
} |
|||
// 首次计算出或修改融资项目总额 |
|||
if (this.finance.loanTotal !== '') { |
|||
// 主方案 -- 计算首付金额 |
|||
this.finance.downPayAmount = (parseInt(this.arguments(this.finance.loanTotal)) * parseFloat(this.arguments(this.finance.downPayRatio)) / 100).toFixed(0) |
|||
// 主方案 -- 计算产品贷款金额 |
|||
this.finance.loanAmount = parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount)) |
|||
// 主方案 -- 计算贷款保证金 |
|||
this.finance.bondAmount = (parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100).toFixed(0) |
|||
} |
|||
if (this.finance.premiumCb && this.finance.dealWayKey === '02') { |
|||
this.finance.offsetPremium = this.finance.premium |
|||
} else { |
|||
this.finance.offsetPremium = '' |
|||
} |
|||
if (this.finance.purchaseTaxCb && this.finance.dealWayKey === '02') { |
|||
this.finance.offsetPurchasetax = this.finance.purchaseTax |
|||
} else { |
|||
this.finance.offsetPurchasetax = '' |
|||
} |
|||
}, |
|||
// 主方案 -- 修改首付金额 |
|||
downPayAmountInput() { |
|||
if (this.finance.loanTotal !== '') { |
|||
// 重新计算首付比例 |
|||
this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toFixed(2) |
|||
// 重新计算产品贷款金额 |
|||
this.finance.loanAmount = parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount)) |
|||
// 主方案 -- 贷款保证金 |
|||
this.finance.bondAmount = (parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100).toFixed(0) |
|||
} |
|||
}, |
|||
// 主方案 -- 修改贷款保证金,重新计算贷款保证金比例 |
|||
bondAmountInput() { |
|||
if (this.finance.bondAmount !== '') { |
|||
this.finance.bondRatio = (parseInt(this.arguments(this.finance.bondAmount)) / parseInt(this.arguments(this.finance.loanAmount)) * 100).toFixed(2) |
|||
} |
|||
}, |
|||
// 其它融--名称 |
|||
changeOtherPolicy(value) { |
|||
const choose = this.other_list.filter((item) => item.name === value) |
|||
if (choose.length > 0 && choose !== null) { |
|||
this.finance.otherPolicySid = choose[0].sid |
|||
this.finance.otherPolicyYearRatio = choose[0].yearRatio |
|||
this.finance.otherPolicyPeriod = choose[0].period |
|||
} else { |
|||
this.finance.otherPolicySid = '' |
|||
} |
|||
}, |
|||
// 应收明细 —— 贷款保证金 |
|||
bondAmounts() { |
|||
if (this.finance.bondAmount !== '') { |
|||
this.finance.bondAmounts = this.finance.bondAmount |
|||
} |
|||
return this.finance.bondAmount |
|||
}, |
|||
changeDealWay(value) { |
|||
const choose = this.dealWay_list.filter((item) => item.dictValue === value) |
|||
if (choose.length > 0 && choose !== null) { |
|||
this.finance.dealWayKey = choose[0].dictKey |
|||
} else { |
|||
this.finance.dealWayKey = '' |
|||
} |
|||
if (this.finance.dealWayKey === '02') { |
|||
this.finance.proxyPremium = '0' |
|||
this.finance.proxyPurchasetax = '0' |
|||
if (this.finance.premiumCb) { |
|||
this.finance.offsetPremium = this.finance.premium |
|||
} else { |
|||
this.finance.offsetPremium = '' |
|||
} |
|||
if (this.finance.purchaseTaxCb) { |
|||
this.finance.offsetPurchasetax = this.finance.purchaseTax |
|||
} else { |
|||
this.finance.offsetPurchasetax = '' |
|||
} |
|||
} else if (this.finance.dealWayKey === '01') { |
|||
this.finance.offsetPremium = '0' |
|||
this.finance.offsetPurchasetax = '0' |
|||
this.finance.proxyPremium = '' |
|||
this.finance.proxyPurchasetax = '' |
|||
} else { |
|||
this.finance.offsetPremium = '0' |
|||
this.finance.offsetPurchasetax = '0' |
|||
this.finance.proxyPremium = '0' |
|||
this.finance.proxyPurchasetax = '0' |
|||
} |
|||
}, |
|||
arguments(val) { |
|||
if (val === '' || val === undefined) { |
|||
val = 0 |
|||
return val |
|||
} else { |
|||
return val |
|||
} |
|||
}, |
|||
handleConfirm() { |
|||
if (this.finance.dealWayKey === '01' && this.finance.isPack === '0') { |
|||
if (this.arguments(this.finance.premium) !== this.arguments(this.finance.proxyPremium)) { |
|||
this.$message({ showClose: true, type: 'error', message: '代收首年保险费数额与融资项目中的保险数额应保持一致' }) |
|||
return |
|||
} |
|||
if (this.arguments(this.finance.purchaseTax) !== this.arguments(this.finance.proxyPurchasetax)) { |
|||
this.$message({ showClose: true, type: 'error', message: '代收购置税数额与融资项目中的购置税数额应保持一致' }) |
|||
return |
|||
} |
|||
} |
|||
if (this.finance.dealWayKey === '02' && this.finance.isPack === '1') { |
|||
if (parseInt(this.arguments(this.finance.premium)) < parseInt(this.arguments(this.finance.offsetPremium))) { |
|||
this.$message({ showClose: true, type: 'error', message: '抵顶首年保险费数额不能大于融资项目中的保险数额' }) |
|||
return |
|||
} |
|||
if (parseInt(this.arguments(this.finance.purchaseTax)) < parseInt(this.arguments(this.finance.offsetPurchasetax))) { |
|||
this.$message({ showClose: true, type: 'error', message: '抵顶购置税数额不能大于融资项目中的购置税数额' }) |
|||
return |
|||
} |
|||
} |
|||
this.submitdisabled = true |
|||
calculate(this.finance).then((resp) => { |
|||
if (resp.success) { |
|||
this.submitdisabled = false |
|||
console.log(resp.data) |
|||
this.finance.policyYearRatio = resp.data.policyYearRatio |
|||
this.finance.loanPayMoney = resp.data.loanPayMoney |
|||
this.finance.loanInterest = resp.data.loanInterest |
|||
this.finance.otherPolicyMonthlyRepay = resp.data.otherPolicyMonthlyRepay |
|||
this.finance.otherPolicyInterest = resp.data.otherPolicyInterest |
|||
this.finance.loanDownPay = resp.data.loanDownPay |
|||
this.finance.downPayAmountsRatio = resp.data.downPayAmountsRatio |
|||
this.finance.loanAmountTotal = resp.data.loanAmountTotal |
|||
this.finance.period = resp.data.period |
|||
this.finance.monthlyRepay = resp.data.monthlyRepay |
|||
this.finance.interest = resp.data.interest |
|||
this.finance.downPayAmounts = resp.data.downPayAmounts |
|||
this.finance.proxyTotal = resp.data.proxyTotal |
|||
this.finance.receivableTotal = resp.data.receivableTotal |
|||
this.finance.offsetTotal = resp.data.offsetTotal |
|||
this.finance.realTotal = resp.data.realTotal |
|||
this.finance.vehTotalPrice = resp.data.vehTotalPrice |
|||
this.$emit('backData', this.finance) |
|||
this.handleColse() |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
handleColse() { |
|||
this.finance = { |
|||
saleOrderSid: '', |
|||
type: '', |
|||
isPack: '', |
|||
policyName: '', |
|||
policySid: '', |
|||
mainVehicleAmount: '', |
|||
accessoriesAmount: '', |
|||
trailerAmount: '', |
|||
purchaseTax: '', |
|||
premium: '', |
|||
loanTotal: '', |
|||
|
|||
accessoriesAmountCb: false, |
|||
trailerAmountCb: false, |
|||
purchaseTaxCb: false, |
|||
premiumCb: false, |
|||
|
|||
downPayRatio: '', |
|||
downPayAmount: '', |
|||
loanAmount: '', |
|||
loanPeriod: '', |
|||
bondRatio: '', |
|||
bondAmount: '', |
|||
factoryDiscount: '', |
|||
factoryDiscountUse: '', |
|||
factoryDiscountUseKey: '', |
|||
policyYearRatio: '', |
|||
loanPayMoney: '', |
|||
loanInterest: '', |
|||
discountCar: '', |
|||
otherPolicyState: false, |
|||
|
|||
otherPolicyName: '', |
|||
otherPolicySid: '', |
|||
otherPolicyAmount: '', |
|||
otherPolicyPeriod: '', |
|||
|
|||
otherPolicyMonthlyRepay: '', |
|||
otherPolicyInterest: '', |
|||
otherPolicyYearRatio: '', |
|||
|
|||
loanDownPay: '', |
|||
downPayAmountsRatio: '', |
|||
loanAmountTotal: '', |
|||
period: '', |
|||
monthlyRepay: '', |
|||
interest: '', |
|||
returnTime: '', |
|||
|
|||
downPayAmounts: '', |
|||
bondAmounts: '', |
|||
depositPremium: '', |
|||
depositSettle: '', |
|||
serviceAmount: '', |
|||
proxyAccidentPremium: '', |
|||
registerAmount: '', |
|||
operationAmount: '', |
|||
vehOtherPrice: '', |
|||
otherAmount: '', |
|||
otherAmountRemark: '', |
|||
dealWay: '', |
|||
dealWayKey: '', |
|||
proxyPremium: '', |
|||
proxyPurchasetax: '', |
|||
proxyTotal: '', |
|||
offsetPremium: '', |
|||
offsetPurchasetax: '', |
|||
offsetTotal: '', |
|||
receivableTotal: '', |
|||
realTotal: '', |
|||
vehTotalPrice: '', |
|||
nominalPrice: '' |
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.formaddcopy02 { |
|||
padding: 0px; |
|||
} |
|||
.span-sty { |
|||
width: 140px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 130px !important; |
|||
} |
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.addinputw { |
|||
margin-left: 130px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 130px !important; |
|||
width: calc(100% - 125px); |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
File diff suppressed because it is too large
@ -0,0 +1,254 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>款票详情</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">车架号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title"> |
|||
<div>款项情况(平台收款)</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.finSelectVoList" border style="width: 100%" :index="index"> |
|||
<el-table-column fixed align="center" label="序号" type="index" :index="index + 1" width="60"/> |
|||
<el-table-column label="款项名称" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.receivablesName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="应收金额" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.reveivableMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="已收款" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.subscriptionMoneyAll }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未收款" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notSubscriptionMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remark }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div class="title">发票情况</div> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">开票名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoicingName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">税号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoiceNo }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">地址</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.address }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.telPhone }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">开户行</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.openingBank }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">银行账号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.bankNum }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">开票单位</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoiceTitle }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">开票类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoiceType }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">开票状态</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.billingState }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">开票金额</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoiceAmount }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">开票日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.invoiceDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">移交状态</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.transferState }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">接收人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.recipient }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">移交日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.vinInvoiceVo.transferTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { deliveredFinSelect, deliveredFinSelecByBusVinSidPC } from '@/api/chukuguanli/chukubanli' |
|||
|
|||
export default { |
|||
name: 'PaymentTicket', |
|||
data() { |
|||
return { |
|||
tableKey: 0, |
|||
index: 0, |
|||
// --按钮菜单------- |
|||
listLoading: false, |
|||
formobj: { |
|||
vinNo: '', |
|||
paymentMethod: '', |
|||
contractNo: '', |
|||
customerName: '', |
|||
modelName: '', |
|||
finSelectVoList: [], |
|||
vinInvoiceVo: { |
|||
invoicingName: '', |
|||
invoiceNo: '', |
|||
invoiceTitle: '', |
|||
invoiceType: '', |
|||
billingState: '', |
|||
invoiceAmount: '', |
|||
invoiceDate: '', |
|||
transferState: '', |
|||
address: '', |
|||
telPhone: '', |
|||
openingBank: '', |
|||
bankNum: '', |
|||
recipient: '', |
|||
transferTime: '' |
|||
} |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
showInfo(contractId, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
if (row.vinSid !== null && row.vinSid !== undefined) { |
|||
deliveredFinSelect({ contractNo: contractId, vinSid: row.vinSid }).then((response) => { |
|||
if (response.success) { |
|||
console.log(response.data) |
|||
this.formobj = response.data |
|||
} |
|||
}) |
|||
} |
|||
// 销售订单退车查看款票情况时执行此方法 |
|||
if (row.busVinSid !== null && row.busVinSid !== undefined) { |
|||
deliveredFinSelecByBusVinSidPC({ contractNo: contractId, busVinSid: row.busVinSid }).then((res) =>{ |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$refs['dataForm'].resetFields() |
|||
this.formobj = { |
|||
vinNo: '', |
|||
paymentMethod: '', |
|||
contractNo: '', |
|||
customerName: '', |
|||
modelName: '', |
|||
finSelectVoList: [], |
|||
vinInvoiceVo: { |
|||
invoicingName: '', |
|||
invoiceNo: '', |
|||
invoiceTitle: '', |
|||
invoiceType: '', |
|||
billingState: '', |
|||
invoiceAmount: '', |
|||
invoiceDate: '', |
|||
transferState: '', |
|||
address: '', |
|||
telPhone: '', |
|||
openingBank: '', |
|||
bankNum: '', |
|||
recipient: '', |
|||
transferTime: '' |
|||
} |
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
</style> |
@ -1,828 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleSave()">保存</el-button> |
|||
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" label-position="top" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">单车主车销售合同价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.finalPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">单车挂车销售合同价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.gcPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">单车上装销售合同价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.szPrice }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div v-if="formobj.typeKey !== '02'"> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">是否打包</div> |
|||
<el-form-item> |
|||
<el-radio-group class="addinputw" v-model="formobj.isPack"> |
|||
<el-radio label="1">是</el-radio> |
|||
<el-radio label="0">否</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<div class="span-sty">资方及产品政策</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.policyName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">融资项目</div> |
|||
<el-form-item prop="mainVehicleAmount"> |
|||
<div class="addinputInfo"> |
|||
<span><span class="icon">*</span>主车发票价<el-input v-model="formobj.mainVehicleAmount" clearable style="width: 100px" placeholder="" @keyup.native="formobj.mainVehicleAmount = oninput(formobj.mainVehicleAmount, 2)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox v-model="formobj.accessoriesAmountCb" style="padding-right: 5px"/>融资票据<el-input :disabled="!formobj.accessoriesAmountCb" v-model="formobj.accessoriesAmount" clearable style="width: 100px" placeholder="" @keyup.native="formobj.accessoriesAmount = oninput(formobj.accessoriesAmount, 2)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox v-model="formobj.trailerAmountCb" style="padding-right: 5px"/>挂车<el-input :disabled="!formobj.trailerAmountCb" v-model="formobj.trailerAmount" clearable style="width: 100px" placeholder="" @keyup.native="formobj.trailerAmount = oninput(formobj.trailerAmount, 2)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox v-model="formobj.premiumCb" style="padding-right: 5px"/>保险<el-input :disabled="!formobj.premiumCb" v-model="formobj.premium" clearable style="width: 100px" placeholder="" @keyup.native="formobj.premium = oninput(formobj.premium, 2)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox v-model="formobj.purchaseTaxCb" style="padding-right: 5px"/>购置税<el-input :disabled="!formobj.purchaseTaxCb" v-model="formobj.purchaseTax" clearable style="width: 100px" placeholder="" @keyup.native="formobj.purchaseTax = oninput(formobj.purchaseTax, 2)"/>元</span> |
|||
<span style="padding-left: 5px"><el-checkbox v-model="formobj.vehDamageFloatCb" style="padding-right: 5px"/>车损上浮<el-input :disabled="!formobj.vehDamageFloatCb" v-model="formobj.vehDamageFloat" clearable style="width: 100px" placeholder="" @keyup.native="formobj.vehDamageFloat = oninput(formobj.vehDamageFloat, 2)"/>元</span> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">融资项目总额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ loanTotal() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">首付比例</div> |
|||
<el-form-item><span class="addinputInfo">{{ downPayRatio() }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>首付金额</div> |
|||
<el-form-item prop="downPayAmount"> |
|||
<el-input class="addinputw" v-model="formobj.downPayAmount" placeholder="" clearable @keyup.native="formobj.downPayAmount = oninput(formobj.downPayAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">产品贷款金额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ loanAmount() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>产品期数</div> |
|||
<el-form-item prop="loanPeriod"> |
|||
<el-input class="addinputw" v-model="formobj.loanPeriod" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款保证金比例</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ bondRatio() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>贷款保证金</div> |
|||
<el-form-item prop="bondAmount"> |
|||
<el-input class="addinputw" v-model="formobj.bondAmount" placeholder="" clearable @keyup.native="formobj.bondAmount = oninput(formobj.bondAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>厂家贴息</div> |
|||
<el-form-item prop="factoryDiscount"> |
|||
<el-input class="addinputw" v-model="formobj.factoryDiscount" placeholder="" clearable @keyup.native="formobj.factoryDiscount = oninput(formobj.factoryDiscount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">年利率</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.policyYearRatio" placeholder="" clearable @keyup.native="formobj.policyYearRatio = oninput(formobj.policyYearRatio, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>月还金额</div> |
|||
<el-form-item prop="loanPayMoney"> |
|||
<el-input class="addinputw" v-model="formobj.loanPayMoney" placeholder="" clearable @keyup.native="formobj.loanPayMoney = oninput(formobj.loanPayMoney, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">利息总额</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.loanInterest" placeholder="" clearable @keyup.native="formobj.loanInterest = oninput(formobj.loanInterest, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">厂家贴息用途</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.factoryDiscountUse" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"><el-checkbox v-model="formobj.otherPolicyState" style="padding-right: 5px"/>其它融</div> |
|||
<div v-if="formobj.otherPolicyState"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">其它融名称</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>贷款金额</div> |
|||
<el-form-item prop="otherPolicyAmount"> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyAmount" placeholder="" clearable @keyup.native="formobj.otherPolicyAmount = oninput(formobj.otherPolicyAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>期数</div> |
|||
<el-form-item prop="otherPolicyPeriod"> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyPeriod" placeholder="" clearable @keyup.native="formobj.otherPolicyPeriod = oninput(formobj.otherPolicyPeriod, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>月还金额</div> |
|||
<el-form-item prop="otherPolicyMonthlyRepay"> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyMonthlyRepay" placeholder="" clearable @keyup.native="formobj.otherPolicyMonthlyRepay = oninput(formobj.otherPolicyMonthlyRepay, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">利息总额</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyInterest" placeholder="" clearable @keyup.native="formobj.otherPolicyInterest = oninput(formobj.otherPolicyInterest, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">年利率</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.otherPolicyYearRatio" placeholder="" clearable @keyup.native="formobj.otherPolicyYearRatio = oninput(formobj.otherPolicyYearRatio, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<div class="title">方案汇总</div> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">融资首付</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ loanDownPay() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">实际首付比例</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ downPayAmountsRatio() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">总贷款金额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ loanAmountTotal() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">期数</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ period() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">月还金额</div> |
|||
<el-form-item><span class="addinputInfo">{{ monthlyRepay() }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">利息总额</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ interest() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>预计首款还款日</div> |
|||
<el-form-item prop="returnTime"> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="formobj.returnTime" clearable class="addinputw" type="date" placeholder=""/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">应收明细</div> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">融资首付</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ downPayAmounts() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">贷款保证金</div> |
|||
<el-form-item><span class="addinputInfo">{{ bondAmounts() }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">保险保证金</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.depositPremium" placeholder="" clearable @keyup.native="formobj.depositPremium = oninput(formobj.depositPremium, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">落户保证金</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.depositSettle" placeholder="" clearable @keyup.native="formobj.depositSettle = oninput(formobj.depositSettle, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"><span class="icon">*</span>服务费</div> |
|||
<el-form-item prop="serviceAmount"> |
|||
<el-input class="addinputw" v-model="formobj.serviceAmount" placeholder="" clearable @keyup.native="formobj.serviceAmount = oninput(formobj.serviceAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">代收意外险</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.proxyAccidentPremium" placeholder="" clearable @keyup.native="formobj.proxyAccidentPremium = oninput(formobj.proxyAccidentPremium, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">上牌费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.registerAmount" placeholder="" clearable @keyup.native="formobj.registerAmount = oninput(formobj.registerAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">运管费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.operationAmount" placeholder="" clearable @keyup.native="formobj.operationAmount = oninput(formobj.operationAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">补车价</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.vehOtherPrice" placeholder="" clearable @keyup.native="formobj.vehOtherPrice = oninput(formobj.vehOtherPrice, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">其它费用</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.otherAmount" placeholder="" clearable @keyup.native="formobj.otherAmount = oninput(formobj.otherAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">其它费用说明</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.otherAmountRemark" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">办理方式选择</div> |
|||
<el-form-item> |
|||
<el-select v-model="formobj.dealWay" placeholder="请选择" @change="changeDealWay" clearable class="addinputw"> |
|||
<el-option v-for="item in dealWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<div class="span-sty">代收首年保险费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.proxyPremium" placeholder="" clearable @keyup.native="formobj.proxyPremium = oninput(formobj.proxyPremium, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<div class="span-sty">代收购置税</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.proxyPurchasetax" placeholder="" clearable @keyup.native="formobj.proxyPurchasetax = oninput(formobj.proxyPurchasetax, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">应收合计</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ receivableTotal() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">抵顶费用合计</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ offsetTotal() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<div class="span-sty">抵顶首年保险费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.offsetPremium" placeholder="" clearable @keyup.native="formobj.offsetPremium = oninput(formobj.offsetPremium, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<div class="span-sty">抵顶购置税</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.offsetPurchasetax" placeholder="" clearable @keyup.native="formobj.offsetPurchasetax = oninput(formobj.offsetPurchasetax, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">实收合计</div> |
|||
<el-form-item> |
|||
<span class="addinputInfo">{{ realTotal() }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">车辆总价</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.vehTotalPrice" placeholder="" clearable @keyup.native="formobj.vehTotalPrice = oninput(formobj.vehTotalPrice, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty">名义(留购)价</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.nominalPrice" placeholder="" clearable @keyup.native="formobj.nominalPrice = oninput(formobj.nominalPrice, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item><span class="addinputInfo">注:结清时需缴纳此费用</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<div v-if="formobj.typeKey == '02'"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">资方及产品政策</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.policyName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>厂家贴息</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.factoryDiscount" placeholder="" clearable @keyup.native="formobj.factoryDiscount = oninput(formobj.factoryDiscount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>厂家贴息用途</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.factoryDiscountUse" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>服务费</div> |
|||
<el-form-item> |
|||
<el-input class="addinputw" v-model="formobj.serviceAmount" placeholder="" clearable @keyup.native="formobj.serviceAmount = oninput(formobj.serviceAmount, 2)"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { typeValues } from '@/api/dictcommons/dictcommons' |
|||
import {saveJinRong, selectDetailss } from '@/api/salesManagement/orderManagement' |
|||
|
|||
export default { |
|||
name: 'JinRongFangAnEdit', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
tableKey: 0, |
|||
index: 0, |
|||
dealWay_list: [], |
|||
formobj: { |
|||
saleOrderSid: '', |
|||
type: '', |
|||
isPack: '', |
|||
policyName: '', |
|||
mainVehicleAmount: '', |
|||
accessoriesAmount: '', |
|||
trailerAmount: '', |
|||
purchaseTax: '', |
|||
premium: '', |
|||
vehDamageFloat: '', |
|||
loanTotal: '', |
|||
|
|||
accessoriesAmountCb: false, |
|||
trailerAmountCb: false, |
|||
purchaseTaxCb: false, |
|||
premiumCb: false, |
|||
vehDamageFloatCb: false, |
|||
|
|||
downPayRatio: '', |
|||
downPayAmount: '', |
|||
loanAmount: '', |
|||
loanPeriod: '', |
|||
bondRatio: '', |
|||
bondAmount: '', |
|||
factoryDiscount: '', |
|||
factoryDiscountUse: '', |
|||
policyYearRatio: '', |
|||
loanPayMoney: '', |
|||
loanInterest: '', |
|||
otherPolicyState: false, |
|||
|
|||
otherPolicyName: '', |
|||
otherPolicyAmount: '', |
|||
otherPolicyPeriod: '', |
|||
|
|||
otherPolicyMonthlyRepay: '', |
|||
otherPolicyInterest: '', |
|||
otherPolicyYearRatio: '', |
|||
|
|||
loanDownPay: '', |
|||
downPayAmountsRatio: '', |
|||
loanAmountTotal: '', |
|||
period: '', |
|||
monthlyRepay: '', |
|||
interest: '', |
|||
returnTime: '', |
|||
|
|||
downPayAmounts: '', |
|||
bondAmounts: '', |
|||
depositPremium: '', |
|||
depositSettle: '', |
|||
serviceAmount: '', |
|||
proxyAccidentPremium: '', |
|||
registerAmount: '', |
|||
operationAmount: '', |
|||
vehOtherPrice: '', |
|||
otherAmount: '', |
|||
otherAmountRemark: '', |
|||
dealWay: '', |
|||
dealWayKey: '', |
|||
proxyPremium: '', |
|||
proxyPurchasetax: '', |
|||
offsetPremium: '', |
|||
offsetPurchasetax: '', |
|||
offsetTotal: '', |
|||
receivableTotal: '', |
|||
realTotal: '', |
|||
vehTotalPrice: '', |
|||
nominalPrice: '' |
|||
}, |
|||
rules: { |
|||
mainVehicleAmount: [{ required: true, message: '主车发票价不能为空', trigger: 'blur' }], |
|||
downPayAmount: [{ required: true, message: '首付金额不能为空', trigger: 'blur' }], |
|||
loanPeriod: [{ required: true, message: '产品期数不能为空', trigger: 'blur' }], |
|||
bondAmount: [{ required: true, message: '贷款保证金不能为空', trigger: 'blur' }], |
|||
factoryDiscount: [{ required: true, message: '厂家贴息不能为空', trigger: 'blur' }], |
|||
loanPayMoney: [{ required: true, message: '月还金额不能为空', trigger: 'blur' }], |
|||
otherPolicyAmount: [{ required: true, message: '贷款金额不能为空', trigger: 'blur' }], |
|||
otherPolicyPeriod: [{ required: true, message: '期数不能为空', trigger: 'blur' }], |
|||
otherPolicyMonthlyRepay: [{ required: true, message: '月还金额不能为空', trigger: 'blur' }], |
|||
returnTime: [{ required: true, message: '预计首期还款日不能为空', trigger: 'blur' }], |
|||
serviceAmount: [{ required: true, message: '服务费不能为空', trigger: 'blur' }], |
|||
factoryDiscountUse: [{ required: true, message: '厂家贴息用途不能为空', trigger: 'blur' }] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(val) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '单车金融方案' |
|||
// vue将一个data/DataSource对象变量赋值给另一个,结果两个对象变量同时变化的解决办法 |
|||
// this.formobj = JSON.parse(JSON.stringify(value)) |
|||
selectDetailss({ businessSid: val }).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.formobj.saleOrderSid = res.data.salesOrderSid |
|||
} |
|||
}) |
|||
typeValues({ type: 'dealWay' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.dealWay_list = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
// 输入数字正则 |
|||
oninput(val, limit = 0) { |
|||
val = val.replace(/[^\d.]/g, '') // 保留数字 |
|||
val = val.replace(/^00/, '0.') // 开头不能有两个0 |
|||
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0. |
|||
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个 |
|||
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点 |
|||
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 |
|||
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' |
|||
const reg = new RegExp(str) |
|||
if (limit === 0) { |
|||
// 不需要小数点 |
|||
val = val.replace(reg, '$1') |
|||
} else { |
|||
// 通过正则保留小数点后指定的位数 |
|||
val = val.replace(reg, '$1.$2') |
|||
} |
|||
return val |
|||
}, |
|||
// 主方案 —— 融资项目总额 |
|||
loanTotal() { |
|||
this.formobj.loanTotal = (parseFloat(this.arguments(this.formobj.mainVehicleAmount)) + parseFloat(this.arguments(this.formobj.accessoriesAmount)) + parseFloat(this.arguments(this.formobj.trailerAmount)) + parseFloat(this.arguments(this.formobj.premium)) + parseFloat(this.arguments(this.formobj.purchaseTax)) + parseFloat(this.arguments(this.formobj.vehDamageFloat))).toFixed(2) |
|||
return this.formobj.loanTotal |
|||
}, |
|||
// 主方案 —— 首付比例 |
|||
downPayRatio() { |
|||
if (this.formobj.loanTotal !== '' && this.formobj.downPayAmount !== '') { |
|||
this.formobj.downPayRatio = (parseFloat(this.arguments(this.formobj.downPayAmount)) / parseFloat(this.arguments(this.formobj.loanTotal)) * 100).toFixed(2) + '%' |
|||
} |
|||
return this.formobj.downPayRatio |
|||
}, |
|||
// 主方案 —— 产品贷款金额 |
|||
loanAmount() { |
|||
if (this.formobj.loanTotal !== '' && this.formobj.downPayAmount !== '') { |
|||
this.formobj.loanAmount = (parseFloat(this.arguments(this.formobj.loanTotal)) - parseFloat(this.arguments(this.formobj.downPayAmount))).toFixed(2) |
|||
} |
|||
return this.formobj.loanAmount |
|||
}, |
|||
// 主方案 —— 贷款保证金比例 |
|||
bondRatio() { |
|||
if (this.formobj.bondAmount !== '' && this.formobj.loanAmount !== '') { |
|||
this.formobj.bondRatio = (parseFloat(this.arguments(this.formobj.bondAmount)) / parseFloat(this.arguments(this.formobj.loanAmount)) * 100).toFixed(2) + '%' |
|||
} |
|||
return this.formobj.bondRatio |
|||
}, |
|||
// 方案汇总 —— 融资首付 |
|||
loanDownPay() { |
|||
if (this.formobj.downPayAmount !== '') { |
|||
if (this.formobj.otherPolicyAmount !== '') { |
|||
this.formobj.loanDownPay = (parseFloat(this.arguments(this.formobj.downPayAmount)) - parseFloat(this.arguments(this.formobj.otherPolicyAmount))).toFixed(2) |
|||
} else { |
|||
this.formobj.loanDownPay = this.formobj.downPayAmount |
|||
} |
|||
} |
|||
return this.formobj.loanDownPay |
|||
}, |
|||
// 方案汇总 —— 实际首付比例 |
|||
downPayAmountsRatio() { |
|||
if (this.formobj.loanDownPay !== '' && this.formobj.loanTotal !== '') { |
|||
this.formobj.downPayAmountsRatio = (parseFloat(this.formobj.loanDownPay) / parseFloat(this.formobj.loanTotal) * 100).toFixed(2) + '%' |
|||
} |
|||
return this.formobj.downPayAmountsRatio |
|||
}, |
|||
// 方案汇总 —— 总贷款金额 |
|||
loanAmountTotal() { |
|||
if (this.formobj.loanAmount !== '') { |
|||
if (this.formobj.otherPolicyAmount !== '') { |
|||
this.formobj.loanAmountTotal = (parseFloat(this.arguments(this.formobj.loanAmount)) + parseFloat(this.arguments(this.formobj.otherPolicyAmount))).toFixed(2) |
|||
} else { |
|||
this.formobj.loanAmountTotal = this.formobj.loanAmount |
|||
} |
|||
} |
|||
return this.formobj.loanAmountTotal |
|||
}, |
|||
// 方案汇总 —— 期数 |
|||
period() { |
|||
if (this.formobj.loanPeriod !== '') { |
|||
if (this.formobj.otherPolicyPeriod !== '') { |
|||
if (parseFloat(this.arguments(this.formobj.loanPeriod)) - parseFloat(this.arguments(this.formobj.otherPolicyPeriod)) < 0) { |
|||
this.formobj.period = '-' + '/' + this.formobj.loanPeriod |
|||
} else { |
|||
const aa = (parseFloat(this.arguments(this.formobj.loanPeriod)) - parseFloat(this.arguments(this.formobj.otherPolicyPeriod))).toFixed(2) |
|||
this.formobj.period = this.formobj.otherPolicyPeriod + '/' + aa |
|||
} |
|||
} else { |
|||
this.formobj.period = '-' + '/' + this.formobj.loanPeriod |
|||
} |
|||
} |
|||
return this.formobj.period |
|||
}, |
|||
// 方案汇总 —— 月还金额 |
|||
monthlyRepay() { |
|||
if (this.formobj.loanPayMoney !== '') { |
|||
if (this.formobj.otherPolicyMonthlyRepay !== '') { |
|||
if (parseFloat(this.arguments(this.formobj.loanPayMoney)) - parseFloat(this.arguments(this.formobj.otherPolicyMonthlyRepay)) === 0) { |
|||
const aa = (parseFloat(this.arguments(this.formobj.loanPayMoney)) + parseFloat(this.arguments(this.formobj.otherPolicyMonthlyRepay))).toFixed(2) |
|||
this.formobj.monthlyRepay = aa + '/' + '-' |
|||
} else { |
|||
const bb = (parseFloat(this.arguments(this.formobj.loanPayMoney)) + parseFloat(this.arguments(this.formobj.otherPolicyMonthlyRepay))).toFixed(2) |
|||
this.formobj.monthlyRepay = bb + '/' + this.formobj.loanPayMoney |
|||
} |
|||
} else { |
|||
this.formobj.monthlyRepay = this.formobj.loanPayMoney + '/' + '-' |
|||
} |
|||
} |
|||
return this.formobj.monthlyRepay |
|||
}, |
|||
// 方案汇总 —— 利息总额 |
|||
interest() { |
|||
if (this.formobj.loanInterest !== '' && this.formobj.otherPolicyInterest !== '') { |
|||
this.formobj.interest = (parseFloat(this.arguments(this.formobj.loanInterest)) + parseFloat(this.arguments(this.formobj.otherPolicyInterest))).toFixed(2) |
|||
} else if (this.formobj.loanInterest === '' && this.formobj.otherPolicyInterest !== '') { |
|||
this.formobj.interest = this.formobj.otherPolicyInterest |
|||
} else if (this.formobj.loanInterest !== '' && this.formobj.otherPolicyInterest === '') { |
|||
this.formobj.interest = this.formobj.loanInterest |
|||
} else { |
|||
this.formobj.interest = '' |
|||
} |
|||
return this.formobj.interest |
|||
}, |
|||
// 应收明细 —— 融资首付 |
|||
downPayAmounts() { |
|||
if (this.formobj.downPayAmount !== '') { |
|||
if (this.formobj.otherPolicyAmount !== '') { |
|||
this.formobj.downPayAmounts = (parseFloat(this.arguments(this.formobj.downPayAmount)) - parseFloat(this.arguments(this.formobj.otherPolicyAmount))).toFixed(2) |
|||
} else { |
|||
this.formobj.downPayAmounts = this.formobj.downPayAmount |
|||
} |
|||
} |
|||
return this.formobj.downPayAmounts |
|||
}, |
|||
// 应收明细 —— 贷款保证金 |
|||
bondAmounts() { |
|||
if (this.formobj.bondAmount !== '') { |
|||
this.formobj.bondAmounts = this.formobj.bondAmount |
|||
} |
|||
return this.formobj.bondAmount |
|||
}, |
|||
changeDealWay(value) { |
|||
const choose = this.dealWay_list.filter((item) => item.dictValue === value) |
|||
this.formobj.dealWayKey = choose[0].dictKey |
|||
}, |
|||
// 应收明细 —— 应收合计 |
|||
receivableTotal() { |
|||
if (this.formobj.serviceAmount !== '') { |
|||
this.formobj.receivableTotal = (parseFloat(this.arguments(this.formobj.downPayAmounts)) + parseFloat(this.arguments(this.formobj.bondAmounts)) + parseFloat(this.arguments(this.formobj.depositPremium)) + parseFloat(this.arguments(this.formobj.depositSettle)) + parseFloat(this.arguments(this.formobj.serviceAmount)) + parseFloat(this.arguments(this.formobj.proxyAccidentPremium)) + parseFloat(this.arguments(this.formobj.registerAmount)) + parseFloat(this.arguments(this.formobj.operationAmount)) + parseFloat(this.arguments(this.formobj.vehOtherPrice)) + parseFloat(this.arguments(this.formobj.otherAmount)) + parseFloat(this.arguments(this.formobj.proxyPremium)) + parseFloat(this.arguments(this.formobj.proxyPurchasetax))).toFixed(2) |
|||
} |
|||
return this.formobj.receivableTotal |
|||
}, |
|||
// 应收明细 —— 抵顶费用合计 |
|||
offsetTotal() { |
|||
if (this.formobj.offsetPremium !== '' && this.formobj.offsetPurchasetax !== '') { |
|||
this.formobj.offsetTotal = (parseFloat(this.arguments(this.formobj.offsetPremium)) + parseFloat(this.arguments(this.formobj.offsetPurchasetax))).toFixed(2) |
|||
} else if (this.formobj.offsetPremium === '' && this.formobj.offsetPurchasetax !== '') { |
|||
this.formobj.offsetTotal = this.formobj.offsetPurchasetax |
|||
} else if (this.formobj.offsetPremium !== '' && this.formobj.offsetPurchasetax === '') { |
|||
this.formobj.offsetTotal = this.formobj.offsetPremium |
|||
} else { |
|||
this.formobj.offsetTotal = '' |
|||
} |
|||
return this.formobj.offsetTotal |
|||
}, |
|||
// 应收明细 —— 实收合计 |
|||
realTotal() { |
|||
if (this.formobj.offsetTotal !== '') { |
|||
this.formobj.realTotal = (parseFloat(this.arguments(this.formobj.receivableTotal)) - parseFloat(this.arguments(this.formobj.offsetTotal))).toFixed(2) |
|||
} else { |
|||
this.formobj.realTotal = this.formobj.receivableTotal |
|||
} |
|||
return this.formobj.realTotal |
|||
}, |
|||
arguments(val) { |
|||
if (val === '') { |
|||
val = 0 |
|||
return val |
|||
} else { |
|||
return val |
|||
} |
|||
}, |
|||
handleSave() { |
|||
if (this.formobj.typeKey === '02') { |
|||
if (this.formobj.factoryDiscount === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '厂家贴息不能为空' }) |
|||
return |
|||
} |
|||
if (this.formobj.factoryDiscountUse === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '厂家贴息用途不能为空' }) |
|||
return |
|||
} |
|||
if (this.formobj.serviceAmount === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '服务费不能为空' }) |
|||
return |
|||
} |
|||
} |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
saveJinRong(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true,type: 'success', message: '保存成功' }) |
|||
this.handleReturn() |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn() { |
|||
this.formobj = { |
|||
saleOrderSid: '', |
|||
type: '', |
|||
typeKey: '', |
|||
isPack: '', |
|||
policyName: '', |
|||
mainVehicleAmount: '', |
|||
accessoriesAmount: '', |
|||
trailerAmount: '', |
|||
purchaseTax: '', |
|||
premium: '', |
|||
vehDamageFloat: '', |
|||
loanTotal: '', |
|||
|
|||
accessoriesAmountCb: false, |
|||
trailerAmountCb: false, |
|||
purchaseTaxCb: false, |
|||
premiumCb: false, |
|||
vehDamageFloatCb: false, |
|||
|
|||
downPayRatio: '', |
|||
downPayAmount: '', |
|||
loanAmount: '', |
|||
loanPeriod: '', |
|||
bondRatio: '', |
|||
bondAmount: '', |
|||
factoryDiscount: '', |
|||
factoryDiscountUse: '', |
|||
policyYearRatio: '', |
|||
loanPayMoney: '', |
|||
loanInterest: '', |
|||
otherPolicyState: false, |
|||
|
|||
otherPolicyName: '', |
|||
otherPolicyAmount: '', |
|||
otherPolicyPeriod: '', |
|||
|
|||
otherPolicyMonthlyRepay: '', |
|||
otherPolicyInterest: '', |
|||
otherPolicyYearRatio: '', |
|||
|
|||
loanDownPay: '', |
|||
downPayAmountsRatio: '', |
|||
loanAmountTotal: '', |
|||
period: '', |
|||
monthlyRepay: '', |
|||
interest: '', |
|||
returnTime: '', |
|||
|
|||
downPayAmounts: '', |
|||
bondAmounts: '', |
|||
depositPremium: '', |
|||
depositSettle: '', |
|||
serviceAmount: '', |
|||
proxyAccidentPremium: '', |
|||
registerAmount: '', |
|||
operationAmount: '', |
|||
vehOtherPrice: '', |
|||
otherAmount: '', |
|||
otherAmountRemark: '', |
|||
dealWay: '', |
|||
dealWayKey: '', |
|||
proxyPremium: '', |
|||
proxyPurchasetax: '', |
|||
offsetPremium: '', |
|||
offsetPurchasetax: '', |
|||
offsetTotal: '', |
|||
receivableTotal: '', |
|||
realTotal: '', |
|||
vehTotalPrice: '', |
|||
nominalPrice: '' |
|||
} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 140px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 130px !important; |
|||
} |
|||
.addinputw { |
|||
margin-left: 130px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 125px); |
|||
} |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,165 @@ |
|||
package com.yxt.anrui.crm.api.crmvehicledemand; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/8/29 |
|||
**/ |
|||
@Data |
|||
public class AppCrmSolutions { |
|||
|
|||
@JsonProperty("isShowMore") |
|||
private boolean isShowMore; |
|||
@ApiModelProperty("是否打包:1是0否") |
|||
private String isPack; |
|||
@ApiModelProperty("产品政策名称") |
|||
private String policyName; |
|||
private String policySid; |
|||
|
|||
@ApiModelProperty("主车发票价") |
|||
private String mainVehicleAmount; |
|||
@ApiModelProperty("融资票据") |
|||
private String accessoriesAmount; |
|||
|
|||
@ApiModelProperty("挂车金额") |
|||
private String trailerAmount; |
|||
@ApiModelProperty("购置税") |
|||
private String purchaseTax; |
|||
@ApiModelProperty("保险金额") |
|||
private String premium; |
|||
|
|||
@ApiModelProperty("融资项目总额") |
|||
private String loanTotal; |
|||
|
|||
@ApiModelProperty("是否有融资票据") |
|||
private boolean accessoriesAmountCb; |
|||
@ApiModelProperty("是否有挂车") |
|||
private boolean trailerAmountCb; |
|||
@ApiModelProperty("是否有购置税") |
|||
private boolean purchaseTaxCb; |
|||
@ApiModelProperty("是否有保险") |
|||
private boolean premiumCb; |
|||
|
|||
@ApiModelProperty("首付款比例") |
|||
private String downPayRatio; |
|||
@ApiModelProperty("首付金额") |
|||
@NotBlank(message = "首付金额不能为空") |
|||
private String downPayAmount; |
|||
@ApiModelProperty("贷款金额") |
|||
private String loanAmount; |
|||
@ApiModelProperty("贷款期数") |
|||
@NotBlank(message = "产品期数不能为空") |
|||
private String loanPeriod; |
|||
@ApiModelProperty("贷款保证金比例") |
|||
private String bondRatio; |
|||
@ApiModelProperty("贷款保证金金额") |
|||
@NotBlank(message = "贷款保证金不能为空") |
|||
private String bondAmount; |
|||
@ApiModelProperty("厂家贴息") |
|||
@NotBlank(message = "厂家贴息不能为空") |
|||
private String factoryDiscount; |
|||
@ApiModelProperty("厂家贴息用途") |
|||
private String factoryDiscountUse; |
|||
|
|||
@ApiModelProperty("贴息抵车款") |
|||
@JsonProperty("factoryDiscountUseMoney") |
|||
private String discountCar; |
|||
|
|||
@ApiModelProperty("年利率") |
|||
private String policyYearRatio; |
|||
@ApiModelProperty("月还金额") |
|||
@NotBlank(message = "月还金额不能为空") |
|||
private String loanPayMoney; |
|||
@ApiModelProperty("利息总额") |
|||
private String loanInterest; |
|||
|
|||
@ApiModelProperty("是否勾选其它融") |
|||
private boolean otherPolicyState; |
|||
|
|||
@ApiModelProperty("其它融名称") |
|||
private String otherPolicyName; |
|||
private String otherPolicySid; |
|||
@ApiModelProperty("其它融贷款金额") |
|||
private String otherPolicyAmount; |
|||
@ApiModelProperty("其它融期数") |
|||
private String otherPolicyPeriod; |
|||
@ApiModelProperty("其它融月还") |
|||
private String otherPolicyMonthlyRepay; |
|||
@ApiModelProperty("其它融利息总额") |
|||
private String otherPolicyInterest; |
|||
@ApiModelProperty("其它融年利率") |
|||
private String otherPolicyYearRatio; |
|||
|
|||
@ApiModelProperty("'融资首付") |
|||
private String loanDownPay; |
|||
@ApiModelProperty("实际首付比例") |
|||
private String downPayAmountsRatio; |
|||
@ApiModelProperty("总贷款金额") |
|||
private String loanAmountTotal; |
|||
@ApiModelProperty("期数") |
|||
private String period; |
|||
@ApiModelProperty("月还金额") |
|||
private String monthlyRepay; |
|||
@ApiModelProperty("利息总额") |
|||
private String interest; |
|||
@ApiModelProperty("预计首期还款日") |
|||
private String returnTime; |
|||
|
|||
@ApiModelProperty("融资首付") |
|||
private String downPayAmounts; |
|||
@ApiModelProperty("贷款保证金") |
|||
private String bondAmounts; |
|||
@ApiModelProperty("保险保证金") |
|||
private String depositPremium; |
|||
@ApiModelProperty("落户保证金") |
|||
private String depositSettle; |
|||
@ApiModelProperty("服务费") |
|||
@NotBlank(message = "服务费不能为空") |
|||
private String serviceAmount; |
|||
@ApiModelProperty("代收意外险") |
|||
private String proxyAccidentPremium; |
|||
@ApiModelProperty("上牌费") |
|||
private String registerAmount; |
|||
@ApiModelProperty("运管费") |
|||
private String operationAmount; |
|||
|
|||
@ApiModelProperty("补车价") |
|||
private String vehOtherPrice; |
|||
@ApiModelProperty("其它费用") |
|||
private String otherAmount; |
|||
@ApiModelProperty("其它费用说明") |
|||
private String otherAmountRemark; |
|||
@ApiModelProperty("办理方式选择") |
|||
private String dealWay; |
|||
@ApiModelProperty("办理方式选择key") |
|||
private String dealWayKey; |
|||
|
|||
@ApiModelProperty("代收首年保险费") |
|||
private String proxyPremium; |
|||
@ApiModelProperty("代收购置费") |
|||
private String proxyPurchasetax; |
|||
@ApiModelProperty("抵顶首年保险费") |
|||
private String offsetPremium; |
|||
@ApiModelProperty("抵顶购置税") |
|||
private String offsetPurchasetax; |
|||
@ApiModelProperty("抵顶费用合计") |
|||
private String offsetTotal; |
|||
@ApiModelProperty("应收合计") |
|||
private String receivableTotal; |
|||
@ApiModelProperty("实收合计") |
|||
private String realTotal; |
|||
@ApiModelProperty("车辆总价") |
|||
private String vehTotalPrice; |
|||
@ApiModelProperty("名义留购价") |
|||
private String nominalPrice; |
|||
|
|||
private List<CrmSolutionListVo> financeForms = new ArrayList<>(); |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.anrui.crm.api.crmvehicledemand; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/8/29 |
|||
**/ |
|||
@Data |
|||
public class CrmSolutionListVo { |
|||
|
|||
@ApiModelProperty(value = "内容") |
|||
private String value; |
|||
|
|||
@ApiModelProperty(value = "单元格大小") |
|||
private Integer spanSize; |
|||
|
|||
@ApiModelProperty("类型:0 最普通的 1 标题的 2是 加上划线的") |
|||
private Integer type; |
|||
@ApiModelProperty("是否加粗,true是,false否") |
|||
private boolean bold; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanfile; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author fan |
|||
* @Date 2022/11/14 22:40 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class LoanFile extends BaseEntity { |
|||
private static final long serialVersionUID = -1625798325169874963L; |
|||
@ApiModelProperty("关联sid") |
|||
private String linkSid; |
|||
@ApiModelProperty("文件类型") |
|||
private String fileType; |
|||
@ApiModelProperty("附件类型") |
|||
private String attachType; |
|||
@ApiModelProperty("文件名") |
|||
private String fileName; |
|||
@ApiModelProperty("文件大小") |
|||
private String fileSize; |
|||
@ApiModelProperty("文件路径") |
|||
private String filePath; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanfile; |
|||
|
|||
/** |
|||
* @Author fan |
|||
* @Date 2022/11/14 22:46 |
|||
* @Description |
|||
*/ |
|||
public enum LoanFileEnum { |
|||
|
|||
REGISTRATION_FILES_ONE("001", "登记证(1、2页)"), |
|||
REGISTRATION_FILES_TWO("002", "登记证(3、4页)"), |
|||
TAXI_FILES("003", "营运证"), |
|||
DRIVING_CARD_FILES("004", "行驶证"), |
|||
; |
|||
|
|||
|
|||
/** |
|||
* 附件类型 |
|||
*/ |
|||
private final String attachType; |
|||
|
|||
/** |
|||
* 代号 |
|||
*/ |
|||
private final String mark; |
|||
|
|||
LoanFileEnum(String attachType, String mark) { |
|||
this.attachType = attachType; |
|||
this.mark = mark; |
|||
} |
|||
|
|||
public String getAttachType() { |
|||
return attachType; |
|||
} |
|||
|
|||
public String getMark() { |
|||
return mark; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:34 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "抵押资料办理", description = "抵押资料办理") |
|||
@TableName("loan_mortgage_information_transact") |
|||
public class LoanMortgageInformationTransact extends BaseEntity { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("抵押日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date mortgageDate = new Date(); |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("使用组织全路径") |
|||
private String orgSidPath; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:13 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactDetailsVo implements Vo { |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("抵押日期") |
|||
private String mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:12 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactDto implements Dto { |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("抵押日期") |
|||
private Date mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* @description: 抵押办理 |
|||
* @author: fan |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Api(tags = "抵押办理") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanMortgageInformationTransact", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loanmortgageinformationtransact", |
|||
fallback = LoanMortgageInformationTransactFeignFallback.class) |
|||
public interface LoanMortgageInformationTransactFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(@RequestBody PagerQuery<LoanMortgageInformationTransactQuery> pq); |
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("保存抵押办理") |
|||
@PostMapping("/saveMortgageInfo") |
|||
public ResultBean<String> saveMortgageInfo(@RequestBody LoanMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("提交") |
|||
@PostMapping("/submitMortgageInfo") |
|||
public ResultBean<String> submitMortgageInfo(@RequestBody LoanMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 初始化详情 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("初始化详情") |
|||
@GetMapping("/getMortgageInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(@RequestParam("busVinSid") String busVinSid); |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:36 |
|||
*/ |
|||
@Component |
|||
public class LoanMortgageInformationTransactFeignFallback implements LoanMortgageInformationTransactFeign { |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:05 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactQuery implements Query { |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("组织全路径") |
|||
private String orgPath; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
@ApiModelProperty("合同编号/贷款人姓名/车架号") |
|||
private String names; |
|||
@ApiModelProperty("“” 全部 1待抵押 2已抵押") |
|||
private String type; |
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:04 |
|||
*/ |
|||
@Data |
|||
public class LoanMortgageInformationTransactVo implements Vo { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("抵押日期") |
|||
private String disbursementDate; |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String lenderName; |
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
private String createBySid; |
|||
private String orgSidPath; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
private boolean showHandleBtn; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 17:44 |
|||
*/ |
|||
@Data |
|||
public class LoanAuditInfoDto implements Dto { |
|||
@ApiModelProperty("业务sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("客户名称") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方名称") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 17:33 |
|||
*/ |
|||
@Data |
|||
public class LoanAuditInfoVo implements Vo { |
|||
@ApiModelProperty("业务sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("客户名称") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方名称") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:12 |
|||
*/ |
|||
@Data |
|||
public class LoanTransferInfoDto implements Dto { |
|||
private String[] sids; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("送达日期") |
|||
private String deliveryDate; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/29 9:04 |
|||
*/ |
|||
@Data |
|||
public class LoanTransferInfoVo implements Vo { |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("消贷合同号") |
|||
private String contractNo; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("送达日期") |
|||
private String deliveryDate; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:34 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "权证资料管理", description = "权证资料管理") |
|||
@TableName("loan_warrant_information") |
|||
public class LoanWarrantInformation extends BaseEntity { |
|||
@ApiModelProperty("销售订单sid") |
|||
private String salesOrderSid; |
|||
@ApiModelProperty("审核状态key") |
|||
private String auditStateKey; |
|||
@ApiModelProperty("审核状态Value") |
|||
private String auditStateValue; |
|||
@ApiModelProperty("送达日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date deliveryDate; |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date transferDate; |
|||
@ApiModelProperty("消贷合同号") |
|||
private String contractNo; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("使用组织全路径") |
|||
private String orgSidPath; |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/21 9:13 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationDetailsVo implements Vo { |
|||
@ApiModelProperty("业务sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("客户名称") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方名称") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
@ApiModelProperty("移交资料") |
|||
private String transferInformation; |
|||
@ApiModelProperty("送达日期") |
|||
private String deliveryDate; |
|||
@ApiModelProperty("快递单号") |
|||
private String trackingNo; |
|||
@ApiModelProperty("移交方式key") |
|||
private String transferWayKey; |
|||
@ApiModelProperty("移交方式value") |
|||
private String transferWayValue; |
|||
@ApiModelProperty("接收人/签收人") |
|||
private String recipient; |
|||
@ApiModelProperty("移交备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,96 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* @description: 权证资料 |
|||
* @author: fan |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Api(tags = "权证资料") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanWarrantInformation", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loanwarrantinformation", |
|||
fallback = LoanWarrantInformationFeignFallback.class) |
|||
public interface LoanWarrantInformationFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(@RequestBody PagerQuery<LoanWarrantInformationQuery> pq); |
|||
|
|||
|
|||
/** |
|||
* 审核回显 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核回显") |
|||
@GetMapping("/getAuditInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(@RequestParam("sid") String sid); |
|||
|
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核保存") |
|||
@PostMapping("/saveWarrantInfo") |
|||
public ResultBean<String> saveWarrantInfo(@RequestBody LoanAuditInfoDto dto); |
|||
|
|||
|
|||
/** |
|||
* 审核通过 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("审核通过") |
|||
@PostMapping("/approvedWarrantInfo") |
|||
public ResultBean<String> approvedWarrantInfo(@RequestBody LoanAuditInfoDto dto); |
|||
|
|||
|
|||
/** |
|||
* 移交回显 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("移交回显") |
|||
@PostMapping("/transferInfo") |
|||
@ResponseBody |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(@RequestBody String[] sids); |
|||
|
|||
/** |
|||
* 移交保存 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("移交保存") |
|||
@PostMapping("/saveTransferInfo") |
|||
public ResultBean saveTransferInfo(@RequestBody LoanTransferInfoDto dto); |
|||
|
|||
/** |
|||
* 详情 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("详情") |
|||
@GetMapping("/detailsInfo/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<LoanWarrantInformationDetailsVo> detailsInfo(@PathVariable("sid") String sid); |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 14:36 |
|||
*/ |
|||
@Component |
|||
public class LoanWarrantInformationFeignFallback implements LoanWarrantInformationFeign { |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanWarrantInformationDetailsVo> detailsInfo(String sid) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:05 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationQuery implements Query { |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("组织全路径") |
|||
private String orgPath; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("审核状态key") |
|||
private String auditStateKey; |
|||
@ApiModelProperty("移交开始日期") |
|||
private String startTime; |
|||
@ApiModelProperty("移交结束日期") |
|||
private String endTime; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanwarrantinformation; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/16 15:04 |
|||
*/ |
|||
@Data |
|||
public class LoanWarrantInformationVo implements Vo { |
|||
@ApiModelProperty("sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty("审核状态value") |
|||
private String auditStateValue; |
|||
@ApiModelProperty("移交日期") |
|||
private String transferDate; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
@ApiModelProperty("备注") |
|||
private String transferRemarks; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanfile; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import org.apache.ibatis.annotations.Delete; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/14 22:44 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface LoanFileMapper extends BaseMapper<LoanFile> { |
|||
List<LoanFile> selectByLinkSid(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
|
|||
int deleteByLinkSid(String sid); |
|||
|
|||
LoanFile selectByLinkSidOne(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
|
|||
@Delete("delete from loan_file where linkSid = #{sid} and attachType = #{attachType}") |
|||
void delByLinkSidOrType(@Param("sid") String sid, @Param("attachType") String attachType); |
|||
} |
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanfile.LoanFileMapper"> |
|||
<select id="selectByLinkSid" resultType="com.yxt.anrui.riskcenter.api.loanfile.LoanFile"> |
|||
select * |
|||
from loan_file |
|||
where linkSid = #{sid} |
|||
and attachType = #{attachType} |
|||
</select> |
|||
|
|||
<delete id="deleteByLinkSid"> |
|||
delete |
|||
from loan_file |
|||
where linkSid = #{sid} |
|||
</delete> |
|||
|
|||
<select id="selectByLinkSidOne" resultType="com.yxt.anrui.riskcenter.api.loanfile.LoanFile"> |
|||
select * |
|||
from loan_file |
|||
where attachType = #{attachType} |
|||
and linkSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,71 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanfile; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.io.File; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/14 22:43 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class LoanFileService extends MybatisBaseService<LoanFileMapper, LoanFile> { |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
public List<LoanFile> selectByLinkSid(String sid, String attachType) { |
|||
return baseMapper.selectByLinkSid(sid, attachType); |
|||
} |
|||
|
|||
public int deleteByLinkSid(String sid) { |
|||
return baseMapper.deleteByLinkSid(sid); |
|||
} |
|||
|
|||
public void saveAll(String sid, List<String> imageFiles, String attachType) { |
|||
if (!imageFiles.isEmpty()) { |
|||
imageFiles.stream().forEach(str -> { |
|||
LoanFile loanFile = new LoanFile(); |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
loanFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
loanFile.setLinkSid(sid); |
|||
loanFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
loanFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
loanFile.setAttachType(attachType); |
|||
loanFile.setFilePath(str.replace(fileUploadComponent.getUrlPrefix(), "")); |
|||
save(loanFile); |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
public LoanFile selectByLinkSidOne(String sid, String attachType) { |
|||
return baseMapper.selectByLinkSidOne(sid, attachType); |
|||
} |
|||
|
|||
public void delByLinkSidOrType(String sid, String attachType) { |
|||
baseMapper.delByLinkSidOrType(sid, attachType); |
|||
} |
|||
|
|||
public void saveFile(String sid, String filePath, String attachType) { |
|||
LoanFile loanFile = new LoanFile(); |
|||
String str = filePath; |
|||
File file = new File(fileUploadComponent.getUploadPath() + str.replace("/", File.separator)); |
|||
if (file != null) { |
|||
loanFile.setFileSize(fileUploadComponent.getPrintSize(file.length())); |
|||
} |
|||
loanFile.setLinkSid(sid); |
|||
loanFile.setFileName(str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf("."))); |
|||
loanFile.setFileType(str.substring(str.lastIndexOf(".") + 1)); |
|||
loanFile.setAttachType(attachType); |
|||
loanFile.setFilePath(str.replace(fileUploadComponent.getUrlPrefix(), "")); |
|||
save(loanFile); |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransact; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactVo; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanMortgageInformationTransactMapper extends BaseMapper<LoanMortgageInformationTransact> { |
|||
|
|||
List<LoanMortgageInformationTransactVo> listPageDo(@Param(Constants.WRAPPER) QueryWrapper<LoanMortgageInformationTransact> qw); |
|||
|
|||
LoanMortgageInformationTransact fetchByBusVinSid(String busVinSid); |
|||
|
|||
LoanMortgageInformationTransactDetailsVo getMortgageInfo(String busVinSid); |
|||
} |
@ -0,0 +1,31 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact.LoanMortgageInformationTransactMapper"> |
|||
|
|||
<select id="listPageDo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactVo"> |
|||
SELECT |
|||
busVinSid as sid, |
|||
salesOrderSid, |
|||
createTime, |
|||
date_format (mortgageDate,'%Y-%m-%d') as disbursementDate |
|||
from loan_mortgage_information_transact |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="fetchByBusVinSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransact"> |
|||
SELECT * |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="getMortgageInfo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.LoanMortgageInformationTransactDetailsVo"> |
|||
SELECT busVinSid, |
|||
remarks, |
|||
date_format(mortgageDate, '%Y-%m-%d') as mortgageDate |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Api(tags = "抵押资料办理") |
|||
@RestController |
|||
@RequestMapping("v1/loanmortgageinformationtransact") |
|||
public class LoanMortgageInformationTransactRest implements LoanMortgageInformationTransactFeign { |
|||
|
|||
@Autowired |
|||
private LoanMortgageInformationTransactService loanMortgageInformationTransactService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanMortgageInformationTransactVo>> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
ResultBean<PagerVo<LoanMortgageInformationTransactVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanMortgageInformationTransactVo> page = loanMortgageInformationTransactService.listPage(pq); |
|||
return rb.success().setData(page).setMsg(page.getMsg()); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return loanMortgageInformationTransactService.saveMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
return loanMortgageInformationTransactService.submitMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
return loanMortgageInformationTransactService.getMortgageInfo(busVinSid); |
|||
} |
|||
} |
@ -0,0 +1,621 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanmortgageinformationtransact; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleState; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateFeign; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|||
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppBusSalesOrderVo; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation; |
|||
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|||
import com.yxt.anrui.riskcenter.biz.loanwarrantinformation.LoanWarrantInformationService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Service |
|||
public class LoanMortgageInformationTransactService extends MybatisBaseService<LoanMortgageInformationTransactMapper, LoanMortgageInformationTransact> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private BaseVehicleStateFeign baseVehicleStateFeign; |
|||
@Autowired |
|||
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|||
@Autowired |
|||
private BusSalesOrderFeign busSalesOrderFeign; |
|||
@Autowired |
|||
private BusSalesOrderLoancontractFeign busSalesOrderLoancontractFeign; |
|||
@Autowired |
|||
private LoanFileService loanFileService; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
@Autowired |
|||
private LoanWarrantInformationService loanWarrantInformationService; |
|||
|
|||
/** |
|||
* 分页方法 |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> pageBySubList(List<LoanMortgageInformationTransactVo> list, int pagesize, int currentPage) { |
|||
int totalcount = list.size(); |
|||
int pagecount = 0; |
|||
List<LoanMortgageInformationTransactVo> subList; |
|||
int m = totalcount % pagesize; |
|||
if (m > 0) { |
|||
pagecount = totalcount / pagesize + 1; |
|||
} else { |
|||
pagecount = totalcount / pagesize; |
|||
} |
|||
if (m == 0) { |
|||
subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); |
|||
} else { |
|||
if (currentPage == pagecount) { |
|||
subList = list.subList((currentPage - 1) * pagesize, totalcount); |
|||
} else { |
|||
subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); |
|||
} |
|||
} |
|||
return subList; |
|||
} |
|||
|
|||
/** |
|||
* 待抵押列表 |
|||
* |
|||
* @return |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> pageToDo(LoanMortgageInformationTransactQuery query) { |
|||
List<LoanMortgageInformationTransactVo> voList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> finalList = new ArrayList<>(); |
|||
// 查询车辆状态表
|
|||
List<String> busSids = baseVehicleStateFeign.selectBusSidListByBusState("307").getData(); |
|||
busSids.removeAll(Collections.singleton(null)); |
|||
if (!busSids.isEmpty()) { |
|||
for (String busSid : busSids) { |
|||
LoanMortgageInformationTransactVo vo = new LoanMortgageInformationTransactVo(); |
|||
vo.setShowHandleBtn(true); |
|||
vo.setDisbursementDate("-"); |
|||
vo.setSid(busSid); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(busSid).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVin(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
vo.setSalesOrderSid(salesOrderSid); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
vo.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
vo.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
vo.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//分公司
|
|||
if (StringUtils.isNotBlank(salesOrder.getUseOrgName())) { |
|||
vo.setCompany(salesOrder.getUseOrgName()); |
|||
} |
|||
//销售订单创建日期
|
|||
vo.setCreateTime(salesOrder.getCreateTime()); |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
vo.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setLenderName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
vo.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
voList.add(vo); |
|||
} |
|||
} |
|||
//========== 数据权限 =============
|
|||
String orgPath = ""; |
|||
String userSid = ""; |
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuSid(query.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i1); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i2); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i3); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgPath = orgSidPath.substring(0, i4); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
userSid = query.getUserSid(); |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
// ================== 最终加上数据权限组装 ========================
|
|||
if (!voList.isEmpty()) { |
|||
for (LoanMortgageInformationTransactVo vo : voList) { |
|||
if (StringUtils.isNotBlank(userSid)) { |
|||
if (vo.getCreateBySid().equals(userSid)) { |
|||
finalList.add(vo); |
|||
} |
|||
} else if (StringUtils.isNotBlank(orgPath)) { |
|||
if (vo.getOrgSidPath().contains(orgPath)) { |
|||
finalList.add(vo); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (!finalList.isEmpty()) { |
|||
finalList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
} |
|||
return finalList; |
|||
} |
|||
|
|||
/** |
|||
* 已抵押列表 |
|||
*/ |
|||
public List<LoanMortgageInformationTransactVo> listPageDo(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
LoanMortgageInformationTransactQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanMortgageInformationTransact> qw = new QueryWrapper<>(); |
|||
//=======================
|
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|||
privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|||
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = pagerQuery.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> p = new ArrayList<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
qw.orderByDesc("createTime"); |
|||
List<LoanMortgageInformationTransactVo> voList = baseMapper.listPageDo(qw); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
for (LoanMortgageInformationTransactVo vo : voList) { |
|||
vo.setShowHandleBtn(false); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(vo.getSid()).getData(); |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVin(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = vo.getSalesOrderSid(); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
vo.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
vo.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//分公司
|
|||
if (StringUtils.isNotBlank(salesOrder.getUseOrgName())) { |
|||
vo.setCompany(salesOrder.getUseOrgName()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setLenderName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
vo.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return voList; |
|||
} |
|||
|
|||
/** |
|||
* 分页列表 |
|||
* |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
public PagerVo<LoanMortgageInformationTransactVo> listPage(PagerQuery<LoanMortgageInformationTransactQuery> pq) { |
|||
PagerVo<LoanMortgageInformationTransactVo> pagerVo = new PagerVo<>(); |
|||
LoanMortgageInformationTransactQuery params = pq.getParams(); |
|||
// type “” 全部 1待抵押 2已抵押
|
|||
if (params.getType().equals("1")) { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voList = pageToDo(params); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
lastList = this.pageBySubList(voList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(voList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (voList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((voList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(voList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + voList.size() + "条记录"); |
|||
} |
|||
} else if (params.getType().equals("2")) { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voList = listPageDo(pq); |
|||
voList.removeAll(Collections.singleton(null)); |
|||
if (!voList.isEmpty()) { |
|||
lastList = this.pageBySubList(voList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(voList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (voList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((voList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(voList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + voList.size() + "条记录"); |
|||
} |
|||
} else { |
|||
List<LoanMortgageInformationTransactVo> lastList = new ArrayList<>(); |
|||
List<LoanMortgageInformationTransactVo> voListToDo = pageToDo(params); |
|||
List<LoanMortgageInformationTransactVo> voListDo = listPageDo(pq); |
|||
List<LoanMortgageInformationTransactVo> collect = Stream.concat(voListToDo.stream(), voListDo.stream()).collect(Collectors.toList()); |
|||
List<LoanMortgageInformationTransactVo> pageVoList = new ArrayList<>(); |
|||
if (!collect.isEmpty()) { |
|||
if (StringUtils.isNotBlank(params.getNames())) { |
|||
String names = params.getNames(); |
|||
for (LoanMortgageInformationTransactVo vo : collect) { |
|||
if (vo.getVin().contains(names) || vo.getContractId().contains(names) || vo.getLenderName().contains(names)) { |
|||
pageVoList.add(vo); |
|||
} |
|||
} |
|||
lastList = this.pageBySubList(pageVoList, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
lastList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(pageVoList.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (pageVoList.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((pageVoList.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(pageVoList.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + pageVoList.size() + "条记录"); |
|||
} else { |
|||
lastList = this.pageBySubList(collect, (int) pq.getSize(), (int) pq.getCurrent()); |
|||
lastList.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); |
|||
pagerVo.setRecords(lastList); |
|||
pagerVo.setTotal(collect.size()); |
|||
pagerVo.setCurrent(pq.getCurrent()); |
|||
pagerVo.setSize(pq.getSize()); |
|||
if (collect.size() % pq.getSize() != 0L) { |
|||
pagerVo.setPages((collect.size() / pq.getSize()) + 1); |
|||
} else { |
|||
pagerVo.setPages(collect.size() / pq.getSize()); |
|||
} |
|||
pagerVo.setMsg("当前共查询到" + collect.size() + "条记录"); |
|||
} |
|||
} |
|||
} |
|||
return pagerVo; |
|||
} |
|||
|
|||
/** |
|||
* 保存修改 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean saveMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransact entity = baseMapper.fetchByBusVinSid(dto.getBusVinSid()); |
|||
// 修改
|
|||
if (null != entity) { |
|||
entity.setMortgageDate(dto.getMortgageDate()); |
|||
entity.setRemarks(dto.getRemarks()); |
|||
baseMapper.updateById(entity); |
|||
} else { |
|||
// 新增
|
|||
LoanMortgageInformationTransact saveEntity = new LoanMortgageInformationTransact(); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(dto.getBusVinSid()).getData(); |
|||
if (null != orderVehicle) { |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
saveEntity.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
saveEntity.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(salesOrder.getOrgSidPath()); |
|||
if (orgSidByPath.getSuccess()) { |
|||
String userOrgSid = orgSidByPath.getData(); |
|||
saveEntity.setUseOrgSid(userOrgSid); |
|||
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); |
|||
if (organizationVo.getSuccess()) { |
|||
SysOrganizationVo organizationVoData = organizationVo.getData(); |
|||
if (null != organizationVoData) { |
|||
saveEntity.setUseOrgName(organizationVoData.getName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
saveEntity.setMortgageDate(dto.getMortgageDate()); |
|||
saveEntity.setRemarks(dto.getRemarks()); |
|||
saveEntity.setSalesOrderSid(salesOrderSid); |
|||
saveEntity.setBusVinSid(dto.getBusVinSid()); |
|||
baseMapper.insert(saveEntity); |
|||
} |
|||
} |
|||
//删除附件表中关于该linkSid的文件
|
|||
loanFileService.deleteByLinkSid(dto.getBusVinSid()); |
|||
List<String> registrationFiles1 = dto.getRegistrationFiles1(); |
|||
if (!registrationFiles1.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), registrationFiles1, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
} |
|||
List<String> registrationFiles2 = dto.getRegistrationFiles2(); |
|||
if (!registrationFiles2.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), registrationFiles2, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
} |
|||
List<String> taxiFiles = dto.getTaxiFiles(); |
|||
if (!taxiFiles.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), taxiFiles, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
} |
|||
List<String> drivingFiles = dto.getDrivingFiles(); |
|||
if (!drivingFiles.isEmpty()) { |
|||
loanFileService.saveAll(dto.getBusVinSid(), drivingFiles, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
} |
|||
return rb.success().setData(dto.getBusVinSid()); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> submitMortgageInfo(LoanMortgageInformationTransactDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean resultBean = saveMortgageInfo(dto); |
|||
if (resultBean.getSuccess()) { |
|||
baseVehicleStateFeign.updateBusStateByBusSid(dto.getBusVinSid(), "308"); |
|||
LoanMortgageInformationTransact loanMortgageInformationTransact = baseMapper.fetchByBusVinSid(dto.getBusVinSid()); |
|||
LoanWarrantInformation warrantInformation = new LoanWarrantInformation(); |
|||
warrantInformation.setBusVinSid(dto.getBusVinSid()); |
|||
warrantInformation.setAuditStateKey("001"); |
|||
warrantInformation.setAuditStateValue("待审核"); |
|||
warrantInformation.setRemarks(loanMortgageInformationTransact.getRemarks()); |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(dto.getBusVinSid()).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
warrantInformation.setVinNo(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
warrantInformation.setSalesOrderSid(salesOrderSid); |
|||
BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(salesOrderSid).getData(); |
|||
if (null != salesOrder) { |
|||
//组织全路径
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgSidPath())) { |
|||
warrantInformation.setOrgSidPath(salesOrder.getOrgSidPath()); |
|||
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(salesOrder.getOrgSidPath()); |
|||
if (orgSidByPath.getSuccess()) { |
|||
String userOrgSid = orgSidByPath.getData(); |
|||
warrantInformation.setUseOrgSid(userOrgSid); |
|||
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); |
|||
if (organizationVo.getSuccess()) { |
|||
SysOrganizationVo organizationVoData = organizationVo.getData(); |
|||
if (null != organizationVoData) { |
|||
warrantInformation.setUseOrgName(organizationVoData.getName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//创建人sid
|
|||
if (StringUtils.isNotBlank(salesOrder.getCreateBySid())) { |
|||
warrantInformation.setCreateBySid(salesOrder.getCreateBySid()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(salesOrder.getOrgName())) { |
|||
warrantInformation.setDepartment(salesOrder.getOrgName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(salesOrder.getStaffName())) { |
|||
warrantInformation.setSalesman(salesOrder.getStaffName()); |
|||
} |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
warrantInformation.setContractNo(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
warrantInformation.setBorrowerName(loancontract.getBorrowerName()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(loancontract.getBankName())) { |
|||
warrantInformation.setBankName(loancontract.getBankName()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
loanWarrantInformationService.insert(warrantInformation); |
|||
} |
|||
return rb.success().setData(dto.getBusVinSid()); |
|||
} |
|||
|
|||
public ResultBean<LoanMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
ResultBean<LoanMortgageInformationTransactDetailsVo> rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransactDetailsVo vo = baseMapper.getMortgageInfo(busVinSid); |
|||
if (StringUtils.isBlank(vo.getMortgageDate())) { |
|||
vo.setMortgageDate("-"); |
|||
} |
|||
//根据业务车辆sid查询 销售订单业务车辆表
|
|||
BusSalesOrderVehicle orderVehicle = busSalesOrderVehicleFeign.details(busVinSid).getData(); |
|||
if (null != orderVehicle) { |
|||
if (StringUtils.isNotBlank(orderVehicle.getLinkNo())) { |
|||
vo.setVinNo(orderVehicle.getLinkNo()); |
|||
} |
|||
String salesOrderSid = orderVehicle.getSalesOrderSid(); |
|||
//根据销售订单sid查询消贷合同表
|
|||
BusSalesOrderLoancontract loancontract = busSalesOrderLoancontractFeign.fetchDetailsByOrderSid(salesOrderSid).getData(); |
|||
if (null != loancontract) { |
|||
//消贷合同编号
|
|||
if (StringUtils.isNotBlank(loancontract.getLoanCotractNo())) { |
|||
vo.setContractId(loancontract.getLoanCotractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(loancontract.getBorrowerName())) { |
|||
vo.setBorrowerName(loancontract.getBorrowerName()); |
|||
} |
|||
} |
|||
//登记证 1-2页
|
|||
List<LoanFile> fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles1 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|||
collect(Collectors.toList()); |
|||
vo.setRegistrationFiles1(registrationFiles1); |
|||
} |
|||
//登记证 3-4页
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles2 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setRegistrationFiles2(registrationFiles2); |
|||
} |
|||
//营运证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> taxiFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setTaxiFiles(taxiFiles); |
|||
} |
|||
//行驶证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> drivingFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setDrivingFiles(drivingFiles); |
|||
} |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanWarrantInformationMapper extends BaseMapper<LoanWarrantInformation> { |
|||
|
|||
|
|||
LoanWarrantInformation fetchByBusVinSid(String busVinSid); |
|||
|
|||
LoanWarrantInformationDetailsVo getMortgageInfo(String busVinSid); |
|||
|
|||
IPage<LoanWarrantInformationVo> listPage(IPage<LoanWarrantInformation> page, @Param(Constants.WRAPPER) QueryWrapper<LoanWarrantInformation> qw); |
|||
} |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanwarrantinformation.LoanWarrantInformationMapper"> |
|||
|
|||
|
|||
<select id="fetchByBusVinSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformation"> |
|||
SELECT * |
|||
from loan_warrant_information |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="getMortgageInfo" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationDetailsVo"> |
|||
SELECT busVinSid, |
|||
remarks, |
|||
date_format(mortgageDate, '%Y-%m-%d') as mortgageDate |
|||
from loan_mortgage_information_transact |
|||
where busVinSid = #{busVinSid} |
|||
</select> |
|||
<select id="listPage" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanwarrantinformation.LoanWarrantInformationVo"> |
|||
SELECT sid, |
|||
contractNo, |
|||
useOrgName as company, |
|||
department, |
|||
salesman, |
|||
borrowerName, |
|||
vinNo, |
|||
auditStateValue, |
|||
date_format(transferDate, '%Y-%m-%d') as transferDate, |
|||
bankName, |
|||
transferRemarks |
|||
from loan_warrant_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,63 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Api(tags = "权证资料管理") |
|||
@RestController |
|||
@RequestMapping("v1/loanwarrantinformation") |
|||
public class LoanWarrantInformationRest implements LoanWarrantInformationFeign { |
|||
|
|||
@Autowired |
|||
private LoanWarrantInformationService loanMortgageInformationTransactService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanWarrantInformationVo>> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
ResultBean<PagerVo<LoanWarrantInformationVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanWarrantInformationVo> page = loanMortgageInformationTransactService.listPage(pq); |
|||
return rb.success().setData(page); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
return loanMortgageInformationTransactService.getAuditInfo(sid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
return loanMortgageInformationTransactService.saveWarrantInfo(dto); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
return loanMortgageInformationTransactService.approvedWarrantInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
return loanMortgageInformationTransactService.transferInfo(sids); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
return loanMortgageInformationTransactService.saveTransferInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanWarrantInformationDetailsVo> detailsInfo(String sid) { |
|||
return loanMortgageInformationTransactService.detailsInfo(sid); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,377 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanwarrantinformation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateTime; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.base.api.basevehiclestate.BaseVehicleStateFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|||
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontract; |
|||
import com.yxt.anrui.buscenter.api.bussalesorderloancontract.BusSalesOrderLoancontractFeign; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; |
|||
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.*; |
|||
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import lombok.SneakyThrows; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fan |
|||
* @date: 2023/8/21 |
|||
**/ |
|||
@Service |
|||
public class LoanWarrantInformationService extends MybatisBaseService<LoanWarrantInformationMapper, LoanWarrantInformation> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private BaseVehicleStateFeign baseVehicleStateFeign; |
|||
@Autowired |
|||
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
|||
@Autowired |
|||
private BusSalesOrderFeign busSalesOrderFeign; |
|||
@Autowired |
|||
private BusSalesOrderLoancontractFeign busSalesOrderLoancontractFeign; |
|||
@Autowired |
|||
private LoanFileService loanFileService; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
|
|||
public PagerVo<LoanWarrantInformationVo> listPage(PagerQuery<LoanWarrantInformationQuery> pq) { |
|||
IPage<LoanWarrantInformation> page = PagerUtil.queryToPage(pq); |
|||
LoanWarrantInformationQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanWarrantInformation> qw = new QueryWrapper<>(); |
|||
//=======================
|
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(pagerQuery.getOrgPath()); |
|||
privilegeQuery.setMenuSid(pagerQuery.getMenuSid()); |
|||
privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl()); |
|||
privilegeQuery.setUserSid(pagerQuery.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = pagerQuery.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
PagerVo<LoanWarrantInformationVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<LoanWarrantInformationVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
//分公司
|
|||
if (StringUtils.isNotBlank(pagerQuery.getCompany())) { |
|||
qw.like("useOrgName", pagerQuery.getCompany()); |
|||
} |
|||
//销售部门
|
|||
if (StringUtils.isNotBlank(pagerQuery.getDepartment())) { |
|||
qw.like("department", pagerQuery.getDepartment()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(pagerQuery.getSalesman())) { |
|||
qw.like("salesman", pagerQuery.getSalesman()); |
|||
} |
|||
//消贷合同号
|
|||
if (StringUtils.isNotBlank(pagerQuery.getContractNo())) { |
|||
qw.like("contractNo", pagerQuery.getContractNo()); |
|||
} |
|||
//贷款人
|
|||
if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) { |
|||
qw.like("borrowerName", pagerQuery.getBorrowerName()); |
|||
} |
|||
//车架号
|
|||
if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { |
|||
qw.like("vinNo", pagerQuery.getVinNo()); |
|||
} |
|||
//资方
|
|||
if (StringUtils.isNotBlank(pagerQuery.getAuditStateKey())) { |
|||
qw.eq("auditStateKey", pagerQuery.getAuditStateKey()); |
|||
} |
|||
String createStartTime = pagerQuery.getStartTime(); |
|||
String createEndTime = pagerQuery.getEndTime(); |
|||
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (transferDate,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(createEndTime), "date_format (transferDate,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" |
|||
); |
|||
qw.eq("isDelete", 0); |
|||
qw.orderByDesc("createTime"); |
|||
IPage<LoanWarrantInformationVo> pagging = baseMapper.listPage(page, qw); |
|||
PagerVo<LoanWarrantInformationVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
/** |
|||
* 审核回显 |
|||
* |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public ResultBean<LoanAuditInfoVo> getAuditInfo(String sid) { |
|||
ResultBean<LoanAuditInfoVo> rb = ResultBean.fireFail(); |
|||
LoanAuditInfoVo vo = new LoanAuditInfoVo(); |
|||
LoanWarrantInformation loanWarrantInformation = fetchBySid(sid); |
|||
if (null != loanWarrantInformation) { |
|||
BeanUtil.copyProperties(loanWarrantInformation, vo); |
|||
String busVinSid = loanWarrantInformation.getBusVinSid(); |
|||
//登记证 1-2页
|
|||
List<LoanFile> fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles1 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|||
collect(Collectors.toList()); |
|||
vo.setRegistrationFiles1(registrationFiles1); |
|||
} |
|||
//登记证 3-4页
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> registrationFiles2 = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setRegistrationFiles2(registrationFiles2); |
|||
} |
|||
//营运证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> taxiFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setTaxiFiles(taxiFiles); |
|||
} |
|||
//行驶证
|
|||
fileList = loanFileService.selectByLinkSid(busVinSid, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> drivingFiles = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setDrivingFiles(drivingFiles); |
|||
} |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> saveWarrantInfo(LoanAuditInfoDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
LoanWarrantInformation entity = fetchBySid(dto.getSid()); |
|||
BeanUtil.copyProperties(dto, entity); |
|||
String busVinSid = entity.getBusVinSid(); |
|||
baseMapper.updateById(entity); |
|||
//删除附件表中关于该linkSid的文件
|
|||
loanFileService.deleteByLinkSid(busVinSid); |
|||
List<String> registrationFiles1 = dto.getRegistrationFiles1(); |
|||
if (!registrationFiles1.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, registrationFiles1, LoanFileEnum.REGISTRATION_FILES_ONE.getAttachType()); |
|||
} |
|||
List<String> registrationFiles2 = dto.getRegistrationFiles2(); |
|||
if (!registrationFiles2.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, registrationFiles2, LoanFileEnum.REGISTRATION_FILES_TWO.getAttachType()); |
|||
} |
|||
List<String> taxiFiles = dto.getTaxiFiles(); |
|||
if (!taxiFiles.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, taxiFiles, LoanFileEnum.TAXI_FILES.getAttachType()); |
|||
} |
|||
List<String> drivingFiles = dto.getDrivingFiles(); |
|||
if (!drivingFiles.isEmpty()) { |
|||
loanFileService.saveAll(busVinSid, drivingFiles, LoanFileEnum.DRIVING_CARD_FILES.getAttachType()); |
|||
} |
|||
return rb.success().setData(dto.getSid()); |
|||
} |
|||
|
|||
/** |
|||
* 审核保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> approvedWarrantInfo(LoanAuditInfoDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
ResultBean<String> resultBean = saveWarrantInfo(dto); |
|||
if (resultBean.getSuccess()) { |
|||
LoanWarrantInformation entity = fetchBySid(dto.getSid()); |
|||
entity.setAuditStateKey("002"); |
|||
entity.setAuditStateValue("已审核未移交"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(dto.getSid()); |
|||
} |
|||
|
|||
/** |
|||
* 移交回显 |
|||
* |
|||
* @param sids |
|||
* @return |
|||
*/ |
|||
public ResultBean<LoanTransferInfoVo> transferInfo(String[] sids) { |
|||
ResultBean<LoanTransferInfoVo> rb = ResultBean.fireFail(); |
|||
LoanTransferInfoVo vo = new LoanTransferInfoVo(); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
StringBuffer sbVinNo = new StringBuffer(); |
|||
StringBuffer sbConNo = new StringBuffer(); |
|||
HashSet<String> hashSet = new HashSet<>(); |
|||
for (String sid : sids) { |
|||
LoanWarrantInformation entity = fetchBySid(sid); |
|||
if (StringUtils.isNotBlank(entity.getVinNo())) { |
|||
sbVinNo.append(entity.getVinNo()).append(","); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getContractNo())) { |
|||
hashSet.add(entity.getContractNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferRemarks())) { |
|||
vo.setTransferRemarks(entity.getTransferRemarks()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getBankName())) { |
|||
vo.setBankName(entity.getBankName()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferInformation())) { |
|||
vo.setTransferInformation(entity.getTransferInformation()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayKey())) { |
|||
vo.setTransferWayKey(entity.getTransferWayKey()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayValue())) { |
|||
vo.setTransferWayValue(entity.getTransferWayValue()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTrackingNo())) { |
|||
vo.setTrackingNo(entity.getTrackingNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getRecipient())) { |
|||
vo.setRecipient(entity.getRecipient()); |
|||
} |
|||
if (null != entity.getDeliveryDate()) { |
|||
vo.setDeliveryDate(sdf.format(entity.getDeliveryDate())); |
|||
} |
|||
} |
|||
if (sbVinNo.length() > 0) { |
|||
sbVinNo.delete(sbVinNo.length() - 1, sbVinNo.length()); |
|||
vo.setVinNo(sbVinNo.toString()); |
|||
} |
|||
if (!hashSet.isEmpty()) { |
|||
for (String s : hashSet) { |
|||
sbConNo.append(s).append(","); |
|||
} |
|||
} |
|||
if (sbVinNo.length() > 0) { |
|||
sbConNo.delete(sbConNo.length() - 1, sbConNo.length()); |
|||
vo.setContractNo(sbConNo.toString()); |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 移交保存 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean saveTransferInfo(LoanTransferInfoDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String[] sids = dto.getSids(); |
|||
for (String sid : sids) { |
|||
LoanWarrantInformation entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
entity.setTransferDate(new DateTime()); |
|||
entity.setAuditStateKey("003"); |
|||
entity.setAuditStateValue("已移交"); |
|||
int i = baseMapper.updateById(entity); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
/** |
|||
* 详情 |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public ResultBean<LoanWarrantInformationDetailsVo> detailsInfo(String sid) { |
|||
ResultBean<LoanWarrantInformationDetailsVo> rb = ResultBean.fireFail(); |
|||
LoanWarrantInformationDetailsVo vo = new LoanWarrantInformationDetailsVo(); |
|||
LoanAuditInfoVo auditInfoVo = getAuditInfo(sid).getData(); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
if (null != auditInfoVo) { |
|||
BeanUtil.copyProperties(auditInfoVo,vo); |
|||
} |
|||
LoanWarrantInformation entity = fetchBySid(sid); |
|||
if (null != entity) { |
|||
if (StringUtils.isNotBlank(entity.getTransferRemarks())) { |
|||
vo.setTransferRemarks(entity.getTransferRemarks()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferInformation())) { |
|||
vo.setTransferInformation(entity.getTransferInformation()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayKey())) { |
|||
vo.setTransferWayKey(entity.getTransferWayKey()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTransferWayValue())) { |
|||
vo.setTransferWayValue(entity.getTransferWayValue()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getTrackingNo())) { |
|||
vo.setTrackingNo(entity.getTrackingNo()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getRecipient())) { |
|||
vo.setRecipient(entity.getRecipient()); |
|||
} |
|||
if (null != entity.getDeliveryDate()) { |
|||
vo.setDeliveryDate(sdf.format(entity.getDeliveryDate())); |
|||
} |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 10:41 |
|||
*/ |
|||
@Data |
|||
public class AppMortgageInformationTransactDetailsVo implements Vo { |
|||
@ApiModelProperty("业务车辆sid") |
|||
@JsonProperty("sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("贷款人") |
|||
@JsonProperty("lenderName") |
|||
private String borrowerName; |
|||
@ApiModelProperty("车架号") |
|||
@JsonProperty("vin") |
|||
private String vinNo; |
|||
@ApiModelProperty("抵押日期") |
|||
@JsonProperty("disbursementDate") |
|||
private String mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 10:41 |
|||
*/ |
|||
@Data |
|||
public class AppMortgageInformationTransactDto implements Dto { |
|||
@ApiModelProperty("业务车辆sid") |
|||
@JsonProperty("sid") |
|||
private String busVinSid; |
|||
@ApiModelProperty("抵押日期") |
|||
@JsonProperty("disbursementDate") |
|||
private Date mortgageDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("登记证 1-2页") |
|||
private List<String> registrationFiles1 = new ArrayList<>(); |
|||
@ApiModelProperty("登记证 3-4页") |
|||
private List<String> registrationFiles2 = new ArrayList<>(); |
|||
@ApiModelProperty("营运证") |
|||
private List<String> taxiFiles = new ArrayList<>(); |
|||
@ApiModelProperty("行驶证") |
|||
private List<String> drivingFiles = new ArrayList<>(); |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 10:35 |
|||
*/ |
|||
@Data |
|||
public class AppMortgageInformationTransactQuery implements Query { |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("“” 全部 1待抵押 2已抵押") |
|||
private String type; |
|||
|
|||
@ApiModelProperty("合同编号/贷款人姓名/车架号") |
|||
private String names; |
|||
|
|||
@ApiModelProperty("当前组织机构全路径sid") |
|||
private String orgPath; |
|||
|
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/8/28 10:33 |
|||
*/ |
|||
@Data |
|||
public class AppMortgageInformationTransactVo implements Vo { |
|||
@ApiModelProperty("抵押日期") |
|||
private String disbursementDate; |
|||
@ApiModelProperty("业务车辆sid") |
|||
private String sid; |
|||
@ApiModelProperty("消贷合同编号") |
|||
private String contractId; |
|||
@ApiModelProperty("分公司") |
|||
private String company; |
|||
@ApiModelProperty("销售部门") |
|||
private String department; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; |
|||
@ApiModelProperty("贷款人") |
|||
private String lenderName; |
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
@ApiModelProperty("资方") |
|||
private String bankName; |
|||
private boolean showHandleBtn; |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "抵押办理") |
|||
@FeignClient( |
|||
contextId = "terminal-Mortgage", |
|||
name = "anrui-terminal", |
|||
path = "/riskcenter/v1/mortgage", |
|||
fallback = MortgageFeignFallback.class) |
|||
public interface MortgageFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/getMortgageList") |
|||
@ResponseBody |
|||
public ResultBean<PagerVo<AppMortgageInformationTransactVo>> getMortgageList(@RequestBody PagerQuery<AppMortgageInformationTransactQuery> pq); |
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("保存抵押办理") |
|||
@PostMapping("/saveMortgageInfo") |
|||
@ResponseBody |
|||
public ResultBean<String> saveMortgageInfo(@RequestBody AppMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 保存 抵押办理 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("提交") |
|||
@PostMapping("/submitMortgageInfo") |
|||
@ResponseBody |
|||
public ResultBean<String> submitMortgageInfo(@RequestBody AppMortgageInformationTransactDto dto); |
|||
|
|||
|
|||
/** |
|||
* 初始化详情 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("初始化详情") |
|||
@GetMapping("/getMortgageInfo") |
|||
@ResponseBody |
|||
public ResultBean<AppMortgageInformationTransactDetailsVo> getMortgageInfo(@RequestParam("sid") String sid); |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.terminal.api.risk.mortgage; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2023/3/21 15:19 |
|||
* @Description |
|||
*/ |
|||
@Component |
|||
public class MortgageFeignFallback implements MortgageFeign { |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<AppMortgageInformationTransactVo>> getMortgageList(PagerQuery<AppMortgageInformationTransactQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<AppMortgageInformationTransactDetailsVo> getMortgageInfo(String busVinSid) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.yxt.anrui.terminal.biz.risk.mortgage; |
|||
|
|||
import com.yxt.anrui.terminal.api.risk.mortgage.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date 2023/3/25 9:39 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "抵押办理") |
|||
@Controller |
|||
@RequestMapping("/riskcenter/v1/mortgage") |
|||
public class MortgageRest implements MortgageFeign { |
|||
|
|||
@Autowired |
|||
private MortgageService mortgageService; |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<AppMortgageInformationTransactVo>> getMortgageList(PagerQuery<AppMortgageInformationTransactQuery> pq) { |
|||
return mortgageService.getMortgageList(pq); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
return mortgageService.saveMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> submitMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
return mortgageService.submitMortgageInfo(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<AppMortgageInformationTransactDetailsVo> getMortgageInfo(String sid) { |
|||
return mortgageService.getMortgageInfo(sid); |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.yxt.anrui.terminal.biz.risk.mortgage; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*; |
|||
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDetailsVo; |
|||
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDto; |
|||
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactQuery; |
|||
import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date 2023/3/25 9:40 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class MortgageService { |
|||
|
|||
@Autowired |
|||
private LoanMortgageInformationTransactFeign loanMortgageInformationTransactFeign; |
|||
|
|||
public ResultBean<PagerVo<AppMortgageInformationTransactVo>> getMortgageList(PagerQuery<AppMortgageInformationTransactQuery> pq) { |
|||
ResultBean<PagerVo<AppMortgageInformationTransactVo>> rb = ResultBean.fireFail(); |
|||
PagerQuery<LoanMortgageInformationTransactQuery> query = new PagerQuery<>(); |
|||
BeanUtil.copyProperties(pq, query); |
|||
ResultBean<PagerVo<LoanMortgageInformationTransactVo>> voResultBean = loanMortgageInformationTransactFeign.listPage(query); |
|||
PagerVo<AppMortgageInformationTransactVo> vo = new PagerVo<>(); |
|||
if (voResultBean.getSuccess()) { |
|||
PagerVo<LoanMortgageInformationTransactVo> data = voResultBean.getData(); |
|||
BeanUtil.copyProperties(data, vo); |
|||
} |
|||
return rb.success().setMsg("当前共查询到" + vo.getTotal() + "条记录").setData(vo); |
|||
} |
|||
|
|||
public ResultBean<String> saveMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransactDto loanMortgageInformationTransactDto = new LoanMortgageInformationTransactDto(); |
|||
BeanUtil.copyProperties(dto, loanMortgageInformationTransactDto); |
|||
ResultBean<String> resultBean = loanMortgageInformationTransactFeign.saveMortgageInfo(loanMortgageInformationTransactDto); |
|||
if (resultBean.getSuccess()) { |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean<String> submitMortgageInfo(AppMortgageInformationTransactDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
LoanMortgageInformationTransactDto loanMortgageInformationTransactDto = new LoanMortgageInformationTransactDto(); |
|||
BeanUtil.copyProperties(dto, loanMortgageInformationTransactDto); |
|||
ResultBean<String> resultBean = loanMortgageInformationTransactFeign.submitMortgageInfo(loanMortgageInformationTransactDto); |
|||
if (resultBean.getSuccess()) { |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean<AppMortgageInformationTransactDetailsVo> getMortgageInfo(String sid) { |
|||
ResultBean<AppMortgageInformationTransactDetailsVo> rb = ResultBean.fireFail(); |
|||
AppMortgageInformationTransactDetailsVo vo = new AppMortgageInformationTransactDetailsVo(); |
|||
ResultBean<LoanMortgageInformationTransactDetailsVo> resultBean = loanMortgageInformationTransactFeign.getMortgageInfo(sid); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
LoanMortgageInformationTransactDetailsVo loanMortgageInformationTransactDetailsVo = resultBean.getData(); |
|||
BeanUtil.copyProperties(loanMortgageInformationTransactDetailsVo, vo); |
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
Loading…
Reference in new issue