You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1037 lines
48 KiB
1037 lines
48 KiB
<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>
|
|
<div v-if="isShowMore">
|
|
<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" style="width: 60%" filterable 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)"/>-->
|
|
<span class="addinputInfo">{{ finance.downPayAmount }}</span>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<div class="span-sty">产品贷款金额</div>
|
|
<el-form-item>
|
|
<!-- <span class="addinputInfo">{{ finance.loanAmount }}</span>-->
|
|
<el-input class="addinputw addinputInfo" v-model="finance.loanAmount" @change="loanAmountInput" placeholder="" clearable @keyup.native="finance.loanAmount = oninput(finance.loanAmount, 0)"/>
|
|
</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" :disabled="finance.bondTypeKey == '01'" 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>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<div class="span-sty">其它融贴息</div>
|
|
<el-form-item>
|
|
<el-input class="addinputw" style="width: 20%" v-model="finance.otherDiscount" placeholder="" clearable @keyup.native="finance.otherDiscount = oninput(finance.otherDiscount, 0)"/>
|
|
</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>
|
|
</div>
|
|
<div v-else>
|
|
<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="finance.policyName" placeholder="" clearable/>
|
|
</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>
|
|
<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"><span class="icon">*</span>贴息用途</div>
|
|
<el-form-item>
|
|
<span class="addinputInfo">{{ finance.factoryDiscountUse }}</span>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<div class="span-sty"><span class="icon">*</span>贴息抵车款</div>
|
|
<el-form-item>
|
|
<el-input class="addinputw" v-model="finance.discountCar" placeholder="" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<div class="span-sty"><span class="icon">*</span>服务费</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>
|
|
</div>
|
|
</el-form>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { typeValues, selectList, selectListByOther } from '@/api/dictcommons/dictcommons'
|
|
import { calculate } from '@/api/salesManagement/orderManagement'
|
|
|
|
export default {
|
|
name: 'JinRongFangAn',
|
|
props: {
|
|
modelSid: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
viewTitle: '',
|
|
submitdisabled: false,
|
|
isShowMore: false,
|
|
orgSidPath: '',
|
|
source: '', // 进入该页面的组件来源(01代表客户洽谈--意向车型 02代表出库申请--金融报价单 03代表销售订单申请 04代表金融方案变更申请)
|
|
dealWay_list: [],
|
|
policy_list: [],
|
|
other_list: [],
|
|
finance: {
|
|
accessoriesAmount: '',
|
|
accessoriesAmountCb: false,
|
|
actualDiscount: '',
|
|
bondAmount: '',
|
|
bondAmounts: '',
|
|
bondRatio: '',
|
|
bondTypeKey: '',
|
|
dealWay: '',
|
|
dealWayKey: '',
|
|
depositPremium: '',
|
|
depositSettle: '',
|
|
discountCar: '',
|
|
downPayAmount: '',
|
|
downPayAmounts: '',
|
|
downPayAmountsRatio: '',
|
|
downPayRatio: '',
|
|
factoryDiscount: '',
|
|
factoryDiscountUse: '',
|
|
factoryDiscountUseKey: '',
|
|
interest: '',
|
|
isPack: '',
|
|
isShowMore: false,
|
|
loanAmount: '',
|
|
loanAmountTotal: '',
|
|
loanDownPay: '',
|
|
loanInterest: '',
|
|
loanPayMoney: '',
|
|
loanPeriod: '',
|
|
loanTotal: '',
|
|
mainVehicleAmount: '',
|
|
monthlyRepay: '',
|
|
nominalPrice: '',
|
|
offsetAccessories: '',
|
|
offsetPremium: '',
|
|
offsetPurchasetax: '',
|
|
offsetTotal: '',
|
|
operationAmount: '',
|
|
otherActualDiscount: '',
|
|
otherAmount: '',
|
|
otherAmountRemark: '',
|
|
otherDiscount: '',
|
|
otherPolicyAmount: '',
|
|
otherPolicyInterest: '',
|
|
otherPolicyMonthlyRepay: '',
|
|
otherPolicyName: '',
|
|
otherPolicyPeriod: '',
|
|
otherPolicySid: '',
|
|
otherPolicyState: false,
|
|
otherPolicyYearRatio: '',
|
|
period: '',
|
|
policyName: '',
|
|
policySid: '',
|
|
policyYearRatio: '',
|
|
premium: '',
|
|
premiumCb: false,
|
|
proxyAccidentPremium: '',
|
|
proxyPremium: '',
|
|
proxyPurchasetax: '',
|
|
proxyTotal: '',
|
|
purchaseTax: '',
|
|
purchaseTaxCb: false,
|
|
realTotal: '',
|
|
receivableTotal: '',
|
|
registerAmount: '',
|
|
returnTime: '',
|
|
salesOrderSid: '',
|
|
serviceAmount: '',
|
|
serviceChargeTypeKey: '',
|
|
serviceChargeTypeValue: '',
|
|
trailerAmount: '',
|
|
trailerAmountCb: false,
|
|
vehOtherPrice: '',
|
|
vehTotalPrice: ''
|
|
},
|
|
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, orgSidPath, source) {
|
|
this.init()
|
|
this.source = source
|
|
this.orgSidPath = orgSidPath
|
|
this.finance = JSON.parse(JSON.stringify(value))
|
|
this.isShowMore = this.finance.isShowMore
|
|
if (this.finance.isPack !== '' && this.finance.isPack !== null) {
|
|
// source等于04时需要传参产品政策sid(金融方案变更时资方、担保类型不能更改)
|
|
if (this.source == '04') {
|
|
selectList({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), isPack: this.finance.isPack, modelSid: this.modelSid, policySid: this.finance.policySid }).then((resp) => {
|
|
if (resp.success) {
|
|
this.policy_list = resp.data
|
|
}
|
|
})
|
|
} else {
|
|
selectList({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), isPack: this.finance.isPack, modelSid: this.modelSid }).then((resp) => {
|
|
if (resp.success) {
|
|
this.policy_list = resp.data
|
|
}
|
|
})
|
|
}
|
|
}
|
|
if (this.finance.policySid !== '' && this.finance.isPack !== null) {
|
|
selectListByOther({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), sid: this.finance.policySid, modelSid: this.modelSid, period: this.finance.loanPeriod }).then((res) => {
|
|
if (res.success) {
|
|
this.other_list = res.data
|
|
}
|
|
})
|
|
}
|
|
},
|
|
// 是否打包
|
|
isPackChange(val) {
|
|
// source等于04时需要传参产品政策sid(金融方案变更时资方、担保类型不能更改)
|
|
if (this.source == '04') {
|
|
selectList({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), isPack: val, modelSid: this.modelSid, policySid: this.finance.policySid }).then((resp) => {
|
|
if (resp.success) {
|
|
this.policy_list = resp.data
|
|
}
|
|
})
|
|
} else {
|
|
selectList({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), isPack: val, modelSid: this.modelSid }).then((resp) => {
|
|
if (resp.success) {
|
|
this.policy_list = resp.data
|
|
}
|
|
})
|
|
}
|
|
this.finance.accessoriesAmount = ''
|
|
this.finance.accessoriesAmountCb = false
|
|
this.finance.actualDiscount = ''
|
|
this.finance.bondAmount = ''
|
|
this.finance.bondAmounts = ''
|
|
this.finance.bondRatio = ''
|
|
this.finance.bondTypeKey = ''
|
|
this.finance.dealWay = ''
|
|
this.finance.dealWayKey = ''
|
|
this.finance.depositPremium = ''
|
|
this.finance.depositSettle = ''
|
|
this.finance.discountCar = ''
|
|
this.finance.downPayAmount = ''
|
|
this.finance.downPayAmounts = ''
|
|
this.finance.downPayAmountsRatio = ''
|
|
this.finance.downPayRatio = ''
|
|
this.finance.factoryDiscount = ''
|
|
this.finance.factoryDiscountUse = ''
|
|
this.finance.factoryDiscountUseKey = ''
|
|
this.finance.interest = ''
|
|
this.finance.isPack = val
|
|
this.finance.isShowMore = false
|
|
this.finance.loanAmount = ''
|
|
this.finance.loanAmountTotal = ''
|
|
this.finance.loanDownPay = ''
|
|
this.finance.loanInterest = ''
|
|
this.finance.loanPayMoney = ''
|
|
this.finance.loanPeriod = ''
|
|
this.finance.loanTotal = ''
|
|
this.finance.mainVehicleAmount = ''
|
|
this.finance.monthlyRepay = ''
|
|
this.finance.nominalPrice = ''
|
|
this.finance.offsetAccessories = ''
|
|
this.finance.offsetPremium = ''
|
|
this.finance.offsetPurchasetax = ''
|
|
this.finance.offsetTotal = ''
|
|
this.finance.operationAmount = ''
|
|
this.finance.otherActualDiscount = ''
|
|
this.finance.otherAmount = ''
|
|
this.finance.otherAmountRemark = ''
|
|
this.finance.otherDiscount = ''
|
|
this.finance.otherPolicyAmount = ''
|
|
this.finance.otherPolicyInterest = ''
|
|
this.finance.otherPolicyMonthlyRepay = ''
|
|
this.finance.otherPolicyName = ''
|
|
this.finance.otherPolicyPeriod = ''
|
|
this.finance.otherPolicySid = ''
|
|
this.finance.otherPolicyState = false
|
|
this.finance.otherPolicyYearRatio = ''
|
|
this.finance.period = ''
|
|
this.finance.policyName = ''
|
|
this.finance.policyYearRatio = ''
|
|
this.finance.premium = ''
|
|
this.finance.premiumCb = false
|
|
this.finance.proxyAccidentPremium = ''
|
|
this.finance.proxyPremium = ''
|
|
this.finance.proxyPurchasetax = ''
|
|
this.finance.proxyTotal = ''
|
|
this.finance.purchaseTax = ''
|
|
this.finance.purchaseTaxCb = false
|
|
this.finance.realTotal = ''
|
|
this.finance.receivableTotal = ''
|
|
this.finance.registerAmount = ''
|
|
this.finance.returnTime = ''
|
|
this.finance.salesOrderSid = ''
|
|
this.finance.serviceAmount = ''
|
|
this.finance.serviceChargeTypeKey = ''
|
|
this.finance.serviceChargeTypeValue = ''
|
|
this.finance.trailerAmount = ''
|
|
this.finance.trailerAmountCb = false
|
|
this.finance.vehOtherPrice = ''
|
|
this.finance.vehTotalPrice = ''
|
|
// this.finance = {
|
|
// accessoriesAmount: '',
|
|
// accessoriesAmountCb: false,
|
|
// bondAmount: '',
|
|
// bondAmounts: '',
|
|
// bondRatio: '',
|
|
// dealWay: '',
|
|
// dealWayKey: '',
|
|
// depositPremium: '',
|
|
// depositSettle: '',
|
|
// discountCar: '',
|
|
// downPayAmount: '',
|
|
// downPayAmounts: '',
|
|
// downPayAmountsRatio: '',
|
|
// downPayRatio: '',
|
|
// factoryDiscount: '',
|
|
// factoryDiscountUse: '',
|
|
// factoryDiscountUseKey: '',
|
|
// interest: '',
|
|
// isPack: val,
|
|
// isShowMore: false,
|
|
// loanAmount: '',
|
|
// loanAmountTotal: '',
|
|
// loanDownPay: '',
|
|
// loanInterest: '',
|
|
// loanPayMoney: '',
|
|
// loanPeriod: '',
|
|
// loanTotal: '',
|
|
// mainVehicleAmount: '',
|
|
// monthlyRepay: '',
|
|
// nominalPrice: '',
|
|
// offsetPremium: '',
|
|
// offsetPurchasetax: '',
|
|
// offsetTotal: '',
|
|
// operationAmount: '',
|
|
// otherAmount: '',
|
|
// otherAmountRemark: '',
|
|
// otherDiscount: '',
|
|
// otherPolicyAmount: '',
|
|
// otherPolicyInterest: '',
|
|
// otherPolicyMonthlyRepay: '',
|
|
// otherPolicyName: '',
|
|
// otherPolicyPeriod: '',
|
|
// otherPolicySid: '',
|
|
// otherPolicyState: false,
|
|
// otherPolicyYearRatio: '',
|
|
// period: '',
|
|
// policyName: '',
|
|
// policySid: '',
|
|
// policyYearRatio: '',
|
|
// premium: '',
|
|
// premiumCb: false,
|
|
// proxyAccidentPremium: '',
|
|
// proxyPremium: '',
|
|
// proxyPurchasetax: '',
|
|
// proxyTotal: '',
|
|
// purchaseTax: '',
|
|
// purchaseTaxCb: false,
|
|
// realTotal: '',
|
|
// receivableTotal: '',
|
|
// registerAmount: '',
|
|
// returnTime: '',
|
|
// salesOrderSid: '',
|
|
// serviceAmount: '',
|
|
// serviceChargeTypeKey: '',
|
|
// serviceChargeTypeValue: '',
|
|
// trailerAmount: '',
|
|
// trailerAmountCb: false,
|
|
// vehOtherPrice: '',
|
|
// vehTotalPrice: ''
|
|
// }
|
|
},
|
|
// 资方产品政策
|
|
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.depositPremium = choose[0].depositPremium
|
|
// 从金融产品政策中-- 获取落户保证金
|
|
this.finance.depositSettle = choose[0].depositSettle
|
|
// 从金融产品政策中-- 获取名义(留购)价
|
|
this.finance.nominalPrice = choose[0].nominalPrice
|
|
// 从金融产品政策中-- 获取代收意外险
|
|
this.finance.proxyAccidentPremium = choose[0].vehAccidentAmount
|
|
// 从金融产品政策中-- 获取服务费类型
|
|
this.finance.serviceChargeTypeKey = choose[0].serviceChargeTypeKey
|
|
// 从金融产品政策中-- 获取服务费
|
|
this.finance.serviceChargeTypeValue = choose[0].serviceChargeTypeValue
|
|
// 从金融产品政策中 -- 保证金类型(01 固定 贷款保证金不能修改 02 敞口 贷款保证金可修改)
|
|
this.finance.bondTypeKey = choose[0].bondTypeKey
|
|
// 贴息用途赋值
|
|
this.finance.factoryDiscountUse = '抵利息'
|
|
this.finance.factoryDiscountUseKey = '02'
|
|
// 当融资项目总额不为空且不为0时,如果更换产品政策(需要重新计算首付金额、产品贷款金额、贷款保证金等,重置其它融模块的内容)
|
|
if (this.finance.loanTotal !== '' && this.finance.loanTotal !== '0') {
|
|
// 重新计算
|
|
this.financingProject()
|
|
// 重置其它融模块的内容
|
|
this.finance.otherPolicyState = false
|
|
this.finance.otherPolicyName = ''
|
|
this.finance.otherPolicySid = ''
|
|
this.finance.otherPolicyAmount = ''
|
|
this.finance.otherPolicyPeriod = ''
|
|
this.finance.otherPolicyYearRatio = ''
|
|
}
|
|
selectListByOther({ orgPath: this.orgSidPath, userSid: window.sessionStorage.getItem('userSid'), sid: choose[0].sid, modelSid: this.modelSid, period: this.finance.loanPeriod }).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 = Math.round(parseInt(this.arguments(this.finance.loanTotal)) * parseFloat(this.arguments(this.finance.downPayRatio)) / 100)
|
|
// 主方案 -- 计算产品贷款金额
|
|
this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount)))
|
|
// 主方案 -- 计算贷款保证金
|
|
this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100)
|
|
// 应收明细 -- 根据金融产品政策获取的服务费类型计算服务费
|
|
if (this.finance.serviceChargeTypeKey === '01') {
|
|
// 融资项目总额 * 融资项目总额比例(金融产品政策中服务费)
|
|
this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) * (parseFloat(this.arguments(this.finance.serviceChargeTypeValue)) / 100))
|
|
} else if (this.finance.serviceChargeTypeKey === '02') {
|
|
// 贷款金额 * 贷款金额比例(金融产品政策中服务费)
|
|
this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * (parseFloat(this.arguments(this.finance.serviceChargeTypeValue)) / 100))
|
|
} else if (this.finance.serviceChargeTypeKey === '03') {
|
|
// 等于金融产品政策中服务费
|
|
this.finance.serviceAmount = this.finance.serviceChargeTypeValue
|
|
}
|
|
}
|
|
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).toPrecision(2)
|
|
// // 重新计算产品贷款金额
|
|
// this.finance.loanAmount = Math.round(parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.downPayAmount)))
|
|
// if (this.finance.serviceChargeTypeKey === '03') {
|
|
// // 贷款金额 * 贷款金额比例(金融产品政策中服务费)
|
|
// this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue)))
|
|
// }
|
|
// // 主方案 -- 贷款保证金
|
|
// this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100)
|
|
// }
|
|
// },
|
|
// 主方案 -- 修改产品贷款金额
|
|
loanAmountInput() {
|
|
if (this.finance.loanAmount !== '' && this.finance.loanTotal !== '') {
|
|
// 重新计算首付金额
|
|
this.finance.downPayAmount = parseInt(this.arguments(this.finance.loanTotal)) - parseInt(this.arguments(this.finance.loanAmount))
|
|
// 重新计算首付比例
|
|
this.finance.downPayRatio = (parseInt(this.arguments(this.finance.downPayAmount)) / parseInt(this.arguments(this.finance.loanTotal)) * 100).toPrecision(2)
|
|
// 重新计算贷款保证金
|
|
this.finance.bondAmount = Math.round(parseFloat(this.arguments(this.finance.bondRatio)) * parseInt(this.arguments(this.finance.loanAmount)) / 100)
|
|
if (this.finance.serviceChargeTypeKey === '03') {
|
|
// 贷款金额 * 贷款金额比例(金融产品政策中服务费)
|
|
this.finance.serviceAmount = Math.round(parseInt(this.arguments(this.finance.loanAmount)) * parseFloat(this.arguments(this.finance.serviceChargeTypeValue)))
|
|
}
|
|
}
|
|
},
|
|
// 主方案 -- 修改贷款保证金,重新计算贷款保证金比例
|
|
bondAmountInput() {
|
|
if (this.finance.bondAmount !== '') {
|
|
this.finance.bondRatio = (parseInt(this.arguments(this.finance.bondAmount)) / parseInt(this.arguments(this.finance.loanAmount)) * 100).toPrecision(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
|
|
if (this.isShowMore) {
|
|
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.otherPolicyYearRatio = resp.data.otherPolicyYearRatio
|
|
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.offsetAccessories = resp.data.offsetAccessories
|
|
this.finance.offsetTotal = resp.data.offsetTotal
|
|
this.finance.realTotal = resp.data.realTotal
|
|
this.finance.vehTotalPrice = resp.data.vehTotalPrice
|
|
this.finance.actualDiscount = resp.data.actualDiscount
|
|
this.finance.otherActualDiscount = resp.data.otherActualDiscount
|
|
this.finance.isShowMore = this.isShowMore
|
|
this.$emit('backData', this.finance)
|
|
this.handleColse()
|
|
} else {
|
|
this.submitdisabled = false
|
|
}
|
|
}).catch(() => {
|
|
this.submitdisabled = false
|
|
})
|
|
} else {
|
|
this.$emit('backData', this.finance)
|
|
this.submitdisabled = false
|
|
this.handleColse()
|
|
}
|
|
},
|
|
handleColse() {
|
|
this.finance = {
|
|
accessoriesAmount: '',
|
|
accessoriesAmountCb: false,
|
|
actualDiscount: '',
|
|
bondAmount: '',
|
|
bondAmounts: '',
|
|
bondRatio: '',
|
|
bondTypeKey: '',
|
|
dealWay: '',
|
|
dealWayKey: '',
|
|
depositPremium: '',
|
|
depositSettle: '',
|
|
discountCar: '',
|
|
downPayAmount: '',
|
|
downPayAmounts: '',
|
|
downPayAmountsRatio: '',
|
|
downPayRatio: '',
|
|
factoryDiscount: '',
|
|
factoryDiscountUse: '',
|
|
factoryDiscountUseKey: '',
|
|
interest: '',
|
|
isPack: '',
|
|
isShowMore: false,
|
|
loanAmount: '',
|
|
loanAmountTotal: '',
|
|
loanDownPay: '',
|
|
loanInterest: '',
|
|
loanPayMoney: '',
|
|
loanPeriod: '',
|
|
loanTotal: '',
|
|
mainVehicleAmount: '',
|
|
monthlyRepay: '',
|
|
nominalPrice: '',
|
|
offsetAccessories: '',
|
|
offsetPremium: '',
|
|
offsetPurchasetax: '',
|
|
offsetTotal: '',
|
|
operationAmount: '',
|
|
otherActualDiscount: '',
|
|
otherAmount: '',
|
|
otherAmountRemark: '',
|
|
otherDiscount: '',
|
|
otherPolicyAmount: '',
|
|
otherPolicyInterest: '',
|
|
otherPolicyMonthlyRepay: '',
|
|
otherPolicyName: '',
|
|
otherPolicyPeriod: '',
|
|
otherPolicySid: '',
|
|
otherPolicyState: false,
|
|
otherPolicyYearRatio: '',
|
|
period: '',
|
|
policyName: '',
|
|
policySid: '',
|
|
policyYearRatio: '',
|
|
premium: '',
|
|
premiumCb: false,
|
|
proxyAccidentPremium: '',
|
|
proxyPremium: '',
|
|
proxyPurchasetax: '',
|
|
proxyTotal: '',
|
|
purchaseTax: '',
|
|
purchaseTaxCb: false,
|
|
realTotal: '',
|
|
receivableTotal: '',
|
|
registerAmount: '',
|
|
returnTime: '',
|
|
salesOrderSid: '',
|
|
serviceAmount: '',
|
|
serviceChargeTypeKey: '',
|
|
serviceChargeTypeValue: '',
|
|
trailerAmount: '',
|
|
trailerAmountCb: false,
|
|
vehOtherPrice: '',
|
|
vehTotalPrice: ''
|
|
}
|
|
this.source = ''
|
|
this.isShowMore = false
|
|
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>
|
|
|