From c7686ab1189f90aed0017fbd095e5447d0018578 Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Wed, 12 Nov 2025 10:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneyManage/receiveDetail/receiveFinance.vue | 93 ++++++++++++++++------ 1 file changed, 68 insertions(+), 25 deletions(-) diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 711a22d..b70ff15 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -725,55 +725,68 @@ const closeConfirmRefund = () => { //导出相关 const exportListVisible = ref(false) const exportList = ref([]) +const exportListLoading = ref(false) const exportExcel = async function () { - const statusParam = ref([30, 32, 40, 41])// 默认:看不到进度没到这里的 - if (searchData.value.statuses === '待审核') { - statusParam.value = [30] - } else if (searchData.value.statuses === '审核通过') { - statusParam.value = [40] - } else if (searchData.value.statuses === '已驳回') { - statusParam.value = [32] - } else if (searchData.value.statuses === '退款成功') { - statusParam.value = [41] + + let payCurrencySelect = ''; + let goodsName = ''; + + // 处理时间范围 + if (getTime.value && getTime.value.length === 2) { + searchData.value.startTime = moment(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss'); + searchData.value.endTime = moment(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss'); } else { - statusParam.value = [30, 32, 40, 41] + searchData.value.startTime = ''; + searchData.value.endTime = ''; } + // 处理产品名称(级联选择取最后一级) + if (searchData.value.goodsName) { + goodsName = searchData.value.goodsName[searchData.value.goodsName.length - 1]; + } + + // 处理付款币种(转ID) + if (searchData.value.paymentCurrency) { + payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); + } + + const cashRoleId = '1'; + const submitterMarket = adminData.value.markets; + searchData.value.status = 46; const params = { - pageNum: pagination.value.pageNum, - pageSize: pagination.value.pageSize, - cashRecordDTO: { - jwcode: searchData.value.jwcode, - name: searchData.value.name, - markets: searchData.value.markets, - goodsNames: searchData.value.goodsName, - statuses: statusParam.value, - paymentCurrency: searchData.value.paymentCurrency, - payType: searchData.value.payType, - startTime: getTime.value && getTime.value[0] ? dayjs(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss') : "", - endTime: getTime.value && getTime.value[1] ? dayjs(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss') : "", - adminId: adminData.value.id + ...pageInfo.value, + cashCollection: { + ...searchData.value, + submitterId: adminData.value.id, + receivedMarket: MarketNameForId(submitterMarket), + cashRoleId: cashRoleId, + paymentCurrency: payCurrencySelect, + submitterMarket: submitterMarket, + goodsName: goodsName, + market: MarketNameForId(searchData.value.market) } } - const res = await API({ url: '/export/exportFinance', data: params }) + const res = await API({ url: '/export/exportCash', data: params }) if (res.code === 200) { ElMessage.success('导出成功') } else { ElMessage.error(res.msg || '导出失败') } } + const openExportList = () => { getExportList() exportListVisible.value = true } +//获取导出列表 const getExportList = async () => { exportListLoading.value = true try { const result = await API({ url: '/export/export' }) if (result.code === 200) { const filteredData = result.data.filter(item => { - return item.type === 12 + return item.type === 13 }) exportList.value = filteredData } else { @@ -796,6 +809,36 @@ const downloadExportFile = (item) => { ElMessage.warning('文件还在导出中,请稍后再试') } } +//根据状态返回对应的标签类型 +const getTagType = (state) => { + switch (state) { + case 0: + return 'info'; + case 1: + return 'primary'; + case 2: + return 'success'; + case 3: + return 'danger'; + default: + return 'info'; + } +} +//根据状态返回对应的标签文案 +const getTagText = (state) => { + switch (state) { + case 0: + return '待执行'; + case 1: + return '执行中'; + case 2: + return '执行完成'; + case 3: + return '执行出错'; + default: + return '未知状态'; + } +} // 2.1 数据加载:获取地区财务订单列表 const getlist = async () => {