|
|
|
@ -1,12 +1,16 @@
|
|
|
|
|
<!--
|
|
|
|
|
* @Author: lijingjia lijj_xl@163.com
|
|
|
|
|
* @Date: 2024-07-24 18:51:54
|
|
|
|
|
* @Description: 订舱货物状态管理
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
|
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:edi:add')">
|
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
|
添加
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button type="link" @click="handleDel" :disabled="checkPermissions('op:edi:import')">
|
|
|
|
|
<span class="iconfont icon-shanchu2"></span>
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
<Divider type="vertical" />
|
|
|
|
|
<a-upload
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
:maxCount="1"
|
|
|
|
@ -14,24 +18,12 @@
|
|
|
|
|
name="file"
|
|
|
|
|
accept=".xlsm,.xlsx,.xls"
|
|
|
|
|
>
|
|
|
|
|
<a-button
|
|
|
|
|
type="link"
|
|
|
|
|
>
|
|
|
|
|
<a-button type="link">
|
|
|
|
|
<span class="iconfont icon-xiazai"></span>
|
|
|
|
|
导入货物状态
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-upload>
|
|
|
|
|
</template>
|
|
|
|
|
<template #toolbar>
|
|
|
|
|
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:edi:add')">
|
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
|
添加
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button type="link" @click="handleDel" :disabled="checkPermissions('op:edi:import')">
|
|
|
|
|
<span class="iconfont icon-shanchu2"></span>
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
|
<TableAction
|
|
|
|
@ -52,6 +44,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { onMounted } from 'vue'
|
|
|
|
|
import { Divider } from 'ant-design-vue'
|
|
|
|
|
import { checkPermissions } from '/@/hooks/Permissions/index'
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
@ -132,7 +125,7 @@
|
|
|
|
|
function beforeUpload(file) {
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('file', file)
|
|
|
|
|
ImportBookingStatusConfigByExcel(formData).then(res => {
|
|
|
|
|
ImportBookingStatusConfigByExcel(formData).then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
reload()
|
|
|
|
|
createMessage.success('导入成功!')
|
|
|
|
|