问题修复

This commit is contained in:
bb_pan 2025-02-18 20:10:11 +08:00
parent fe5d3f0885
commit 7dd1754362
3 changed files with 77 additions and 42 deletions

View File

@ -695,8 +695,13 @@ const handleViewWord = async (index: any) => {
}) })
return return
} }
let isDays = true
cardList.value[index].devInfoVoList.map((e: any) => { cardList.value[index].devInfoVoList.map((e: any) => {
if (e.rentBeginTime == '' || e.rentEndTime == '') {
isDays = false
return
}
if (e.isChecked) { if (e.isChecked) {
detailsList.push({ detailsList.push({
rentBeginTime: e.rentBeginTime + ' ' + '00:00:00', rentBeginTime: e.rentBeginTime + ' ' + '00:00:00',
@ -711,6 +716,14 @@ const handleViewWord = async (index: any) => {
cost = cost + e.num * e.days * e.dayLeasePrice cost = cost + e.num * e.days * e.dayLeasePrice
} }
}) })
if (!isDays) {
ElMessage({
showClose: false,
message: '请选择租期',
type: 'error',
})
return
}
const queryParams = { const queryParams = {
companyName: localStorage.getItem('currentCompanyName'), companyName: localStorage.getItem('currentCompanyName'),
czcompanyName: companyName, czcompanyName: companyName,
@ -721,8 +734,8 @@ const handleViewWord = async (index: any) => {
} }
console.log('查询参数', queryParams) console.log('查询参数', queryParams)
try {
const res: any = await getBookCarAgreementApi(queryParams) const res: any = await getBookCarAgreementApi(queryParams)
if (import.meta.env.VITE_API_URL == '/proxyApi') { if (import.meta.env.VITE_API_URL == '/proxyApi') {
wordUrl.value = res.data.url wordUrl.value = res.data.url
} else { } else {
@ -745,6 +758,9 @@ const handleViewWord = async (index: any) => {
console.log('预览失败', e) console.log('预览失败', e)
}) })
}, 1000) }, 1000)
} catch (error) {
console.log('error', error)
}
} }
// Word // Word

View File

@ -530,7 +530,13 @@ const handleViewWord = async (index: any) => {
return return
} }
let isDays = true
orderList.value.map((e: any) => { orderList.value.map((e: any) => {
if (e.rentBeginTime == '' || e.rentEndTime == '') {
isDays = false
return
}
detailsList.push({ detailsList.push({
rentBeginTime: e.rentBeginTime + ' ' + '00:00:00', rentBeginTime: e.rentBeginTime + ' ' + '00:00:00',
rentEndTime: e.rentEndTime + ' ' + '23:59:59', rentEndTime: e.rentEndTime + ' ' + '23:59:59',
@ -543,6 +549,14 @@ const handleViewWord = async (index: any) => {
}) })
cost = cost + e.num * e.days * e.dayLeasePrice cost = cost + e.num * e.days * e.dayLeasePrice
}) })
if (!isDays) {
ElMessage({
showClose: false,
message: '请选择租期',
type: 'error',
})
return
}
const queryParams = { const queryParams = {
companyName: localStorage.getItem('currentCompanyName'), companyName: localStorage.getItem('currentCompanyName'),
czcompanyName: companyName, czcompanyName: companyName,
@ -553,6 +567,7 @@ const handleViewWord = async (index: any) => {
} }
console.log('查询参数', queryParams) console.log('查询参数', queryParams)
try {
const res: any = await getBookCarAgreementApi(queryParams) const res: any = await getBookCarAgreementApi(queryParams)
if (import.meta.env.VITE_API_URL == '/proxyApi') { if (import.meta.env.VITE_API_URL == '/proxyApi') {
@ -571,6 +586,9 @@ const handleViewWord = async (index: any) => {
.then((res) => {}) .then((res) => {})
.catch((e) => {}) .catch((e) => {})
}, 1000) }, 1000)
} catch (error) {
console.log('error', error)
}
} }
// Word // Word

View File

@ -503,8 +503,9 @@ const getLeaseListData = async () => {
} }
const getAreaData = async () => { const getAreaData = async () => {
const res: any = await getAreaApi() const res: any = await getAreaApi(0)
areaList.value = res.data areaList.value = res.data
console.log('🚀 ~ getAreaData ~ res.data:', res.data)
} }
// //
@ -636,7 +637,7 @@ const onChangeClass = (val: any) => {
onMounted(() => { onMounted(() => {
getClassAndCompanyData() getClassAndCompanyData()
getLeaseListData() getLeaseListData()
getAreaData() // getAreaData()
}) })
</script> </script>