Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
3a0841e3
Commit
3a0841e3
authored
May 14, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化2
parent
2b3989c6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
488 additions
and
81 deletions
+488
-81
src/components/Preview/filePreview.vue
+397
-0
src/views/financialCenter/financialBilling.vue
+25
-6
src/views/financialCenter/financialIncome.vue
+1
-1
src/views/financialCenter/financialSalary.vue
+4
-4
src/views/financialCenter/payables.vue
+7
-7
src/views/financialCenter/receivables.vue
+2
-1
src/views/sign/appointment/components/fileUpload.vue
+52
-62
No files found.
src/components/Preview/filePreview.vue
0 → 100644
View file @
3a0841e3
This diff is collapsed.
Click to expand it.
src/views/financialCenter/financialBilling.vue
View file @
3a0841e3
...
...
@@ -62,7 +62,9 @@
</el-row>
</div>
<el-table
ref=
"multipleTableRef"
:data=
"tableData"
row-key=
"fortuneBizId"
@
selection-change=
"handleSelectionChange"
height=
"400"
border
...
...
@@ -70,7 +72,7 @@
style=
"width: 100%"
v-loading=
"loading"
>
<el-table-column
type=
"selection"
width=
"40"
fixed=
"left"
/>
<el-table-column
type=
"selection"
width=
"40"
fixed=
"left"
:selectable=
"isSelectable"
/>
<el-table-column
prop=
"payableNo"
label=
"业务编号"
width=
"150"
fixed=
"left"
/>
<el-table-column
prop=
"status"
label=
"出账状态"
width=
"160"
sortable
>
<template
#
default=
"
{ row }">
...
...
@@ -340,7 +342,7 @@ const installmentsBillFlag = ref(false)
const
settingBillYearMonthFlag
=
ref
(
false
)
const
{
proxy
}
=
getCurrentInstance
()
const
{
csf_fortune_status
,
sys_no_yes
}
=
proxy
.
useDict
(
'csf_fortune_status'
,
'sys_no_yes'
)
const
multipleTableRef
=
ref
(
null
)
const
userStore
=
useUserStore
()
// 分页相关
const
currentPage
=
ref
(
1
)
...
...
@@ -671,6 +673,11 @@ const fortuneBizTypeOptions = [
{
value
:
'R'
,
label
:
'关联保单应付单'
},
{
value
:
'U'
,
label
:
'非关联保单应付单'
}
]
// 可选性校验
const
isSelectable
=
row
=>
{
// status 为 6 的行禁止勾选
return
row
.
status
!==
'6'
}
const
confirmRateExchange
=
async
()
=>
{
let
formData
=
await
rateExchangeFormRef
.
value
.
validate
()
formData
.
fortuneBizId
=
selectedRow
.
value
.
fortuneBizId
...
...
@@ -1011,7 +1018,8 @@ const addSpiltRecord = () => {
payoutCurrency
:
'HKD'
,
ruleCurrency
:
selectedRow
.
value
.
ruleCurrency
,
originalCurrency
:
selectedRow
.
value
.
originalCurrency
,
hkdToPayoutRate
:
'1'
hkdToPayoutRate
:
'1'
,
exchangeRate
:
selectedRow
.
value
.
exchangeRate
}
if
(
selectedRow
.
value
.
originalCurrency
&&
selectedRow
.
value
.
originalCurrency
==
'HKD'
)
{
newRow
.
originalToHkdRate
=
'1'
...
...
@@ -1445,7 +1453,6 @@ const updatePayoutAmountapi = async data => {
const
updatePayRollStatusDisable
=
ref
(
true
)
const
multipleSelection
=
ref
([])
const
handleSelectionChange
=
val
=>
{
multipleSelection
.
value
=
val
console
.
log
(
'全选:'
,
val
)
// 完成检核按钮是否禁用
...
...
@@ -1462,7 +1469,7 @@ const submitSettingBillYearMonth = async () => {
if
(
res
.
code
===
200
)
{
settingBillYearMonthFlag
.
value
=
false
ElMessage
.
success
(
'完成检核,等待关账'
)
const
params
=
searchFormRef
.
value
.
getFormData
()
const
params
=
await
searchFormRef
.
value
.
getFormData
()
loadTableData
(
params
)
}
}
catch
(
error
)
{
...
...
@@ -1479,7 +1486,8 @@ const submitSettingBillYearMonth = async () => {
const
singleRes
=
await
actualPayoutDateApi
(
params
)
ElMessage
.
success
(
'设置出账年月成功'
)
settingBillYearMonthFlag
.
value
=
false
loadTableData
()
const
searchParams
=
await
searchFormRef
.
value
.
getFormData
()
loadTableData
(
searchParams
)
}
catch
(
error
)
{
ElMessage
.
error
(
'设置出账年月失败'
)
settingBillYearMonthFlag
.
value
=
true
...
...
@@ -1522,6 +1530,17 @@ const onSubmit = data => {
}
onMounted
(
async
()
=>
{})
// 数据变化时清空选中
watch
(
()
=>
tableData
,
()
=>
{
nextTick
(()
=>
{
multipleTableRef
.
value
?.
clearSelection
()
multipleSelection
.
value
=
[]
})
},
{
deep
:
true
}
)
</
script
>
<
style
scoped
>
...
...
src/views/financialCenter/financialIncome.vue
View file @
3a0841e3
...
...
@@ -173,7 +173,7 @@
<el-table-column
prop=
"policyHolderEn"
label=
"投保人(英文)"
width=
"120"
/>
<el-table-column
prop=
"broker"
label=
"转介人"
width=
"120"
/>
<el-table-column
prop=
"insuranceCompany"
label=
"保险公司"
width=
"120"
/>
<el-table-column
prop=
"
r
emark"
label=
"备注"
width=
"120"
sortable
/>
<el-table-column
prop=
"
manualR
emark"
label=
"备注"
width=
"120"
sortable
/>
<el-table-column
prop=
"isDeleted"
label=
"记录状态"
width=
"120"
sortable
>
<
template
#
default=
"{ row }"
>
{{
row
.
isDeleted
===
1
?
'无效'
:
'有效'
}}
...
...
src/views/financialCenter/financialSalary.vue
View file @
3a0841e3
...
...
@@ -71,7 +71,7 @@
/> -->
<el-table-column
prop=
"fortuneAccountMonth"
label=
"出账月"
label=
"出账
年
月"
min-width=
"150"
show-overflow-tooltip
/>
...
...
@@ -442,8 +442,8 @@ const debounceChangeRateMap = new WeakMap()
const
debounceChangeToAmountMap
=
new
WeakMap
()
// 表格操作菜单
const
dropdownItems
=
[
{
label
:
'拆分出账'
,
value
:
'splitBilling'
}
,
{
label
:
'设置出账日'
,
value
:
'settingSalaryDate'
}
{
label
:
'拆分出账'
,
value
:
'splitBilling'
}
//
{ label: '设置出账日', value: 'settingSalaryDate' }
// { label: '查看记录', value: 'viewRecord' }
]
//=============拆分出账开始================
...
...
@@ -816,7 +816,7 @@ const getList = async (searchParams = {}) => {
payoutDate
:
undefined
,
pageNo
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
,
statusList
:
searchParams
.
statusList
||
[
'6'
]
statusList
:
searchParams
.
statusList
||
[
'6'
]
}
const
response
=
await
getReferrerFortuneList
(
params
)
...
...
src/views/financialCenter/payables.vue
View file @
3a0841e3
...
...
@@ -413,13 +413,13 @@ const payableReportListTableColumns = ref([
width
:
'130'
,
formatter
:
row
=>
row
.
payableNo
||
'-'
},
{
prop
:
'policyNo'
,
label
:
'关联业务编号'
,
sortable
:
true
,
width
:
'130'
,
formatter
:
row
=>
row
.
policyNo
||
'-'
},
//
{
//
prop: 'policyNo',
//
label: '关联业务编号',
//
sortable: true,
//
width: '130',
//
formatter: row => row.policyNo || '-'
//
},
{
prop
:
'policyNo'
,
label
:
'保单号'
,
...
...
src/views/financialCenter/receivables.vue
View file @
3a0841e3
...
...
@@ -94,7 +94,7 @@
</el-table>
</template>
</CommonPage>
<!-- 应收明细 -->
<CommonDialog
dialogTitle=
"应收明细"
dialogWidth=
"80%"
...
...
@@ -901,6 +901,7 @@ const handleSelect = async (e, row) => {
// 3. 此时 addRecordRef.value 一定存在了
if
(
addRecordRef
.
value
&&
selectedRow
.
value
)
{
addReceivablesFormModel
.
value
=
{
...
selectedRow
.
value
}
addReceivablesFormModel
.
value
.
commissionDate
=
selectedRow
.
value
.
commissionDateMonth
console
.
log
(
'赋值成功:'
,
addReceivablesFormModel
.
value
)
}
})
...
...
src/views/sign/appointment/components/fileUpload.vue
View file @
3a0841e3
<!-- 预约附件代码 -->
<
template
>
<div
class=
"uploadContainer"
>
<CardOne
title=
"材料信息"
>
...
...
@@ -129,7 +130,7 @@
:key=
"file.fileBizId"
class=
"uploaded-file-item"
>
<div
class=
"fileName"
>
{{ file.originalName }}
</div>
<div
class=
"fileName
Box
"
>
{{ file.originalName }}
</div>
<div>
<el-button
type=
"primary"
size=
"small"
link
@
click=
"previewFile(file)"
>
查看
...
...
@@ -148,37 +149,9 @@
</div>
</CommonDialog>
<!-- 文件预览弹窗(页面内查看,不打开新窗口) -->
<!-- <el-dialog
v-model="previewDialogVisible"
:title="previewFileName"
width="70%"
:close-on-click-modal="false"
destroy-on-close
@close="previewUrl = ''"
>
<div class="preview-container">
<div v-if="previewFileType === 'image'" class="preview-image-wrapper">
<img :src="previewUrl" class="preview-image" alt="预览图片" />
</div>
<iframe
v-else-if="previewFileType === 'pdf'"
:src="previewUrl"
class="preview-pdf"
frameborder="0"
></iframe>
<div v-else-if="previewFileType === 'unsupported'" class="preview-unsupported">
<el-icon :size="48" color="#909399"><Document /></el-icon>
<p>暂不支持预览此类型文件</p>
<el-button type="primary" @click="previewDialogVisible = false"> 关闭 </el-button>
</div>
</div>
</el-dialog> -->
<!-- 文件预览弹窗 -->
<el-dialog
<FilePreview
ref=
"filePreviewRef"
/>
<!-- <el-dialog
v-model="previewDialogVisible"
:title="previewFileName"
width="90%"
...
...
@@ -187,14 +160,14 @@
@close="closePreview"
>
<div class="preview-container">
<!-- 图片预览 -->
<div v-if="previewFileType === 'image'" class="preview-image-wrapper">
<img :src="previewUrl" class="preview-image" alt="预览图片" />
</div>
<!-- PDF 预览区域(滚动多页) -->
<div v-else-if="previewFileType === 'pdf'" class="pdf-viewer">
<div class="pdf-toolbar">
<!-- 只保留缩放按钮 -->
<el-button-group>
<el-button size="small" @click="zoomOut">
<el-icon><ZoomOut /></el-icon> 缩小
...
...
@@ -213,14 +186,14 @@
<div ref="pdfScrollContainer" class="pdf-scroll-container"></div>
</div>
</div>
<!-- 不支持预览的文件类型 -->
<div v-else-if="previewFileType === 'unsupported'" class="preview-unsupported">
<el-icon :size="48" color="#909399"><Document /></el-icon>
<p>暂不支持预览此类型文件</p>
<el-button type="primary" @click="previewDialogVisible = false"> 关闭 </el-button>
</div>
</div>
</el-dialog>
</el-dialog>
-->
<el-dialog
v-model=
"imageViewerVisible"
title=
"图片预览"
width=
"60%"
>
<div
style=
"text-align: center"
>
<el-image
:src=
"imageUrl"
fit=
"contain"
/>
...
...
@@ -234,6 +207,7 @@ import { ref, nextTick, shallowRef } from 'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
downloadFilesAsZip
}
from
'@/utils/zipDownload'
// 引入刚才封装的工具
import
CommonDialog
from
'@/components/commonDialog'
import
FilePreview
from
'@/components/Preview/filePreview.vue'
import
CardOne
from
'@/components/formCard/cardOne'
import
{
getToken
}
from
'@/utils/auth'
import
{
addFile
,
getAppointmentFile
,
delFile
,
editAppointmentFile
}
from
'@/api/sign/appointment'
...
...
@@ -258,6 +232,7 @@ const props = defineProps({
idsObj
:
{
type
:
Object
,
default
:
()
=>
({})
},
//父组件传递过来的id对象
pageSource
:
{
type
:
String
,
default
:
''
}
//页面来源
})
const
filePreviewRef
=
ref
(
null
)
// 在定义其他响应式变量的附近添加
const
pdfLoading
=
ref
(
false
)
// PDF 加载状态
const
acceptUploadType
=
ref
(
'.pdf,.jpg,.jpeg,.png,.bmp,.gif,.svg'
)
...
...
@@ -397,34 +372,42 @@ const renderAllPages = async scale => {
}
// 修改 previewFile 中的 PDF 分支
function
previewFile
(
file
)
{
console
.
log
(
'===================================='
)
console
.
log
(
'file'
,
file
)
console
.
log
(
'===================================='
)
const
url
=
file
.
url
||
file
.
fileUrl
if
(
!
url
)
{
ElMessage
.
warning
(
'文件地址不存在'
)
return
}
const
ext
=
(
file
.
originalName
||
''
).
split
(
'.'
).
pop
().
toLowerCase
()
previewUrl
.
value
=
url
previewFileName
.
value
=
file
.
originalName
||
'文件'
//
function previewFile(file) {
//
console.log('====================================')
//
console.log('file', file)
//
console.log('====================================')
//
const url = file.url || file.fileUrl
//
if (!url) {
//
ElMessage.warning('文件地址不存在')
//
return
//
}
//
const ext = (file.originalName || '').split('.').pop().toLowerCase()
//
previewUrl.value = url
//
previewFileName.value = file.originalName || '文件'
if
([
'jpg'
,
'jpeg'
,
'png'
,
'webp'
,
'gif'
,
'bmp'
,
'svg'
].
includes
(
ext
))
{
previewFileType
.
value
=
'image'
previewDialogVisible
.
value
=
true
}
else
if
(
ext
===
'pdf'
)
{
previewFileType
.
value
=
'pdf'
previewDialogVisible
.
value
=
true
// 先清理旧的资源
closePreview
()
nextTick
(()
=>
{
loadPdf
(
previewUrl
.
value
)
// if (['jpg', 'jpeg', 'png', 'webp', 'gif', 'bmp', 'svg'].includes(ext)) {
// previewFileType.value = 'image'
// previewDialogVisible.value = true
// } else if (ext === 'pdf') {
// previewFileType.value = 'pdf'
// previewDialogVisible.value = true
// // 先清理旧的资源
// closePreview()
// nextTick(() => {
// loadPdf(previewUrl.value)
// })
// } else {
// previewFileType.value = 'unsupported'
// previewDialogVisible.value = true
// }
// }
// 在需要预览文件的地方调用(例如原来的 previewFile 函数)
function
previewFile
(
file
)
{
// 确保传入对象包含 url 和 name 属性
filePreviewRef
.
value
?.
open
({
url
:
file
.
url
||
file
.
fileUrl
,
name
:
file
.
originalName
||
file
.
name
})
}
else
{
previewFileType
.
value
=
'unsupported'
previewDialogVisible
.
value
=
true
}
}
const
closePreview
=
()
=>
{
pdfLoadingCanceled
=
true
// 取消任何进行中的渲染
...
...
@@ -875,6 +858,13 @@ defineExpose({
})
</
script
>
<
style
lang=
"scss"
scoped
>
.fileNameBox
{
width
:
70%
;
/* 核心三件套: 强制单行 + 溢出隐藏 + 省略号 */
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.pdf-viewer
{
display
:
flex
;
flex-direction
:
column
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment