feat:财税管理-报销单

feature-JimuReport-1106-yjl
yujinlong 1 month ago
parent c949004435
commit c847def6f2

@ -0,0 +1,151 @@
import { request } from '/@/utils/request'
// 获取列表 (Auth)
export function PaymentSettlementGetList(parameter) {
return request({
url: '/feeApi/PaymentSettlement/GetList',
method: 'post',
data: parameter,
})
}
export function GetOrgList() {
return request({
url: '/mainApi/Common/GetOrgList',
method: 'get',
})
}
export function InvoiceSettlementGetInvoiceList(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetInvoiceList',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGetInvoiceDetails(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetInvoiceDetails',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGetExchanges(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetExchanges',
method: 'post',
data: parameter,
})
}
export function GetExchangeRate(params) {
return request({
url: '/feeApi/FeeCurrencyExchange/GetExchangeRate',
method: 'get',
params
})
}
export function InvoiceSettlementSave(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/Save',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGet(params) {
return request({
url: '/feeApi/InvoiceSettlement/Get',
method: 'get',
params
})
}
export function ClientCommonGetStlMode(params) {
return request({
url: '/mainApi/ClientCommon/GetStlMode',
method: 'get',
params
})
}
export function GetClientBankList(parameter) {
return request({
url: '/mainApi/ClientBank/GetClientBankList',
method: 'post',
data: parameter,
})
}
export function PaymentSettlementDelete(parameter) {
return request({
url: '/feeApi/PaymentSettlement/Delete',
method: 'post',
data: parameter,
})
}
export function GeneralInvoiceGet(params) {
return request({
url: '/feeApi/GeneralInvoice/Get',
method: 'get',
params
})
}
export function PaymentSettlementSetLock(parameter) {
return request({
url: '/feeApi/PaymentSettlement/SetLock',
method: 'post',
data: parameter,
})
}
export function PaymentSettlementDeleteDetail(parameter) {
return request({
url: '/feeApi/PaymentSettlement/DeleteDetail',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGetBizList(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetBizList',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGetFees(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetFees',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementSave(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/Save',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGet(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/Get',
method: 'get',
params: parameter,
})
}
export function PaymentFreeSettlementGetExchangesAsync(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetCurrencies',
method: 'post',
data: parameter,
})
}

@ -0,0 +1,110 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetClientListByCode } from '/@/api/common'
export const columns: BasicColumn[] = [
{
title: '报销单编号',
dataIndex: 'applicationNO',
width: 100,
},
{
title: '制单时间',
dataIndex: 'customerName',
width: 100,
},
{
title: '报销人',
dataIndex: 'customerName',
width: 100,
},
{
title: '状态',
dataIndex: 'isLocked',
width: 100,
},
{
title: '部门',
dataIndex: 'modeText',
width: 100,
},
{
title: '凭证号',
dataIndex: 'currency',
width: 100,
},
{
title: '收款人账号',
dataIndex: 'rmbAmount',
width: 100,
},
{
title: '开户行',
dataIndex: 'usdAmount',
width: 100,
},
{
title: '收款人名称',
dataIndex: 'otherAmount',
width: 100,
},
{
title: '合计金额',
dataIndex: 'unInvoiceAmount',
width: 100,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'billType',
label: '',
colProps: { span: 4 },
component: 'Input',
show: false,
defaultValue: 1,
},
{
field: 'settlementNO',
label: '结算单号',
colProps: { span: 4 },
component: 'Input',
},
{
field: 'customerId',
label: '结算单位',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientListByCode,
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
immediate: false,
}
},
},
{
field: 'applicationNO',
label: '申请单号',
colProps: { span: 4 },
component: 'Input',
},
{
field: 'ledgerVoucherNO',
label: '总账凭证号',
colProps: { span: 4 },
component: 'Input',
},
{
field: 'settlementDate',
label: '结算日期',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
allowClear: true,
},
},
]

@ -0,0 +1,184 @@
<template>
<BasicTable @row-dbClick="GoDetailed" class="ds-table" @register="registerTable">
<template #tableTitle>
<div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>复制</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<a-popconfirm
title="确定删除当前选中数据?"
@confirm="FnDel"
ok-text="是"
cancel-text="否"
>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</span>
</a-popconfirm>
</a-tooltip>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
},
},
]"
/>
</template>
<template v-if="column.dataIndex == 'invoiceNumber'">
<span>{{ record.invoiceNumber || '' }}</span>
<i
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-left: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
></i>
</template>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { PaymentSettlementGetList, PaymentSettlementDelete } from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard'
const go = useGo()
const [registerTable, { reload, setLoading, getSelectRows }] = useTable({
api: async (p) => {
const res: API.DataResult = await PaymentSettlementGetList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
return formatParams(p)
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
useAdvancedSearch: true,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function FnDel() {
let ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
const data = {
ids: [...ids],
}
setLoading(true)
PaymentSettlementDelete(data)
.then((res) => {
if (res.succeeded) {
createMessage.success('删除成功')
reload()
}
setLoading(false)
})
.catch(() => {
setLoading(false)
})
}
const copyHandle = (row) => {
const { clipboardRef, isSuccessRef } = useCopyToClipboard(row.invoiceNumber)
clipboardRef.value = row.invoiceNumber
if (unref(isSuccessRef)) {
createMessage.success('复制成功!')
}
}
function GoDetailed(row) {
if (row.modeText == '发票结算') {
go('/feeSettlementDetail?id=' + row.id + '&type=invoice')
}
if (row.modeText == '自由结算') {
go('/feeSettlementDetail?id=' + row.id + '&type=free')
}
}
</script>
<style lang="less" scoped>
.tableTitleBox {
.ant-btn-link {
margin-left: 13px;
color: #000;
font-size: 16px;
}
}
.SvgImg {
width: 18px;
height: 18px;
margin: 6.8px;
}
.ds-h-aciton-btns-fee {
display: flex;
align-items: center;
height: 38px;
padding-right: 10px;
.ds-action-svg-btn {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 2px;
margin-right: 8px;
cursor: pointer;
.next {
transform: rotate(180deg);
}
}
.ds-action-svg-btn:hover {
box-shadow: 0px 2px 4px #cad1db;
}
.vben-svg-icon {
margin: 6.8px;
}
}
</style>
Loading…
Cancel
Save