Commit 3647d0ac authored by Step_by_step's avatar Step_by_step

feat: 还款计划查询

parent 360a3ad0
......@@ -63,7 +63,7 @@ defineEmits(['clickRight', 'click'])
padding: 8px 8px;
}
.box+.box {
.swipe + .swipe {
margin-top: 20px;
}
......
const state = {};
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export default {
namespaced: true,
state,
};
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})
......@@ -18,7 +18,7 @@
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, Button } from "vant";
import { NavBar, Button, Toast } from "vant";
import Notice from "@/components/Notice.vue"
import AuForm from '@/components/AuForm.vue';
import AuFormClass from "@/components/useAuForm";
......@@ -28,36 +28,37 @@ const form = $ref();
const formConfig = $ref(new AuFormClass([
{
title: '物件价格',
propName: 'paymentReqDate',
propName: 'price',
type: 'currency',
value: '',
isRequired: true
isRequired: true,
},
{
title: '还款方式',
propName: 'paymentRe3qDat3e',
propName: 'payType',
type: 'cell',
value: '',
value: '均等还款',
isRequired: true,
select: [],
disabled: true
},
{
title: '融资租期(月)',
propName: 'paymentReqDat3e',
propName: 'leaseTermMonth',
type: 'digit',
value: '',
isRequired: true
},
{
title: '首付款比例',
propName: 'paymentReqDat3e',
propName: 'firstPaymentRatio',
type: 'rate',
value: '',
isRequired: true
},
{
title: '首付租金日',
propName: 'paymentReqDat3e',
propName: 'firstPaymentDate',
type: 'cell',
value: '',
isRequired: true,
......@@ -65,9 +66,29 @@ const formConfig = $ref(new AuFormClass([
},
]))
const checkValues = (values) => {
if (+values.price <= 0) {
Toast({ message: '请输入正确的物件价格', position: 'top' });
return false;
} else if (values.firstPaymentRatio > 1) {
Toast({ message: '请输入正确首付款比例', position: 'top' });
return false;
}
return true;
}
const router = useRouter();
const computing = () => {
router.push({ name: 'calculator-views-plan' })
if (formConfig.validate()) {
let formValueObj = formConfig.getValues()
let validateValue = checkValues(formValueObj)
if (validateValue) {
router.push({ name: 'calculator-views-plan' })
}
} else {
Toast({ message: '请将信息填写完整', position: 'top' });
}
}
</script>
......
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.VITE_HTTP_BASE_URL
const api = {
// getMakingList (data) { // 查询合同制作列表
// return get(
// `${baseURL}/hlct/v1/0/contracts/toMake`,
// {...data}
// )
// },
};
export default api;
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})
<template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj">
<template #list>
<div class="repay_list">
<div class="left">
<div class="times-box" v-for="i in 30">
<div class="times">{{ i }}</div>
</div>
</div>
<div class="right">
<div class="item" v-for="i in 30">
<div class="left-item">
<span>租金</span>
<span>2022-06-20</span>
</div>
<div class="center-item">
<p>
<span>应付金额</span>
<span>¥9,000.00</span>
</p>
<p>
<span>待付金额</span>
<span>¥0.00</span>
</p>
</div>
<div class="right-item">
<span>明细</span>
<span class="flag-button overtime">
<Icon style="margin-right: 1px;" name="info-o" />逾期
</span>
</div>
</div>
</div>
</div>
</template>
<template #footer>
</template>
</RepayPlan>
</template>
<script setup>
import RepayPlan from '@/components/RepayPlan.vue'
import { Icon } from 'vant'
const currencyObj = $ref({
financingCurrency: '200,000.00',
headerCurrency: '5,000.00',
fristCurrency: '10,000.00',
times: '12'
})
</script>
<style lang="less" scoped>
@lineColr: #dcdddf;
.repay_list {
display: flex;
width: 100%;
height: 98%;
overflow-y: auto;
scrollbar-width: none;
/* firefox */
}
.repay_list::-webkit-scrollbar {
display: none;
/* Chrome Safari */
}
@leftW: 45px;
.left {
flex: 0 1 @leftW;
}
.times-box {
display: flex;
height: 100px;
flex-direction: column;
justify-content: center;
background-image: linear-gradient(@lineColr 0%, @lineColr 16%, transparent 16%, transparent 33%, @lineColr 33%, @lineColr 83%, transparent 83%, transparent 100%);
/* 35%设置虚线点y轴上的长度 */
background-position: 50% 50%;
/* right配置右边框位置的虚线 */
background-size: 1px 20px;
/* 第一个参数设置虚线点x轴上的长度;第二个参数设置虚线点的间距 */
background-repeat: repeat-y;
}
.times-box:nth-child(1) {
margin-top: 25px;
height: 70px;
justify-content: flex-start;
}
.times-box:nth-last-child(1) {
// bottom: 80px;
height: 70px;
justify-content: flex-end;
}
.times {
height: @leftW;
width: @leftW;
display: flex;
justify-content: center;
line-height: @leftW;
color: #fff;
background-color: #019ae5;
border-radius: 5px;
}
.right {
flex: 1 0 auto;
padding-left: 20px;
}
.item {
display: flex;
justify-content: space-around;
box-sizing: border-box;
margin-top: 15px;
margin-bottom: 30px;
width: 98%;
height: 70px;
border: 1px solid #dedede;
background-color: #eef5fd;
border-radius: 5px;
padding: 10px 5px 3px 10px;
font-size: 13px;
&>div {
display: flex;
flex-direction: column;
justify-content: space-around;
}
}
.left-item {
flex: 1 0 30%;
span:nth-child(1) {
font-weight: 600;
}
span:nth-child(2) {
color: gray;
}
}
.center-item {
flex: 1 0 45%;
p {
color: gray;
display: flex;
justify-content: space-between;
span:nth-child(2) {
font-weight: 600;
}
}
&>p:nth-child(1) span:nth-child(2) {
color: #019ae5;
}
}
.right-item {
flex: 1 0 25%;
text-align: center;
span:nth-child(1) {
color: #019ae5;
}
span:nth-child(2) {
color: gray;
}
}
.flag-button {
display: flex;
justify-content: center;
align-items: center;
width: 80%;
margin: 0 auto;
height: 40%;
border-radius: 10px;
font-size: 12px;
}
.overtime {
background-color: #eeeeee;
color: orange !important;
border: 1px solid #e2e3e4;
}
.nopay {
background-color: #bec2c5;
color: white !important;
border: 1px solid #bec2c5;
}
.pay {
background-color: #f0f0f0;
color: gray !important;
border: 1px solid #eaeaea;
}
</style>
\ No newline at end of file
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