Commit ac965f5d by zhangxingmin

Merge remote-tracking branch 'origin/test' into test

parents 6e15fd7c 5f8ce1c2
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
"lodash": "^4.18.1", "lodash": "^4.18.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"p-limit": "^7.3.0", "p-limit": "^7.3.0",
"pdfjs-dist": "^5.7.284",
"pinia": "3.0.2", "pinia": "3.0.2",
"spark-md5": "^3.0.2", "spark-md5": "^3.0.2",
"splitpanes": "^4.0.4", "splitpanes": "^4.0.4",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -510,8 +510,8 @@ export function newQueryCommissionExpectedByPage(data) { ...@@ -510,8 +510,8 @@ export function newQueryCommissionExpectedByPage(data) {
// 应收款管理修改应收记录状态 // 应收款管理修改应收记录状态
export function CommissionExpectedChangeStatus(data) { export function CommissionExpectedChangeStatus(data) {
return request({ return request({
url: 'csf/api/CommissionExpected/change_status', url: 'csf/api/CommissionExpected/edit/status',
method: 'post', method: 'put',
data: data data: data
}) })
} }
...@@ -547,3 +547,12 @@ export function editStatusApi(data) { ...@@ -547,3 +547,12 @@ export function editStatusApi(data) {
data: data data: data
}) })
} }
//出账检核--修改结算汇率
export function editExchangeRateApi(data) {
return request({
url: 'csf/api/fortune/edit/exchange_rate',
method: 'post',
data: data
})
}
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
:type="btn.type || 'primary'" :type="btn.type || 'primary'"
:icon="btn.icon" :icon="btn.icon"
:size="btn.size || 'default'" :size="btn.size || 'default'"
@click="handleButtonClick(btn)" @click.stop="handleButtonClick(btn)"
:disabled="btn.disabled" :disabled="btn.disabled"
:loading="btn.loading" :loading="btn.loading"
:class="btn.customClass" :class="btn.customClass"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
:type="btn.type || 'primary'" :type="btn.type || 'primary'"
:icon="btn.icon" :icon="btn.icon"
:size="btn.size || 'default'" :size="btn.size || 'default'"
@click="handleButtonClick(btn)" @click.stop="handleButtonClick(btn)"
:disabled="btn.disabled" :disabled="btn.disabled"
:loading="btn.loading" :loading="btn.loading"
:class="btn.customClass" :class="btn.customClass"
...@@ -316,6 +316,9 @@ const checkConditions = () => { ...@@ -316,6 +316,9 @@ const checkConditions = () => {
// 处理按钮点击 // 处理按钮点击
const handleButtonClick = async (btn: OperationButton) => { const handleButtonClick = async (btn: OperationButton) => {
console.log('====================================')
console.log('按钮')
console.log('====================================')
// 触发通用按钮点击事件 // 触发通用按钮点击事件
emit('btn-click', btn) emit('btn-click', btn)
...@@ -362,6 +365,9 @@ const handleSizeChange = (size: number) => { ...@@ -362,6 +365,9 @@ const handleSizeChange = (size: number) => {
const handleCurrentChange = (page: number) => { const handleCurrentChange = (page: number) => {
currentPage.value = page currentPage.value = page
console.log('====================================')
console.log('当前页')
console.log('====================================')
emit('current-change', page) emit('current-change', page)
} }
......
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
export function copyToClipboard(text) { // 传统降级复制方法
// 方案1:使用现代 Clipboard API
if (navigator.clipboard && navigator.clipboard.writeText) {
return navigator.clipboard.writeText(text).catch((err) => {
console.error('Clipboard API 写入失败:', err);
ElMessage.error('复制失败')
// 降级到传统方案
fallbackCopyText(text);
});
}
// 方案2:降级使用传统方法
else {
fallbackCopyText(text);
}
}
// 传统复制方法
function fallbackCopyText(text, typeName = '内容') { function fallbackCopyText(text, typeName = '内容') {
const textarea = document.createElement('textarea'); const textarea = document.createElement('textarea');
textarea.value = text; textarea.value = text;
// 防止页面滚动或闪烁
textarea.style.position = 'fixed'; textarea.style.position = 'fixed';
textarea.style.opacity = '0'; textarea.style.opacity = '0';
textarea.style.left = '-9999px';
document.body.appendChild(textarea); document.body.appendChild(textarea);
try { try {
textarea.select(); textarea.select();
textarea.setSelectionRange(0, 99999); // 对于移动设备 textarea.setSelectionRange(0, 99999); // 兼容移动端
document.execCommand('copy'); const successful = document.execCommand('copy');
console.log('传统方法复制成功'); if (successful) {
ElMessage.success(`${typeName}已复制`) ElMessage.success(`${typeName}已复制`);
} else {
throw new Error('execCommand 返回失败');
}
} catch (err) { } catch (err) {
console.error('传统方法复制失败:', err) console.error('传统方法复制失败:', err);
ElMessage.error('复制失败'); ElMessage.error('复制失败,请手动复制');
} finally { } finally {
document.body.removeChild(textarea); document.body.removeChild(textarea);
} }
} }
export default { // 主导出函数,接收 text 和 typeName 两个参数
copyToClipboard export default function copyToClipboard(text, typeName = '内容') {
// 1. 判断是否在安全上下文(HTTPS/localhost) 且 浏览器支持 Clipboard API
if (window.isSecureContext && navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(() => {
ElMessage.success(`${typeName}已复制`);
}).catch((err) => {
console.error('Clipboard API 写入失败,降级处理:', err);
// API 调用失败(如权限被拒),自动降级到传统方案
fallbackCopyText(text, typeName);
});
} else {
// 2. 非安全环境(如 HTTP)或不支持新 API,直接使用传统降级方案
fallbackCopyText(text, typeName);
}
} }
\ No newline at end of file
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
/> --> /> -->
<el-table-column <el-table-column
prop="fortuneAccountMonth" prop="fortuneAccountMonth"
label="出账月" label="出账月"
min-width="150" min-width="150"
show-overflow-tooltip show-overflow-tooltip
/> />
...@@ -442,8 +442,8 @@ const debounceChangeRateMap = new WeakMap() ...@@ -442,8 +442,8 @@ const debounceChangeRateMap = new WeakMap()
const debounceChangeToAmountMap = new WeakMap() const debounceChangeToAmountMap = new WeakMap()
// 表格操作菜单 // 表格操作菜单
const dropdownItems = [ const dropdownItems = [
{ label: '拆分出账', value: 'splitBilling' }, { label: '拆分出账', value: 'splitBilling' }
{ label: '设置出账日', value: 'settingSalaryDate' } // { label: '设置出账日', value: 'settingSalaryDate' }
// { label: '查看记录', value: 'viewRecord' } // { label: '查看记录', value: 'viewRecord' }
] ]
//=============拆分出账开始================ //=============拆分出账开始================
...@@ -733,11 +733,13 @@ const salaryDataSetting = async e => { ...@@ -733,11 +733,13 @@ const salaryDataSetting = async e => {
// 分页事件 // 分页事件
const handleSizeChange = val => { const handleSizeChange = val => {
pageSize.value = val pageSize.value = val
getList() const params = searchFormRef.value.getFormData()
getList(params)
} }
const handleCurrentChange = val => { const handleCurrentChange = val => {
currentPage.value = val currentPage.value = val
getList() const params = searchFormRef.value.getFormData()
getList(params)
} }
// 设置当前页的选中状态 // 设置当前页的选中状态
...@@ -814,7 +816,7 @@ const getList = async (searchParams = {}) => { ...@@ -814,7 +816,7 @@ const getList = async (searchParams = {}) => {
payoutDate: undefined, payoutDate: undefined,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
statusList:searchParams.statusList || ['6'] statusList: searchParams.statusList || ['6']
} }
const response = await getReferrerFortuneList(params) const response = await getReferrerFortuneList(params)
...@@ -850,6 +852,7 @@ const getStatusType = status => { ...@@ -850,6 +852,7 @@ const getStatusType = status => {
// 查询 // 查询
const handleQuery = () => { const handleQuery = () => {
currentPage.value = 1
const params = searchFormRef.value.getFormData() const params = searchFormRef.value.getFormData()
console.log('父组件发起查询:', params) console.log('父组件发起查询:', params)
clearAllSelection() clearAllSelection()
......
...@@ -75,7 +75,7 @@ const tableColumns = ref([ ...@@ -75,7 +75,7 @@ const tableColumns = ref([
{ prop: 'fortuneAccountMonth', label: '出账月(实)', sortable: true, width: '150'}, { prop: 'fortuneAccountMonth', label: '出账月(实)', sortable: true, width: '150'},
{ prop: 'billOrg', label: '出账机构', sortable: true, width: '150'}, { prop: 'billOrg', label: '出账机构', sortable: true, width: '150'},
{ prop: 'hkdAmount', label: '本期总出账金额(原币种)', sortable: true, width: '150'}, { prop: 'hkdAmount', label: '本期总出账金额(原币种)', sortable: true, width: '150'},
{ prop: 'fortuneAccountBizId', label: '出账记录业务id', sortable: true, width: '150'}, // { prop: 'fortuneAccountBizId', label: '出账记录业务id', sortable: true, width: '150'},
]) ])
// 添加表格引用 // 添加表格引用
...@@ -130,6 +130,7 @@ getList() ...@@ -130,6 +130,7 @@ getList()
// 查询 // 查询
const handleQuery = () => { const handleQuery = () => {
currentPage.value = 1
const params = searchFormRef.value.getFormData() const params = searchFormRef.value.getFormData()
console.log('父组件发起查询:', params) console.log('父组件发起查询:', params)
getList(params) getList(params)
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</el-table> </el-table>
</template> </template>
</CommonPage> </CommonPage>
<!-- 应收明细 -->
<CommonDialog <CommonDialog
dialogTitle="应收明细" dialogTitle="应收明细"
dialogWidth="80%" dialogWidth="80%"
...@@ -188,22 +188,29 @@ ...@@ -188,22 +188,29 @@
:width="item.width" :width="item.width"
:formatter="item.formatter" :formatter="item.formatter"
/> />
<!-- <el-table-column fixed="right" label="操作" min-width="120">
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }"> <template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click"> <el-popover placement="right" :width="200" trigger="click" v-if="row.type == '1'">
<template #reference> <template #reference>
<el-icon> <el-icon>
<MoreFilled /> <MoreFilled />
</el-icon> </el-icon>
</template> </template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu"> <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-menu-item :index="item.value" v-for="item in dropdownItems" :key="item.value">
{{ item.label }} {{ item.label }}
</el-menu-item> </el-menu-item> -->
<el-menu-item
:index="item.value"
v-for="item in getOperateItems(row)"
:key="item.value"
>{{ item.label }}</el-menu-item
>
</el-menu> </el-menu>
</el-popover> </el-popover>
</template> </template>
</el-table-column> --> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
v-model:current-page="detailPageInfo.currentPage" v-model:current-page="detailPageInfo.currentPage"
...@@ -370,9 +377,9 @@ const addReceivablesFormConfig = [ ...@@ -370,9 +377,9 @@ const addReceivablesFormConfig = [
rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }] rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
}, },
{ {
type: 'date', type: 'month',
prop: 'commissionDate', prop: 'commissionDate',
label: '入账(估)', label: '入账(估)',
placeholder: '请选择' placeholder: '请选择'
}, },
// { // {
...@@ -421,7 +428,7 @@ const addReceivablesFormConfig = [ ...@@ -421,7 +428,7 @@ const addReceivablesFormConfig = [
}, },
{ {
type: 'select', type: 'select',
prop: 'reconciliationCompanyBizId', prop: 'reconciliationCompany',
label: '对账公司', label: '对账公司',
api: '/insurance/base/api/insuranceReconciliationCompany/page', api: '/insurance/base/api/insuranceReconciliationCompany/page',
keywordField: 'name', keywordField: 'name',
...@@ -441,15 +448,7 @@ const addReceivablesFormConfig = [ ...@@ -441,15 +448,7 @@ const addReceivablesFormConfig = [
}, },
{ {
type: 'input', type: 'input',
prop: 'exchangeRate', prop: 'manualRemark',
label: '结算汇率',
inputType: 'decimal',
rules: [{ required: true, message: '只能输入正整数和小数', trigger: 'blur' }]
// defaultValue: 1
},
{
type: 'input',
prop: 'remark',
label: '备注' label: '备注'
} }
] ]
...@@ -483,6 +482,7 @@ const handleConfirmAddReceivables = async () => { ...@@ -483,6 +482,7 @@ const handleConfirmAddReceivables = async () => {
ElMessage.success('应收款修改成功') ElMessage.success('应收款修改成功')
addReceivablesDialogVisible.value = false addReceivablesDialogVisible.value = false
resetAddReceivablesForm() resetAddReceivablesForm()
receivedFortuneListData()
loadTableData() // 重新加载表格 loadTableData() // 重新加载表格
} else { } else {
ElMessage.error(res.msg || '应收款修改失败') ElMessage.error(res.msg || '应收款修改失败')
...@@ -503,9 +503,9 @@ const searchConfig = ref([ ...@@ -503,9 +503,9 @@ const searchConfig = ref([
label: '保单号' label: '保单号'
}, },
{ {
type: 'daterange', type: 'monthrange',
prop: 'entryDate', prop: 'entryDate',
label: '入账(估)', label: '入账(估)',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间' endPlaceholder: '结束时间'
}, },
...@@ -650,6 +650,21 @@ const dropdownItems = [ ...@@ -650,6 +650,21 @@ const dropdownItems = [
{ label: '设置状态', value: 'setStatus' }, { label: '设置状态', value: 'setStatus' },
{ label: '更新数据', value: 'updateData' } { label: '更新数据', value: 'updateData' }
] ]
// 动态生成操作菜单项(根据行数据)
const getOperateItems = row => {
const items = []
// 条件:isPart == 1 时不显示分期出账(使用宽松相等,兼容字符串 '1')
if (row.type == 1) {
items.push({ label: '设置状态', value: 'setStatus' })
items.push({ label: '更新数据', value: 'updateData' })
}
// 始终显示的菜单项(保持原始顺序)
// items.push({ label: '设置出账年月(实)', value: 'settingBillYearMonth' })
return items
}
// 弹窗状态 // 弹窗状态
const entryRecordDialogTableVisible = ref(false) const entryRecordDialogTableVisible = ref(false)
...@@ -726,6 +741,7 @@ const handleReset = () => { ...@@ -726,6 +741,7 @@ const handleReset = () => {
} }
const handleQuery = () => { const handleQuery = () => {
currentPage.value = 1
loadTableData() loadTableData()
} }
const visibleDefaultButtons = ref(['add', 'export', 'reset', 'query']) const visibleDefaultButtons = ref(['add', 'export', 'reset', 'query'])
...@@ -741,12 +757,14 @@ const operationBtnList = ref([ ...@@ -741,12 +757,14 @@ const operationBtnList = ref([
// 分页事件 // 分页事件
const handleSizeChange = val => { const handleSizeChange = val => {
pageSize.value = val pageSize.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
const handleCurrentChange = val => { const handleCurrentChange = val => {
currentPage.value = val currentPage.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
// 加载表格数据 // 加载表格数据
...@@ -754,10 +772,23 @@ const loadTableData = async () => { ...@@ -754,10 +772,23 @@ const loadTableData = async () => {
const searchParams = searchFormRef.value.getFormData() || {} const searchParams = searchFormRef.value.getFormData() || {}
loading.value = true loading.value = true
try { try {
console.log('searchParams.entryDate', searchParams.entryDate)
if (searchParams.entryDate.length > 0) {
searchParams.commissionDateStart = `${searchParams.entryDate[0]}-01`
searchParams.commissionDateEnd = `${searchParams.entryDate[1]}-01`
} else {
searchParams.commissionDateStart = ''
searchParams.commissionDateEnd = ''
}
const params = { const params = {
...searchParams, ...searchParams,
commissionDateStart: searchParams?.entryDate?.[0] || undefined, // commissionDateStart: searchParams?.entryDate?.[0] + '-01' || undefined,
commissionDateEnd: searchParams?.entryDate?.[1] || undefined, // commissionDateEnd: searchParams?.entryDate?.[1] + '-01' || undefined,
commissionDateStart: searchParams.commissionDateStart || undefined,
commissionDateEnd: searchParams.commissionDateEnd || undefined,
entryDate: undefined, entryDate: undefined,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value pageSize: pageSize.value
...@@ -870,6 +901,7 @@ const handleSelect = async (e, row) => { ...@@ -870,6 +901,7 @@ const handleSelect = async (e, row) => {
// 3. 此时 addRecordRef.value 一定存在了 // 3. 此时 addRecordRef.value 一定存在了
if (addRecordRef.value && selectedRow.value) { if (addRecordRef.value && selectedRow.value) {
addReceivablesFormModel.value = { ...selectedRow.value } addReceivablesFormModel.value = { ...selectedRow.value }
addReceivablesFormModel.value.commissionDate = selectedRow.value.commissionDateMonth
console.log('赋值成功:', addReceivablesFormModel.value) console.log('赋值成功:', addReceivablesFormModel.value)
} }
}) })
...@@ -918,6 +950,7 @@ const handleConfirmSetStatus = () => { ...@@ -918,6 +950,7 @@ const handleConfirmSetStatus = () => {
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('状态修改成功') ElMessage.success('状态修改成功')
setStatusDialogTableVisible.value = false setStatusDialogTableVisible.value = false
receivedFortuneListData()
loadTableData() // 重新加载表格 loadTableData() // 重新加载表格
} else { } else {
ElMessage.error(res.msg || '状态修改失败') ElMessage.error(res.msg || '状态修改失败')
...@@ -1070,7 +1103,7 @@ const receivableReportTableColumns = ref([ ...@@ -1070,7 +1103,7 @@ const receivableReportTableColumns = ref([
sortable: true, sortable: true,
width: '120', width: '120',
formatter: row => row.policyCurrency || '-' formatter: row => row.policyCurrency || '-'
}, }
// { // {
// prop: 'unpaidAmount', // prop: 'unpaidAmount',
// label: '待入账金额HKD', // label: '待入账金额HKD',
...@@ -1078,12 +1111,12 @@ const receivableReportTableColumns = ref([ ...@@ -1078,12 +1111,12 @@ const receivableReportTableColumns = ref([
// width: '120', // width: '120',
// formatter: row => formatCurrency(row.unpaidAmount || 0) // formatter: row => formatCurrency(row.unpaidAmount || 0)
// }, // },
{ // {
prop: 'remark', // prop: 'manualRemark',
label: '备注', // label: '备注',
width: '150', // width: '150',
formatter: row => row.remark || '-' // formatter: row => row.manualRemark || '-'
} // }
]) ])
// 应收明细 // 应收明细
const receivableReportItemTableColumns = ref([ const receivableReportItemTableColumns = ref([
...@@ -1105,7 +1138,7 @@ const receivableReportItemTableColumns = ref([ ...@@ -1105,7 +1138,7 @@ const receivableReportItemTableColumns = ref([
prop: 'no', prop: 'no',
label: '应收单编号', label: '应收单编号',
sortable: true, sortable: true,
width: '150', width: '180',
formatter: row => row.no || '-' formatter: row => row.no || '-'
}, },
// { // {
...@@ -1126,7 +1159,7 @@ const receivableReportItemTableColumns = ref([ ...@@ -1126,7 +1159,7 @@ const receivableReportItemTableColumns = ref([
prop: 'reconciliationCompany', prop: 'reconciliationCompany',
label: '对账公司', label: '对账公司',
sortable: true, sortable: true,
width: '150', width: '100',
formatter: row => row.reconciliationCompany || '-' formatter: row => row.reconciliationCompany || '-'
}, },
{ {
...@@ -1181,7 +1214,7 @@ const receivableReportItemTableColumns = ref([ ...@@ -1181,7 +1214,7 @@ const receivableReportItemTableColumns = ref([
{ {
prop: 'commissionRatio', prop: 'commissionRatio',
label: '产品对应来佣率', label: '保单对应来佣率',
sortable: true, sortable: true,
width: '120', width: '120',
formatter: row => (row.commissionRatio || 0) + '%' || '-' formatter: row => (row.commissionRatio || 0) + '%' || '-'
...@@ -1214,7 +1247,6 @@ const receivableReportItemTableColumns = ref([ ...@@ -1214,7 +1247,6 @@ const receivableReportItemTableColumns = ref([
width: '120', width: '120',
formatter: row => row.realAmount || '-' formatter: row => row.realAmount || '-'
}, },
//还不确定字段
{ {
prop: 'realReconciliationYearMonth', prop: 'realReconciliationYearMonth',
label: '检核年月', label: '检核年月',
...@@ -1227,7 +1259,7 @@ const receivableReportItemTableColumns = ref([ ...@@ -1227,7 +1259,7 @@ const receivableReportItemTableColumns = ref([
label: '本次入账比例', label: '本次入账比例',
sortable: true, sortable: true,
width: '120', width: '120',
formatter: row => (row.revenueRatio || 0) + '%' || '-' formatter: row => (row.revenueRatio ? row.revenueRatio + '%' : '-')
}, },
{ {
prop: 'pendingAmount', prop: 'pendingAmount',
...@@ -1264,7 +1296,6 @@ const receivableReportItemTableColumns = ref([ ...@@ -1264,7 +1296,6 @@ const receivableReportItemTableColumns = ref([
width: '120', width: '120',
formatter: row => row.productName || '-' formatter: row => row.productName || '-'
}, },
//还不确定字段
{ {
prop: 'issueNumber', prop: 'issueNumber',
label: '年期', label: '年期',
...@@ -1287,11 +1318,18 @@ const receivableReportItemTableColumns = ref([ ...@@ -1287,11 +1318,18 @@ const receivableReportItemTableColumns = ref([
formatter: row => formatCurrency(row.premium || 0) formatter: row => formatCurrency(row.premium || 0)
}, },
{ {
prop: 'realRemark', prop: 'manualRemark',
label: '人工备注',
sortable: true,
width: '120',
formatter: row => row.manualRemark || '-'
},
{
prop: 'remark',
label: '备注', label: '备注',
sortable: true, sortable: true,
width: '120', width: '120',
formatter: row => row.realRemark || '-' formatter: row => row.remark || '-'
}, },
{ {
prop: 'realUpdaterName', prop: 'realUpdaterName',
......
...@@ -232,7 +232,7 @@ import { ...@@ -232,7 +232,7 @@ import {
getItineraryExprot getItineraryExprot
} from '@/api/sign/appointment' } from '@/api/sign/appointment'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { copyToClipboard } from '@/utils/copyToClipboard' import copyToClipboard from '@/utils/copyToClipboard'
const dictStore = useDictStore() const dictStore = useDictStore()
const userStore = useUserStore() const userStore = useUserStore()
const router = useRouter() const router = useRouter()
......
...@@ -386,6 +386,7 @@ const handleReset = () => { ...@@ -386,6 +386,7 @@ const handleReset = () => {
loadTableData() loadTableData()
} }
const handleQuery = async () => { const handleQuery = async () => {
currentPage.value = 1
const params = searchFormRef.value.getFormData() const params = searchFormRef.value.getFormData()
console.log('params', params) console.log('params', params)
...@@ -421,6 +422,8 @@ const operationBtnList = ref([ ...@@ -421,6 +422,8 @@ const operationBtnList = ref([
// 加载表格数据 // 加载表格数据
const loadTableData = async (searchParams = {}) => { const loadTableData = async (searchParams = {}) => {
loading.value = true loading.value = true
// console.log('searchFormRef.value', searchFormRef.value)
// const searchParams = searchFormRef.value.getFormData() || {}
try { try {
const params = { const params = {
pageNo: currentPage.value, pageNo: currentPage.value,
...@@ -443,11 +446,13 @@ loadTableData() ...@@ -443,11 +446,13 @@ loadTableData()
// 分页事件 // 分页事件
const handleSizeChange = val => { const handleSizeChange = val => {
pageSize.value = val pageSize.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
const handleCurrentChange = val => { const handleCurrentChange = val => {
currentPage.value = val currentPage.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
// 表格数据 // 表格数据
const tableData = ref([]) const tableData = ref([])
......
...@@ -1250,6 +1250,7 @@ const handleReset = () => { ...@@ -1250,6 +1250,7 @@ const handleReset = () => {
} }
const handleQuery = async () => { const handleQuery = async () => {
const params = searchFormRef.value.getFormData() const params = searchFormRef.value.getFormData()
currentPage.value = 1
console.log('params', params) console.log('params', params)
// let msg = validateEnglish2(params.eng) // let msg = validateEnglish2(params.eng)
// if (params.eng && msg) { // if (params.eng && msg) {
...@@ -1288,6 +1289,7 @@ const operationBtnList = ref([ ...@@ -1288,6 +1289,7 @@ const operationBtnList = ref([
// 加载表格数据 // 加载表格数据
const loadTableData = async (searchParams = {}) => { const loadTableData = async (searchParams = {}) => {
loading.value = true loading.value = true
try { try {
const params = { const params = {
pageNo: currentPage.value, pageNo: currentPage.value,
...@@ -1310,11 +1312,14 @@ const loadTableData = async (searchParams = {}) => { ...@@ -1310,11 +1312,14 @@ const loadTableData = async (searchParams = {}) => {
// 分页事件 // 分页事件
const handleSizeChange = val => { const handleSizeChange = val => {
pageSize.value = val pageSize.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
const handleCurrentChange = val => { const handleCurrentChange = val => {
currentPage.value = val currentPage.value = val
loadTableData() const params = searchFormRef.value.getFormData()
loadTableData(params)
} }
// 表格数据 // 表格数据
const tableData = ref([]) const tableData = ref([])
......
...@@ -151,7 +151,7 @@ import { ...@@ -151,7 +151,7 @@ import {
saveInitialPayment, saveInitialPayment,
updatePolicyProduct updatePolicyProduct
} from '@/api/sign/underwritingMain' } from '@/api/sign/underwritingMain'
import { copyToClipboard } from '@/utils/copyToClipboard' import copyToClipboard from '@/utils/copyToClipboard';
import PolicyDetail from './policyDetail.vue' import PolicyDetail from './policyDetail.vue'
const policyDetailFormRef = ref(null) const policyDetailFormRef = ref(null)
const policyDetailFormData = ref({}) const policyDetailFormData = ref({})
...@@ -346,6 +346,7 @@ const handleReset = () => { ...@@ -346,6 +346,7 @@ const handleReset = () => {
loadTableData() loadTableData()
} }
const handleQuery = async () => { const handleQuery = async () => {
currentPage.value = 1
loadTableData() loadTableData()
} }
const visibleDefaultButtons = ref(['reset', 'query']) const visibleDefaultButtons = ref(['reset', 'query'])
......
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