|
|
@ -3,22 +3,22 @@
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handledbclick">
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handledbclick">
|
|
|
|
<template #tableTitle>
|
|
|
|
<template #tableTitle>
|
|
|
|
<a-button type="link" size="mini" @click="handleLabel">
|
|
|
|
<a-button type="link" size="mini" @click="handleLabel">
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
<span class="iconfont icon-cengji"></span>
|
|
|
|
分配标签
|
|
|
|
分配标签
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
<a-button :loading="sumload" type="link" size="mini" @click="handleSum">
|
|
|
|
<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-button>
|
|
|
|
<a-upload :customRequest="customRequest" :multiple="false"
|
|
|
|
<a-upload :customRequest="customRequest" :multiple="false"
|
|
|
|
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
|
|
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
|
|
:showUploadList="false" name="file">
|
|
|
|
:showUploadList="false" name="file">
|
|
|
|
<a-button size="mini" type="link">
|
|
|
|
<a-button size="mini" type="link">
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
<span class="iconfont icon-a-17Fdaoru"></span>
|
|
|
|
导入</a-button>
|
|
|
|
导入</a-button>
|
|
|
|
</a-upload>
|
|
|
|
</a-upload>
|
|
|
|
<a-button type="link" @click="handleSuport" :loading="loadingExport" size="mini">
|
|
|
|
<a-button type="link" @click="handleSuport" :loading="loadingExport" size="mini">
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
<span class="iconfont icon-jiantouxia"></span>
|
|
|
|
导出
|
|
|
|
导出
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -27,6 +27,12 @@
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
<span class="iconfont icon-jiahao2fill"></span>
|
|
|
|
新增
|
|
|
|
新增
|
|
|
|
</a-button>
|
|
|
|
</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>
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
<template v-slot:bodyCell="{ column, record }">
|
|
|
|
<template v-if="column.dataIndex == 'vessel'">
|
|
|
|
<template v-if="column.dataIndex == 'vessel'">
|
|
|
@ -50,6 +56,13 @@
|
|
|
|
<template v-if="column.dataIndex == 'isRecvBC'">
|
|
|
|
<template v-if="column.dataIndex == 'isRecvBC'">
|
|
|
|
<BulbFilled style="color: green; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBC" />
|
|
|
|
<BulbFilled style="color: green; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBC" />
|
|
|
|
</template>
|
|
|
|
</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'">
|
|
|
|
<template v-if="column.dataIndex == 'isRecvBKCancel'">
|
|
|
|
<BulbFilled style="color: red; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBKCancel" />
|
|
|
|
<BulbFilled style="color: red; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBKCancel" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -108,7 +121,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
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 { reactive, ref, h, onMounted } from 'vue';
|
|
|
|
import { columns, searchFormSchema, FeeStatus } from './columns'
|
|
|
|
import { columns, searchFormSchema, FeeStatus } from './columns'
|
|
|
|
import { BulbFilled, CheckCircleFilled, BulbOutlined } from '@ant-design/icons-vue';
|
|
|
|
import { BulbFilled, CheckCircleFilled, BulbOutlined } from '@ant-design/icons-vue';
|
|
|
@ -122,7 +135,7 @@ const { createMessage } = useMessage()
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
const go = useGo()
|
|
|
|
const go = useGo()
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }] = useTable({
|
|
|
|
const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps, setSelectedRowKeys }] = useTable({
|
|
|
|
title: '',
|
|
|
|
title: '',
|
|
|
|
api: async (p) => {
|
|
|
|
api: async (p) => {
|
|
|
|
const res: API.DataResult = await BookingSlotPage(p)
|
|
|
|
const res: API.DataResult = await BookingSlotPage(p)
|
|
|
@ -152,7 +165,7 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
|
|
|
|
setProps({
|
|
|
|
setProps({
|
|
|
|
showIndexColumn: false,
|
|
|
|
showIndexColumn: false,
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
resolve({ data: arr, total: 10 })
|
|
|
|
resolve({ data: arr, total: res.count })
|
|
|
|
optionsStore.getOptionsByCode('GetClientPortSelectList')
|
|
|
|
optionsStore.getOptionsByCode('GetClientPortSelectList')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -172,6 +185,7 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
|
|
|
|
showTableSetting: true,
|
|
|
|
showTableSetting: true,
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
|
showIndexColumn: true,
|
|
|
|
showIndexColumn: true,
|
|
|
|
|
|
|
|
rowKey: 'id',
|
|
|
|
indexColumnProps: {
|
|
|
|
indexColumnProps: {
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -188,14 +202,14 @@ function handledbclick(record) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleDelete(row) {
|
|
|
|
function handleDelete(row) {
|
|
|
|
setLoading(true);
|
|
|
|
setLoading(true);
|
|
|
|
// mskDelete({ id: row.id }).then(res => {
|
|
|
|
BookingSlotDelete([row.id]).then(res => {
|
|
|
|
// if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
// reload()
|
|
|
|
reload()
|
|
|
|
// } else {
|
|
|
|
} else {
|
|
|
|
// createMessage.error(res.message)
|
|
|
|
createMessage.error(res.message)
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// setLoading(false);
|
|
|
|
setLoading(false);
|
|
|
|
// })
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const labelIdArray = ref([])
|
|
|
|
const labelIdArray = ref([])
|
|
|
|
const labelList = ref([]) as any
|
|
|
|
const labelList = ref([]) as any
|
|
|
@ -221,6 +235,45 @@ function handleLabel() {
|
|
|
|
labelLoad.value = false
|
|
|
|
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) {
|
|
|
|
function customRequest(data) {
|
|
|
|
const formData = new FormData()
|
|
|
|
const formData = new FormData()
|
|
|
|
formData.append('file', data.file)
|
|
|
|
formData.append('file', data.file)
|
|
|
@ -439,4 +492,8 @@ function handleSuport() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/deep/ .vben-basic-table-action button {
|
|
|
|
|
|
|
|
padding: 0 3px !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|