Commit 6da225d1 authored by WangRui's avatar WangRui

[feature]还款计划页面接口联调

parent 223aeb36
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
<script setup> <script setup>
import { Popup, NavBar, Field, Cell,RadioGroup, Radio,CellGroup, Button, NumberKeyboard, Dialog, PasswordInput } from 'vant'; import { Popup, NavBar, Field, Cell,RadioGroup, Radio,CellGroup, Button, NumberKeyboard, Dialog, PasswordInput } from 'vant';
import {ref, reactive} from "vue"; import {ref, reactive} from "vue";
import { pay } from '@/utils/pay';
const props = defineProps({ const props = defineProps({
visible: { type: Boolean }, // 是否打开弹框 visible: { type: Boolean }, // 是否打开弹框
...@@ -164,6 +165,7 @@ const payMoney = () => { ...@@ -164,6 +165,7 @@ const payMoney = () => {
const handleFinishAmount = () => { const handleFinishAmount = () => {
showDialog.value = false; showDialog.value = false;
pay();
} }
......
...@@ -54,12 +54,19 @@ import api from "../api"; ...@@ -54,12 +54,19 @@ import api from "../api";
const showDialog = ref(false); const showDialog = ref(false);
let currencyObj = $ref({ let currencyObj = $ref({
// financingCurrency: '200,000.00', financingCurrency: '200,000.00',
// headerCurrency: '5,000.00', headerCurrency: '5,000.00',
// fristCurrency: '10,000.00', fristCurrency: '10,000.00',
// times: '12' times: '12'
}) })
let cashflow = [] let cashflow = [
{
chargeDueDate: '2022-12-28',
dueAmount: '2000',
obligation: '3200',
}
]
const payInfo = ref({}); const payInfo = ref({});
let showModal = ref(false); let showModal = ref(false);
...@@ -101,7 +108,7 @@ const getRepayPlanInfo = async () => { ...@@ -101,7 +108,7 @@ const getRepayPlanInfo = async () => {
console.log(cashflow); console.log(cashflow);
} }
} }
getRepayPlanInfo() // getRepayPlanInfo()
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -3,6 +3,10 @@ import { get, put, post, File, deleteReq } from '@/utils/http' ...@@ -3,6 +3,10 @@ import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL const baseURL = import.meta.env.DEV ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = { const api = {
//列表查询
getRepayPlantList(data={}) {
return post(`${baseURL}/app/api/app/repayment/details`, data)
},
//还款计划明细 //还款计划明细
getRepaymentDetails(data={}){ getRepaymentDetails(data={}){
return post(`${baseURL}/app/api/app/project/repayment/details`, data) return post(`${baseURL}/app/api/app/project/repayment/details`, data)
......
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useIntention = defineStore('formStore', () => {
const repayPlanData = ref({})
return { repayPlanData }
})
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<Notice detail="只可对已关联的项目还款" /> <Notice detail="只可对已关联的项目还款" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval"> <List :finished="finished" finished-text="没有更多了" @load="loadApproval">
<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" />
...@@ -27,25 +27,39 @@ import { useRouter } from "vue-router"; ...@@ -27,25 +27,39 @@ import { useRouter } from "vue-router";
const searchVal = $ref(''); const searchVal = $ref('');
const listValue = $ref([ let listValue = $ref([
{ // {
title: '202204-DB001-001', // title: '202204-DB001-001',
other_title: "2022-07-18", // other_title: "2022-07-18",
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]] // values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
}, // },
{ // {
title: '202204-DB001-001', // title: '202204-DB001-001',
other_title: "2022-07-18", // other_title: "2022-07-18",
values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]] // values: [["剩余应还金额", "状态", "融资金额"], ["¥ 20,000.00", "正常", "¥ 20,000.00"]]
}, // },
]) ])
const refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
const onRefresh = () => { const getList = async () => {
// 下拉重置参数,重新加载 // 下拉重置参数,重新加载
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId')});
if(list.result === 'SUCCESS'){
list = list.data.map(item => ({
...item,
title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0],
values: [["剩余应还金额", "状态", "融资金额"], [item.residueAmount, item.contractStatusN, item.financeAmount]]
}))
}else {
list = [];
}
listValue = list;
refreshing = false;
}; };
getList();
const loadApproval = () => { const loadApproval = () => {
......
...@@ -16,14 +16,15 @@ const pay = (payType = 'alipay') => { ...@@ -16,14 +16,15 @@ const pay = (payType = 'alipay') => {
} }
const appId = '10037ca75e6125aa015e9e12a89b001b'; const appId = '10037ca75e6125aa015e9e12a89b001b';
const AppKey = 'f7a74b6c02ae4e1e94aaba311c04acf2';
const timestamp = getTimestamp(); const timestamp = getTimestamp();
const nonce = randomString(); const nonce = randomString();
const content = { const content = {
"requestTimestamp": getTimestamp(true), // 报文请求时间 "requestTimestamp": getTimestamp(true), // 报文请求时间
"mid": "898201612345678", // 商户号 "mid": "898201612345678", // 商户号
"tid": "88880001", // 终端号 "tid": "88880001", // 终端号
"instMid": "YUEDANDEFAULT", // 业务类型 "instMid": "H5DEFAULT", // 业务类型YUEDANDEFAULT
"totalAmount": 3, // 支付总金额 "totalAmount": 0.1, // 支付总金额
"notifyUrl": "https://qrtest2.chinaums.com/netpayportal/test/notifyUrl.do", // 支付结果通知地址 "notifyUrl": "https://qrtest2.chinaums.com/netpayportal/test/notifyUrl.do", // 支付结果通知地址
"returnUrl": "https://qrtest2.chinaums.com/netpayportal/test/returnUrl.do", // 支付结果回跳商户页面 "returnUrl": "https://qrtest2.chinaums.com/netpayportal/test/returnUrl.do", // 支付结果回跳商户页面
"merOrderId": randomString(true) // 商户订单号 商户自行生成 6..32 "merOrderId": randomString(true) // 商户订单号 商户自行生成 6..32
...@@ -43,7 +44,7 @@ function randomString(OnlyNumber = false, e) { ...@@ -43,7 +44,7 @@ function randomString(OnlyNumber = false, e) {
a = t.length, a = t.length,
n = ""; n = "";
if (OnlyNumber) t = t2; if (OnlyNumber) t = t2;
for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
return n return n
} }
......
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