|
|
@ -1,15 +1,10 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="topTable">
|
|
|
|
<div class="topTable">
|
|
|
|
<BasicTable
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="(e) => {
|
|
|
|
class="ds-table"
|
|
|
|
|
|
|
|
@register="registerTable"
|
|
|
|
|
|
|
|
@row-dbClick="
|
|
|
|
|
|
|
|
(e) => {
|
|
|
|
|
|
|
|
GoDetailed(true, e)
|
|
|
|
GoDetailed(true, e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"
|
|
|
|
">
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #tableTitle>
|
|
|
|
<template #tableTitle>
|
|
|
|
<div class="buttonGroup">
|
|
|
|
<div class="buttonGroup">
|
|
|
|
<a-button v-repeat type="link">
|
|
|
|
<a-button v-repeat type="link">
|
|
|
@ -20,11 +15,11 @@
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
导出EXCEL
|
|
|
|
导出EXCEL
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
<a-button v-repeat type="link">
|
|
|
|
<a-button @click="handleApply" v-repeat type="link">
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
提交审核
|
|
|
|
提交审核
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
<a-button v-repeat type="link">
|
|
|
|
<a-button @click="handleWithdraw" v-repeat type="link">
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
<span class="iconfont icon-locksuo IconColor"></span>
|
|
|
|
撤销审核
|
|
|
|
撤销审核
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
@ -35,12 +30,7 @@
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
添加
|
|
|
|
添加
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
<a-popconfirm
|
|
|
|
<a-popconfirm title="确定删除当前选中数据?" ok-text="是" cancel-text="否" @confirm="FnDel">
|
|
|
|
title="确定删除当前选中数据?"
|
|
|
|
|
|
|
|
ok-text="是"
|
|
|
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
|
|
|
@confirm="FnDel"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<a-button type="link">
|
|
|
|
<a-button type="link">
|
|
|
|
<span class="iconfont icon-shanchu21"></span>
|
|
|
|
<span class="iconfont icon-shanchu21"></span>
|
|
|
|
删除
|
|
|
|
删除
|
|
|
@ -53,8 +43,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
<TableAction
|
|
|
|
<TableAction :actions="[
|
|
|
|
:actions="[
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
tooltip: '编辑',
|
|
|
|
tooltip: '编辑',
|
|
|
@ -62,8 +51,7 @@
|
|
|
|
GoDetailed(true, record)
|
|
|
|
GoDetailed(true, record)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]"
|
|
|
|
]" />
|
|
|
|
/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</BasicTable>
|
|
|
|
</BasicTable>
|
|
|
@ -81,24 +69,24 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { GetList,InvoiceApplicationDelete} from './api.js'
|
|
|
|
import { GetList, InvoiceApplicationDelete, Withdraw, ApplyAudit } from './api.js'
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
import { columns, searchFormSchema, billTypeData } from './columns'
|
|
|
|
import { columns, searchFormSchema, billTypeData } from './columns'
|
|
|
|
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
|
|
|
|
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
|
|
|
|
import * as XLSX from 'xlsx'
|
|
|
|
import * as XLSX from 'xlsx'
|
|
|
|
import DsPrint from '/@/components/Print/index.vue'
|
|
|
|
import DsPrint from '/@/components/Print/index.vue'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
const { notification } = useMessage()
|
|
|
|
const { notification } = useMessage()
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
const go = useGo()
|
|
|
|
const go = useGo()
|
|
|
|
// 引入处理入参方法
|
|
|
|
// 引入处理入参方法
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
import { useAppStore } from '/@/store/modules/app'
|
|
|
|
import { useAppStore } from '/@/store/modules/app'
|
|
|
|
const appStore = useAppStore()
|
|
|
|
const appStore = useAppStore()
|
|
|
|
// 表格
|
|
|
|
// 表格
|
|
|
|
const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
|
|
|
|
const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
|
|
|
|
title: '',
|
|
|
|
title: '',
|
|
|
|
api: async (p) => {
|
|
|
|
api: async (p) => {
|
|
|
|
const res: API.DataResult = await GetList(p)
|
|
|
|
const res: API.DataResult = await GetList(p)
|
|
|
@ -134,31 +122,68 @@
|
|
|
|
dataIndex: 'action',
|
|
|
|
dataIndex: 'action',
|
|
|
|
fixed: 'right',
|
|
|
|
fixed: 'right',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// 新增 编辑
|
|
|
|
// 新增 编辑
|
|
|
|
function GoDetailed(type, data) {
|
|
|
|
function GoDetailed(type, data) {
|
|
|
|
if (type) {
|
|
|
|
if (type) {
|
|
|
|
go(`/invoiceapplyDetail?id=${data.id}`)
|
|
|
|
go(`/invoiceapplyDetail?id=${data.id}`)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
go(`/invoiceapplyDetail`)
|
|
|
|
go(`/invoiceapplyDetail`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
function FnDel() {
|
|
|
|
function FnDel() {
|
|
|
|
const ids = getSelectRows().map((item) => {
|
|
|
|
let ids = []
|
|
|
|
|
|
|
|
ids = getSelectRows().map((item) => {
|
|
|
|
return item.id
|
|
|
|
return item.id
|
|
|
|
})
|
|
|
|
})
|
|
|
|
InvoiceApplicationDelete({ids:ids}).then(res=>{
|
|
|
|
if (ids.length == 0) {
|
|
|
|
if(res.succeeded){
|
|
|
|
createMessage.error('请选择要删除的数据')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
InvoiceApplicationDelete({ ids: ids }).then(res => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
createMessage.success('删除成功')
|
|
|
|
createMessage.success('删除成功')
|
|
|
|
reload()
|
|
|
|
reload()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleApply() {
|
|
|
|
|
|
|
|
let ids = []
|
|
|
|
|
|
|
|
ids = getSelectRows().map((item) => {
|
|
|
|
|
|
|
|
return item.id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (ids.length == 0) {
|
|
|
|
|
|
|
|
createMessage.error('请选择数据')
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ApplyAudit({ ids: ids }).then(res => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
createMessage.success('操作成功')
|
|
|
|
|
|
|
|
reload()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleWithdraw() {
|
|
|
|
|
|
|
|
let ids = []
|
|
|
|
|
|
|
|
ids = getSelectRows().map((item) => {
|
|
|
|
|
|
|
|
return item.id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (ids.length == 0) {
|
|
|
|
|
|
|
|
createMessage.error('请选择数据')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Withdraw({ ids: ids }).then(res => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
createMessage.success('操作成功')
|
|
|
|
|
|
|
|
reload()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 导出 EXCEL
|
|
|
|
// 导出 EXCEL
|
|
|
|
function ExportExcel() {
|
|
|
|
function ExportExcel() {
|
|
|
|
let Data: any = []
|
|
|
|
let Data: any = []
|
|
|
|
let DelData = ['id', 'bsno', 'ctnCode']
|
|
|
|
let DelData = ['id', 'bsno', 'ctnCode']
|
|
|
|
getRawDataSource().forEach((item, index) => {
|
|
|
|
getRawDataSource().forEach((item, index) => {
|
|
|
@ -208,22 +233,22 @@
|
|
|
|
URL.revokeObjectURL(url)
|
|
|
|
URL.revokeObjectURL(url)
|
|
|
|
document.body.removeChild(a)
|
|
|
|
document.body.removeChild(a)
|
|
|
|
}, 0)
|
|
|
|
}, 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 将字符串转换为ArrayBuffer
|
|
|
|
// 将字符串转换为ArrayBuffer
|
|
|
|
function s2ab(s) {
|
|
|
|
function s2ab(s) {
|
|
|
|
const buf = new ArrayBuffer(s.length)
|
|
|
|
const buf = new ArrayBuffer(s.length)
|
|
|
|
const view = new Uint8Array(buf)
|
|
|
|
const view = new Uint8Array(buf)
|
|
|
|
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff
|
|
|
|
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff
|
|
|
|
return buf
|
|
|
|
return buf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const dsPrint = ref()
|
|
|
|
const dsPrint = ref()
|
|
|
|
// 打印费用
|
|
|
|
// 打印费用
|
|
|
|
async function printFee() {
|
|
|
|
async function printFee() {
|
|
|
|
dsPrint.value.init()
|
|
|
|
dsPrint.value.init()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.topTable {
|
|
|
|
.topTable {
|
|
|
|
height: calc(100vh - 145px);
|
|
|
|
height: calc(100vh - 145px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|