问题修复
This commit is contained in:
parent
fe5d3f0885
commit
7dd1754362
|
|
@ -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,30 +734,33 @@ const handleViewWord = async (index: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('查询参数', queryParams)
|
console.log('查询参数', queryParams)
|
||||||
const res: any = await getBookCarAgreementApi(queryParams)
|
try {
|
||||||
|
const res: any = await getBookCarAgreementApi(queryParams)
|
||||||
|
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||||
|
wordUrl.value = res.data.url
|
||||||
|
} else {
|
||||||
|
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||||
|
}
|
||||||
|
console.log('🚀 ~ handleViewWord ~ wordUrl.value:', wordUrl.value)
|
||||||
|
dialogFormVisibleSettleWord.value = true
|
||||||
|
|
||||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
settleWordTitle.value = '租赁服务合同'
|
||||||
wordUrl.value = res.data.url
|
setTimeout(() => {
|
||||||
} else {
|
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
//传递要预览的文件地址即可
|
||||||
|
myDocxPreviewer
|
||||||
|
.preview(wordUrl.value)
|
||||||
|
.then((res) => {
|
||||||
|
console.log('预览完成')
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log('1111', wordUrl.value)
|
||||||
|
console.log('预览失败', e)
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('error', error)
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleViewWord ~ wordUrl.value:', wordUrl.value)
|
|
||||||
dialogFormVisibleSettleWord.value = true
|
|
||||||
|
|
||||||
settleWordTitle.value = '租赁服务合同'
|
|
||||||
setTimeout(() => {
|
|
||||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
|
||||||
//传递要预览的文件地址即可
|
|
||||||
myDocxPreviewer
|
|
||||||
.preview(wordUrl.value)
|
|
||||||
.then((res) => {
|
|
||||||
console.log('预览完成')
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log('1111', wordUrl.value)
|
|
||||||
console.log('预览失败', e)
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载合同为 Word 文件
|
// 下载合同为 Word 文件
|
||||||
|
|
|
||||||
|
|
@ -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,24 +567,28 @@ const handleViewWord = async (index: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('查询参数', queryParams)
|
console.log('查询参数', queryParams)
|
||||||
const res: any = await getBookCarAgreementApi(queryParams)
|
try {
|
||||||
|
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 {
|
||||||
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
wordUrl.value = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + res.data.url
|
||||||
|
}
|
||||||
|
dialogFormVisibleSettleWord.value = true
|
||||||
|
|
||||||
|
settleWordTitle.value = '租赁服务合同'
|
||||||
|
setTimeout(() => {
|
||||||
|
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||||
|
//传递要预览的文件地址即可
|
||||||
|
myDocxPreviewer
|
||||||
|
.preview(wordUrl.value)
|
||||||
|
.then((res) => {})
|
||||||
|
.catch((e) => {})
|
||||||
|
}, 1000)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('error', error)
|
||||||
}
|
}
|
||||||
dialogFormVisibleSettleWord.value = true
|
|
||||||
|
|
||||||
settleWordTitle.value = '租赁服务合同'
|
|
||||||
setTimeout(() => {
|
|
||||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
|
||||||
//传递要预览的文件地址即可
|
|
||||||
myDocxPreviewer
|
|
||||||
.preview(wordUrl.value)
|
|
||||||
.then((res) => {})
|
|
||||||
.catch((e) => {})
|
|
||||||
}, 1000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载合同为 Word 文件
|
// 下载合同为 Word 文件
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue