Commit d9335d34 authored by Zhang Xiaojie's avatar Zhang Xiaojie

update:贷款

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