|
|
|
@ -3,22 +3,22 @@
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handledbclick">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
|
<a-button type="link" size="mini" @click="handleLabel">
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
<span class="iconfont icon-cengji"></span>
|
|
|
|
|
分配标签
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button :loading="sumload" type="link" size="mini" @click="handleSum">
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
<span class="iconfont icon-shujuyingshe"></span>
|
|
|
|
|
合票
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-upload :customRequest="customRequest" :multiple="false"
|
|
|
|
|
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
|
|
|
:showUploadList="false" name="file">
|
|
|
|
|
<a-button size="mini" type="link">
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
<span class="iconfont icon-a-17Fdaoru"></span>
|
|
|
|
|
导入</a-button>
|
|
|
|
|
</a-upload>
|
|
|
|
|
<a-button type="link" @click="handleSuport" :loading="loadingExport" size="mini">
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
<span class="iconfont icon-jiantouxia"></span>
|
|
|
|
|
导出
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
@ -27,6 +27,12 @@
|
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
|
新增
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-popconfirm title="确定删除吗?" ok-text="确定" cancel-text="取消" @confirm="handleDeleteAll">
|
|
|
|
|
<a-button type="link" size="mini">
|
|
|
|
|
<span class="iconfont icon-shanchu2"></span>
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.dataIndex == 'vessel'">
|
|
|
|
@ -50,6 +56,13 @@
|
|
|
|
|
<template v-if="column.dataIndex == 'isRecvBC'">
|
|
|
|
|
<BulbFilled style="color: green; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBC" />
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="column.dataIndex == 'labelList'">
|
|
|
|
|
<div>
|
|
|
|
|
<a-tag style="color: black !important;font-weight: bold;cursor: pointer;" :color="item.color"
|
|
|
|
|
@click="handleLabelBind(record)" v-for="(item, index) in record.labelList" :key="index">{{ item.name
|
|
|
|
|
}}</a-tag>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="column.dataIndex == 'isRecvBKCancel'">
|
|
|
|
|
<BulbFilled style="color: red; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBKCancel" />
|
|
|
|
|
</template>
|
|
|
|
@ -108,7 +121,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { BookingSlotPage, BookingLabelList, BookingLabelBind, GetMergeList, ImportSlotFromFile, PrintOrder } from './api'
|
|
|
|
|
import { BookingSlotPage, BookingLabelList, BookingLabelBind, GetMergeList, ImportSlotFromFile, PrintOrder, BookingSlotDelete } from './api'
|
|
|
|
|
import { reactive, ref, h, onMounted } from 'vue';
|
|
|
|
|
import { columns, searchFormSchema, FeeStatus } from './columns'
|
|
|
|
|
import { BulbFilled, CheckCircleFilled, BulbOutlined } from '@ant-design/icons-vue';
|
|
|
|
@ -122,7 +135,7 @@ const { createMessage } = useMessage()
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
|
const go = useGo()
|
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
|
const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }] = useTable({
|
|
|
|
|
const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps, setSelectedRowKeys }] = useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await BookingSlotPage(p)
|
|
|
|
@ -152,7 +165,7 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
|
|
|
|
|
setProps({
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
|
}),
|
|
|
|
|
resolve({ data: arr, total: 10 })
|
|
|
|
|
resolve({ data: arr, total: res.count })
|
|
|
|
|
optionsStore.getOptionsByCode('GetClientPortSelectList')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -172,6 +185,7 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
showIndexColumn: true,
|
|
|
|
|
rowKey: 'id',
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
@ -188,14 +202,14 @@ function handledbclick(record) {
|
|
|
|
|
}
|
|
|
|
|
function handleDelete(row) {
|
|
|
|
|
setLoading(true);
|
|
|
|
|
// mskDelete({ id: row.id }).then(res => {
|
|
|
|
|
// if (res.succeeded) {
|
|
|
|
|
// reload()
|
|
|
|
|
// } else {
|
|
|
|
|
// createMessage.error(res.message)
|
|
|
|
|
// }
|
|
|
|
|
// setLoading(false);
|
|
|
|
|
// })
|
|
|
|
|
BookingSlotDelete([row.id]).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
reload()
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
setLoading(false);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const labelIdArray = ref([])
|
|
|
|
|
const labelList = ref([]) as any
|
|
|
|
@ -221,6 +235,45 @@ function handleLabel() {
|
|
|
|
|
labelLoad.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleDeleteAll() {
|
|
|
|
|
const select = getSelectRows()
|
|
|
|
|
const pkIdArr = select.map((item, index) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
if (pkIdArr.length === 0) {
|
|
|
|
|
createMessage.error('请选择要删除的数据')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
setLoading(true);
|
|
|
|
|
BookingSlotDelete(pkIdArr).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
reload()
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
setLoading(false);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleLabelBind(row) {
|
|
|
|
|
visible.value = true
|
|
|
|
|
labelIdArray.value = []
|
|
|
|
|
labelLoad.value = true
|
|
|
|
|
setSelectedRowKeys([row.id])
|
|
|
|
|
BookingLabelList({ scope: 1 }).then(res => {
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
item.isActive = false
|
|
|
|
|
if (row.labelList) {
|
|
|
|
|
row.labelList.forEach(ite => {
|
|
|
|
|
if (ite.id === item.id) {
|
|
|
|
|
item.isActive = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
labelList.value = res.data
|
|
|
|
|
labelLoad.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function customRequest(data) {
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('file', data.file)
|
|
|
|
@ -439,4 +492,8 @@ function handleSuport() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .vben-basic-table-action button {
|
|
|
|
|
padding: 0 3px !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|