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