Commit b3a13b17 by Sweet Zhang

部分字段对接

parent a38cf62a
......@@ -481,6 +481,7 @@ const updatePayoutAmountapi = async (data) => {
if (res.code === 200) {
ElMessage.success('设置本期出账金额成功')
loadTableData()
setPayoutAmountDialogFlag.value = false
} else {
ElMessage.error(res.msg || '设置本期出账金额失败')
}
......
......@@ -131,11 +131,12 @@
</template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu">
<el-menu-item :index="item.value" v-for="item in dropdownItems" :key="item.value">
<el-text class="mx-1" v-if="!item.confirm">{{item.label}}</el-text>
<el-popconfirm v-if="item.confirm" confirm-button-text="Yes" cancel-button-text="No" :icon="InfoFilled" icon-color="#626AEF"
:title="item.confirm" @confirm="handleMenuConfirm(item.value, row)" width="300" placement="left-end">
<el-text class="mx-1" v-if="!item.confirm">{{ item.label }}</el-text>
<el-popconfirm v-if="item.confirm" confirm-button-text="Yes" cancel-button-text="No"
:icon="InfoFilled" icon-color="#626AEF" :title="item.confirm"
@confirm="handleMenuConfirm(item.value, row)" width="300" placement="left-end">
<template #reference>
<el-text class="mx-1">{{item.label}}</el-text>
<el-text class="mx-1">{{ item.label }}</el-text>
</template>
</el-popconfirm>
</el-menu-item>
......@@ -236,7 +237,7 @@
<!-- 新增检核记录弹窗 -->
<CommonDialog :dialogTitle='editStatus.value == "add" ? "新增检核记录" : "修改检核记录"' dialogWidth='80%'
:openDialog=addCheckRecordDialogFlag :showAction='true' :showClose='true'
@close='addCheckRecordDialogFlag = false;editStatus = "add"' @confirm='handleAddCheckRecord()'>
@close='closeDialog()' @confirm='handleAddCheckRecord()'>
<el-row>
<el-col :xs="24" :sm="24" :md="24" :lg="24">
<SearchForm ref="addCheckRecordFormRef" :config="addCheckRecordConfig" v-model="addReceivablesFormModel" />
......@@ -248,7 +249,8 @@
:showClose='true' @close='fileUploadDialogFlag = false; files = ""'
@confirm='fileUploadDialogFlag = false; files = ""'>
<FileUpload v-model="files" :data="{ reconciliationYearMonth: checkFormData.reconciliationYearMonth }"
:file-type="['xlsx', 'xls']" :action="'/csf/api/commission/upload/excel'" :limit="1" :fileSize="15" @uploadEnd="handleUploadEnd"/>
:file-type="['xlsx', 'xls']" :action="'/csf/api/commission/upload/excel'" :limit="1" :fileSize="15"
@uploadEnd="handleUploadEnd" />
</CommonDialog>
<!-- 设置比对状态 -->
......@@ -288,13 +290,13 @@ import {
import { Plus, Upload, Select } from '@element-plus/icons-vue'
import FileUpload from '@/components/FileUpload/index.vue'
import { loadDicts, getDictLabel } from '@/utils/useDict'
const formatRatio = (row,column,cellValue,index) => {
const formatRatio = (row, column, cellValue, index) => {
if (cellValue == null || cellValue == '' || cellValue == 0) {
return '-'
}
return cellValue + '%'
}
const formatCurrencyUtil = (row,column,cellValue,index) => {
const formatCurrencyUtil = (row, column, cellValue, index) => {
if (cellValue == null || cellValue == '' || cellValue == 0) {
return '-'
}
......@@ -424,7 +426,7 @@ const checkConfig = ref([
])
const checkRecordEdit = (row) => {
console.log('查看记录', row)
selectedRowCheck.value = {...row}
selectedRowCheck.value = { ...row }
editStatus.value = 'edit'
addReceivablesFormModel.value = { ...row }
addCheckRecordDialogFlag.value = true
......@@ -481,7 +483,7 @@ onMounted(async () => {
}
})
// 格式化函数(每次渲染都会调用,所以能拿到最新字典)
const formatStatus = (row, column,cellValue,index) => {
const formatStatus = (row, column, cellValue, index) => {
return getDictLabel('csf_expected_commission_status', cellValue) // 实时查缓存
}
// 应收单类型
......@@ -621,6 +623,8 @@ const handleAddCheckRecord = async () => {
console.log(params)
await updateCommissionRecord(params.value)
ElMessage.success('更新检核记录成功')
resetForm('addReceivablesFormModel')
} else {
const addCheckSearchParams = addCheckRecordFormRef.value.getFormData()
console.log('新增检核记录', addCheckSearchParams)
......@@ -631,6 +635,7 @@ const handleAddCheckRecord = async () => {
await addPayrollCheckRecord([params.value])
ElMessage.success('新增检核记录成功')
addCheckRecordDialogFlag.value = false
resetForm('addReceivablesFormModel')
checkRecordTableData.value = []
}
checkRecordQuery()
......@@ -639,6 +644,18 @@ const handleAddCheckRecord = async () => {
ElMessage.error('新增检核记录失败')
}
}
const resetForm = (type) => {
if (type === 'addReceivablesFormModel')
addReceivablesFormModel.value = {}
addCheckRecordFormRef.value.resetForm()
}
const closeDialog = () => {
addCheckRecordDialogFlag.value = false
editStatus.value = 'add'
handleQuery()
}
// 生成可出账记录
const generateCommissionRecordapi = async () => {
try {
......@@ -658,8 +675,8 @@ const generateCommissionRecordapi = async () => {
}
// 表格操作菜单
const dropdownItems = [
{ label: '设置比对状态', value: 'setStatus' ,confirm:''},
{ label: '同步到应收款管理', value: 'syncToReceivable',confirm:'确认要同步到应收款管理吗?' },
{ label: '设置比对状态', value: 'setStatus', confirm: '' },
{ label: '同步到应收款管理', value: 'syncToReceivable', confirm: '确认要同步到应收款管理吗?' },
// { label: '更新数据', value: 'editRecord' },
// { label: '查看记录', value: 'viewRecord' }
]
......@@ -667,7 +684,7 @@ const handleMenuConfirm = async (action, row) => {
console.log('点击了操作菜单', action, row)
if (action === 'syncToReceivable') {
try {
if(row.commissionStatus !== '3'){
if (row.commissionStatus !== '3') {
ElMessage.error('应收款管理已有这条记录,无需同步')
return
}
......@@ -815,7 +832,7 @@ const handleSelect = (e, row) => {
} else if (e === 'viewRecord') {
viewRecordDialogFlag.value = true
return
}else if (e === 'syncToReceivable') {
} else if (e === 'syncToReceivable') {
return
}
......
<template>
<div>
<CommonPage :operationBtnList="operationBtnList" :showSearchForm="true" :show-pagination="true" :total="pageTotal"
<CommonPage :operationBtnList="operationBtnList" :visibleDefaultButtons="visibleDefaultButtons" :showSearchForm="true" :show-pagination="true" :total="pageTotal"
:current-page="currentPage" :page-size="pageSize" @size-change="handleSizeChange"
@current-change="handleCurrentChange">
<!-- 搜索区域 -->
......@@ -15,8 +15,8 @@
<el-col :xs="24" :sm="12" :md="4" :lg="4">
<el-card shadow="hover" class="statistics-card">
<div class="card-content">
<div class="card-label">应出总金额</div>
<div class="card-value">{{ formatCurrency(statisticsData.totalAmount) }}</div>
<div class="card-label">应出总金额</div>
<div class="card-value">{{ formatCurrency(statisticsData.totalExpectedAmount) }}</div>
</div>
</el-card>
</el-col>
......@@ -32,7 +32,7 @@
<el-card shadow="hover" class="statistics-card">
<div class="card-content">
<div class="card-label">待出账金额</div>
<div class="card-value">{{ formatCurrency(statisticsData.pendingPaidAmount) }}</div>
<div class="card-value">{{ formatCurrency(statisticsData.totalUnpaidAmount) }}</div>
</div>
</el-card>
</el-col>
......@@ -56,7 +56,7 @@
<el-card shadow="hover" class="statistics-card">
<div class="card-content">
<div class="card-label">总保费</div>
<div class="card-value">{{ statisticsData.totalPolicyCount }}</div>
<div class="card-value">{{ formatCurrency(statisticsData.totalPremiumAmount) }}</div>
</div>
</el-card>
</el-col>
......@@ -113,7 +113,11 @@
{{ formatCurrency(row.unpaidAmount) }}
</template>
</el-table-column>
<el-table-column prop="brokerRatio" label="持有比例" width="120" sortable />
<el-table-column prop="brokerRatio" label="持有比例" width="120" sortable >
<template #default="{ row }">
{{ (row.brokerRatio || 0) + '%' }}
</template>
</el-table-column>
<el-table-column prop="insuranceCompany" label="保险公司" width="120" sortable />
<el-table-column prop="productName" label="产品计划" width="120" sortable />
<el-table-column prop="premium" label="期交保费" width="120" sortable>
......@@ -153,7 +157,7 @@
<!-- 新增出账记录 -->
<CommonDialog :dialogTitle="editStatus === 'add' ? '新增出账记录' : '修改出账记录'" dialogWidth="80%"
:openDialog="addPayRecordDialogVisible" :showAction="true" :showClose="true"
@close="addPayRecordDialogVisible = false; editStatus = 'add'" @confirm="handleConfirmAddPayRecord">
@close="resetAddPayRecordForm" @confirm="handleConfirmAddPayRecord">
<SearchForm ref="addPayRecordFormRef" :config="addPayRecordFormConfig" v-model="addPayRecordFormModel" />
</CommonDialog>
<!-- 设置出账状态 -->
......@@ -193,7 +197,9 @@ const setPayRecordStatusFormConfig = ref([
label: '修改理由',
},
])
const visibleDefaultButtons = ref([
'add', 'export', 'reset', 'query'
])
const userStore = useUserStore()
// 应收单类型
const fortuneBizTypeOptions = [
......@@ -420,6 +426,12 @@ const handleConfirmAddPayRecord = async () => {
}
}
// 弹窗表单重置
const resetAddPayRecordForm = () => {
addPayRecordFormRef.value.resetForm()
editStatus.value = 'add'
addPayRecordDialogVisible.value = false
}
const editStatus = ref('add')
......@@ -434,10 +446,10 @@ const handleSelect = async (e, row) => {
payRecordDialogTableColumns.value = [
{ property: 'broker', label: '转介人', width: '100', },
{ property: 'fortuneName', label: '出账项目', width: '150' },
{ property: 'amount', label: '出账金额', width: '150' },
{ property: 'currentPaymentAmount', label: '出账金额', width: '150' },
{ property: 'currency', label: '出账币种', width: '150' },
{ property: 'amount', label: '出账比例', width: '150' },
{ property: 'currentCommissionRatio', label: '待出账比例', width: '150' },
{ property: 'commissionPaidRatio', label: '出账比例', width: '150' },
{ property: 'fortuneUnpaidRatio', label: '待出账比例', width: '150' },
{ property: 'fortunePeriod', label: '佣金期数', width: '150' },
{ property: 'fortuneTotalPeriod', label: '总期数', width: '150' },
{ property: 'updaterId', label: '操作人', width: '150' },
......@@ -535,11 +547,11 @@ const operationBtnList = ref([
direction: 'left',
click: handleAdd
},
{
key: 'import',
direction: 'left',
click: handleImport
},
// {
// key: 'import',
// direction: 'left',
// click: handleImport
// },
{
key: 'export',
direction: 'right',
......
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