Browse Source

导出对接

lihui/feature-20251104165712-现金二期
ZhangYong 2 weeks ago
parent
commit
c7686ab118
  1. 99
      src/views/moneyManage/receiveDetail/receiveFinance.vue

99
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
}
}
const res = await API({ url: '/export/exportFinance', data: 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 === 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 () => {

Loading…
Cancel
Save