|
|
|
@ -92,7 +92,9 @@
|
|
|
|
|
registerAllModules()
|
|
|
|
|
import 'handsontable/dist/handsontable.full.css'
|
|
|
|
|
import { formSchema } from './columns'
|
|
|
|
|
import { GetCtnSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { ApiEdit, ApiInfo, ApiListDetail, ApiDelDetail } from './api'
|
|
|
|
|
import { GetClientListByCode } from '/@/api/common'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
|
// 声明Emits
|
|
|
|
@ -173,11 +175,16 @@
|
|
|
|
|
}
|
|
|
|
|
const activeKey = ref('1')
|
|
|
|
|
//--------------------------------------- tab1 ---------------------------------------
|
|
|
|
|
const list = ref([])
|
|
|
|
|
const list = ref<any>([])
|
|
|
|
|
// 全部勾选
|
|
|
|
|
const allCheck = ref(false)
|
|
|
|
|
// 部分勾选
|
|
|
|
|
const someCheck = ref(false)
|
|
|
|
|
const hotTb = ref()
|
|
|
|
|
// 箱型字段
|
|
|
|
|
const ctnDict = ref([])
|
|
|
|
|
// 箱主字段
|
|
|
|
|
const ContainerOwnerDict = ref([])
|
|
|
|
|
watchEffect(() => {
|
|
|
|
|
// 全选
|
|
|
|
|
if (allCheck.value) {
|
|
|
|
@ -219,6 +226,7 @@
|
|
|
|
|
deep: true,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
|
data: 'selected',
|
|
|
|
@ -228,6 +236,7 @@
|
|
|
|
|
className: 'htCenter',
|
|
|
|
|
readOnly: false,
|
|
|
|
|
},
|
|
|
|
|
// -----------------
|
|
|
|
|
{
|
|
|
|
|
title: '主键Id',
|
|
|
|
|
width: 200,
|
|
|
|
@ -238,7 +247,17 @@
|
|
|
|
|
width: 200,
|
|
|
|
|
data: 'pid',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '箱型代码',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnCode',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '原箱主',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'oldContainerOwnerId',
|
|
|
|
|
},
|
|
|
|
|
// -----------------
|
|
|
|
|
{
|
|
|
|
|
title: '租箱业务号',
|
|
|
|
|
width: 200,
|
|
|
|
@ -246,117 +265,144 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '箱号',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'cntrno',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '箱型代码',
|
|
|
|
|
width: 290,
|
|
|
|
|
data: 'ctnCode',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '箱型',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnall',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '原箱主名称',
|
|
|
|
|
width: 290,
|
|
|
|
|
data: 'oldContainerOwner',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
// 下拉框数据,可以同步或者异步返回(异步需要process返回)
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const res = ctnDict.value.length ? ctnDict.value : (await GetCtnSelectList())?.data
|
|
|
|
|
if (!ctnDict.value.length) ctnDict.value = res
|
|
|
|
|
const dict = res.map((res) => {
|
|
|
|
|
return res.ctnName
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '原箱主',
|
|
|
|
|
width: 290,
|
|
|
|
|
data: 'oldContainerOwnerId',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'oldContainerOwner',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
// 下拉框数据,可以同步或者异步返回(异步需要process返回)
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const res = ContainerOwnerDict.value.length
|
|
|
|
|
? ContainerOwnerDict.value
|
|
|
|
|
: (await GetClientListByCode({ code: 'leasing' }))?.data
|
|
|
|
|
if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res
|
|
|
|
|
const dict = res.map((res) => {
|
|
|
|
|
return res.pinYinCode
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租箱业务',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'cmRentDirectEnum',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租箱类型',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'rentType',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '业务状态',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'billState',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '关联放箱单号',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'ctnReleaseNo',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租入日期',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'bsdate',
|
|
|
|
|
type: 'date',
|
|
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '开始计费日期',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'feeStartDate',
|
|
|
|
|
type: 'date',
|
|
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '币别',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'currenty',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '日租金',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'dailyRate',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
format: '0',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提箱费',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'pickupFee',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
format: '0',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提箱日期',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'pickupDate',
|
|
|
|
|
type: 'date',
|
|
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '还箱费',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'dropoffFee',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
format: '0',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '还箱日期',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'dropoffDate',
|
|
|
|
|
type: 'date',
|
|
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提箱港口名称',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'pickupPort',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提箱港口',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'pickupPortid',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '还箱港口名称',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'dropoffPort',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '还箱港口',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'dropoffPortid',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '业务编号/提单号',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'mblno',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '运输工具',
|
|
|
|
|
width: 290,
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'vehicleName',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
@ -369,7 +415,7 @@
|
|
|
|
|
fixedColumnsLeft: 1,
|
|
|
|
|
// 需要隐藏的列
|
|
|
|
|
hiddenColumns: {
|
|
|
|
|
columns: [1, 2],
|
|
|
|
|
columns: [1, 2, 3, 4],
|
|
|
|
|
indicators: true,
|
|
|
|
|
},
|
|
|
|
|
// 控制回车移动
|
|
|
|
@ -388,6 +434,28 @@
|
|
|
|
|
async afterChange(changes, source) {
|
|
|
|
|
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
|
|
|
|
|
let dict: any = {}
|
|
|
|
|
if (changes[0][1] === 'ctnall') {
|
|
|
|
|
const res = ctnDict.value.length ? ctnDict.value : (await GetCtnSelectList())?.data
|
|
|
|
|
if (!ctnDict.value.length) ctnDict.value = res
|
|
|
|
|
const item = res.filter((item) => {
|
|
|
|
|
return item.ctnName === changes[0][3]
|
|
|
|
|
})
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
list.value[changes[0][0]]['ctnall'] = dict?.ctnName
|
|
|
|
|
list.value[changes[0][0]]['ctnCode'] = dict?.ediCode
|
|
|
|
|
}
|
|
|
|
|
if (changes[0][1] === 'oldContainerOwner') {
|
|
|
|
|
const res = ContainerOwnerDict.value.length
|
|
|
|
|
? ContainerOwnerDict.value
|
|
|
|
|
: (await GetCtnSelectList())?.data
|
|
|
|
|
if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res
|
|
|
|
|
const item = res.filter((item) => {
|
|
|
|
|
return item.pinYinCode === changes[0][3]
|
|
|
|
|
})
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
list.value[changes[0][0]]['oldContainerOwner'] = dict?.pinYinCode
|
|
|
|
|
list.value[changes[0][0]]['oldContainerOwnerId'] = dict?.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -419,6 +487,5 @@
|
|
|
|
|
.ds-goods-tb-check {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 15px;
|
|
|
|
|
top: 30px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|