Commit aaadad10 authored by 14699's avatar 14699

'fix-测试问题修复及调整'

parent 0046b8d4
......@@ -28,7 +28,9 @@
"build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test",
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production",
"build:homeMessage:test": "set VITE_TARGET=homeMessage&& vite build --mode test",
"build:homeMessage:production": "set VITE_TARGET=homeMessage&& vite build --mode production"
"build:homeMessage:production": "set VITE_TARGET=homeMessage&& vite build --mode production",
"build:paymentProtocol:test": "set VITE_TARGET=paymentProtocol&& vite build --mode test",
"build:paymentProtocol:production": "set VITE_TARGET=paymentProtocol&& vite build --mode production"
},
"dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2",
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
服务时间:周一至周五9:00-12:00,13:00-17:00,节假日除外。
</p>
<p>
您也可通过小程序直接留言,我们会在3个工作日内为您解释和说明。
您也可通过APP直接留言,我们会在3个工作日内为您解释和说明。
</p>
<section class="form-area">
......
......@@ -13,8 +13,8 @@ const api = {
saveInfo(data = {}) {
return post(`${baseURL}/app/api/app/financing/intention/save`, { userId: window.localStorage.getItem('userId'), ...data })
},
getAgent() {
return post(`${baseURL}/app/api/app/agent/file`, {})
getAgent(data = {}) {
return post(`${baseURL}/app/api/app/agent/file`, data)
}
};
......
......@@ -73,10 +73,10 @@ const formRaw = [
{
title: '代理店联系电话',
propName: 'agentPhone',
type: 'digit',
type: 'input',
value: '',
isRequired: true,
reg: phoneReg
reg: cellPhoneReg
},
{
title: '您的姓名/公司名称',
......@@ -149,35 +149,56 @@ const getLocation = () => {
message: '加载中...',
});
location(function (res) {
Toast.clear();
let info = JSON.parse(res);
console.log(info);
let provineReg = new RegExp(info.address.province)
let cityReg = new RegExp(info.address.city)
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
Toast.clear();
if (temp1.length > 0) {
let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
if (temp2.length > 0) {
formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
checkAgentObj = {
agentBpName: temp2[0].bpName,
agentBpId: temp2[0].bpId
}
} else {
formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
checkAgentObj = {
agentBpName: temp1[0].bpName,
agentBpId: temp1[0].bpId
}
}
}
let province = info.address.province;
let city = info.address.city.length>0?info.address.city:'ALL';
getLocationRegeo(province +'_'+ city)
// let provineReg = new RegExp(info.address.province)
// let cityReg = new RegExp(info.address.city)
// let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
// if (temp1.length > 0) {
// let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
// if (temp2.length > 0) {
// formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
// formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
// checkAgentObj = {
// agentBpName: temp2[0].bpName,
// agentBpId: temp2[0].bpId
// }
// } else {
// formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
// formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
// checkAgentObj = {
// agentBpName: temp1[0].bpName,
// agentBpId: temp1[0].bpId
// }
// }
// }
}, function (error) {
console.error('定位error', error)
})
};
const getLocationRegeo = async (area) => {
let agentRes = await api.getAgent({
area:area
})
console.log('area',area);
console.log('agentRes',agentRes);
if (agentRes.success) {
if(agentRes.rows.length > 0){
formConfig.setFormValue('agentBpName', 'value', agentRes.rows[0].bpName)
formConfig.setFormValue('agentPhone', 'value', agentRes.rows[0].cellPhone)
checkAgentObj = {
agentBpName: agentRes.rows[0].bpName,
agentBpId: agentRes.rows[0].bpId
}
}
}
};
const getFormVal = () => {
if (formStore.intentionData.intentionId) {
formConfig.fillValues(unref(formStore.intentionData));
......@@ -217,7 +238,8 @@ const handleAgent = async () => {
})
).map(item => {
return { text: item.bpName, value: item.bpName, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text)))
})
// .sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList;
}
// }
......
......@@ -139,7 +139,8 @@ const checkCashflow = (listItem, curIndex) => {
}
let monthLastDate = moment().endOf('month').format('YYYY-MM-DD') // 获取当前日期本月最后一天
// 判断当期还款日期是否本月最后一天之后
if(moment(listItem.dueDate).isAfter(monthLastDate, 'year')){
if(moment(listItem.dueDate).isAfter(monthLastDate)){
console.log(moment(listItem.dueDate).isAfter(monthLastDate))
return false
}
return true
......
import { get, put, post, File, deleteReq } from '@/utils/http'
const baseURL = import.meta.env.VITE_HTTP_BASE_URL
const api = {
// getMakingList (data) { // 查询合同制作列表
// return get(
// `${baseURL}/hlct/v1/0/contracts/toMake`,
// {...data}
// )
// },
};
export default api;
const state = {};
export default {
namespaced: true,
state,
};
<template>
<div class="container">
<NavBar title="支付协议" left-arrow @click-left="goBack"/>
<div class="content">
<VuePdfEmbed ref="pdfRef" :source="pdfSource" :page="page" @rendered="handleDocumentRender"></VuePdfEmbed>
</div>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let isLoading = $ref(true)
const page = $ref(null)
const pdfRef = $ref('')
let pageCount = $ref(1)
let pdfSource = $ref('https://kflc.komatsu-fl.com.cn/appFile/agreement/kflc_payment_protocol.pdf')
watchEffect(() => {
if (isLoading) {
Toast.loading({ message: '加载中...', forbidClick: true, overlay: true, duration: 0 });
} else {
Toast.clear()
}
})
const handleDocumentRender = (args) => {
isLoading = false
pageCount = pdfRef.pageCount
}
</script>
<style lang="less" scoped>
.content {
height: calc(100% - var(--van-nav-bar-height));
overflow-y: auto;
}
.vue-pdf-embed {}
</style>
<route>
{
meta: {
title: '支付协议'
}
}
</route>
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