客户对账列表页还原

dev
lijingjia 1 week ago
parent a713abadc2
commit 9d7bc1d0f8

@ -1,70 +1,129 @@
<template>
<div class="ds-sea-export-table p20">
<div class="ds-table">
<BasicTable
@register="registerTable"
@row-dbClick="
(e) => {
GoDetailed(true, e)
}
"
>
<template #tableTitle>
<TableButton :show="{ add: null, del: null }" @add="GoDetailed(false, null)" @del="FnDel">
<span class="iconfont icon-daochu-hei" @click="ExportExcel">excel</span>
<span class="iconfont icon-tijiaoshenhe-danse" @click="Lock"></span>
<span class="iconfont icon-chexiaoshenqingshenhe-danse" @click="UnLock"></span>
</TableButton>
<div class="buttonGroup">
<!-- <a-button v-repeat type="link" @click="generated">
<span class="iconfont icon-renwu_ IconColor"></span>
生成发票申请
</a-button> -->
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'billNo'">
<div class="billNo">
<span
v-if="record.billNo"
@click="FnCopy(record.billNo)"
class="iconfont icon-fuzhi3"
></span>
<span>{{ record.billNo }}</span>
</div>
</template>
<template v-if="column.dataIndex == 'isLocking'">
<span v-if="record.isLocking">
<i class="iconfont icon-locksuo"></i>
<div class="topTable">
<BasicTable
class="ds-table"
@register="registerTable"
@row-dbClick="
(e) => {
GoDetailed(true, e)
}
"
>
<template #tableTitle>
<div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新增</span>
</template>
<span @click="GoDetailed(false, null)" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</span>
<span v-else> <i class="iconfont icon-a-jiesuo1_jiesuo"></i> </span>
</template>
<template v-if="column.dataIndex == 'billType'">
<span
v-for="item in billTypeData"
:key="item.value"
v-show="item.value == record.billType"
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<a-popconfirm
title="确定删除当前选中数据?"
@confirm="FnDel"
ok-text="是"
cancel-text="否"
>
{{ item.label }}
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</span>
</a-popconfirm>
</a-tooltip>
<!-- <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>打印</span>
</template>
<span @click="printFee" class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/dayin.svg" class="SvgImg" />
</span>
</template>
<template v-if="column.dataIndex == 'isNoTax'">
<a-tag color="error" v-if="record.isNoTax == 'true'"></a-tag>
<a-tag color="success" v-else></a-tag>
</template>
</template>
<template v-slot:tableAction="{ record }">
</a-tooltip> -->
<!-- <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>分享</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/tijiao.svg" class="SvgImg" />
</span>
</a-tooltip> -->
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>编辑</span>
<span>导出excel</span>
</template>
<a-button type="link" @click="GoDetailed(true, record)">
<span class="iconfont icon-icon_519"></span>
</a-button>
<span @click="ExportExcel" class="ds-action-svg-btn" style="padding-top: 4px">
<SvgIcon size="16" name="export" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>提交锁定</span>
</template>
<span @click="Lock" class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>解除锁定</span>
</template>
<span @click="UnLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span>
</a-tooltip>
</div>
<div class="buttonGroup">
<!-- <a-button v-repeat type="link" @click="generated">
<span class="iconfont icon-renwu_ IconColor"></span>
生成发票申请
</a-button> -->
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'billNo'">
<div class="billNo">
<span
v-if="record.billNo"
@click="FnCopy(record.billNo)"
class="iconfont icon-fuzhi3"
></span>
<span>{{ record.billNo }}</span>
</div>
</template>
<!-- <template v-if="column.key === 'action'">
<template v-if="column.dataIndex == 'isLocking'">
<span v-if="record.isLocking">
<i class="iconfont icon-locksuo"></i>
</span>
<span v-else> <i class="iconfont icon-a-jiesuo1_jiesuo"></i> </span>
</template>
<template v-if="column.dataIndex == 'billType'">
<span
v-for="item in billTypeData"
:key="item.value"
v-show="item.value == record.billType"
>
{{ item.label }}
</span>
</template>
<template v-if="column.dataIndex == 'isNoTax'">
<a-tag color="error" v-if="record.isNoTax == 'true'"></a-tag>
<a-tag color="success" v-else></a-tag>
</template>
</template>
<template v-slot:tableAction="{ record }">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>编辑</span>
</template>
<a-button type="link" @click="GoDetailed(true, record)">
<span class="iconfont icon-icon_519"></span>
</a-button>
</a-tooltip>
</template>
<!-- <template v-if="column.key === 'action'">
<TableAction
:actions="[
{
@ -77,18 +136,20 @@
]"
/>
</template> -->
</BasicTable>
</BasicTable>
<!-- 合计 -->
<div class="static-box">
<a-table
class="static-box"
class="ds-table"
:columns="calcColumns"
:data-source="calcData"
:pagination="false"
></a-table>
</div>
<!-- <DsPrint ref="dsPrint" name="客户对账"></DsPrint> -->
</div>
<!-- <DsPrint ref="dsPrint" name="客户对账"></DsPrint> -->
</template>
<script lang="ts" setup name="客户对账">
<script lang="ts" setup>
import { ref } from 'vue'
import {
GetCheckBillList,
@ -98,10 +159,12 @@
} from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns, searchFormSchema, billTypeData } from './columns'
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
import * as XLSX from 'xlsx'
import DsPrint from '/@/components/Print/index.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification, createMessage } = useMessage()
import { SvgIcon } from '/@/components/Icon'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
//
@ -110,44 +173,53 @@
const appStore = useAppStore()
const tbHeight = window.innerHeight - 350
//
const [registerTable, { reload, getVxeSelectRows, getRawDataSource }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillList(p)
calcData.value = [res.data?.dataTotal]
return new Promise((resolve) => {
if (res.data?.list) {
const ids = res.data.list.map((item) => {
return item.id
})
appStore.setIds(ids, 'khdz')
}
resolve({ data: [...res.data.list], total: res.data.totalCount })
})
},
//
beforeFetch: (p) => {
return formatParams(p)
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
canResize: true,
immediate: true,
resizeHeightOffset: 131,
tableComponent: 'vxe',
autoHeight: window.innerHeight - 416.5,
id: '0',
})
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getRawDataSource }] =
useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillList(p)
calcData.value = [res.data?.dataTotal]
return new Promise((resolve) => {
if (res.data?.list) {
const ids = res.data.list.map((item) => {
return item.id
})
appStore.setIds(ids, 'khdz')
}
resolve({ data: [...res.data.list], total: res.data.totalCount })
})
},
//
beforeFetch: (p) => {
return formatParams(p)
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 90,
autoHeight: tbHeight,
immediate: true,
tableComponent: 'vxe',
actionColumn: {
width: 60,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
//
function FnCopy(data) {
const el = document.createElement('input')
@ -168,7 +240,7 @@
}
//
function FnDel() {
const select = getVxeSelectRows()
const select = getSelectRows()
let ApiData: any = {
ids: [],
}
@ -193,7 +265,7 @@
let ApiData: any = {
ids: [],
}
getVxeSelectRows().forEach((e) => {
getSelectRows().forEach((e) => {
ApiData.ids.push(e.id)
})
@ -210,7 +282,7 @@
let ApiData: any = {
ids: [],
}
getVxeSelectRows().forEach((e) => {
getSelectRows().forEach((e) => {
ApiData.ids.push(e.id)
})
CheckBillUnLocking(ApiData).then((res) => {
@ -394,12 +466,12 @@
color: #257afa;
cursor: pointer;
}
.ds-sea-export-table {
height: 100%;
.ds-table {
.ant-table-body {
min-height: calc(100vh - 430px);
}
.topTable {
// height: calc(100vh - 145px);
.static-box {
position: fixed;
bottom: 0;
padding-left: 20px;
}
}
.ds-h-aciton-btns-fee {

Loading…
Cancel
Save