Commit 5482e697 authored by WangRui's avatar WangRui
parents 44a1afb1 b433d2e5
......@@ -26,11 +26,11 @@ npm run preview 本地预览打包完的文件
### 子应用
1. 融资计算器 ✅✋.5)
1. 融资计算器 ✅ (纯前端,等额本息) ✋.5)
2. 融资意向 ✅✋.5)
3. 项目查询 (✋1.5 项目信息明细页面需要重头画)
4. 合同签约 (E签宝, 预览签署文件)✅✋ 2)
5. 还款计划 (支付)(✋ 2)
3. 项目查询 (✋ 1.5 项目信息明细页面需要重头画)
4. 合同签约 (E签宝, 预览签署文件, 由消息推送后做✅✋ 2)
5. 还款计划 (支付, 只能从上到下支付)(✋ 2)
6. 还款计划查询 (发票预览下载) (✋ 2)
7. 自助服务 ✅✋.5)
8. 客户信息变更 ✅✋ 1)
......@@ -54,3 +54,7 @@ npm run preview 本地预览打包完的文件
- 消息推送 (极光推送)(✋ 1)
### **合计:** 22.5 (接口完毕情况下)
问题: 支付,ios证书等,代码版权
......@@ -31,15 +31,23 @@ export default {
},
async mounted() {
const TempAccess = import.meta.env.DEV ? '60243b9f-5f2b-41f8-8007-67984b5ae1cd' : ''
let homePage = { path: "applications", replace: true }
if (import.meta.env.PROD) {
let index = this.$router.getRoutes().filter(route => route.meta.title)
this.$router.push({ path: index[0].path, replace: true });
return;
// 得保证 每个子应用中首页有 title
let jumRouter = await login(TempAccess);
if (jumRouter.path) {
// 通过消息传入跳转页面的情况
homePage = { ...homePage, jumRouter }
} else {
// 一般点击进入
let index = this.$router.getRoutes().filter(route => route.meta.title);
homePage.path = index[0];
}
}
const jumpRouter = await login(TempAccess)
this.$router.push({ path: jumpRouter.path ? jumpRouter : "applications", replace: true });
this.$router.push(homePage);
}
};
</script>
......
......@@ -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 = () => {
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>
<div class="container">
<NavBar title="还款计划查询" left-arrow @click-left="goBack" />
<section class="list">
<Search v-model="searchVal" placeholder="请输入项目编号/融资金额" />
<Notice detail="只可对已关联的项目还款" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval">
<ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values"
@click="jump" />
</List>
</PullRefresh>
</section>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Search } from "vant";
import Notice from '@/components/Notice.vue'
import ListItem from '@/components/ListItem.vue'
import api from "../api";
import { useRouter } from "vue-router";
const searchVal = $ref('');
const 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"]]
},
])
const refreshing = $ref(true);
const finished = $ref(true);
const onRefresh = () => {
// 下拉重置参数,重新加载
};
const loadApproval = () => {
}
const router = useRouter();
const jump = () => {
router.push({ name: 'repayPlan-views-plan' })
}
</script>
<style scoped lang="less">
.list {
box-sizing: border-box;
height: calc(100vh - var(--van-nav-bar-height));
display: flex;
flex-direction: column;
justify-content: space-between;
padding-bottom: 10px;
}
.scroll {
box-sizing: border-box;
height: calc(100vh - 30vw);
overflow-y: auto;
}
</style>
<route>
{
meta: {
title: '还款计划查询'
}
}
</route>
<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
......@@ -5,7 +5,7 @@ export function bridgeLogin() {
return new Promise((resolve) => {
// 调用成功返回
window.onSuccess = function (message) {
console.log(message, '测试打印')
console.log('BaseBridge:', message)
let object = handleSpecialCharacters(message)
const data = {
token: object.token,
......@@ -35,8 +35,8 @@ export function bridgeLogin() {
export default async function login(token = '') {
let result = {}
if (token === '') {
console.log('登录返回信息', JSON.stringify(result))
result = await bridgeLogin() // 本地子应用
console.log('登录返回信息', JSON.stringify(result))
} else {
result.token = token
}
......@@ -58,16 +58,16 @@ export function handleSpecialCharacters(jsonStr) {
jsonStr = jsonStr.replace(/ /g, "&nbsp;");
jsonStr = jsonStr.replace(/</g, "$lt;");
jsonStr = jsonStr.replace(/>/g, "$gt;");
try{
try {
obj = JSON.parse(jsonStr)
} catch (e) {
let jsonArr = jsonStr.split('')
let start = jsonStr.indexOf('"project":') + '"project":'.length
let end = jsonStr.indexOf('}"', start)
jsonArr.splice(start, 1)
jsonArr.splice(end, 1)
jsonStr = jsonArr.join('')
obj = JSON.parse(jsonStr)
}catch(e){
let jsonArr=jsonStr.split('')
let start=jsonStr.indexOf('"project":')+'"project":'.length
let end=jsonStr.indexOf('}"',start)
jsonArr.splice(start,1)
jsonArr.splice(end,1)
jsonStr=jsonArr.join('')
obj=JSON.parse(jsonStr)
// let token=jsonStr.slice(jsonStr.indexOf('token')+'token'.length+3,jsonStr.indexOf('userId')-3)
......@@ -85,7 +85,7 @@ export function handleSpecialCharacters(jsonStr) {
}
}
return obj;
}
}
// 通知消息跳转页面
......@@ -93,10 +93,10 @@ function NoticeAndReplaceRouter(message) {
if (!message || !message.path) return {};
const path = message.path.match(/#(.*)\?/)[1]
const query = getQuery(message.path)
query.name=message.workflowTaskName
query.name = message.workflowTaskName
console.log(path, query, '跳转参数与地址');
return {path, query}
return { path, query }
}
......@@ -74,6 +74,7 @@ export default ({ mode }) => {
},
build: {
outDir: `dist/${VITE_TARGET}`
}
},
base: './'
}
}
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