|
|
|
@ -17,6 +17,10 @@
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-button type="link" @click="derivedExcel">
|
|
|
|
|
<span class="iconfont icon-Excel"></span>
|
|
|
|
|
导出待上线
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
@ -38,7 +42,8 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
|
|
|
|
|
import { ApiList, ApiDel } from './api'
|
|
|
|
|
import { ApiList, ApiDel, ApiGetDSX } from './api'
|
|
|
|
|
import { ExportExcelByColumn } from '/@/api/common'
|
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
|
import TenantAuditStepModal from './TenantAuditStepModal.vue'
|
|
|
|
|
import { columns, searchFormSchema } from './columns'
|
|
|
|
@ -109,6 +114,147 @@
|
|
|
|
|
reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const DSXcolumns = [
|
|
|
|
|
{
|
|
|
|
|
title: '箱号',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'cntrno',
|
|
|
|
|
readOnly: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '箱型',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnall',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '箱来源',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnSource',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '是否上线',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'isOnline',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
readOnly: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '识别备注',
|
|
|
|
|
width: 200,
|
|
|
|
|
data: 'dealRemark',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '箱流转状态',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnFlowState',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '状态日期',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'changeTime',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '当前箱业务状态',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnBizState',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '关联合同号',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnReleaseNo',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '当前港口',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'port',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '始发港',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'portLoad',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '目的港',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'portDelivery',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '预抵港',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'portDischarge',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '场站/码头',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'depot',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '船名',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'vessel',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '航次',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'voyno',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '业务编号',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'mblno',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'remark',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
function derivedExcel() {
|
|
|
|
|
const select = getSelectRows()
|
|
|
|
|
let ApiData: any = {
|
|
|
|
|
ids: [],
|
|
|
|
|
}
|
|
|
|
|
if (select.length === 0) {
|
|
|
|
|
notification.warning({ message: '请至少选择一条数据', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
} else {
|
|
|
|
|
ApiData.ids = select.map((item) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ApiGetDSX(ApiData).then((res) => {
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
let ApiData: any = {
|
|
|
|
|
columnSets: [],
|
|
|
|
|
jsonDataStr: [],
|
|
|
|
|
}
|
|
|
|
|
DSXcolumns.forEach((item, index) => {
|
|
|
|
|
ApiData.columnSets.push({
|
|
|
|
|
title: item.title,
|
|
|
|
|
enTitle: item.data,
|
|
|
|
|
dataIndex: item.data,
|
|
|
|
|
visible: true,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
ApiData.jsonDataStr = JSON.stringify(res.data)
|
|
|
|
|
ExportExcelByColumn(ApiData).then((res) => {
|
|
|
|
|
const xlsUrl = window.URL.createObjectURL(
|
|
|
|
|
new Blob([res], {
|
|
|
|
|
type: 'application/vnd.ms-excel;charset=utf-8',
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
const fname = '待上线数据'
|
|
|
|
|
const link = document.createElement('a')
|
|
|
|
|
link.href = xlsUrl
|
|
|
|
|
link.setAttribute('download', fname)
|
|
|
|
|
document.body.appendChild(link)
|
|
|
|
|
link.click()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleAudit(record) {
|
|
|
|
|
openModal(true, {
|
|
|
|
|
record,
|
|
|
|
|