Commit aaadad10 authored by 14699's avatar 14699

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

parent 0046b8d4
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
"build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test", "build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test",
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production", "build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production",
"build:homeMessage:test": "set VITE_TARGET=homeMessage&& vite build --mode test", "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": { "dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2", "@hips/plugin-vue-jssdk": "^1.1.2",
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
服务时间:周一至周五9:00-12:00,13:00-17:00,节假日除外。 服务时间:周一至周五9:00-12:00,13:00-17:00,节假日除外。
</p> </p>
<p> <p>
您也可通过小程序直接留言,我们会在3个工作日内为您解释和说明。 您也可通过APP直接留言,我们会在3个工作日内为您解释和说明。
</p> </p>
<section class="form-area"> <section class="form-area">
......
...@@ -13,8 +13,8 @@ const api = { ...@@ -13,8 +13,8 @@ const api = {
saveInfo(data = {}) { saveInfo(data = {}) {
return post(`${baseURL}/app/api/app/financing/intention/save`, { userId: window.localStorage.getItem('userId'), ...data }) return post(`${baseURL}/app/api/app/financing/intention/save`, { userId: window.localStorage.getItem('userId'), ...data })
}, },
getAgent() { getAgent(data = {}) {
return post(`${baseURL}/app/api/app/agent/file`, {}) return post(`${baseURL}/app/api/app/agent/file`, data)
} }
}; };
......
...@@ -73,10 +73,10 @@ const formRaw = [ ...@@ -73,10 +73,10 @@ const formRaw = [
{ {
title: '代理店联系电话', title: '代理店联系电话',
propName: 'agentPhone', propName: 'agentPhone',
type: 'digit', type: 'input',
value: '', value: '',
isRequired: true, isRequired: true,
reg: phoneReg reg: cellPhoneReg
}, },
{ {
title: '您的姓名/公司名称', title: '您的姓名/公司名称',
...@@ -149,35 +149,56 @@ const getLocation = () => { ...@@ -149,35 +149,56 @@ const getLocation = () => {
message: '加载中...', message: '加载中...',
}); });
location(function (res) { location(function (res) {
Toast.clear();
let info = JSON.parse(res); let info = JSON.parse(res);
console.log(info); console.log(info);
let provineReg = new RegExp(info.address.province) let province = info.address.province;
let cityReg = new RegExp(info.address.city) let city = info.address.city.length>0?info.address.city:'ALL';
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN)); getLocationRegeo(province +'_'+ city)
Toast.clear(); // let provineReg = new RegExp(info.address.province)
if (temp1.length > 0) { // let cityReg = new RegExp(info.address.city)
let temp2 = temp1.filter(item => cityReg.test(item.cityIdN)) // let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
if (temp2.length > 0) { // if (temp1.length > 0) {
formConfig.setFormValue('agentBpName', 'value', temp2[0].value) // let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone) // if (temp2.length > 0) {
checkAgentObj = { // formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
agentBpName: temp2[0].bpName, // formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
agentBpId: temp2[0].bpId // checkAgentObj = {
} // agentBpName: temp2[0].bpName,
} else { // agentBpId: temp2[0].bpId
formConfig.setFormValue('agentBpName', 'value', temp1[0].value) // }
formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone) // } else {
checkAgentObj = { // formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
agentBpName: temp1[0].bpName, // formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
agentBpId: temp1[0].bpId // checkAgentObj = {
} // agentBpName: temp1[0].bpName,
} // agentBpId: temp1[0].bpId
} // }
// }
// }
}, function (error) { }, function (error) {
console.error('定位error', 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 = () => { const getFormVal = () => {
if (formStore.intentionData.intentionId) { if (formStore.intentionData.intentionId) {
formConfig.fillValues(unref(formStore.intentionData)); formConfig.fillValues(unref(formStore.intentionData));
...@@ -217,7 +238,8 @@ const handleAgent = async () => { ...@@ -217,7 +238,8 @@ const handleAgent = async () => {
}) })
).map(item => { ).map(item => {
return { text: item.bpName, value: item.bpName, ...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; formStore.agentList = agentList;
} }
// } // }
......
...@@ -139,7 +139,8 @@ const checkCashflow = (listItem, curIndex) => { ...@@ -139,7 +139,8 @@ const checkCashflow = (listItem, curIndex) => {
} }
let monthLastDate = moment().endOf('month').format('YYYY-MM-DD') // 获取当前日期本月最后一天 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 false
} }
return true 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