|
@@ -24,6 +24,10 @@
|
|
|
<template #input>{{ formatAmount(state.form.taxAmount) }}</template>
|
|
<template #input>{{ formatAmount(state.form.taxAmount) }}</template>
|
|
|
<template #extra>元</template>
|
|
<template #extra>元</template>
|
|
|
</van-field>
|
|
</van-field>
|
|
|
|
|
+ <van-field v-model="state.form.unAmount" label="待认领金额" readonly>
|
|
|
|
|
+ <template #input>{{ formatAmount(state.form.unAmount) }}</template>
|
|
|
|
|
+ <template #extra>元</template>
|
|
|
|
|
+ </van-field>
|
|
|
<van-field v-model="state.form.date" label="到款日期" readonly>
|
|
<van-field v-model="state.form.date" label="到款日期" readonly>
|
|
|
<template #input>{{ formatDate(new Date(state.form.date), 'YYYY-mm-dd') }}</template>
|
|
<template #input>{{ formatDate(new Date(state.form.date), 'YYYY-mm-dd') }}</template>
|
|
|
</van-field>
|
|
</van-field>
|
|
@@ -88,6 +92,7 @@
|
|
|
form: {
|
|
form: {
|
|
|
allotAmount: null,
|
|
allotAmount: null,
|
|
|
amount: null, //到款金额
|
|
amount: null, //到款金额
|
|
|
|
|
+ unAmount: 0, // 待认领金额
|
|
|
manageAmount: 0,
|
|
manageAmount: 0,
|
|
|
taxAmount: 0,
|
|
taxAmount: 0,
|
|
|
projectName: '',
|
|
projectName: '',
|
|
@@ -124,6 +129,7 @@
|
|
|
if (err) return
|
|
if (err) return
|
|
|
state.fundDetail = res.data
|
|
state.fundDetail = res.data
|
|
|
state.form = { ...state.form, ...res.data }
|
|
state.form = { ...state.form, ...res.data }
|
|
|
|
|
+ state.form.unAmount = state.form.amount - state.form.manageAmount - state.form.taxAmount
|
|
|
// state.form.projectName = res.data.projectName
|
|
// state.form.projectName = res.data.projectName
|
|
|
// state.form.amount = res.data.amount
|
|
// state.form.amount = res.data.amount
|
|
|
// state.form.manageAmount = res.data.manageAmount
|
|
// state.form.manageAmount = res.data.manageAmount
|
|
@@ -156,7 +162,7 @@
|
|
|
params.amount = Number(params.amount)
|
|
params.amount = Number(params.amount)
|
|
|
params.detail = params.detail.map((item: any) => ({
|
|
params.detail = params.detail.map((item: any) => ({
|
|
|
...item,
|
|
...item,
|
|
|
- amount: Number(item.amount)
|
|
|
|
|
|
|
+ amount: Number(item.amount * 100)
|
|
|
}))
|
|
}))
|
|
|
params.externalAmount = Number(params.externalAmount)
|
|
params.externalAmount = Number(params.externalAmount)
|
|
|
params.internalAmount = Number(params.internalAmount)
|
|
params.internalAmount = Number(params.internalAmount)
|
|
@@ -177,17 +183,14 @@
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
// 进行openId登录
|
|
// 进行openId登录
|
|
|
const code: string = route.query.code ? route.query.code.toString() : ''
|
|
const code: string = route.query.code ? route.query.code.toString() : ''
|
|
|
- console.log('11111111111111111111111')
|
|
|
|
|
|
|
+ await storesUseUserInfo.setOpenId(code)
|
|
|
let param = {
|
|
let param = {
|
|
|
- code: code,
|
|
|
|
|
|
|
+ code: openId.value,
|
|
|
unionId: unionId.value,
|
|
unionId: unionId.value,
|
|
|
- user_name: userInfos.value?.userName,
|
|
|
|
|
- tenant: Local.get('Tenant'),
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (code) {
|
|
|
|
|
- console.log('2222222222222222222222')
|
|
|
|
|
- const [err, res]: ToResponse = await to(loginApi.weChatLogin(param))
|
|
|
|
|
|
|
+ if (openId.value) {
|
|
|
|
|
+ const [err, res]: ToResponse = await to(loginApi.weChatLoginUnionId(param))
|
|
|
if (err) {
|
|
if (err) {
|
|
|
// 跳转到登录页面
|
|
// 跳转到登录页面
|
|
|
Local.remove('token')
|
|
Local.remove('token')
|
|
@@ -196,6 +199,7 @@
|
|
|
}
|
|
}
|
|
|
// 存储 token 到浏览器缓存
|
|
// 存储 token 到浏览器缓存
|
|
|
Local.set('token', res?.data?.token)
|
|
Local.set('token', res?.data?.token)
|
|
|
|
|
+ Local.set('Tenant', res.data.tenant)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const id = route.query.id ? +route.query.id : 0
|
|
const id = route.query.id ? +route.query.id : 0
|