Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.4 #2

Merged
merged 21 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat 调整对账单逻辑
  • Loading branch information
xxm1995 committed Mar 25, 2024
commit 000fed19b478ce3047cdc09a254538665e396a03
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<a-descriptions-item label="支付通道">
<a-tag>{{ dictConvert('PayChannel', form.channel) }}</a-tag>
</a-descriptions-item>
<a-descriptions-item label="对账单下载">
<a-tag v-if="form?.down" color="green">已下载</a-tag>
<a-tag v-else color="red">未下载</a-tag>
<a-descriptions-item label="对账单下载/上传">
<a-tag v-if="form?.down" color="green">完成下载/上传</a-tag>
<a-tag v-else color="red">未下载/上传</a-tag>
</a-descriptions-item>
<a-descriptions-item label="对账单比对">
<a-tag v-if="form?.compare" color="green">已比对</a-tag>
Expand Down
43 changes: 39 additions & 4 deletions src/views/payment/order/reconcile/order/ReconcileOrderList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,29 @@
<a-tag>{{ dictConvert('PayChannel', row.channel) }}</a-tag>
</template>
</vxe-column>
<vxe-column field="down" title="对账单下载">
<vxe-column field="down" title="下载或上传">
<template #default="{ row }">
<a-tag v-if="row.down" color="green">已下载</a-tag>
<a-link v-else color="red" @click="down(row)">下载</a-link>
<template v-if="row.down">
<a-tag v-if="row.down" color="green">已完成</a-tag>
</template>
<template v-else>
<a-link color="red" @click="down(row)">下载</a-link>
<a-divider type="vertical" />
<a-upload
name="file"
:multiple="false"
:action="uploadAction"
:headers="tokenHeader"
:data="{ id: row.id }"
:showUploadList="false"
@change="handleChange"
>
<a-link color="red">上传</a-link>
</a-upload>
</template>
</template>
</vxe-column>
<vxe-column field="compare" title="对账单比对">
<vxe-column field="compare" title="比对">
<template #default="{ row }">
<a-tag v-if="row.compare" color="green">已比对</a-tag>
<a-link v-else :disabled="!row.down" color="red" @click="compareOrder(row)">比对</a-link>
Expand Down Expand Up @@ -91,12 +107,15 @@
import ReconcileOrderCreate from './ReconcileOrderCreate.vue'
import ALink from '/@/components/Link/Link.vue'
import ReconcileDiffListModel from '/@/views/payment/order/reconcile/diff/ReconcileDiffListModel.vue'
import { useUpload } from '/@/hooks/bootx/useUpload'

// 使用hooks
const { handleTableChange, pageQueryResHandel, resetQueryParams, sortChange, sortParam, pagination, pages, model, loading } =
useTablePage(queryPage)
const { notification, createMessage, createConfirm } = useMessage()
const { dictConvert, dictDropDown } = useDict()
// 手动上传对账单
const { tokenHeader, uploadAction } = useUpload('/order/reconcile/upload')

let payChannelList = $ref<LabeledValue[]>([])

Expand Down Expand Up @@ -201,6 +220,22 @@
})
}

/**
* 上传完成回调
*/
function handleChange(info) {
if (info.file.status === 'done') {
if (!info.file.response.code) {
queryPage()
createMessage.success(`${info.file.name} 上传成功!`)
} else {
createMessage.error(`${info.file.response.msg}`)
}
} else if (info.file.status === 'error') {
createMessage.error('上传失败')
}
}

/**
* 创建对账订单
*/
Expand Down