Commit 3ddc9ecd authored by 14699's avatar 14699

'fix-功能完善'

parent 0b79104d
...@@ -58,23 +58,23 @@ ...@@ -58,23 +58,23 @@
</template> </template>
<Popup v-model:show="typeShow" position="bottom" :style="{ height: '45%' }"> <Popup v-model:show="typeShow" @close="typeOnCancel" position="bottom" :style="{ height: '45%' }">
<Picker title="请选择" show-toolbar :columns="typeColumns" @confirm="typeOnConfirm($event, 'picker')" <Picker title="请选择" show-toolbar :columns="typeColumns" @confirm="typeOnConfirm($event, 'picker')"
@cancel="typeOnCancel" /> @cancel="typeOnCancel" />
</Popup> </Popup>
<Popup v-model:show="typeShowDate" position="bottom"> <Popup v-model:show="typeShowDate" @close="typeOnCancel" position="bottom">
<DatetimePicker v-model="currentDate" type="date" title="选择年月日" @confirm="typeOnConfirm($event, 'date')" <DatetimePicker v-model="currentDate" type="date" title="选择年月日" @confirm="typeOnConfirm($event, 'date')"
@cancel="typeOnCancel" /> @cancel="typeOnCancel" />
</Popup> </Popup>
<Popup v-model:show="typeShowCascader" position="bottom"> <Popup v-model:show="typeShowCascader" @close="typeOnCancel" position="bottom">
<Cascader v-model="cascaderValue" title="请选择" :options="typeColumns" @close="typeOnCancel" <Cascader v-model="cascaderValue" title="请选择" :options="typeColumns" @close="typeOnCancel"
@finish="typeOnConfirm($event, 'cascader')" /> @finish="typeOnConfirm($event, 'cascader')" />
</Popup> </Popup>
<Popup v-model:show="typeShowArea" position="bottom"> <Popup v-model:show="typeShowArea" @close="typeOnCancel" position="bottom">
<Area title="请选择" :area-list="typeColumns" @confirm="typeOnConfirm($event, 'area')" /> <Area title="请选择" :area-list="typeColumnsObject" @confirm="typeOnConfirm($event, 'area')" @cancel="typeOnCancel"/>
</Popup> </Popup>
</div> </div>
</template> </template>
...@@ -117,6 +117,7 @@ const typeShowDate = ref(false) ...@@ -117,6 +117,7 @@ const typeShowDate = ref(false)
const typeShowCascader = ref(false) const typeShowCascader = ref(false)
const typeShowArea = ref(false) const typeShowArea = ref(false)
const typeColumns = ref([]) const typeColumns = ref([])
const typeColumnsObject = ref([])
const currentDate = ref(new Date()) const currentDate = ref(new Date())
const cascaderValue = ref('') const cascaderValue = ref('')
...@@ -148,7 +149,7 @@ function placeHolder(value, type, item = {}) { ...@@ -148,7 +149,7 @@ function placeHolder(value, type, item = {}) {
function chooser(formItem) { function chooser(formItem) {
if (formItem.disabled) return if (formItem.disabled) return
nowItem.value = formItem nowItem.value = formItem
console.log(Object.prototype.toString.call(formItem.select) === '[object Object]'); // console.log(Object.prototype.toString.call(formItem.select) === '[object Object]');
if (formItem.select === 'date') { if (formItem.select === 'date') {
typeShowDate.value = true typeShowDate.value = true
...@@ -156,7 +157,7 @@ function chooser(formItem) { ...@@ -156,7 +157,7 @@ function chooser(formItem) {
formItem.select() formItem.select()
} else if (Object.prototype.toString.call(formItem.select) === '[object Object]') { } else if (Object.prototype.toString.call(formItem.select) === '[object Object]') {
typeShowArea.value = true typeShowArea.value = true
typeColumns.value = formItem.select typeColumnsObject.value = formItem.select
} else if (formItem.select[0].hasOwnProperty('children')) { } else if (formItem.select[0].hasOwnProperty('children')) {
typeShowCascader.value = true typeShowCascader.value = true
typeColumns.value = formItem.select typeColumns.value = formItem.select
...@@ -192,7 +193,8 @@ function isObject(obj) { ...@@ -192,7 +193,8 @@ function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]' return Object.prototype.toString.call(obj) === '[object Object]'
} }
function typeOnCancel() { function typeOnCancel() {
typeShow.value = typeShowDate.value = false typeShow.value = false
typeShowDate.value = false
typeShowCascader.value = false; typeShowCascader.value = false;
typeShowArea.value = false; typeShowArea.value = false;
} }
......
...@@ -88,8 +88,7 @@ table { ...@@ -88,8 +88,7 @@ table {
color: gray; color: gray;
} }
td, td, th {
th {
text-align: center; text-align: center;
height: 25px; height: 25px;
line-height: 20px; line-height: 20px;
...@@ -115,6 +114,13 @@ table.more_four tr>th { ...@@ -115,6 +114,13 @@ table.more_four tr>th {
text-align: left; text-align: left;
} }
table.more_four td:last-child {
text-align: right !important;
}
table.more_four th:last-child {
text-align: right !important;
}
.swipe { .swipe {
box-sizing: border-box; box-sizing: border-box;
background-color: white; background-color: white;
......
...@@ -70,7 +70,7 @@ const formConfigArr = [ ...@@ -70,7 +70,7 @@ const formConfigArr = [
title: '合同利率', title: '合同利率',
propName: 'contractRate', propName: 'contractRate',
type: 'rate', type: 'rate',
value: '6', value: '',
isRequired: true, isRequired: true,
}, },
] ]
...@@ -116,7 +116,7 @@ const updateForm = async () => { ...@@ -116,7 +116,7 @@ const updateForm = async () => {
} else if (['firstRentDay'].includes(item.propName)) { } else if (['firstRentDay'].includes(item.propName)) {
item.value = ''; item.value = '';
} else if (item.propName === "contractRate") { } else if (item.propName === "contractRate") {
item.value = '6' item.value = ''
} }
else if (item.propName === "repayment") { else if (item.propName === "repayment") {
item.value = '均等还款' item.value = '均等还款'
...@@ -136,10 +136,13 @@ const checkValues = (values) => { ...@@ -136,10 +136,13 @@ const checkValues = (values) => {
if (+values.priceOfItem <= 0) { if (+values.priceOfItem <= 0) {
Toast({ message: '请输入正确的物件价格', position: 'top' }); Toast({ message: '请输入正确的物件价格', position: 'top' });
return false; return false;
} else if (+values.term <= 0) {
Toast({ message: '请输入正确的融资租期(月)', position: 'top' });
return false;
} else if (values.firstGoldRatio > 1 || isNaN(+values.firstGoldRatio) || +values.firstGoldRatio < 0) { } else if (values.firstGoldRatio > 1 || isNaN(+values.firstGoldRatio) || +values.firstGoldRatio < 0) {
Toast({ message: '请输入正确首付款比例', position: 'top' }); Toast({ message: '请输入正确首付款比例', position: 'top' });
return false; return false;
} else if (isNaN(+values.contractRate) || +values.contractRate < 0) { } else if (isNaN(+values.contractRate) || +values.contractRate <= 0) {
Toast({ message: '请输入正确的合同利率', position: 'top' }); Toast({ message: '请输入正确的合同利率', position: 'top' });
return false; return false;
} }
...@@ -148,7 +151,7 @@ const checkValues = (values) => { ...@@ -148,7 +151,7 @@ const checkValues = (values) => {
const getResult = (formValueObj) => { const getResult = (formValueObj) => {
let { priceOfItem, term, firstGoldRatio, firstRentDay, contractRate } = formValueObj let { priceOfItem, term, firstGoldRatio, firstRentDay, contractRate } = formValueObj
let firstGold = (priceOfItem * firstGoldRatio).toFixed(0); let firstGold = +firstGoldRatio > 0?(priceOfItem * firstGoldRatio).toFixed(0) : 0;
let financeAmount = priceOfItem - firstGold; let financeAmount = priceOfItem - firstGold;
let monthRate = contractRate / 12; let monthRate = contractRate / 12;
...@@ -160,7 +163,7 @@ const getResult = (formValueObj) => { ...@@ -160,7 +163,7 @@ const getResult = (formValueObj) => {
let interest = (financeAmount * monthRate * (temp ** term - temp ** (i - 1)) / (temp ** term - 1)).toFixed(2) let interest = (financeAmount * monthRate * (temp ** term - temp ** (i - 1)) / (temp ** term - 1)).toFixed(2)
let principal = (financeAmount * monthRate * temp ** (i - 1) / (temp ** term - 1)).toFixed(2) let principal = (financeAmount * monthRate * temp ** (i - 1) / (temp ** term - 1)).toFixed(2)
let dueAmount = (financeAmount * monthRate * temp ** term / (temp ** term - 1)).toFixed(2) let dueAmount = (financeAmount * monthRate * temp ** term / (temp ** term - 1)).toFixed(2)
let chargeDueDate = moment(firstRentDay).add(i, 'month').format('YYYY-MM-DD') let chargeDueDate = moment(firstRentDay).add(i-1, 'month').format('YYYY-MM-DD')
cashflow.push({ interest, principal, dueAmount, times: i + "", chargeDueDate }) cashflow.push({ interest, principal, dueAmount, times: i + "", chargeDueDate })
} }
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="backToLast"> <RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="backToLast">
<template #list> <template #list>
<div class="repay_list" v-if="currencyObj.times && plan.financeAmount"> <div class="repay_list" v-if="plan.financeAmount">
<div class="left"> <div class="repay_content" v-for="item in plan.cashflow">
<div class="times-box" v-for="i in currencyObj.times"> <div class="left">
<div class="times">{{ i }}</div> <div class="times-box">
</div> <div class="times">{{ item.times }}</div>
</div>
<div class="right">
<div class="item" v-for="item in plan.cashflow">
<div class="item-head">
<span>租金</span>
<span>{{ currency(item.dueAmount) }}</span>
<span>{{ item.chargeDueDate }}</span>
</div> </div>
<div class="item-foot"> </div>
<span>本金</span> <div class="right">
<span>{{ currency(item.principal) }}</span> <div class="item">
<span>利息</span> <div class="item-head">
<span>{{ currency(item.interest) }}</span> <span>租金</span>
<span>{{ currency(item.dueAmount) }}</span>
<span>{{ item.chargeDueDate }}</span>
</div>
<div class="item-foot">
<span>本金</span>
<span>{{ currency(item.principal) }}</span>
<span>利息</span>
<span>{{ currency(item.interest) }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -51,7 +53,7 @@ const getPlan = () => { ...@@ -51,7 +53,7 @@ const getPlan = () => {
financingCurrency: currency(plan.financeAmount) , financingCurrency: currency(plan.financeAmount) ,
headerCurrency: currency(plan.firstGold), headerCurrency: currency(plan.firstGold),
fristCurrency: currency(plan.cashflow[0].dueAmount), fristCurrency: currency(plan.cashflow[0].dueAmount),
times: plan.cashflow.length times: plan.term
} }
} }
...@@ -78,7 +80,7 @@ const save = async () => { ...@@ -78,7 +80,7 @@ const save = async () => {
} }
const backToLast = () => { const backToLast = () => {
router.replace({ name: 'calculator-views-detail' }) router.replace({ name: 'calculator-views' })
} }
</script> </script>
...@@ -86,7 +88,7 @@ const backToLast = () => { ...@@ -86,7 +88,7 @@ const backToLast = () => {
@lineColr: #dcdddf; @lineColr: #dcdddf;
.repay_list { .repay_list {
display: flex; /*display: flex;*/
width: 100%; width: 100%;
height: 98%; height: 98%;
overflow-y: auto; overflow-y: auto;
...@@ -99,6 +101,11 @@ const backToLast = () => { ...@@ -99,6 +101,11 @@ const backToLast = () => {
/* Chrome Safari */ /* Chrome Safari */
} }
.repay_content {
display: flex;
width: 100%;
}
@leftW: 45px; @leftW: 45px;
.left { .left {
...@@ -121,7 +128,7 @@ const backToLast = () => { ...@@ -121,7 +128,7 @@ const backToLast = () => {
.times-box:nth-child(1) { .times-box:nth-child(1) {
margin-top: 25px; /*margin-top: 25px;*/
height: 70px; height: 70px;
justify-content: flex-start; justify-content: flex-start;
} }
...@@ -174,7 +181,7 @@ const backToLast = () => { ...@@ -174,7 +181,7 @@ const backToLast = () => {
color: gray; color: gray;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-end; justify-content: inherit;
span { span {
margin-right: 5px; margin-right: 5px;
......
...@@ -63,7 +63,7 @@ const formConfig = $ref(new AuFormClass([ ...@@ -63,7 +63,7 @@ const formConfig = $ref(new AuFormClass([
title: '联系方式', title: '联系方式',
propName: 'userPhoneNumber', propName: 'userPhoneNumber',
type: 'input', type: 'input',
value: '', value: window.localStorage.getItem('phone'),
isRequired: true isRequired: true
} }
])) ]))
...@@ -104,9 +104,11 @@ const save = async () => { ...@@ -104,9 +104,11 @@ const save = async () => {
p { p {
// margin-top: 10px; // margin-top: 10px;
background-color: #fff; background-color: #fff;
padding: 10px 30px; padding: 10px 10px;
line-height: 25px; line-height: 25px;
margin: 0 10px 0; margin: 0 10px 0;
font-weight: 600;
font-size: 14px;
} }
p:nth-child(1) { p:nth-child(1) {
......
...@@ -7,15 +7,9 @@ const api = { ...@@ -7,15 +7,9 @@ const api = {
contextQuery(data = {}) { contextQuery(data = {}) {
return post(`${baseURL}/app/api/app/sign/context/query`, data) return post(`${baseURL}/app/api/app/sign/context/query`, data)
}, },
// 业务经办保存 // 已签署合同文本查询
saveInfo(data = {}) { preListQuery(data = {}) {
return post(`${baseURL}/app/api/hls/payment/info/save`, data) return post(`${baseURL}/app/api/app/sign/context/file`, data)
// {
// paymentReqId: '',
// oppositeFinancialContact: '对方财务联系人',
// contactInformation: '联系方式',
// receivets: ’时间戳‘
// }
} }
}; };
......
...@@ -17,7 +17,6 @@ const router = useRouter(); ...@@ -17,7 +17,6 @@ const router = useRouter();
let iframeUrl = $ref(route.query.url) let iframeUrl = $ref(route.query.url)
console.log('hahhhah', iframeUrl);
let toLastPage = () => { let toLastPage = () => {
router.replace({ name: 'contractSign-views' }) router.replace({ name: 'contractSign-views' })
} }
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<section class="list"> <section class="list">
<Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc" @change="TabChange"> <Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc" @change="TabChange">
<Search v-model="searchValue" placeholder="请输入合同编号/代理店" /> <Search v-model="searchValue" placeholder="请输入合同编号/代理店" @search="onSearch"/>
<Tab title="未签署"> <Tab title="未签署">
<Notice detail="只对已关联的项目发送合同签约链接" /> <Notice detail="只对已关联的项目发送合同签约链接" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval"> <List v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadApproval">
<SignListItem v-for="item in notList" :sdata="item" @click="eSign(item.signUrl)" /> <SignListItem v-for="item in notList" :sdata="item" @click="eSign(item.signUrl)" />
</List> </List>
</PullRefresh> </PullRefresh>
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<Tab title="已签署"> <Tab title="已签署">
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval"> <List v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadApproval">
<SignListItem v-for="item in alreadyList" :sdata="item" @click="pdfPre" /> <SignListItem v-for="item in alreadyList" :sdata="item" @click="pdfPre(item)" />
</List> </List>
</PullRefresh> </PullRefresh>
</Tab> </Tab>
...@@ -41,15 +41,20 @@ let notList = $ref([]) ...@@ -41,15 +41,20 @@ let notList = $ref([])
let alreadyList = $ref([]) let alreadyList = $ref([])
const active = $ref(0) const active = $ref(0)
const searchValue = $ref('') let searchValue = $ref('')
let refreshing = $ref(false); let refreshing = $ref(false);
let finished = $ref(false); let finished = $ref(false);
let loading = $ref(false);
let pager = { let pager = {
page: 1, page: 1,
pageSize: 10 pageSize: 10
} }
const onSearch = () => {
queryList()
}
let queryList = async () => { let queryList = async () => {
refreshing = true refreshing = true
let res = await api.contextQuery({ let res = await api.contextQuery({
...@@ -59,8 +64,8 @@ let queryList = async () => { ...@@ -59,8 +64,8 @@ let queryList = async () => {
projectNumber: searchValue, projectNumber: searchValue,
...pager ...pager
}) })
loading = true
if (res.success && res.total > 0) { if (res.success && res.rows.length > 0) {
res.rows.forEach(item => { res.rows.forEach(item => {
let temp = { let temp = {
...item, ...item,
...@@ -80,6 +85,7 @@ let queryList = async () => { ...@@ -80,6 +85,7 @@ let queryList = async () => {
finished = true finished = true
// Toast.fail('获取列表失败!'); // Toast.fail('获取列表失败!');
} }
refreshing = false refreshing = false
} }
...@@ -91,6 +97,7 @@ const onRefresh = () => { ...@@ -91,6 +97,7 @@ const onRefresh = () => {
alreadyList = [] alreadyList = []
} }
finished = false finished = false
refreshing = false
pager.page = 1; pager.page = 1;
pager.pageSize = 10; pager.pageSize = 10;
queryList() queryList()
...@@ -109,8 +116,9 @@ const loadApproval = () => { ...@@ -109,8 +116,9 @@ const loadApproval = () => {
const router = useRouter(); const router = useRouter();
const pdfPre = () => { const pdfPre = (item) => {
router.push({ name: 'contractSign-views-pdfPre' }) // router.push({ name: 'contractSign-views-pdfPre' })
router.push({ name: 'contractSign-views-pdfPreList', item: item })
} }
let eSign = (eUrl) => { let eSign = (eUrl) => {
......
<template>
<div class="container">
<NavBar title="合同预览列表" left-arrow @click-left="goBack" />
<section class="list">
<ListItem v-for="item in preList" :values="item.documentName" @click="jump(item.intentionId)" />
</section>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty } from "vant";
import ListItem from '@/components/ListItem.vue'
import api from "../api";
import { useRouter } from "vue-router";
import { useIntention } from '../store/index'
const route = useRoute();
const router = useRouter();
const esignFlowId = $ref(route.item.esignFlowId);
let preList = $ref([]);
const getDailyLiquidatedDetail = async () => {
const res = await api.preListQuery({"esignFlowId": esignFlowId})
if(res.success){
preList = res.rows
} else {
Toast.fail('请求失败,请联系管理员!');
}
};
getDailyLiquidatedDetail();
</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-top: 8px;
padding-bottom: 10px;
}
.scroll {
box-sizing: border-box;
height: 100%;
overflow-y: auto;
}
</style>
This diff is collapsed.
...@@ -25,10 +25,10 @@ import { useInfoChange } from '../store/index' ...@@ -25,10 +25,10 @@ import { useInfoChange } from '../store/index'
const infoChangeStore = useInfoChange() const infoChangeStore = useInfoChange()
const refreshing = $ref(false); let refreshing = $ref(false);
const finished = $ref(true); const finished = $ref(true);
const infos = $ref([]) let infos = $ref([])
let queryList = async () => { let queryList = async () => {
refreshing = true refreshing = true
...@@ -54,7 +54,7 @@ const onRefresh = () => { ...@@ -54,7 +54,7 @@ const onRefresh = () => {
const loadApproval = () => { const loadApproval = () => {
queryList() queryList()
} };
const router = useRouter(); const router = useRouter();
...@@ -69,20 +69,23 @@ const getDetail = async (item) => { ...@@ -69,20 +69,23 @@ const getDetail = async (item) => {
Toast.fail('获取信息详情失败') Toast.fail('获取信息详情失败')
return {} return {}
} }
} };
const jump = async (item) => { const jump = async (item) => {
// 申请中/审批通过时申请页面为只读 // 申请中/审批通过时申请页面为只读
// 审批退回时可再次维护并重新提交 // 审批退回时可再次维护并重新提交
if (item.reqStatus && item.reqStatus === 'RETURN') { if (item.reqStatus && item.reqStatus === 'RETURN') {
infoChangeStore.data = await getDetail(item) infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress) if (infoChangeStore.data.hlsBpMasterAddress)
router.push({ path: '/infochange/views/changeform', query: { isReturn: true } }) router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
} else if (item.reqStatus && item.reqStatus !== 'RETURN') { } else if (item.reqStatus && item.reqStatus !== 'RETURN') {
infoChangeStore.data = await getDetail(item) infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress) if (infoChangeStore.data.hlsBpMasterAddress)
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } }) router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
} else { } else {
infoChangeStore.data.bpObj = item;
router.push({ path: '/infochange/views/changeform', query: {} }) router.push({ path: '/infochange/views/changeform', query: {} })
} }
} }
......
...@@ -22,12 +22,13 @@ import { NavBar, Button, Field, Toast } from "vant"; ...@@ -22,12 +22,13 @@ import { NavBar, Button, Field, Toast } from "vant";
import AuForm from '@/components/AuForm.vue'; import AuForm from '@/components/AuForm.vue';
import AuFormClass from "@/components/useAuForm"; import AuFormClass from "@/components/useAuForm";
import { useLocation } from "@/utils/location" import { useLocation } from "@/utils/location"
import { phoneReg } from "@/utils/Reg" import { phoneReg, cellPhoneReg } from "@/utils/Reg"
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useIntention } from '../store/index' import { useIntention } from '../store/index'
import { unref } from "vue"; import { unref } from "vue";
import api from "../api"; import api from "../api";
import { areaList } from '@vant/area-data'; import { areaList } from '@vant/area-data';
import { currency } from "@/utils/textFormat";
const formStore = useIntention() const formStore = useIntention()
let location = useLocation() let location = useLocation()
...@@ -90,7 +91,7 @@ const formRaw = [ ...@@ -90,7 +91,7 @@ const formRaw = [
type: 'input', type: 'input',
value: '', value: '',
isRequired: true, isRequired: true,
reg: phoneReg reg: cellPhoneReg
}, },
{ {
title: '联系地址', title: '联系地址',
...@@ -134,7 +135,7 @@ const save = async () => { ...@@ -134,7 +135,7 @@ const save = async () => {
}, 2000); }, 2000);
} }
} else { } else {
Toast({ message: '请将信息填写完整', position: 'top' }); Toast({ message: '请正确填写完整信息', position: 'top' });
} }
}; };
...@@ -206,7 +207,7 @@ const handleAgent = async () => { ...@@ -206,7 +207,7 @@ const handleAgent = async () => {
let firstGoldRatio = formValueObj.firstGoldRatio; let firstGoldRatio = formValueObj.firstGoldRatio;
if(+firstGoldRatio > 0 && +financeAmount > 0){ if(+firstGoldRatio > 0 && +financeAmount > 0){
let firstGold = (financeAmount * firstGoldRatio).toFixed(2) let firstGold = (financeAmount * firstGoldRatio).toFixed(2)
formConfig.setFormValue("firstGold", "value", +firstGold) formConfig.setFormValue("firstGold", "value", currency(firstGold))
} }
}); });
getFormVal(); getFormVal();
......
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
</template> </template>
<script setup> <script setup>
import { Popup, NavBar, Field, Cell,RadioGroup, Radio,CellGroup, Button, NumberKeyboard, Dialog, PasswordInput } from 'vant'; import { Toast, Popup, NavBar, Field, Cell,RadioGroup, Radio,CellGroup, Button, NumberKeyboard, Dialog, PasswordInput } from 'vant';
import {ref, reactive} from "vue"; import {ref, watchEffect, reactive} from "vue";
import { pay } from '@/utils/pay'; import { pay } from '@/utils/pay';
import api from "../api"; import api from "../api";
import { Base } from '@hips/plugin-vue-jssdk'; import { Base } from '@hips/plugin-vue-jssdk';
...@@ -135,15 +135,18 @@ const emit = defineEmits(['payMoneyClick', 'closePage']) ...@@ -135,15 +135,18 @@ const emit = defineEmits(['payMoneyClick', 'closePage'])
// }); // });
const showDialog = ref(false); const showDialog = ref(false);
const show = ref(false); const show = ref(false);
const checked = ref(null); const checked = ref('ALI_PAY');
const orderAmount = ref(props.payInfoObj.payAmount); const orderAmount = ref();
const showModeFlag = ref(true); const showModeFlag = ref(true);
const password = ref([]); const password = ref([]);
const showKeyboard = ref(true); const showKeyboard = ref(true);
const checkArray = {UNION_PAY:'云闪付(银行卡)',WECHAT_PAY:'微信支付',ALI_PAY:'支付宝'}; const checkArray = {UNION_PAY:'云闪付(银行卡)',WECHAT_PAY:'微信支付',ALI_PAY:'支付宝'};
watchEffect(() => {
orderAmount.value = props.payInfoObj.payAmount
})
const cancel = () => { const cancel = () => {
console.log('canecel')
emit('closePage', false); emit('closePage', false);
} }
...@@ -166,17 +169,22 @@ const payMoney = () => { ...@@ -166,17 +169,22 @@ const payMoney = () => {
// // on close // // on close
// }); // });
// emit('closePage', false); // emit('closePage', false);
if(!checked.value){
const info = { Toast.fail('请先选择支付方式!')
// payAmount: orderAmount.value,
payAmount: '0.01',
payType: checked.value,
cashflowId: props.payInfoObj.cashflowId
} }
console.log(info) else if(+orderAmount <= 0 || +orderAmount > +props.payInfoObj.payAmount){
//emit('payMoneyClick', info); Toast.fail('请输入正确的支付金额!')
goPayApp(info) } else {
} const info = {
// payAmount: orderAmount.value,
payAmount: '0.01',
payType: checked.value,
cashflowId: props.payInfoObj.cashflowId
}
//emit('payMoneyClick', info);
goPayApp(info)
}
};
const goPayApp = async (param) => { const goPayApp = async (param) => {
// 下拉重置参数,重新加载 // 下拉重置参数,重新加载
...@@ -215,12 +223,20 @@ const handleFinishAmount = () => { ...@@ -215,12 +223,20 @@ const handleFinishAmount = () => {
.van-cell { .van-cell {
width: 75%; width: 75%;
margin-left: 50px; margin-left: 50px;
padding: 10px;
}
.pay-money-content{
display: flex;
width: 100%;
} }
.pay-money-update{ .pay-money-update{
float: left; /*float: left;*/
margin-top: -40px; /*margin-top: -40px;*/
margin-right: 15px; /*margin-right: 15px;*/
color: #1989fa; color: #1989fa;
margin-top: 15px;
height: 40px;
line-height: 40px;
} }
.van-cell-mode { .van-cell-mode {
position: relative; position: relative;
...@@ -276,6 +292,8 @@ const handleFinishAmount = () => { ...@@ -276,6 +292,8 @@ const handleFinishAmount = () => {
border: 1px solid antiquewhite; border: 1px solid antiquewhite;
background: antiquewhite; background: antiquewhite;
height: 40px; height: 40px;
line-height: 40px;
padding-left: 5px;
} }
:deep(.van-password-input__security){ :deep(.van-password-input__security){
width: 90%; width: 90%;
......
...@@ -7,13 +7,3 @@ export const useMakeRepayment = defineStore('makeRepaymentStore', () => { ...@@ -7,13 +7,3 @@ export const useMakeRepayment = defineStore('makeRepaymentStore', () => {
const contractId = ref('') const contractId = ref('')
return { makeRepayPlanData, contractId } return { makeRepayPlanData, contractId }
}) })
// export const useCounterStore = defineStore('counter', () => {
// const count = ref(0)
// const doubleCount = computed(() => count.value * 2)
// function increment() {
// count.value++
// }
//
// return { count, doubleCount, increment }
// })
...@@ -25,6 +25,7 @@ import ListItem from '@/components/ListItem.vue' ...@@ -25,6 +25,7 @@ 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' import { useMakeRepayment } from '../store/index'
import {currency} from '@/utils/textFormat'
const makeRepaymentStore = useMakeRepayment() const makeRepaymentStore = useMakeRepayment()
...@@ -43,7 +44,7 @@ const getList = async () => { ...@@ -43,7 +44,7 @@ const getList = async () => {
...item, ...item,
title: item.contractNumber, title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0], other_title: item.applyDate?.split(' ')[0],
values: [["剩余应还金额", "状态", "融资金额"], [item.residueAmount, item.contractStatusN, item.financeAmount]] values: [["剩余应还金额", "状态", "融资金额"], [currency(item.residueAmount), item.contractStatusN, currency(item.financeAmount)]]
})) }))
}else { }else {
list = []; list = [];
......
<template> <template>
<NavBar title="违约金明细" left-arrow @click-left="goBack" /> <NavBar title="罚息明细" left-arrow @click-left="goBack" />
<Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo"> <Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo">
<CollapseItem :title="item.periods" :name="index+1" :value="item.amount"> <CollapseItem :title="item.periods" :name="index+1" :value="item.amount">
<CellGroup v-for="(k) of item.detail"> <CellGroup v-for="(k) of item.detail">
...@@ -13,44 +13,67 @@ ...@@ -13,44 +13,67 @@
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"; import api from "../api";
import {goBack} from '../../../utils/globalFun';
import { useMakeRepayment } from '../store/index';
import { currency } from "@/utils/textFormat";
const makeRepaymentStore = useMakeRepayment()
let damageDetailInfo = $ref([
// {
// periods: '第一期',
// amount: '4300.88',
// detail: [
// {
// name: '违约金1',
// debait: '2300',
// date: '2022-12-08',
// },
// {
// name: '违约金2',
// debait: '2300.88',
// date: '2022-12-08',
// }
// ]
// },
// {
// periods: '第二期',
// amount: '4300.88',
// detail: [
// {
// name: '违约金1',
// debait: '2300',
// date: '2022-12-08',
// },
// {
// name: '违约金2',
// debait: '2300.88',
// date: '2022-12-08',
// }
// ]
// }
]);
const damageDetailInfo = ref([
{
periods: '第一期',
amount: '4300.88',
detail: [
{
name: '违约金1',
debait: '2300',
date: '2022-12-08',
},
{
name: '违约金2',
debait: '2300.88',
date: '2022-12-08',
}
]
},
{
periods: '第二期',
amount: '4300.88',
detail: [
{
name: '违约金1',
debait: '2300',
date: '2022-12-08',
},
{
name: '违约金2',
debait: '2300.88',
date: '2022-12-08',
}
]
}
])
const activeNames = ref([]); const activeNames = ref([]);
const getDailyLiquidatedDetail = async () => {
const res = await api.getLiquidatedDetail({"contractId": makeRepaymentStore.contractId})
if(res.success){
damageDetailInfo = res.rows.map(items => ({
...items,
periods: `第${items.times}期`,
amount: currency(items.dueAmount),
detail: items.file.map(item => ({
...item,
name: `罚息`,
debait: currency(item.dueAmount),
date: item.creationDate?.split(' ')[0]
}))
}))
} else {
Toast.fail('请求失败,请联系管理员!');
}
};
getDailyLiquidatedDetail();
</script> </script>
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" 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="repay_content" v-for="(item, index) in cashflow">
<div class="times-box" v-for="i in currencyObj.times"> <div class="left">
<div class="times">{{ i }}</div> <div class="times-box">
<div class="times">{{ item.times }}</div>
</div>
</div>
<div class="right">
<div class="item">
<div class="left-item">
<span>{{ item.cfItemN }}</span>
<span>{{ item.dueDate}}</span>
</div>
<div class="center-item">
<p>
<span>应付</span>
<span>{{ currency(item.dueAmount) }}</span>
</p>
<p>
<span>待付</span>
<span>{{ currency(item.obligation) }}</span>
</p>
</div>
<div class="right-item">
<span></span>
<span class="flag-button paid" v-if="item.writeOffFlag == 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span v-else-if="checkCashflow(item,index)" class="flag-button payment" @click="handleClick(item)">
支付
</span>
<span v-else class="flag-button paying">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
</div>
</div>
</div>
</div> </div>
</div>
<div class="right">
<div class="item" v-for="item in cashflow">
<div class="left-item">
<span>租金</span>
<span>{{item.chargeDueDate}}</span>
</div>
<div class="center-item">
<p>
<span>应付金额</span>
<span>{{item.dueAmount}}</span>
</p>
<p>
<span>待付金额</span>
<span>{{item.obligation}}</span>
</p>
</div>
<div class="right-item">
<span></span>
<span class="flag-button payment" @click="handleClick(item)">
支付
</span>
</div>
</div>
</div>
</div> </div>
<Pay :visible="showModal" :payInfoObj="payInfo" @payMoneyClick="pay" @closePage="handleColse"/> <Pay :visible="showModal" :payInfoObj="payInfo" @payMoneyClick="pay" @closePage="handleColse"/>
<!-- <Dialog v-model:show="showDialog" title="标题" show-cancel-button z-index="2022">-->
<!-- <div>jhahha</div>-->
<!-- &lt;!&ndash; <img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg" />&ndash;&gt;-->
<!-- </Dialog>-->
</template> </template>
<template #footer> <template #footer>
</template> </template>
</RepayPlan> </RepayPlan>
</template> </template>
...@@ -52,25 +55,14 @@ import {goBack} from '../../../utils/globalFun'; ...@@ -52,25 +55,14 @@ 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' import { useMakeRepayment } from '../store/index';
import { currency } from "@/utils/textFormat";
const makeRepaymentStore = useMakeRepayment() const makeRepaymentStore = useMakeRepayment()
const showDialog = ref(false); const showDialog = ref(false);
let currencyObj = $ref({ let currencyObj = $ref()
financingCurrency: '200,000.00', let cashflow = []
headerCurrency: '5,000.00', let payInfo = $ref({});
fristCurrency: '10,000.00',
times: '12'
})
let cashflow = [
{
chargeDueDate: '2022-12-28',
dueAmount: '2000',
obligation: '3200',
}
]
let payInfo = ref({});
let showModal = ref(false); let showModal = ref(false);
const route = useRoute() const route = useRoute()
...@@ -98,26 +90,36 @@ const goDamagesDetail = () => { ...@@ -98,26 +90,36 @@ const goDamagesDetail = () => {
const getRepayPlanInfo = async () => { const getRepayPlanInfo = async () => {
const result = await api.getRepayPlanDetail({"contractId": makeRepaymentStore.contractId}) const result = await api.getRepayPlanDetail({"contractId": makeRepaymentStore.contractId})
if(result.message === '请求成功'){ if(result.success){
const rows = result.rows[0]; const rows = result.rows[0];
currencyObj = { currencyObj = {
financingCurrency: rows.financeAmount, financingCurrency: currency(rows.financeAmount),
headerCurrency: rows.firstGold, headerCurrency: currency(rows.firstGold),
fristCurrency: rows.firstRentGold, fristCurrency: currency(rows.firstRental),
times: rows.cashflow.length times: rows.leaseTerm
} }
rows.cashflow = rows.cashflow.map(item => { item.calcDate = item.calcDate?.split(" ")[0]; return item }) rows.cashflow = rows.cashflow.map(item => { item.dueDate = item.dueDate?.split(" ")[0]; return item })
cashflow = rows.cashflow cashflow = rows.cashflow
console.log(cashflow);
} }
} }
getRepayPlanInfo() getRepayPlanInfo();
const checkCashflow = (listItem, curIndex) => {
const getLiquidatedDamagesInfo = async () => { // cashflow.find((item, index)=>{
const result = await api.getLiquidatedDetail({contractId: makeRepaymentStore.contractId}) //
// })
for(var i = 0; i< curIndex; i++) {
if(cashflow[i].writeOffFlag != 'FULL'){
return false
}
}
// cashflow.forEach((item,index) => {
// if(item.writeOffFlag != 'FULL'){
// return false
// }
// })
return true
} }
getLiquidatedDamagesInfo()
</script> </script>
...@@ -125,7 +127,7 @@ getLiquidatedDamagesInfo() ...@@ -125,7 +127,7 @@ getLiquidatedDamagesInfo()
@lineColr: #dcdddf; @lineColr: #dcdddf;
.repay_list { .repay_list {
display: flex; /*display: flex;*/
width: 100%; width: 100%;
height: 98%; height: 98%;
overflow-y: auto; overflow-y: auto;
...@@ -138,6 +140,11 @@ getLiquidatedDamagesInfo() ...@@ -138,6 +140,11 @@ getLiquidatedDamagesInfo()
/* Chrome Safari */ /* Chrome Safari */
} }
.repay_content {
display: flex;
width: 100%;
}
@leftW: 45px; @leftW: 45px;
.left { .left {
...@@ -160,7 +167,7 @@ getLiquidatedDamagesInfo() ...@@ -160,7 +167,7 @@ getLiquidatedDamagesInfo()
.times-box:nth-child(1) { .times-box:nth-child(1) {
margin-top: 25px; /*margin-top: 25px;*/
height: 70px; height: 70px;
justify-content: flex-start; justify-content: flex-start;
} }
...@@ -265,6 +272,7 @@ getLiquidatedDamagesInfo() ...@@ -265,6 +272,7 @@ getLiquidatedDamagesInfo()
height: 40%; height: 40%;
border-radius: 10px; border-radius: 10px;
font-size: 12px; font-size: 12px;
margin-top: 15px;
} }
.overtime { .overtime {
......
...@@ -28,13 +28,6 @@ import { useRouter } from "vue-router"; ...@@ -28,13 +28,6 @@ import { useRouter } from "vue-router";
import { useProjectList } from "../store"; import { useProjectList } from "../store";
const formStore = useProjectList() const formStore = useProjectList()
// const listValue = $ref([
// {
// title: '2204-DB001-001',
// other_title: "2022-07-18",
// values: [["机型", "状态", "代理店"], ["HB2015-1MO", "正常", "江苏-宁隆"]]
// }
// ])
let refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
...@@ -56,7 +49,7 @@ const getList = async (param) => { ...@@ -56,7 +49,7 @@ const getList = async (param) => {
list = res.rows.map(item => ({ list = res.rows.map(item => ({
...item, ...item,
title: item.itemProjectNumber, title: item.itemProjectNumber,
other_title: item.creationDate?.split(' ')[0], other_title: item.applyDate?.split(' ')[0],
values: [["机型", "状态", "代理店"], [item.model, item.contractStatusN, item.agencyBpName]] values: [["机型", "状态", "代理店"], [item.model, item.contractStatusN, item.agencyBpName]]
})) }))
}else { }else {
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @leftClick="backToLast"> <RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="backToLast">
<template #list> <template #list>
<div class="repay_list"> <div class="repay_list">
<div class="left"> <div class="repay_content" v-for="item in cashflow">
<div class="times-box" v-for="i in currencyObj.times"> <div class="left">
<div class="times">{{ i }}</div> <div class="times-box">
</div> <div class="times">{{ item.times }}</div>
</div>
<div class="right">
<div class="item" v-for="item in cashflow">
<div class="left-item">
<span>租金</span>
<!-- <span>{{ item.chargeDueDate}}</span> 这个是实际字段-->
<span>{{ item.calcDate}}</span>
</div> </div>
<div class="center-item"> </div>
<p> <div class="right">
<!-- <span>应付金额</span>--> <div class="item">
<span>{{item.dueAmount}}</span> <div class="left-item">
</p> <span>{{ item.cfItemN }}</span>
<p> <span>{{ item.dueDate}}</span>
<!-- <span>待付金额</span>--> </div>
<!-- <span>¥0.00</span>--> <div class="center-item">
</p> <p>
</div> <span>应付</span>
<div class="right-item"> <span>{{ currency(item.dueAmount) }}</span>
<span>明细</span> </p>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'"> <p>
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}} <span>待付</span>
</span> <span>{{ currency(item.obligation) }}</span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'"> </p>
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}} </div>
</span> <div class="right-item">
<span class="flag-button overtime" v-else> <span></span>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}} <span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'">
</span> <Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button overtime" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}}
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -52,31 +53,25 @@ import { Icon } from 'vant' ...@@ -52,31 +53,25 @@ import { Icon } from 'vant'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import api from "../api"; import api from "../api";
import { useProjectList } from "../store"; import { useProjectList } from "../store";
import { currency } from "@/utils/textFormat"
const router = useRouter() const router = useRouter()
const formStore = useProjectList() const formStore = useProjectList()
let currencyObj = $ref({ let currencyObj = $ref({})
// financingCurrency: '200,000.00',
// headerCurrency: '5,000.00',
// fristCurrency: '10,000.00',
// times: '12'
})
let cashflow = [] let cashflow = []
const getRepayPlanInfo = async () => { const getRepayPlanInfo = async () => {
// "contractId": "777"
const result = await api.getRepaymentDetails({"contractId": formStore.contractId}) const result = await api.getRepaymentDetails({"contractId": formStore.contractId})
if(result.message === '请求成功'){ if(result.success){
const rows = result.rows[0]; const rows = result.rows[0];
currencyObj = { currencyObj = {
financingCurrency: rows.financeAmount, financingCurrency: currency(rows.financeAmount),
headerCurrency: rows.firstGold, headerCurrency: currency(rows.firstGold),
fristCurrency: rows.firstRentGold, fristCurrency: currency(rows.firstRental),
times: rows.cashflow.length times: rows.leaseTerm
} }
rows.cashflow = rows.cashflow.map(item => { item.calcDate = item.calcDate?.split(" ")[0]; return item }) rows.cashflow = rows.cashflow.map(item => { item.dueDate = item.dueDate?.split(" ")[0]; return item })
cashflow = rows.cashflow cashflow = rows.cashflow
console.log(cashflow);
} }
} }
getRepayPlanInfo() getRepayPlanInfo()
...@@ -92,7 +87,7 @@ const backToLast = () => { ...@@ -92,7 +87,7 @@ const backToLast = () => {
@lineColr: #dcdddf; @lineColr: #dcdddf;
.repay_list { .repay_list {
display: flex; /*display: flex;*/
width: 100%; width: 100%;
height: 98%; height: 98%;
overflow-y: auto; overflow-y: auto;
...@@ -104,6 +99,10 @@ const backToLast = () => { ...@@ -104,6 +99,10 @@ const backToLast = () => {
display: none; display: none;
/* Chrome Safari */ /* Chrome Safari */
} }
.repay_content {
display: flex;
width: 100%;
}
@leftW: 45px; @leftW: 45px;
...@@ -127,7 +126,7 @@ const backToLast = () => { ...@@ -127,7 +126,7 @@ const backToLast = () => {
.times-box:nth-child(1) { .times-box:nth-child(1) {
margin-top: 25px; /*margin-top: 25px;*/
height: 70px; height: 70px;
justify-content: flex-start; justify-content: flex-start;
} }
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<AuForm v-model="formBillingInfoConfig" :key="form" moduleName="开票信息"/> <AuForm v-model="formBillingInfoConfig" :key="form" moduleName="开票信息"/>
<AuForm v-model="formleaseInfoConfig" :key="form" moduleName="租赁物信息"/> <AuForm v-model="formleaseInfoConfig" :key="form" moduleName="租赁物信息"/>
<Cell title="还款计划" is-link class="cell-title" @click="gotoRepayPlan"/> <Cell title="还款计划" is-link class="cell-title" @click="gotoRepayPlan"/>
<!-- to="/repayplan/views/plan"/-->
</section> </section>
</div> </div>
</div> </div>
...@@ -49,7 +48,7 @@ const formBaseConfigArr = [ ...@@ -49,7 +48,7 @@ const formBaseConfigArr = [
}, },
{ {
title: '代理店', title: '代理店',
propName: 'decryptAgencyBpName', propName: 'agencyBpName',
type: 'input', type: 'input',
value: '', value: '',
isRequired: false, isRequired: false,
...@@ -73,7 +72,7 @@ const formBaseConfigArr = [ ...@@ -73,7 +72,7 @@ const formBaseConfigArr = [
}, },
{ {
title: '物件属性', title: '物件属性',
propName: 'leaseProperties', propName: 'leasePropertiesN',
type: 'input', type: 'input',
value: '', value: '',
isRequired: false, isRequired: false,
...@@ -107,7 +106,7 @@ const formBaseConfigArr = [ ...@@ -107,7 +106,7 @@ const formBaseConfigArr = [
const formBillingInfoArr = [ const formBillingInfoArr = [
{ {
title: '纳税人类型', title: '纳税人类型',
propName: 'taxpayerType', propName: 'taxpayerTypeN',
type: 'input', type: 'input',
value: '', value: '',
isRequired: false, isRequired: false,
...@@ -173,20 +172,20 @@ const formleaseInfoArr = [ ...@@ -173,20 +172,20 @@ const formleaseInfoArr = [
}, },
{ {
title: '测算方式', title: '测算方式',
propName: 'calculationMethod', propName: 'calculationMethodN',
type: 'input', type: 'input',
value: '', value: '',
isRequired: false, isRequired: false,
disabled: true, disabled: true,
}, },
{ // {
title: '租赁物分类', // title: '租赁物分类',
propName: 'leaseTypeN', // propName: 'leaseTypeN',
type: 'input', // type: 'input',
value: '', // value: '',
isRequired: false, // isRequired: false,
disabled: true // disabled: true
}, // },
{ {
title: '物件名称', title: '物件名称',
propName: 'fullName', propName: 'fullName',
...@@ -214,76 +213,20 @@ const formleaseInfoArr = [ ...@@ -214,76 +213,20 @@ const formleaseInfoArr = [
{ {
title: '物件价格', title: '物件价格',
propName: 'leaseValue', propName: 'leaseValue',
type: 'input', type: 'currency',
value: '', value: '',
isRequired: false, isRequired: false,
disabled: true disabled: true
} }
] ];
const form = $ref(); const form = $ref();
let listArr = $ref([ let listArr = $ref([]);
// { const formBaseConfig = $ref(new AuFormClass(formBaseConfigArr));
// sortId: '序号', const formBillingInfoConfig = $ref(new AuFormClass(formBillingInfoArr));
// bpName: '担保方名称' const formleaseInfoConfig = $ref(new AuFormClass(formleaseInfoArr));
// }, let contractId = $ref(formStore.contractId);
// {
// sortId: 1,
// bpName: '李某某'
// },
// {
// sortId: 2,
// bpName: '担保人2'
// },
])
const formBaseConfig = $ref(new AuFormClass(formBaseConfigArr))
const formGuarantorConfig = $ref(new AuFormClass([
{
title: '纳税人类别',
propName: 'paymentReqDate',
type: 'input',
value: '啊哈哈哈',
isRequired: false,
disabled: true,
},
{
title: '纳税人识别',
propName: 'paymentReqDat3e',
type: 'input',
value: '1000',
isRequired: false,
disabled: true,
},
{
title: '发票抬头',
propName: 'paymentReqDat3e',
type: 'input',
value: '23456567X',
isRequired: false,
disabled: true
},
{
title: '发票电话',
propName: 'paymentReqDat3e',
type: 'input',
value: '',
isRequired: false,
disabled: true
},
{
title: '发票地址',
propName: 'paymentReqDat3e',
type: 'input',
value: '',
isRequired: false,
disabled: true
},
]))
const formBillingInfoConfig = $ref(new AuFormClass(formBillingInfoArr))
const formleaseInfoConfig = $ref(new AuFormClass(formleaseInfoArr))
let contractId = $ref(null);
const projectInfoDetail = async () => { const projectInfoDetail = async () => {
console.log('url', formStore.contractId);
let result = await api.getProjectDetail({"contractId": formStore.contractId}); let result = await api.getProjectDetail({"contractId": formStore.contractId});
if(result.success) { if(result.success) {
let rows = result.rows; let rows = result.rows;
...@@ -311,7 +254,6 @@ const projectInfoDetail = async () => { ...@@ -311,7 +254,6 @@ const projectInfoDetail = async () => {
bpName: '担保方名称' bpName: '担保方名称'
}) })
} }
if(rows[0]?.billingInformationList.length !== 0){ if(rows[0]?.billingInformationList.length !== 0){
billingInfo = rows[0].billingInformationList[0]; billingInfo = rows[0].billingInformationList[0];
formBillingInfoConfig.replace(formBillingInfoArr.map(item => { formBillingInfoConfig.replace(formBillingInfoArr.map(item => {
...@@ -319,7 +261,6 @@ const projectInfoDetail = async () => { ...@@ -319,7 +261,6 @@ const projectInfoDetail = async () => {
return item return item
})) }))
} }
if(rows[0]?.leaseInformationList.length !== 0){ if(rows[0]?.leaseInformationList.length !== 0){
leaseInfo = rows[0].leaseInformationList[0] leaseInfo = rows[0].leaseInformationList[0]
formleaseInfoConfig.replace(formleaseInfoArr.map(item => { formleaseInfoConfig.replace(formleaseInfoArr.map(item => {
...@@ -327,9 +268,7 @@ const projectInfoDetail = async () => { ...@@ -327,9 +268,7 @@ const projectInfoDetail = async () => {
return item return item
})) }))
} }
} }
}; };
projectInfoDetail(); projectInfoDetail();
......
...@@ -40,7 +40,7 @@ const queryList = async () => { ...@@ -40,7 +40,7 @@ const queryList = async () => {
refreshing = true refreshing = true
let res = await api.contractQueryAll({ receivets: + new Date() + '', ...pager }) let res = await api.contractQueryAll({ receivets: + new Date() + '', ...pager })
if (res.success && res.total > 0) { if (res.success && res.rows.length > 0) {
res.rows.forEach(item => { res.rows.forEach(item => {
let temp = { let temp = {
...item, ...item,
......
...@@ -71,7 +71,7 @@ const secondFormConfig = $ref({}) ...@@ -71,7 +71,7 @@ const secondFormConfig = $ref({})
const lastFormConfig = $ref(new AuFormClass([ const lastFormConfig = $ref(new AuFormClass([
{ {
title: '项目编号', title: '项目编号',
propName: 'contractId', propName: 'contractNumber',
type: 'input', type: 'input',
value: '', value: '',
isRequired: true, isRequired: true,
...@@ -79,7 +79,7 @@ const lastFormConfig = $ref(new AuFormClass([ ...@@ -79,7 +79,7 @@ const lastFormConfig = $ref(new AuFormClass([
}, },
{ {
title: '机型', title: '机型',
propName: 'machineNumber', propName: 'model',
type: 'input', type: 'input',
value: '', value: '',
isRequired: true, isRequired: true,
...@@ -103,7 +103,7 @@ const lastFormConfig = $ref(new AuFormClass([ ...@@ -103,7 +103,7 @@ const lastFormConfig = $ref(new AuFormClass([
}, },
{ {
title: '代理店名称', title: '代理店名称',
propName: 'agencyBpName', propName: 'agencyName',
type: 'input', type: 'input',
value: '', value: '',
isRequired: true, isRequired: true,
...@@ -137,8 +137,8 @@ let checkPrj = async () => { ...@@ -137,8 +137,8 @@ let checkPrj = async () => {
let res = await api.contractQuery({ ...firstFormConfig.getValues(), receivets: + new Date() + '' }) let res = await api.contractQuery({ ...firstFormConfig.getValues(), receivets: + new Date() + '' })
if (res.success && res.total > 0) { if (res.success && res.total > 0) {
lastFormConfig.fillValues(res.rows[0]) lastFormConfig.fillValues(res.rows[0])
if(!res.rows[0].contractId) return false if(!res.rows[0].projectLeaseItemId) return false
shouldSaveContractId = res.rows[0].contractId shouldSaveContractId = res.rows[0].projectLeaseItemId
return true return true
} else { } else {
Toast.fail('未找到该项目') Toast.fail('未找到该项目')
...@@ -155,7 +155,7 @@ let queryContractInfo = async () => { ...@@ -155,7 +155,7 @@ let queryContractInfo = async () => {
if (res.success && res.total > 0) { if (res.success && res.total > 0) {
lastFormConfig.fillValues(res.rows[0]) lastFormConfig.fillValues(res.rows[0])
shouldSaveContractId = res.rows[0].contractId shouldSaveContractId = res.rows[0].projectLeaseItemId
} else { } else {
Toast.fail('未找到该项目') Toast.fail('未找到该项目')
} }
...@@ -169,7 +169,7 @@ const nextStep = async () => { ...@@ -169,7 +169,7 @@ const nextStep = async () => {
step++ step++
}else { }else {
Toast.fail('未查询到该关联项目') Toast.fail('未查询到该关联项目')
}; }
} else if (step === 2 && secondFormConfig.sms && secondFormConfig.tel) { } else if (step === 2 && secondFormConfig.sms && secondFormConfig.tel) {
if (checkSms()) { if (checkSms()) {
queryContractInfo() queryContractInfo()
...@@ -183,12 +183,15 @@ let buttonValues = $ref('获取验证码') ...@@ -183,12 +183,15 @@ let buttonValues = $ref('获取验证码')
const getSms = async () => { const getSms = async () => {
if (phoneReg.test(secondFormConfig.tel)) { if (phoneReg.test(secondFormConfig.tel)) {
let res = await api.phoneValid({ let res = await api.phoneValid({
contractId: shouldSaveContractId, projectLeaseItemId: shouldSaveContractId.toString(),
phone: secondFormConfig.tel, phone: secondFormConfig.tel,
receivets: + new Date() + '' receivets: + new Date() + ''
}) })
if (res.success) { if (res.success && res.rows[0]) {
Toast.success('短信发送成功,请注意查收!')
CountDown() CountDown()
} else {
Toast.fail("短信验证码发送失败!")
} }
} else { } else {
Toast.fail("请将手机号输入正确") Toast.fail("请将手机号输入正确")
...@@ -218,18 +221,17 @@ const lastStep = () => { ...@@ -218,18 +221,17 @@ const lastStep = () => {
const router = useRouter() const router = useRouter()
const submit = async () => { const submit = async () => {
let res = await api.contractBind({ let res = await api.contractBind({
contractId: shouldSaveContractId, projectLeaseItemId: shouldSaveContractId.toString(),
receivets: + new Date() + '' receivets: + new Date() + ''
}) })
if (res.success && res.total > 0 && res.rows[0]?.associationId) { if (res.success && res.total > 0 && res.rows[0]?.associationId) {
Toast.success('绑定成功') Toast.success('绑定成功')
setTimeout(() => { setTimeout(() => {
goBack() goBack()
}, 1000); }, 1000);
} else { } else {
Toast.fail('绑定失败,请稍后重试。') let message = res.message?res.message:'绑定失败,请稍后重试!'
Toast.fail(message)
} }
} }
</script> </script>
......
...@@ -4,6 +4,6 @@ import { defineStore } from 'pinia' ...@@ -4,6 +4,6 @@ import { defineStore } from 'pinia'
export const useIntention = defineStore('formStore', () => { export const useIntention = defineStore('formStore', () => {
const repayPlanData = ref({}) const repayPlanData = ref({})
const contractId = ref('')
return { repayPlanData } return { repayPlanData, contractId }
}) })
<template> <template>
<div class="container"> <div class="container">
<NavBar title="还款计划" left-arrow @click-left="goBack" /> <NavBar title="还款计划查询" left-arrow @click-left="goBack" />
<section class="list"> <section class="list">
<Search v-model="searchVal" placeholder="请输入项目编号/融资金额" /> <Search v-model="searchVal" placeholder="请输入项目编号/融资金额" />
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<PullRefresh v-model="refreshing" @refresh="getList" 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(item)" />
</List> </List>
</PullRefresh> </PullRefresh>
</section> </section>
...@@ -25,21 +25,11 @@ import ListItem from '@/components/ListItem.vue' ...@@ -25,21 +25,11 @@ 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 {currency} from '@/utils/textFormat' import {currency} from '@/utils/textFormat'
import { useIntention } from "../store";
const searchVal = $ref(''); const searchVal = $ref('');
const formStore = useIntention();
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);
...@@ -53,7 +43,7 @@ const getList = async () => { ...@@ -53,7 +43,7 @@ const getList = async () => {
...item, ...item,
title: item.contractNumber, title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0], other_title: item.applyDate?.split(' ')[0],
values: [["剩余应还金额", "状态", "融资金额"], [currency(item.residueAmount),item.contractStatusN, currency(item.financeAmount)]] values: [["剩余应还金额", "合同状态", "融资金额"], [currency(item.residueAmount),item.contractStatusN, currency(item.financeAmount)]]
})) }))
}else { }else {
list = []; list = [];
...@@ -65,12 +55,12 @@ const getList = async () => { ...@@ -65,12 +55,12 @@ const getList = async () => {
getList(); getList();
const loadApproval = () => { const loadApproval = () => {
} }
const router = useRouter(); const router = useRouter();
const jump = () => { const jump = (item) => {
formStore.contractId = item.contractId;
router.push({ name: 'repayPlan-views-plan' }) router.push({ name: 'repayPlan-views-plan' })
} }
</script> </script>
......
...@@ -2,34 +2,42 @@ ...@@ -2,34 +2,42 @@
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" > <RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" >
<template #list> <template #list>
<div class="repay_list"> <div class="repay_list">
<div class="left"> <div class="repay_content" v-for="item in cashflow">
<div class="times-box" v-for="i in currencyObj.times"> <div class="left">
<div class="times">{{ i }}</div> <div class="times-box">
</div> <div class="times">{{ item.times }}</div>
</div> </div>
<div class="right">
<div class="item" v-for="item in cashflow">
<div class="left-item">
<span>租金</span>
<span>{{ item.chargeDueDate}}</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>
<div class="right-item"> <div class="right">
<span>明细</span> <div class="item">
<span class="flag-button overtime"> <div class="left-item">
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}} <span>{{ item.cfItemN }}</span>
</span> <span>{{ item.dueDate}}</span>
</div>
<div class="center-item">
<p>
<span>应付</span>
<span>{{ currency(item.dueAmount) }}</span>
</p>
<p>
<span>待付</span>
<span>{{ currency(item.obligation) }}</span>
</p>
</div>
<div class="right-item">
<span>明细</span>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button overtime" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}}
</span>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -45,31 +53,26 @@ import { goBack } from "@/utils/globalFun" ...@@ -45,31 +53,26 @@ import { goBack } from "@/utils/globalFun"
import { Icon } from 'vant' import { Icon } from 'vant'
import {useRoute} from 'vue-router' import {useRoute} from 'vue-router'
import api from "../api"; import api from "../api";
import { currency } from "@/utils/textFormat"
import { useIntention } from "../store";
const formStore = useIntention()
let currencyObj = $ref({ let currencyObj = $ref({})
// financingCurrency: '200,000.00',
// headerCurrency: '5,000.00',
// fristCurrency: '10,000.00',
// times: '12'
})
let cashflow = [] let cashflow = []
//writeOffFlag: "NOT"
// writeOffFlagN: "待付"
const getRepayPlanInfo = async () => { const getRepayPlanInfo = async () => {
const result = await api.getRepaymentDetails({"contractId": "777"}) const result = await api.getRepaymentDetails({"contractId": formStore.contractId})
if(result.message === '请求成功'){ if(result.message === '请求成功'){
const rows = result.rows[0]; const rows = result.rows[0];
currencyObj = { currencyObj = {
financingCurrency: rows.financeAmount, financingCurrency: currency(rows.financeAmount),
headerCurrency: rows.firstGold, headerCurrency: currency(rows.firstGold),
fristCurrency: rows.firstRentGold, fristCurrency: currency(rows.firstRental),
times: rows.cashflow.length times: rows.leaseTerm
} }
// rows.cashflow = rows.cashflow.map(item => { item.chargeDueDate = item.chargeDueDate.split(" ")[0]; return item }) rows.cashflow = rows.cashflow.map(item => { item.dueDate = item.dueDate.split(" ")[0]; return item })
cashflow = rows.cashflow cashflow = rows.cashflow
console.log(cashflow);
} }
} }
getRepayPlanInfo() getRepayPlanInfo()
...@@ -79,7 +82,7 @@ getRepayPlanInfo() ...@@ -79,7 +82,7 @@ getRepayPlanInfo()
@lineColr: #dcdddf; @lineColr: #dcdddf;
.repay_list { .repay_list {
display: flex; /*display: flex;*/
width: 100%; width: 100%;
height: 98%; height: 98%;
overflow-y: auto; overflow-y: auto;
...@@ -91,6 +94,10 @@ getRepayPlanInfo() ...@@ -91,6 +94,10 @@ getRepayPlanInfo()
display: none; display: none;
/* Chrome Safari */ /* Chrome Safari */
} }
.repay_content {
display: flex;
width: 100%;
}
@leftW: 45px; @leftW: 45px;
...@@ -114,7 +121,7 @@ getRepayPlanInfo() ...@@ -114,7 +121,7 @@ getRepayPlanInfo()
.times-box:nth-child(1) { .times-box:nth-child(1) {
margin-top: 25px; // margin-top: 25px;
height: 70px; height: 70px;
justify-content: flex-start; justify-content: flex-start;
} }
...@@ -219,6 +226,7 @@ getRepayPlanInfo() ...@@ -219,6 +226,7 @@ getRepayPlanInfo()
height: 40%; height: 40%;
border-radius: 10px; border-radius: 10px;
font-size: 12px; font-size: 12px;
/*margin-top: 15px;*/
} }
.overtime { .overtime {
......
let phoneReg = /^1[3-9]\d{9}$/ let phoneReg = /^1[3-9]\d{9}$/
let cellReg = /^(0\d{2,3})-?(\d{7,8})$/
let cellPhoneReg = /^(1[3-9]\d{9})|(0\d{2,3})-?(\d{7,8})$/
// 带 400 的电话
// let cellPhoneReg = /^([^0-9](0[0-9]{2,3}\-[2-9][0-9]{6,7}|1[3-9][0-9]{9}|400-[0-9]{3}-[0-9]{4})[^0-9])$/
let idCardReg = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/ let idCardReg = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
//社会信用代码校验 //社会信用代码校验
let creditCodeReg = /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/ let creditCodeReg = /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/
//校验身份证信息
function IdentityCodeValid(code) {
var city = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江 ",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北 ",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏 ",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外 "
};
var tip = "";
var pass = true;
if (!code || !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(code)) {
tip = "身份证号格式错误";
pass = false;
} else if (!city[code.substr(0, 2)]) {
tip = "地址编码错误";
pass = false;
} else {
//18位身份证需要验证最后一位校验位
if (code.length == 18) {
code = code.split('');
//∑(ai×Wi)(mod 11)
//加权因子
var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
//校验位
var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
var sum = 0;
var ai = 0;
var wi = 0;
for (var i = 0; i < 17; i++) {
ai = code[i];
wi = factor[i];
sum += ai * wi;
}
var last = parity[sum % 11];
if (parity[sum % 11] != code[17]) {
tip = "校验位错误";
pass = false;
}
}
}
return pass
}
let emailReg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
let zipcodeReg = /^[0-9]{6}$/;
export { export {
phoneReg, phoneReg,
cellReg,
cellPhoneReg,
idCardReg, idCardReg,
creditCodeReg creditCodeReg,
} IdentityCodeValid,
\ No newline at end of file emailReg,
zipcodeReg
}
...@@ -65,3 +65,58 @@ export function detectOS() { ...@@ -65,3 +65,58 @@ export function detectOS() {
return 'other' return 'other'
} }
} }
//身份证号获取出生年月
export function getBirthdayByIdNO (id_card_no){
var date_of_birth = "";
if (id_card_no.length==18) {
date_of_birth = id_card_no.substr(6,8);
return date_of_birth.replace(/(.{4})(.{2})/,"$1-$2-");
}else if(id_card_no.length==15){
date_of_birth = "19"+date_of_birth.substr(6,6);
return date_of_birth.replace(/(.{4})(.{2})/,"$1-$2-");
}else{
return date_of_birth;
}
}
//身份证获取性别
export function getSexByIdNO(id_card_no){
if (id_card_no.length==18) {
return id_card_no.charAt(16)%2==0?"FEMALE":"MALE";
}else if(id_card_no.length==15){
return id_card_no.charAt(14)%2==0?"FEMALE":"MALE";
}else{
return "";
}
}
// 计算年龄
export function getAge(id_card_no) {
var len = (id_card_no + "").length;
if (len == 0) {
return 0;
} else {
if ((len != 15) && (len != 18))
{
return 0;
}
}
var strBirthday = "";
if (len == 18)
{
strBirthday = id_card_no.substr(6, 4) + "/" + id_card_no.substr(10, 2) + "/" + id_card_no.substr(12, 2);
}
if (len == 15) {
strBirthday = "19" + id_card_no.substr(6, 2) + "/" + id_card_no.substr(8, 2) + "/" + id_card_no.substr(10, 2);
}
//时间字符串里,必须是“/”
var birthDate = new Date(strBirthday);
var nowDateTime = new Date();
var age = nowDateTime.getFullYear() - birthDate.getFullYear();
//再考虑月、天的因素;.getMonth()获取的是从0开始的,这里进行比较,不需要加1
if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) {
age--;
}
return age;
}
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