Commit 0b79104d authored by 14699's avatar 14699

'fix-功能完善'

parent 168b8aa3
...@@ -70,7 +70,7 @@ const formConfigArr = [ ...@@ -70,7 +70,7 @@ const formConfigArr = [
title: '合同利率', title: '合同利率',
propName: 'contractRate', propName: 'contractRate',
type: 'rate', type: 'rate',
value: '6.00', value: '6',
isRequired: true, isRequired: true,
}, },
] ]
...@@ -81,7 +81,7 @@ const router = useRouter(); ...@@ -81,7 +81,7 @@ const router = useRouter();
const form = $ref(); const form = $ref();
const formConfig = $ref(new AuFormClass(formConfigArr)) const formConfig = $ref(new AuFormClass(formConfigArr))
const isComplete = $ref(false) let isComplete = $ref(false)
const updateForm = async () => { const updateForm = async () => {
...@@ -107,7 +107,7 @@ const updateForm = async () => { ...@@ -107,7 +107,7 @@ const updateForm = async () => {
})) }))
} }
} else if(planStore.planData?.isComputed) { } else if(planStore.planData?.isComputed) {
} else { } else {
formConfig.replace(formConfigArr.map(item => { formConfig.replace(formConfigArr.map(item => {
if (item.propName !== "repayment") { if (item.propName !== "repayment") {
...@@ -136,10 +136,10 @@ const checkValues = (values) => { ...@@ -136,10 +136,10 @@ 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.firstGoldRatio > 1 || isNaN(+values.firstGoldRatio)) { } 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)) { } else if (isNaN(+values.contractRate) || +values.contractRate < 0) {
Toast({ message: '请输入正确的合同利率', position: 'top' }); Toast({ message: '请输入正确的合同利率', position: 'top' });
return false; return false;
} }
...@@ -148,7 +148,7 @@ const checkValues = (values) => { ...@@ -148,7 +148,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; let firstGold = (priceOfItem * firstGoldRatio).toFixed(0);
let financeAmount = priceOfItem - firstGold; let financeAmount = priceOfItem - firstGold;
let monthRate = contractRate / 12; let monthRate = contractRate / 12;
...@@ -175,7 +175,7 @@ const getResult = (formValueObj) => { ...@@ -175,7 +175,7 @@ const getResult = (formValueObj) => {
planStore.planData = { planStore.planData = {
isComputed: true, isComputed: true,
firstGold: firstGold.toFixed(2) + "", firstGold: firstGold,
financeAmount: financeAmount.toFixed(2) + "", financeAmount: financeAmount.toFixed(2) + "",
cashflow, cashflow,
...formValueObjTemp ...formValueObjTemp
...@@ -230,4 +230,4 @@ const backLast = () => { ...@@ -230,4 +230,4 @@ const backLast = () => {
keepAlive: true keepAlive: true
} }
} }
</route> </route>
\ No newline at end of file
...@@ -29,15 +29,15 @@ import {currency} from '@/utils/textFormat' ...@@ -29,15 +29,15 @@ import {currency} from '@/utils/textFormat'
const planStore = usePlan() const planStore = usePlan()
const refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
const listValue = $ref([]) let listValue = $ref([])
let getList = async () => { let getList = async () => {
let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') }) let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') })
if (list.rows && list.rows.length) { if (list.rows && list.rows.length) {
list = list.rows.map(item => list = list.rows.map(item =>
({ ...item, title: item.creationDate.split(' ')[0], values: [["物件价格", "融资金额", "每期还款"], [`¥${currency(item.priceOfItem)}`, `¥${currency(item.financeAmount)}`, `¥${currency(item.dueAmount)}`]] }) ({ ...item, title: item.creationDate.split(' ')[0], values: [["物件价格", "融资金额", "每期还款"], [`¥${currency(item.priceOfItem)}`, `¥${currency(item.financeAmount)}`, `¥${currency(item.dueAmount)}`]] })
) )
} else { } else {
list = [] list = []
...@@ -60,6 +60,7 @@ const jump = async (testQuatationId) => { ...@@ -60,6 +60,7 @@ const jump = async (testQuatationId) => {
Toast.fail('获取不到计算数据'); Toast.fail('获取不到计算数据');
} }
} else { } else {
planStore.planData = {isComplete: false };
router.push({ name: 'calculator-views-detail' }) router.push({ name: 'calculator-views-detail' })
} }
} }
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @leftClick="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="currencyObj.times && plan.financeAmount">
<div class="left"> <div class="left">
...@@ -39,9 +39,9 @@ import api from "../api"; ...@@ -39,9 +39,9 @@ import api from "../api";
import { usePlan } from '../store/index' import { usePlan } from '../store/index'
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const currencyObj = $ref({}) let currencyObj = $ref({})
const plan = $ref({}) let plan = $ref({})
const isComplete = $ref(false) let isComplete = $ref(false)
const getPlan = () => { const getPlan = () => {
const planStore = usePlan() const planStore = usePlan()
...@@ -189,4 +189,4 @@ const backToLast = () => { ...@@ -189,4 +189,4 @@ const backToLast = () => {
keepAlive: true keepAlive: true
} }
} }
</route> </route>
\ No newline at end of file
...@@ -54,9 +54,9 @@ let queryList = async () => { ...@@ -54,9 +54,9 @@ let queryList = async () => {
refreshing = true refreshing = true
let res = await api.contextQuery({ let res = await api.contextQuery({
actionType: active, actionType: active,
agencyName: '', agencyName: searchValue,
receivets: + new Date() + '', receivets: + new Date() + '',
projectNumber: '', projectNumber: searchValue,
...pager ...pager
}) })
...@@ -114,7 +114,7 @@ const pdfPre = () => { ...@@ -114,7 +114,7 @@ const pdfPre = () => {
} }
let eSign = (eUrl) => { let eSign = (eUrl) => {
eUrl = 'http://www.baidu.com' // eUrl = 'http://www.baidu.com'
router.push({ path: '/contractsign/views/esign', query: { url: eUrl } }) router.push({ path: '/contractsign/views/esign', query: { url: eUrl } })
} }
......
...@@ -14,10 +14,10 @@ import { NavBar, Toast } from "vant"; ...@@ -14,10 +14,10 @@ import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed' import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue' import { watchEffect } from 'vue'
const isLoading = $ref(true) let isLoading = $ref(true)
const page = $ref(null) const page = $ref(null)
const pdfRef = $ref('') const pdfRef = $ref('')
const pageCount = $ref(1) let pageCount = $ref(1)
const pdfSource = $ref('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') const pdfSource = $ref('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf')
watchEffect(() => { watchEffect(() => {
...@@ -31,16 +31,16 @@ watchEffect(() => { ...@@ -31,16 +31,16 @@ watchEffect(() => {
const handleDocumentRender = (args) => { const handleDocumentRender = (args) => {
isLoading = false isLoading = false
pageCount = pdfRef.pageCount pageCount = pdfRef.pageCount
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.content { .content {
height: calc(100% - var(--van-nav-bar-height)); height: calc(100% - var(--van-nav-bar-height));
overflow-y: auto; overflow-y: auto;
} }
.vue-pdf-embed { .vue-pdf-embed {
} }
</style> </style>
\ No newline at end of file
...@@ -28,7 +28,7 @@ import {currency} from '@/utils/textFormat' ...@@ -28,7 +28,7 @@ import {currency} from '@/utils/textFormat'
const formStore = useIntention() const formStore = useIntention()
const listValue = $ref([]) let listValue = $ref([])
const getList = async () => { const getList = async () => {
let res = await api.getlist() let res = await api.getlist()
...@@ -37,7 +37,7 @@ const getList = async () => { ...@@ -37,7 +37,7 @@ const getList = async () => {
return { return {
title: item.intentionNumber, title: item.intentionNumber,
other_title: item.creationDate.split(' ')[0], other_title: item.creationDate.split(' ')[0],
values: [["合同金额", "状态"], ["¥ " + (currency(item.contractAmount) || '0.00'), item.intentionStatusN]], values: [["合同金额", "状态"], ["¥ " + (currency(item.financeAmount) || '0.00'), item.intentionStatusN]],
intentionId: item.intentionId intentionId: item.intentionId
} }
}) })
...@@ -48,7 +48,7 @@ const getList = async () => { ...@@ -48,7 +48,7 @@ const getList = async () => {
} }
getList() getList()
const refreshing = $ref(true); let refreshing = $ref(true);
const finished = $ref(true); const finished = $ref(true);
const router = useRouter(); const router = useRouter();
......
...@@ -51,7 +51,7 @@ const formRaw = [ ...@@ -51,7 +51,7 @@ const formRaw = [
title: '首付款比例', title: '首付款比例',
propName: 'firstGoldRatio', propName: 'firstGoldRatio',
type: 'rate', type: 'rate',
value: '6', value: '',
isRequired: true isRequired: true
}, },
{ {
...@@ -104,7 +104,7 @@ const formRaw = [ ...@@ -104,7 +104,7 @@ const formRaw = [
const form = $ref(); const form = $ref();
let message = $ref('') let message = $ref('')
const formConfig = $ref(new AuFormClass(formRaw)) let formConfig = $ref(new AuFormClass(formRaw))
let messageDisabled = $ref(false) let messageDisabled = $ref(false)
let agentList = [] let agentList = []
...@@ -121,74 +121,47 @@ const save = async () => { ...@@ -121,74 +121,47 @@ const save = async () => {
for (const key in formValueObj) { for (const key in formValueObj) {
formValueObj[key] = formValueObj[key] + ''; formValueObj[key] = formValueObj[key] + '';
} }
console.log(formValueObj); let validateValue = checkValues(formValueObj);
if (formConfig.validate()) { if(validateValue) {
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount}) let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount})
if (res.success) { if (res.success) {
Toast.success('保存成功'); Toast.success('保存成功');
} else { } else {
Toast.fail('保存失败, 请稍后重试'); Toast.fail('保存失败, 请稍后重试');
} }
setTimeout(() => { setTimeout(() => {
toLast() toLast()
}, 2000); }, 2000);
} }
} else { } else {
Toast({ message: '请将信息填写完整', position: 'top' }); Toast({ message: '请将信息填写完整', position: 'top' });
} }
} };
const handleAgent = async () => {
if (formStore.agentList.length) {
agentList = formStore.agentList
} else {
let agentRes = await api.getAgent()
if (agentRes.success) {
agentList = agentRes.rows.map(item => ({
provinceIdN: item.provinceIdN || '',
cityIdN: item.cityIdN || '',
bpName: item.bpName,
bpCode: item.bpCode,
cellPhone: item.cellPhone,
})
).map(item => {
return { text: item.provinceIdN + item.cityIdN + item.bpName, value: item.bpName, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList;
}
}
formConfig.setFormValue('agentBpName', 'select', agentList)
}
handleAgent()
const getLocation = () => { const getLocation = () => {
location(function (info) { location(function (res) {
let info = JSON.parse(res);
console.log(info); console.log(info);
let provineReg = new RegExp(info.address.province) let provineReg = new RegExp(info.address.province)
let cityReg = new RegExp(info.address.city) let cityReg = new RegExp(info.address.city)
let temp1 = agentList.filter(item => provineReg.test(item.text));
let temp1 = agentList.filter(item => provineReg.test(item.text)); if (temp1.length > 0) {
if (temp1.length) {
let temp2 = temp1.filter(item => cityReg.test(item.text)) let temp2 = temp1.filter(item => cityReg.test(item.text))
if (temp2.length > 0) {
if (temp2.length) { formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
formConfig.setFormValue('agentBpName', 'value', temp2[0].text)
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone) formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
} else { } else {
formConfig.setFormValue('agentBpName', 'value', temp1[0].text) formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone) formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
} }
} }
}, function (error) { }, function (error) {
console.error('定位error', error) console.error('定位error', error)
}) })
} };
const getFormVal = () => { const getFormVal = () => {
if (formStore.intentionData?.intentionId) { if (formStore.intentionData.intentionId) {
formConfig.fillValues(unref(formStore.intentionData)); formConfig.fillValues(unref(formStore.intentionData));
message = formStore.intentionData.remark; message = formStore.intentionData.remark;
formConfig.setAll('disabled', () => true); formConfig.setAll('disabled', () => true);
...@@ -196,15 +169,64 @@ const getFormVal = () => { ...@@ -196,15 +169,64 @@ const getFormVal = () => {
} else { } else {
getLocation() getLocation()
} }
} };
getFormVal()
const handleSelect = (value) => { const handleSelect = (value) => {
console.log('选择框选择后拿到的值:', value) console.log('选择框选择后拿到的值:', value)
if(value.type === "picker"){ if(value.type === "picker"){
formConfig.setFormValue('agentPhone', 'value', value.cellPhone) formConfig.setFormValue('agentPhone', 'value', value.cellPhone)
} }
};
const handleAgent = async () => {
if (formStore.agentList.length) {
agentList = formStore.agentList
} else {
let agentRes = await api.getAgent()
if (agentRes.success) {
agentList = agentRes.rows.map(item => ({
provinceIdN: item.provinceIdN || '',
cityIdN: item.cityIdN || '',
bpName: item.bpName,
bpCode: item.bpCode,
cellPhone: item.cellPhone,
})
).map(item => {
return { text: item.provinceIdN + item.cityIdN + item.bpName, value: item.bpName, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList;
}
}
formConfig.setFormValue('agentBpName', 'select', agentList);
formConfig.watchForm("firstGoldRatio", (n, o) => {
let formValueObj = formConfig.getValues()
let financeAmount = formValueObj.financeAmount;
let firstGoldRatio = formValueObj.firstGoldRatio;
if(+firstGoldRatio > 0 && +financeAmount > 0){
let firstGold = (financeAmount * firstGoldRatio).toFixed(2)
formConfig.setFormValue("firstGold", "value", +firstGold)
}
});
getFormVal();
};
handleAgent();
const checkValues = (values) => {
if (+values.financeAmount <= 0) {
Toast({ message: '请输入正确的合同总额', position: 'top' });
return false;
} else if (values.firstGoldRatio > 1 || isNaN(+values.firstGoldRatio) || +values.firstGoldRatio < 0) {
Toast({ message: '请输入正确首付款比例', position: 'top' });
return false;
} else if (+values.firstGold <= 0) {
Toast({ message: '请输入正确的首付款金额', position: 'top' });
return false;
}
return true;
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -18,6 +18,10 @@ const api = { ...@@ -18,6 +18,10 @@ const api = {
//违约金每日明细 //违约金每日明细
getDailyLiquidatedDetail(data={}){ getDailyLiquidatedDetail(data={}){
return post(`${baseURL}/app/api/app/day/liquidated/damages/details`, data) return post(`${baseURL}/app/api/app/day/liquidated/damages/details`, data)
},
//支付
getPay(data={}){
return post(`${baseURL}/app/api/app/repayment/payment`, data)
} }
}; };
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
</div> </div>
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a=""> <div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>支付方式</span><!----></div> <div class="van-cell__title"><span>支付方式</span><!----></div>
<div class="van-cell__value_mode"><span>{{checked}}</span></div> <div class="van-cell__value_mode"><span>{{checkArray[checked]}}</span></div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"></i> <i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"></i>
</div> </div>
<div class="pay-money-choose" v-show="showModeFlag"> <div class="pay-money-choose" v-show="showModeFlag">
<RadioGroup v-model="checked"> <RadioGroup v-model="checked">
<CellGroup inset> <CellGroup inset>
<Cell clickable @click="checked = '云闪付(银行卡)'"> <Cell clickable @click="checked = 'UNION_PAY'">
<template #title> <template #title>
<div class="alipayTitle"> <div class="alipayTitle">
<span class="custom-title mr10"> <span class="custom-title mr10">
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
</div> </div>
</template> </template>
<template #right-icon> <template #right-icon>
<Radio name="云闪付(银行卡)" /> <Radio name="UNION_PAY" />
</template> </template>
</Cell> </Cell>
<Cell clickable @click="checked = '微信支付'"> <Cell clickable @click="checked = 'WECHAT_PAY'">
<template #title> <template #title>
<div class="alipayTitle"> <div class="alipayTitle">
<span class="custom-title mr10"> <span class="custom-title mr10">
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
</div> </div>
</template> </template>
<template #right-icon> <template #right-icon>
<Radio name="微信支付" /> <Radio name="WECHAT_PAY" />
</template> </template>
</Cell> </Cell>
<Cell clickable @click="checked = '支付宝'"> <Cell clickable @click="checked = 'ALI_PAY'">
<template #title> <template #title>
<div class="alipayTitle"> <div class="alipayTitle">
<span class="custom-title mr10"> <span class="custom-title mr10">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</div> </div>
</template> </template>
<template #right-icon> <template #right-icon>
<Radio name="支付宝" /> <Radio name="ALI_PAY" />
</template> </template>
</Cell> </Cell>
</CellGroup> </CellGroup>
...@@ -114,9 +114,19 @@ ...@@ -114,9 +114,19 @@
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'; import { pay } from '@/utils/pay';
import api from "../api";
import { Base } from '@hips/plugin-vue-jssdk';
const { openWebLink } = Base;
const props = defineProps({ const props = defineProps({
visible: { type: Boolean }, // 是否打开弹框 visible: { type: Boolean }, // 是否打开弹框
payInfoObj: {
type: Object,
default: {
cashflowId: '',
payAmount: '',
}
},
}) })
const emit = defineEmits(['payMoneyClick', 'closePage']) const emit = defineEmits(['payMoneyClick', 'closePage'])
...@@ -126,11 +136,11 @@ const emit = defineEmits(['payMoneyClick', 'closePage']) ...@@ -126,11 +136,11 @@ 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(null);
const orderAmount = ref(null); const orderAmount = ref(props.payInfoObj.payAmount);
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 cancel = () => { const cancel = () => {
console.log('canecel') console.log('canecel')
...@@ -146,7 +156,7 @@ const onDelete = () => { ...@@ -146,7 +156,7 @@ const onDelete = () => {
} }
const payMoney = () => { const payMoney = () => {
showDialog.value = true; // showDialog.value = true;
// Dialog.alert({ // Dialog.alert({
// // title: '标题', // // title: '标题',
// showConfirmButton: false, // showConfirmButton: false,
...@@ -155,14 +165,33 @@ const payMoney = () => { ...@@ -155,14 +165,33 @@ const payMoney = () => {
// }).then(() => { // }).then(() => {
// // on close // // on close
// }); // });
emit('closePage', false); // emit('closePage', false);
const info = { const info = {
orderAmount: orderAmount.value, // payAmount: orderAmount.value,
checked: checked.value, payAmount: '0.01',
payType: checked.value,
cashflowId: props.payInfoObj.cashflowId
} }
emit('payMoneyClick', info); console.log(info)
//emit('payMoneyClick', info);
goPayApp(info)
} }
const goPayApp = async (param) => {
// 下拉重置参数,重新加载
let res = await api.getPay({...param,receivets: + new Date() + '',});
console.log(res)
if(res.rows[0].qrCode){
openWebLink(res.rows[0].qrCode)
.then((res) => {console.log(res)})
.catch((err) => {console.log(err)});
}else{
Toast.fail('当前支付方式暂不支持!')
}
};
const handleFinishAmount = () => { const handleFinishAmount = () => {
showDialog.value = false; showDialog.value = false;
pay(); pay();
......
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
</div> </div>
<div class="right-item"> <div class="right-item">
<span></span> <span></span>
<span class="flag-button payment" @click="handleClick"> <span class="flag-button payment" @click="handleClick(item)">
支付 支付
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<Pay :visible="showModal" @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">--> <!-- <Dialog v-model:show="showDialog" title="标题" show-cancel-button z-index="2022">-->
<!-- <div>jhahha</div>--> <!-- <div>jhahha</div>-->
<!-- &lt;!&ndash; <img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg" />&ndash;&gt;--> <!-- &lt;!&ndash; <img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg" />&ndash;&gt;-->
...@@ -70,12 +70,13 @@ let cashflow = [ ...@@ -70,12 +70,13 @@ let cashflow = [
} }
] ]
const payInfo = ref({}); let payInfo = ref({});
let showModal = ref(false); let showModal = ref(false);
const route = useRoute() const route = useRoute()
const handleClick = () => { const handleClick = (item) => {
showModal.value = true showModal.value = true
payInfo = {cashflowId:item.cashflowId,payAmount:item.obligation}
} }
const handleColse = (param) => { const handleColse = (param) => {
...@@ -83,10 +84,10 @@ const handleColse = (param) => { ...@@ -83,10 +84,10 @@ const handleColse = (param) => {
} }
const pay = (value) => { const pay = (value) => {
console.log(value, value.showDialog); // console.log(value, value.showDialog);
// payInfo.value = value; // payInfo.value = value;
showDialog.value = true; // showDialog.value = true;
console.log(showDialog.value) // console.log(showDialog.value)
// console.log(payInfo.value) // console.log(payInfo.value)
} }
const router = useRouter(); const router = useRouter();
......
<template> <template>
<RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @click-left="goBack" > <RepayPlan navTitle="还款计划" :currencyObj="currencyObj" @onLeftClick="goBack" >
<template #list> <template #list>
<div class="repay_list"> <div class="repay_list">
<div class="left"> <div class="left">
......
import { get, put, post, File, deleteReq } from '@/utils/http' 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 = {
//列表查询 //列表查询
getSelfServiceList(data={}) { getSelfServiceList(data={}) {
......
<template> <template>
<div class="container"> <div class="container">
<NavBar title="授权" left-arrow @click-left="goBack" /> <NavBar title="授权" left-arrow @click-left="goBack" />
<Notice detail="授权该代理店后,该代理店可查看您的信息。" /> <Notice detail="授权该代理店后,该代理店可查看您的信息。" />
<section class="form"> <section class="form">
<CellGroup inset> <CellGroup inset>
<Field required v-model="form.contractNumber" is-link readonly label="项目编号" @click="showProjectNumber = true" <Field required v-model="form.contractNumber" is-link readonly label="项目编号" @click="showProjectNumber = true"
...@@ -15,11 +13,9 @@ ...@@ -15,11 +13,9 @@
input-align="right" /> input-align="right" />
</CellGroup> </CellGroup>
</section> </section>
<section class="sub"> <section class="sub">
<Button type="primary" block @click="confirm">授权</Button> <Button type="primary" block @click="confirm">授权</Button>
</section> </section>
<Popup v-model:show="showProjectNumber" position="bottom"> <Popup v-model:show="showProjectNumber" position="bottom">
<Picker :columns="projectNumberColumns" :columns-field-names="{text:'contractNumber', value: 'contractId'}" @confirm="projectNumberConfirm" @cancel="showProjectNumber = false" > <Picker :columns="projectNumberColumns" :columns-field-names="{text:'contractNumber', value: 'contractId'}" @confirm="projectNumberConfirm" @cancel="showProjectNumber = false" >
</Picker> </Picker>
...@@ -31,7 +27,6 @@ ...@@ -31,7 +27,6 @@
<Popup v-model:show="showPicker" position="bottom"> <Popup v-model:show="showPicker" position="bottom">
<Picker :columns="agencyColumns" :columns-field-names="{text:'agencyName', value: 'agencyId'}" @confirm="agencyConfrim" @cancel="showPicker = false" > <Picker :columns="agencyColumns" :columns-field-names="{text:'agencyName', value: 'agencyId'}" @confirm="agencyConfrim" @cancel="showPicker = false" >
<template #columns-top> <template #columns-top>
<!-- <Icon name="search" />-->
<Search v-model="agencyValue" placeholder="请输入搜索关键词" @click-left-icon="searchAgency" /> <Search v-model="agencyValue" placeholder="请输入搜索关键词" @click-left-icon="searchAgency" />
</template> </template>
</Picker> </Picker>
...@@ -46,10 +41,8 @@ import {NavBar, Field, CellGroup, Popup, Picker, Button, Icon, Search, Toast, Di ...@@ -46,10 +41,8 @@ import {NavBar, Field, CellGroup, Popup, Picker, Button, Icon, Search, Toast, Di
import api from '../api' import api from '../api'
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
let showArea = $ref(false) let showArea = $ref(false)
const form = $ref({ const form = $ref({
code: '', code: '',
contractNumber: '', contractNumber: '',
...@@ -69,15 +62,15 @@ let agencyColumns = $ref([]) ; ...@@ -69,15 +62,15 @@ let agencyColumns = $ref([]) ;
const agencyValue = $ref(null); const agencyValue = $ref(null);
const areaPagination = { const areaPagination = {
page: 1, page: 1,
size: 1000, pageSize: 1000,
} }
const agencyPagination = { const agencyPagination = {
page: 1, page: 1,
size: 1000, pageSize: 1000,
} }
const projectNumber = { const projectNumber = {
page: 1, page: 1,
size: 1000 pageSize: 1000
} }
const projectNumberConfirm = (selectValues) => { const projectNumberConfirm = (selectValues) => {
form.contractNumber = selectValues.contractNumber; form.contractNumber = selectValues.contractNumber;
...@@ -129,7 +122,7 @@ const confirm = async () => { ...@@ -129,7 +122,7 @@ const confirm = async () => {
goBack() goBack()
}); });
}else{ }else{
Toast.fail('授权失败') Toast.fail(res.message?res.message:'授权失败')
} }
} }
const getContractList = async () => { const getContractList = async () => {
......
<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">
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll"> <PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<List :finished="finished" finished-text="没有更多了" @load="loadApproval"> <List :finished="finished" finished-text="没有更多了" @load="loadApproval">
...@@ -9,7 +8,6 @@ ...@@ -9,7 +8,6 @@
</List> </List>
</PullRefresh> </PullRefresh>
</section> </section>
<Plus @click="jump" /> <Plus @click="jump" />
</div> </div>
</template> </template>
...@@ -23,10 +21,6 @@ import api from "../api"; ...@@ -23,10 +21,6 @@ import api from "../api";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
let listValue = $ref([ let listValue = $ref([
// {
// title: '2022-07-18',
// values: [["授权对象编码", "授权对象名称", "所属区域"], ["DB001", "新疆田园技术有限公司", "西北"]]
// }
]) ])
let pagination = { page: 1, pageSize: 10 } let pagination = { page: 1, pageSize: 10 }
...@@ -37,9 +31,8 @@ const queryList = async () => { ...@@ -37,9 +31,8 @@ const queryList = async () => {
refreshing = true refreshing = true
let res = await api.getSelfServiceList({ receivets: + new Date() + '', ...pagination }) let res = await api.getSelfServiceList({ receivets: + new Date() + '', ...pagination })
if (res.success) { if (res.success && res.total > 0) {
pagination.page++ if(res.total > 10){finished = false}
if (res.total == 0) finished = true
res.rows.forEach(item => { res.rows.forEach(item => {
listValue.push({ listValue.push({
title: item.authDate.split(' ')[0] + '' || '', title: item.authDate.split(' ')[0] + '' || '',
...@@ -50,7 +43,6 @@ const queryList = async () => { ...@@ -50,7 +43,6 @@ const queryList = async () => {
} else { } else {
finished = true finished = true
} }
refreshing = false refreshing = false
} }
queryList() queryList()
...@@ -61,7 +53,7 @@ const onRefresh = () => { ...@@ -61,7 +53,7 @@ const onRefresh = () => {
listValue = []; listValue = [];
pagination.page = 1; pagination.page = 1;
pagination.pageSize = 10; pagination.pageSize = 10;
finished = false finished = true
queryList() queryList()
}; };
......
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