Commit 2d480f79 by Sweet Zhang

新单跟进附件删除功能,邮寄信息读取

parent 6725ee0a
...@@ -22,7 +22,14 @@ ...@@ -22,7 +22,14 @@
<el-statistic title="待入账金额(估)" :value="statisticsData.pendingPaidAmount" /> <el-statistic title="待入账金额(估)" :value="statisticsData.pendingPaidAmount" />
</el-col> </el-col>
<el-col :xs="24" :sm="12" :md="4" class="text-center mb-4"> <el-col :xs="24" :sm="12" :md="4" class="text-center mb-4">
<el-statistic title="已入账比例" :value="statisticsData.paidAmountRatio" /> <el-statistic :value="formatCurrency(statisticsData.paidAmountRatio)">
<template #title>
<div style="display: inline-flex; align-items: center">
已入账比例
</div>
</template>
<template #suffix>%</template>
</el-statistic>
</el-col> </el-col>
<el-col :xs="24" :sm="12" :md="4" class="text-center mb-4"> <el-col :xs="24" :sm="12" :md="4" class="text-center mb-4">
<el-statistic title="总保单数" :value="statisticsData.totalPolicyCount" /> <el-statistic title="总保单数" :value="statisticsData.totalPolicyCount" />
...@@ -764,7 +771,7 @@ const receivableReportTableColumns = ref([ ...@@ -764,7 +771,7 @@ const receivableReportTableColumns = ref([
{ prop: 'exchangeRate', label: '结算汇率(估)', sortable: true, width: '120'}, { prop: 'exchangeRate', label: '结算汇率(估)', sortable: true, width: '120'},
{ prop: 'insuranceCompany', label: '保险公司', sortable: true, width: '120', formatter: (row) => row.insuranceCompany || '-' }, { prop: 'insuranceCompany', label: '保险公司', sortable: true, width: '120', formatter: (row) => row.insuranceCompany || '-' },
{ prop: 'productName', label: '产品计划', sortable: true, width: '120', formatter: (row) => row.productName || '-' }, { prop: 'productName', label: '产品计划', sortable: true, width: '120', formatter: (row) => row.productName || '-' },
{ prop: 'premium', label: '期交保费', sortable: true, width: '120', formatter: (row) => row.premium || '-' }, { prop: 'premium', label: '期交保费', sortable: true, width: '120', formatter: (row) => formatCurrency(row.premium || 0) },
{ prop: 'policyCurrency', label: '保单币种', sortable: true, width: '120', formatter: (row) => row.policyCurrency || '-' }, { prop: 'policyCurrency', label: '保单币种', sortable: true, width: '120', formatter: (row) => row.policyCurrency || '-' },
]) ])
const receivableReportItemTableColumns = ref([ const receivableReportItemTableColumns = ref([
......
...@@ -225,8 +225,6 @@ const onSubmit = async (data) => { ...@@ -225,8 +225,6 @@ const onSubmit = async (data) => {
ElMessage.error(res.msg || '保存转介人失败') ElMessage.error(res.msg || '保存转介人失败')
} }
} else if (data.activeTab === 'attachment') {
} else if (data.activeTab === 'firstPayment') { } else if (data.activeTab === 'firstPayment') {
try { try {
params = { params = {
...@@ -246,6 +244,8 @@ const onSubmit = async (data) => { ...@@ -246,6 +244,8 @@ const onSubmit = async (data) => {
return return
} }
}else if(data.activeTab === 'attachment'){
viewDetailDialogFlag.value = false
} }
} }
......
...@@ -156,25 +156,20 @@ ...@@ -156,25 +156,20 @@
:formatter="column.formatter" :formatter="column.formatter"
/> />
<el-table-column fixed="right" label="操作" min-width="120"> <el-table-column fixed="right" label="操作" min-width="120">
<template #default> <template #default="scope">
<el-popconfirm title="确定删除吗?" @confirm="deleteFile(scope.row)">
<template #reference>
<el-button <el-button
link link
type="primary"
size="small"
@click="handleClick"
:disabled="props.mode === 'viewDetail'"
>
修改 </el-button
><el-button
link
type="danger" type="danger"
size="small" size="small"
@click="handleClick"
:disabled="props.mode === 'viewDetail'" :disabled="props.mode === 'viewDetail'"
> >
删除 删除
</el-button> </el-button>
</template> </template>
</el-popconfirm>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -220,7 +215,7 @@ import CommonDialog from '@/components/commonDialog' ...@@ -220,7 +215,7 @@ import CommonDialog from '@/components/commonDialog'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { Delete, Edit, Search, Share, Upload } from '@element-plus/icons-vue' import { Delete, Edit, Search, Share, Upload } from '@element-plus/icons-vue'
import { getPolicyfollow, getProductList } from '@/api/sign/underwritingMain' import { getPolicyfollow, getProductList } from '@/api/sign/underwritingMain'
import { uploadOssFileList } from '@/api/common' import { uploadOssFileList,delUploadFile } from '@/api/common'
import { getProcessDetail } from '@/api/sign/fna' import { getProcessDetail } from '@/api/sign/fna'
import { premiumReconciliationList } from '@/api/sign/policy' import { premiumReconciliationList } from '@/api/sign/policy'
import { loadDicts, getDictLabel } from '@/utils/useDict' import { loadDicts, getDictLabel } from '@/utils/useDict'
...@@ -999,6 +994,7 @@ const activeTab = ref('basic') ...@@ -999,6 +994,7 @@ const activeTab = ref('basic')
// ======================== // ========================
const handleBeforeLeave = async (newTabName, oldTabName) => { const handleBeforeLeave = async (newTabName, oldTabName) => {
console.log('切换前确认-----------------------', newTabName, oldTabName) console.log('切换前确认-----------------------', newTabName, oldTabName)
console.log(tabDirty.value)
if (tabDirty.value[oldTabName]) { if (tabDirty.value[oldTabName]) {
try { try {
await ElMessageBox.confirm(`“${getTabLabel(oldTabName)}” 未提交,确定要切换吗?`, '提示', { await ElMessageBox.confirm(`“${getTabLabel(oldTabName)}” 未提交,确定要切换吗?`, '提示', {
...@@ -1058,25 +1054,36 @@ const handleSubmit = () => { ...@@ -1058,25 +1054,36 @@ const handleSubmit = () => {
if (valid) { if (valid) {
console.log('提交数据', introducerTableData.value) console.log('提交数据', introducerTableData.value)
if (activeTab.value === 'postal') { if (activeTab.value === 'postal') {
tabDirty.value.postal = false
emit('submit', { ...postalFormData.value, activeTab: activeTab.value }) emit('submit', { ...postalFormData.value, activeTab: activeTab.value })
} else if (activeTab.value === 'firstPayment') { } else if (activeTab.value === 'firstPayment') {
tabDirty.value.firstPayment = false
emit('submit', { ...firstPremiumFormData.value, activeTab: activeTab.value }) emit('submit', { ...firstPremiumFormData.value, activeTab: activeTab.value })
} else if (activeTab.value === 'attachment') { } else if (activeTab.value === 'attachment') {
emit('submit', { activeTab: activeTab.value }) emit('submit', { activeTab: activeTab.value })
tabDirty.value.attachment = false
} else if (activeTab.value === 'introducer') { } else if (activeTab.value === 'introducer') {
emit('submit', { ...introducerTableData.value, activeTab: activeTab.value }) emit('submit', { ...introducerTableData.value, activeTab: activeTab.value })
tabDirty.value.introducer = false
} else if (activeTab.value === 'basic') { } else if (activeTab.value === 'basic') {
tabDirty.value.basic = false
emit('submit', { emit('submit', {
...basicInfoFormData.value, ...basicInfoFormData.value,
activeTab: activeTab.value, activeTab: activeTab.value,
...policyInfoFormData.value ...policyInfoFormData.value
}) })
} else if (activeTab.value === 'productPlan') { } else if (activeTab.value === 'productPlan') {
tabDirty.value.productPlan = false
emit('submit', { emit('submit', {
...basicPlanFormData.value, ...basicPlanFormData.value,
activeTab: activeTab.value, activeTab: activeTab.value,
...localData.additionalPlans ...localData.additionalPlans
}) })
}else if (activeTab.value === 'attachment'){
tabDirty.value.attachment = false
emit('submit', {
activeTab: activeTab.value
})
} }
} }
}) })
...@@ -1085,9 +1092,19 @@ const handleSubmit = () => { ...@@ -1085,9 +1092,19 @@ const handleSubmit = () => {
const handleCancel = () => { const handleCancel = () => {
emit('cancel') emit('cancel')
} }
// 删除附件
const deleteFile = (row)=>{
console.log(row)
const fileBizId = row.fileBizId || '';
delUploadFile(fileBizId).then(res=>{
console.log(res)
if(res.code===200){
getAttachmentListDetail(props.policyBizId)
}else{
ElMessage.error('删除文件失败')
}
const handleClick = tab => { })
activeTab.value = tab.name
} }
// 如果外部 modelValue 更新(比如重新加载数据),同步到 localData // 如果外部 modelValue 更新(比如重新加载数据),同步到 localData
...@@ -1116,6 +1133,9 @@ const getPolicyfollowDetail = () => { ...@@ -1116,6 +1133,9 @@ const getPolicyfollowDetail = () => {
firstPremiumFormData.value = { firstPremiumFormData.value = {
...transformToFormData(res.data, firstPremiumFormConfig.value) ...transformToFormData(res.data, firstPremiumFormConfig.value)
} }
postalFormData.value = {
...transformToFormData(res.data, postalFormConfig.value)
}
introducerTableData.value = res.data.brokerList || [] introducerTableData.value = res.data.brokerList || []
console.log('====父组件在赋值basicPlanFormData后', basicPlanFormData.value) console.log('====父组件在赋值basicPlanFormData后', basicPlanFormData.value)
} }
...@@ -1135,7 +1155,6 @@ const getAttachmentListDetail = policyBizId => { ...@@ -1135,7 +1155,6 @@ const getAttachmentListDetail = policyBizId => {
uploadOssFileList(params).then(res => { uploadOssFileList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
attachmentTableData.value = res.data || [] attachmentTableData.value = res.data || []
console.log('attachmentTableData', res.data)
} }
}) })
} }
......
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