diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 98a790f..e089a8e 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -2,7 +2,7 @@
-
+
精网号
-
-
- 活动名称 - - - -
-
- 产品名称 - -
-
- 付款时间 - -
- -
- 查询 - 重置 +
+
+
+ 活动名称 + + + +
+
+ 产品名称 + +
+
+ 付款时间 + +
+ 查询 + 重置 + 导出excel + 查看导出列表
@@ -97,7 +101,7 @@
- @@ -231,6 +235,38 @@
+ + + + + + + + + + + + + + + + + @@ -688,6 +724,123 @@ const closeConfirmRefund = () => { textContent.value = '' } +//导出相关 +const exportListVisible = ref(false) +const exportList = ref([]) +const exportListLoading = ref(false) +const exportExcel = async function () { + + 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 { + 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 = { + ...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/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 === 13 + }) + exportList.value = filteredData + } else { + ElMessage.error(result.msg || '获取导出列表失败') + } + } catch (error) { + console.error('获取导出列表出错:', error) + ElMessage.error('获取导出列表失败,请稍后重试') + } finally { + exportListLoading.value = false + } +} +const downloadExportFile = (item) => { + if (item.state === 2) { + const link = document.createElement('a') + link.href = item.url + link.download = item.fileName + link.click() + } else { + 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 () => { @@ -771,7 +924,7 @@ const submitRefund = async () => { } if (refundFormData.value.refundModel == 0) { refundFormData.value.partRefundGold = refundFormData.value.permanentGold, - refundFormData.value.partRefundFree = refundFormData.value.freeGold + refundFormData.value.partRefundFree = refundFormData.value.freeGold } const result = await request({ url: '/Money/addOnline', @@ -1132,25 +1285,38 @@ const handlePagination = (type, val) => { width: 100%; background: #F3FAFE; - .row { + .rowItem { + display: flex; + width: 15vw; + align-items: center; + justify-content: center; + margin-right: 0.5vw; + } + + el-button { + margin-left: 10px; + } + + .row1 { height: 4vh; width: 80vw; display: flex; min-height: 40px; + } - .rowItem { - display: flex; - width: 15vw; - align-items: center; - justify-content: center; - margin-right: 0.5vw; - } + .row2 { + height: 4vh; + width: 80vw; + display: flex; + align-items: center; - .buttons { + min-height: 40px; + + .left { + height: 4vh; + width: 58vw; display: flex; - justify-content: center; - align-items: center; - margin-left: 10px; + min-height: 40px; } } } diff --git a/src/views/moneyManage/receiveDetail/receiveHead.vue b/src/views/moneyManage/receiveDetail/receiveHead.vue index 63ca0a5..77bea24 100644 --- a/src/views/moneyManage/receiveDetail/receiveHead.vue +++ b/src/views/moneyManage/receiveDetail/receiveHead.vue @@ -2,7 +2,7 @@
-
+
精网号
- +
付款币种
-
-
- 活动名称 - - - -
-
- 产品名称 - -
-
- 付款时间 - -
- -
- 查询 - 重置 +
+
+
+ 活动名称 + + + +
+
+ 产品名称 + +
+
+ 付款时间 + +
+ 查询 + 重置 + 导出excel + 查看导出列表
@@ -86,7 +90,7 @@
- @@ -450,6 +454,39 @@
+ + + + + + + + + + + + + + + + + +
@@ -539,6 +576,126 @@ const ifRefundGold = () => { } +//导出相关 +const exportListVisible = ref(false) +const exportList = ref([]) +const exportListLoading = ref(false) +const exportExcel = async function () { + + 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 { + 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 = '2'; + const submitterMarket = adminData.value.markets; + searchData.value.status = 46; + const params = { + ...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/exportCash', data: params }) + if (res.code === 200) { + ElMessage.success('导出成功') + } else { + ElMessage.error(res.msg || '导出失败') + } +} + +const openExportList = () => { + getExportList() + console.log('daoshiu'); + + 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 === 13 + }) + exportList.value = filteredData + } else { + ElMessage.error(result.msg || '获取导出列表失败') + } + } catch (error) { + console.error('获取导出列表出错:', error) + ElMessage.error('获取导出列表失败,请稍后重试') + } finally { + exportListLoading.value = false + } +} +const downloadExportFile = (item) => { + if (item.state === 2) { + const link = document.createElement('a') + link.href = item.url + link.download = item.fileName + link.click() + } else { + 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 '未知状态'; + } +} + // 基础数据 const adminData = ref({}); @@ -593,7 +750,7 @@ const getlist = async () => { // 总部财务固定参数:角色ID=1,按标签页筛选状态 const cashRoleId = '2'; const receivedMarket = adminData.value.markets; - if (activeTab.value === 'pass') searchData.value.status = 13; + if (activeTab.value === 'pass') searchData.value.status = 13; else if (activeTab.value === 'done') searchData.value.status = 46; const result = await request({ @@ -645,7 +802,7 @@ const submitRefund = async () => { } if (refundFormData.value.refundModel == 0) { refundFormData.value.partRefundGold = refundFormData.value.permanentGold, - refundFormData.value.partRefundFree = refundFormData.value.freeGold + refundFormData.value.partRefundFree = refundFormData.value.freeGold } const result = await request({ url: '/Money/addOnline', @@ -931,25 +1088,38 @@ const handlePagination = (type, val) => { width: 100%; background: #F3FAFE; - .row { + .rowItem { + display: flex; + width: 15vw; + align-items: center; + justify-content: center; + margin-right: 0.5vw; + } + + el-button { + margin-left: 10px; + } + + .row1 { height: 4vh; width: 80vw; display: flex; min-height: 40px; + } - .rowItem { - display: flex; - width: 15vw; - align-items: center; - justify-content: center; - margin-right: 0.5vw; - } + .row2 { + height: 4vh; + width: 80vw; + display: flex; + align-items: center; - .buttons { + min-height: 40px; + + .left { + height: 4vh; + width: 58vw; display: flex; - justify-content: center; - align-items: center; - margin-left: 10px; + min-height: 40px; } } } diff --git a/src/views/moneyManage/receiveDetail/receiveManage.vue b/src/views/moneyManage/receiveDetail/receiveManage.vue index cb76943..e089a8e 100644 --- a/src/views/moneyManage/receiveDetail/receiveManage.vue +++ b/src/views/moneyManage/receiveDetail/receiveManage.vue @@ -2,7 +2,7 @@
-
+
精网号
-
-
- 活动名称 - - - -
-
- 产品名称 - -
-
- 付款时间 - -
- -
- 查询 - 重置 +
+
+
+ 活动名称 + + + +
+
+ 产品名称 + +
+
+ 付款时间 + +
+ 查询 + 重置 + 导出excel + 查看导出列表
@@ -97,7 +101,7 @@
- @@ -231,6 +235,38 @@
+ + + + + + + + + + + + + + + + + @@ -688,6 +724,123 @@ const closeConfirmRefund = () => { textContent.value = '' } +//导出相关 +const exportListVisible = ref(false) +const exportList = ref([]) +const exportListLoading = ref(false) +const exportExcel = async function () { + + 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 { + 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 = { + ...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/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 === 13 + }) + exportList.value = filteredData + } else { + ElMessage.error(result.msg || '获取导出列表失败') + } + } catch (error) { + console.error('获取导出列表出错:', error) + ElMessage.error('获取导出列表失败,请稍后重试') + } finally { + exportListLoading.value = false + } +} +const downloadExportFile = (item) => { + if (item.state === 2) { + const link = document.createElement('a') + link.href = item.url + link.download = item.fileName + link.click() + } else { + 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 () => { @@ -771,7 +924,7 @@ const submitRefund = async () => { } if (refundFormData.value.refundModel == 0) { refundFormData.value.partRefundGold = refundFormData.value.permanentGold, - refundFormData.value.partRefundFree = refundFormData.value.freeGold + refundFormData.value.partRefundFree = refundFormData.value.freeGold } const result = await request({ url: '/Money/addOnline', @@ -1093,7 +1246,7 @@ onMounted(async () => { await getlist(); // 菜单权限校验(确保地区财务权限) - if (!hasMenuPermission(menuTree.value, 79)) { + if (!hasMenuPermission(menuTree.value, 67)) { ElMessageBox.alert( '您暂无该页面操作权限,请联系管理员', '权限提示', @@ -1132,25 +1285,38 @@ const handlePagination = (type, val) => { width: 100%; background: #F3FAFE; - .row { + .rowItem { + display: flex; + width: 15vw; + align-items: center; + justify-content: center; + margin-right: 0.5vw; + } + + el-button { + margin-left: 10px; + } + + .row1 { height: 4vh; width: 80vw; display: flex; min-height: 40px; + } - .rowItem { - display: flex; - width: 15vw; - align-items: center; - justify-content: center; - margin-right: 0.5vw; - } + .row2 { + height: 4vh; + width: 80vw; + display: flex; + align-items: center; - .buttons { + min-height: 40px; + + .left { + height: 4vh; + width: 58vw; display: flex; - justify-content: center; - align-items: center; - margin-left: 10px; + min-height: 40px; } } } diff --git a/src/views/moneyManage/receiveDetail/receiveService.vue b/src/views/moneyManage/receiveDetail/receiveService.vue index e5721c1..e94b7d8 100644 --- a/src/views/moneyManage/receiveDetail/receiveService.vue +++ b/src/views/moneyManage/receiveDetail/receiveService.vue @@ -73,7 +73,7 @@
- @@ -561,9 +561,14 @@ const jwcodeSeachMarket = async () => { url: '/cashCollection/getNameAndMarket', data: addFormData.value.jwcode }) - addFormData.value.market = result.data.market - addFormData.value.marketName = result.data.marketName - addFormData.value.name = result.data.name + if(result.code == 200){ + ElMessage.success('客户信息查询成功') + addFormData.value.market = result.data.market + addFormData.value.marketName = result.data.marketName + addFormData.value.name = result.data.name + }else{ + ElMessage.error('客户不存在') + } } catch (error) { console.log(error); } diff --git a/src/views/moneyManage/refundDetail/refundCharge.vue b/src/views/moneyManage/refundDetail/refundCharge.vue index 68485b8..6bf08ba 100644 --- a/src/views/moneyManage/refundDetail/refundCharge.vue +++ b/src/views/moneyManage/refundDetail/refundCharge.vue @@ -57,7 +57,7 @@ - + diff --git a/src/views/moneyManage/refundDetail/refundFinance.vue b/src/views/moneyManage/refundDetail/refundFinance.vue index 9663d8d..2776384 100644 --- a/src/views/moneyManage/refundDetail/refundFinance.vue +++ b/src/views/moneyManage/refundDetail/refundFinance.vue @@ -56,7 +56,7 @@ - + diff --git a/src/views/moneyManage/refundDetail/refundHeader.vue b/src/views/moneyManage/refundDetail/refundHeader.vue index e340243..76cbf7e 100644 --- a/src/views/moneyManage/refundDetail/refundHeader.vue +++ b/src/views/moneyManage/refundDetail/refundHeader.vue @@ -57,7 +57,7 @@ - + diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index b0b3a17..2f4091e 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -55,7 +55,7 @@ - +