Commit d9335d34 authored by Zhang Xiaojie's avatar Zhang Xiaojie

update:贷款

parent 3fbafc18
......@@ -18,14 +18,14 @@
<template #loan_type="text">
{{ text | filterLoanType }}
</template>
<span slot="date" slot-scope="text">
<!-- <span slot="date" slot-scope="text">
{{ text.min_date }}-{{ text.max_date }}
</span>
<span slot="rate" slot-scope="text">
{{ text.rate_lower }}-{{ text.rate_upper }}
</span>
</span> -->
<!-- <span slot="rate" slot-scope="text">
{{ text.rate }}
</span> -->
<span slot="amount" slot-scope="text">
{{ text.min_amount }}-{{ text.max_amount }}
{{ text.min_amount }}~{{ text.max_amount }}
</span>
<template #guarantee_type="text">
{{ text | filterGuaranteeType }}
......
......@@ -22,14 +22,15 @@ export default [
scopedSlots: { customRender: 'loan_type' },
},
{
title: '产品期限()',
title: '产品期限()',
align: 'center',
scopedSlots: { customRender: 'date' },
dataIndex: 'date',
// scopedSlots: { customRender: 'date' },
},
{
title: '参考利率(%)',
title: '最低参考利率(%)',
align: 'center',
scopedSlots: { customRender: 'rate' },
dataIndex: 'rate',
},
{
title: '产品额度(万元)',
......
......@@ -21,13 +21,15 @@ export default class LoanProductService {
inst_name: string
loan_type: eProductType
max_amount: number
max_date: number
date:number
rate:number
// max_date: number
product_name: string
products: string
rate_lower: number
rate_upper: number
// rate_lower: number
// rate_upper: number
submit_cond: string
min_date: number
// min_date: number
min_amount: number
}
) {
......@@ -47,15 +49,17 @@ export default class LoanProductService {
inst_name: string
loan_type: eProductType
max_amount: number
max_date: number
// max_date: number
product_name: string
products: string
rate_lower: number
rate_upper: number
// rate_lower: number
// rate_upper: number
submit_cond: string
min_amount: number
min_date: number
// min_date: number
uuid:string
date:number
rate:number
}
) {
return baseAxios({
......
......@@ -13,6 +13,8 @@
product_status: number,
product_type: number,
products: string,
date:number,
lower:number,
rate_lower: string,
rate_upper: string,
submit_cond: string,
......
......@@ -11,6 +11,8 @@ export interface iListItem {
max_date: number,
min_amount: number,
min_date: number,
date:number,
rate:number,
product_name: string,
product_status: number,
loan_type: number,
......
......@@ -3,7 +3,7 @@
<div class="text-left">
<a-button type="primary" @click="$router.go(-1)">返回</a-button>
</div>
<p class="text-2xl font-bold mb-5">新增产品</p>
<p class="text-2xl font-bold mb-5">{{title}}</p>
<div class="text-left">
<a-form-model
:model="form"
......@@ -28,8 +28,8 @@
</a-form-model-item>
<a-form-model-item label="贷款期限(年)" required>
<a-select
:value="form.period"
@change="(v)=>form.period = v"
:value="form.date"
@change="(v)=>form.date = v"
style="width: 20%"
>
<a-select-option value="1"> 1 </a-select-option>
......@@ -56,8 +56,8 @@
</a-form-model-item>
<a-form-model-item label="参考利率(%)" required>
<a-input-number
:value="form.interstMin"
@change="(v) => (form.interstMin = Number.parseFloat(v).toFixed(4))"
:value="form.rate"
@change="(v) => (form.rate = Number.parseFloat(v).toFixed(4))"
placeholder="最多可输小数点后四位"
:step="0.0001"
:precision="4"
......@@ -175,13 +175,16 @@ export default Vue.extend({
},
mounted() {
if (this.$route.query.record) {
this.title = "编辑产品"
const record: iListItem = JSON.parse(this.$route.query.record as string);
this.form.name = record.product_name;
this.form.orgnization = record.inst_name;
this.form.startTime = record.min_date;
this.form.endTime = record.max_date;
this.form.interstMin = record.rate_lower;
this.form.interstMax = record.rate_upper;
// this.form.startTime = record.min_date;
// this.form.endTime = record.max_date;
// this.form.interstMin = record.rate_lower;
// this.form.interstMax = record.rate_upper;
this.form.date = record.date,
this.form.rate = record.rate
this.form.limitMin = record.min_amount;
this.form.limitMax = record.max_amount;
this.form.guarantee = record.guarantee_type;
......@@ -220,14 +223,16 @@ export default Vue.extend({
},
data() {
return {
title:"新增产品",
form: {
name: "",
orgnization: "",
startTime: 0,
endTime: 1,
period:1,
interstMax: 0.01,
interstMin: 0,
// startTime: 0,
// endTime: 1,
date:1,
rate:0,
// interstMax: 0.01,
// interstMin: 0,
limitMax: 1,
limitMin: 0,
guarantee: eGuaranteeType.credit,
......@@ -316,15 +321,17 @@ export default Vue.extend({
guarantee_type: this.form.guarantee as eGuaranteeType,
inst_name: this.form.orgnization,
max_amount: this.form.limitMax,
max_date: this.form.endTime,
// max_date: this.form.endTime,
product_name: this.form.name,
products: this.form.introduction,
loan_type: this.form.type,
rate_lower: +this.form.interstMin,
rate_upper: +this.form.interstMax,
date:+this.form.date,
rate:+this.form.rate,
// rate_lower: +this.form.interstMin,
// rate_upper: +this.form.interstMax,
submit_cond: this.form.submissionCon,
min_amount: this.form.limitMin,
min_date: this.form.startTime,
// min_date: this.form.startTime,
uuid: this.uuid,
})
.then((ret) => {
......@@ -345,14 +352,16 @@ export default Vue.extend({
guarantee_type: this.form.guarantee as eGuaranteeType,
inst_name: this.form.orgnization,
max_amount: this.form.limitMax,
max_date: this.form.endTime,
// max_date: this.form.endTime,
min_amount: this.form.limitMin,
min_date: this.form.startTime,
// min_date: this.form.startTime,
loan_type: this.form.type as eProductType,
product_name: this.form.name,
products: this.form.introduction,
rate_lower: +this.form.interstMin,
rate_upper: +this.form.interstMax,
date:+this.form.date,
rate:+this.form.rate,
// rate_lower: +this.form.interstMin,
// rate_upper: +this.form.interstMax,
submit_cond: this.form.submissionCon,
})
.then((ret) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment