Merge remote-tracking branch 'origin/ah-simple' into ah-simple
This commit is contained in:
commit
22348c07fb
|
|
@ -14,14 +14,11 @@ declare module 'vue' {
|
|||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
|
|
@ -29,7 +26,6 @@ declare module 'vue' {
|
|||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
|
|
@ -37,7 +33,6 @@ declare module 'vue' {
|
|||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
|
|
@ -47,7 +42,6 @@ declare module 'vue' {
|
|||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
|
|
|
|||
|
|
@ -695,8 +695,13 @@ const handleViewWord = async (index: any) => {
|
|||
})
|
||||
return
|
||||
}
|
||||
let isDays = true
|
||||
|
||||
cardList.value[index].devInfoVoList.map((e: any) => {
|
||||
if (e.rentBeginTime == '' || e.rentEndTime == '') {
|
||||
isDays = false
|
||||
return
|
||||
}
|
||||
if (e.isChecked) {
|
||||
detailsList.push({
|
||||
rentBeginTime: e.rentBeginTime + ' ' + '00:00:00',
|
||||
|
|
@ -711,6 +716,14 @@ const handleViewWord = async (index: any) => {
|
|||
cost = cost + e.num * e.days * e.dayLeasePrice
|
||||
}
|
||||
})
|
||||
if (!isDays) {
|
||||
ElMessage({
|
||||
showClose: false,
|
||||
message: '请选择租期',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
const queryParams = {
|
||||
companyName: localStorage.getItem('currentCompanyName'),
|
||||
czcompanyName: companyName,
|
||||
|
|
@ -721,30 +734,33 @@ const handleViewWord = async (index: any) => {
|
|||
}
|
||||
|
||||
console.log('查询参数', queryParams)
|
||||
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
|
||||
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
|
||||
|
||||
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)
|
||||
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)
|
||||
} catch (error) {
|
||||
console.log('error', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 下载合同为 Word 文件
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div>
|
||||
{{
|
||||
myCompanyId == item.toCompany
|
||||
? item.fromCompanyName
|
||||
? item.fromCompanyName || '系统通知'
|
||||
: item.toCompanyName
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -530,7 +530,13 @@ const handleViewWord = async (index: any) => {
|
|||
return
|
||||
}
|
||||
|
||||
let isDays = true
|
||||
|
||||
orderList.value.map((e: any) => {
|
||||
if (e.rentBeginTime == '' || e.rentEndTime == '') {
|
||||
isDays = false
|
||||
return
|
||||
}
|
||||
detailsList.push({
|
||||
rentBeginTime: e.rentBeginTime + ' ' + '00:00:00',
|
||||
rentEndTime: e.rentEndTime + ' ' + '23:59:59',
|
||||
|
|
@ -543,6 +549,14 @@ const handleViewWord = async (index: any) => {
|
|||
})
|
||||
cost = cost + e.num * e.days * e.dayLeasePrice
|
||||
})
|
||||
if (!isDays) {
|
||||
ElMessage({
|
||||
showClose: false,
|
||||
message: '请选择租期',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
const queryParams = {
|
||||
companyName: localStorage.getItem('currentCompanyName'),
|
||||
czcompanyName: companyName,
|
||||
|
|
@ -553,24 +567,28 @@ const handleViewWord = async (index: any) => {
|
|||
}
|
||||
|
||||
console.log('查询参数', queryParams)
|
||||
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
|
||||
}
|
||||
dialogFormVisibleSettleWord.value = true
|
||||
try {
|
||||
const res: any = await getBookCarAgreementApi(queryParams)
|
||||
|
||||
settleWordTitle.value = '租赁服务合同'
|
||||
setTimeout(() => {
|
||||
const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm'))
|
||||
//传递要预览的文件地址即可
|
||||
myDocxPreviewer
|
||||
.preview(wordUrl.value)
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
}, 1000)
|
||||
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
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
// 下载合同为 Word 文件
|
||||
|
|
|
|||
|
|
@ -503,8 +503,9 @@ const getLeaseListData = async () => {
|
|||
}
|
||||
|
||||
const getAreaData = async () => {
|
||||
const res: any = await getAreaApi()
|
||||
const res: any = await getAreaApi(0)
|
||||
areaList.value = res.data
|
||||
console.log('🚀 ~ getAreaData ~ res.data:', res.data)
|
||||
}
|
||||
|
||||
// 重置
|
||||
|
|
@ -636,7 +637,7 @@ const onChangeClass = (val: any) => {
|
|||
onMounted(() => {
|
||||
getClassAndCompanyData()
|
||||
getLeaseListData()
|
||||
getAreaData()
|
||||
// getAreaData()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -2186,7 +2186,7 @@ const changeDate = (row: any, index: number) => {
|
|||
:minLimit="row.examinationPdf.length"
|
||||
listType="text"
|
||||
:justifyContent="`flex-start`"
|
||||
:acceptTypeList="['.jpg', '.png']"
|
||||
:acceptTypeList="['.jpg', '.png','.pdf']"
|
||||
@onFileChange="
|
||||
(fileList) => onFileChangeEquip(fileList, row, $index, 2)
|
||||
"
|
||||
|
|
|
|||
Loading…
Reference in New Issue