Commit 90c9f1c0 authored by WangRui's avatar WangRui

[feature]还款计划-接口变化后的相关调整

parent 492b3699
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
import { goBack } from "@/utils/globalFun" import { goBack } from "@/utils/globalFun"
import { NavBar } from "vant"; import { NavBar } from "vant";
const emit = defineEmits(['onClickRight', 'leftClick']) const emit = defineEmits(['onClickRight', 'onLeftClick'])
defineProps({ defineProps({
navTitle: { navTitle: {
type: String, type: String,
...@@ -68,7 +68,7 @@ const onClickRight = () => { ...@@ -68,7 +68,7 @@ const onClickRight = () => {
} }
const onLeftClick = () => { const onLeftClick = () => {
emit('leftClick') emit('onLeftClick')
} }
</script> </script>
......
...@@ -7,13 +7,17 @@ const api = { ...@@ -7,13 +7,17 @@ const api = {
getRepayPlantList(data = {}) { getRepayPlantList(data = {}) {
return post(`${baseURL}/app/api/app/repayment/details`, data) return post(`${baseURL}/app/api/app/repayment/details`, data)
}, },
// 明细查询
getRepayPlanDetail(data ={}){
return post(`${baseURL}/app/api/app/project/repayment/details`, data)
},
//还款计划明细 //还款计划明细
getRepaymentDetails(data={}){ getRepayPlanDetail(data={}){
return post(`${baseURL}/app/api/app/project/repayment/details`, data) return post(`${baseURL}/app/api/app/project/repayment/details`, data)
},
//违约金明细
getLiquidatedDetail(data={}){
return post(`${baseURL}/app/api/app/liquidated/damages/details`, data)
},
//违约金每日明细
getDailyLiquidatedDetail(data={}){
return post(`${baseURL}/app/api/app/day/liquidated/damages/details`, data)
} }
}; };
......
...@@ -2,13 +2,18 @@ import { ref, computed } from 'vue' ...@@ -2,13 +2,18 @@ import { ref, computed } from 'vue'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const useMakeRepayment = defineStore('makeRepaymentStore', () => {
export const useCounterStore = defineStore('counter', () => { const makeRepayPlanData = ref({})
const count = ref(0) const contractId = ref('')
const doubleCount = computed(() => count.value * 2) return { makeRepayPlanData, contractId }
function increment() {
count.value++
}
return { count, doubleCount, increment }
}) })
// export const useCounterStore = defineStore('counter', () => {
// const count = ref(0)
// const doubleCount = computed(() => count.value * 2)
// function increment() {
// count.value++
// }
//
// return { count, doubleCount, increment }
// })
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了"> <List :finished="finished" finished-text="没有更多了">
<ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values" <ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values"
@click="jump" /> @click="jump(item.contractId)" />
</List> </List>
</PullRefresh> </PullRefresh>
</section> </section>
...@@ -24,21 +24,13 @@ import Notice from '@/components/Notice.vue' ...@@ -24,21 +24,13 @@ import Notice from '@/components/Notice.vue'
import ListItem from '@/components/ListItem.vue' import ListItem from '@/components/ListItem.vue'
import api from "../api"; import api from "../api";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useMakeRepayment } from '../store/index'
const makeRepaymentStore = useMakeRepayment()
const searchVal = $ref(''); const searchVal = $ref('');
let listValue = $ref([ let listValue = $ref([])
{
title: '202204-DB001-001',
other_title: "2022-07-18",
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
},
{
title: '202204-DB001-001',
other_title: "2022-07-18",
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
},
])
let refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
...@@ -46,8 +38,8 @@ const finished = $ref(true); ...@@ -46,8 +38,8 @@ const finished = $ref(true);
const getList = async () => { const getList = async () => {
// 下拉重置参数,重新加载 // 下拉重置参数,重新加载
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId')}); let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId')});
if(list.result === 'SUCCESS'){ if(list.success){
list = list.data.map(item => ({ list = list.rows.map(item => ({
...item, ...item,
title: item.contractNumber, title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0], other_title: item.applyDate?.split(' ')[0],
...@@ -59,7 +51,7 @@ const getList = async () => { ...@@ -59,7 +51,7 @@ const getList = async () => {
listValue = list; listValue = list;
refreshing = false; refreshing = false;
}; };
// getList(); getList();
const loadApproval = () => { const loadApproval = () => {
...@@ -67,35 +59,10 @@ const loadApproval = () => { ...@@ -67,35 +59,10 @@ const loadApproval = () => {
const router = useRouter(); const router = useRouter();
const jump = () => { const jump = (contractId) => {
router.push({ name: 'makeRepayment-views-plan', params: { makeRepaymentStore.contractId = contractId
name: 'hh' router.push({ name: 'makeRepayment-views-plan'})
}})
} }
// export default ({
// setup(props, ctx) {
// //router是全局路由对象,route= userRoute()是当前路由对象
// let router = useRouter();
// const jump=()=>{
// router.push({
// //传递参数使用params的话,只能使用name指定(在route.js里面声明name)
// name:'makeRepayment-views-plan',
// params:{
// num:1
// }
// /* 使用query的话,指定path或者name都行
// path:'/home',
// query:{
// num:1
// } */
// })
// }
// return{
// jump,
// }
// }
// })
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script setup> <script setup>
import { Collapse, CollapseItem, Cell, CellGroup, NavBar } from 'vant'; import { Collapse, CollapseItem, Cell, CellGroup, NavBar } from 'vant';
import {ref, reactive} from "vue"; import {ref, reactive} from "vue";
import api from "../api";
const damageDetailInfo = ref([ const damageDetailInfo = ref([
...@@ -49,6 +50,8 @@ const damageDetailInfo = ref([ ...@@ -49,6 +50,8 @@ const damageDetailInfo = ref([
} }
]) ])
const activeNames = ref([]); const activeNames = ref([]);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" navText="违约金明细" @onClickRight="goDamagesDetail"> <RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" navText="违约金明细" @onClickRight="goDamagesDetail">
<template #list> <template #list>
<div class="repay_list"> <div class="repay_list">
<div class="left"> <div class="left">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</p> </p>
</div> </div>
<div class="right-item"> <div class="right-item">
<span>啊哈哈哈:{{route.params.name}}</span> <span></span>
<span class="flag-button payment" @click="handleClick"> <span class="flag-button payment" @click="handleClick">
支付 支付
</span> </span>
...@@ -48,10 +48,13 @@ ...@@ -48,10 +48,13 @@
import RepayPlan from '@/components/RepayPlan.vue' import RepayPlan from '@/components/RepayPlan.vue'
import Pay from '../components/Pay.vue' import Pay from '../components/Pay.vue'
import { Icon, Dialog } from 'vant' import { Icon, Dialog } from 'vant'
import {goBack} from '../../../utils/globalFun';
import {ref} from "vue"; import {ref} from "vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import api from "../api"; import api from "../api";
import { useMakeRepayment } from '../store/index'
const makeRepaymentStore = useMakeRepayment()
const showDialog = ref(false); const showDialog = ref(false);
let currencyObj = $ref({ let currencyObj = $ref({
financingCurrency: '200,000.00', financingCurrency: '200,000.00',
...@@ -72,9 +75,7 @@ let showModal = ref(false); ...@@ -72,9 +75,7 @@ let showModal = ref(false);
const route = useRoute() const route = useRoute()
const handleClick = () => { const handleClick = () => {
console.log('hahhha')
showModal.value = true showModal.value = true
console.log('jaj', showModal.value);
} }
const handleColse = (param) => { const handleColse = (param) => {
...@@ -95,7 +96,7 @@ const goDamagesDetail = () => { ...@@ -95,7 +96,7 @@ const goDamagesDetail = () => {
} }
const getRepayPlanInfo = async () => { const getRepayPlanInfo = async () => {
const result = await api.getRepayPlanDetail({"contractId": "777"}) const result = await api.getRepayPlanDetail({"contractId": makeRepaymentStore.contractId})
if(result.message === '请求成功'){ if(result.message === '请求成功'){
const rows = result.rows[0]; const rows = result.rows[0];
currencyObj = { currencyObj = {
...@@ -109,20 +110,14 @@ const getRepayPlanInfo = async () => { ...@@ -109,20 +110,14 @@ const getRepayPlanInfo = async () => {
console.log(cashflow); console.log(cashflow);
} }
} }
// getRepayPlanInfo() getRepayPlanInfo()
// export default ({ const getLiquidatedDamagesInfo = async () => {
// setup(props, ctx) { const result = await api.getLiquidatedDetail({contractId: makeRepaymentStore.contractId})
// //router是全局路由对象,route= userRoute()是当前路由对象 }
// let route = useRoute(); getLiquidatedDamagesInfo()
// const num = route.params.num;
// console.log(num);
// return {
// num,
// };
// },
// });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
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