szh-new
张同海 4 months ago
parent 1faf8ded77
commit 37a864c2d0

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetCtnSelectList } from '/@/api/common' import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '箱号', title: '箱号',
@ -25,24 +25,24 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 200, width: 200,
}, },
// { {
// title: '备注', title: '备注??',
// dataIndex: '', dataIndex: '',
// sorter: true, sorter: true,
// width: 200, width: 200,
// }, },
{ {
title: '箱初期成本', title: '箱初期成本',
dataIndex: 'ctnValue_Base', dataIndex: 'ctnValue_Base',
sorter: true, sorter: true,
width: 200, width: 200,
}, },
// { {
// title: '购入价格', title: '购入价格??',
// dataIndex: '', dataIndex: '',
// sorter: true, sorter: true,
// width: 200, width: 200,
// }, },
] ]
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -52,18 +52,30 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
// { {
// field: 'cntrno', field: 'ctnOwner',
// label: '箱主', label: '箱主',
// component: 'Input', component: 'ApiSelect',
// colProps: { span: 4 }, required: false,
// }, dynamicDisabled: false,
// { colProps: { span: 4 },
// field: 'cntrno', componentProps: ({ formModel }) => {
// label: '箱来源', return {
// component: 'Input', allowClear: true,
// colProps: { span: 4 }, showSearch: true,
// }, api: GetClientListByCode,
params: { code: 'leasing' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
] ]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
@ -80,16 +92,26 @@ export const formSchema: FormSchema[] = [
colProps: { span: 20 }, colProps: { span: 20 },
}, },
{ {
label: '',
field: 'ctnall', field: 'ctnall',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'ctnCode',
label: '箱型', label: '箱型',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 20 }, colProps: { span: 20 },
componentProps: () => { componentProps: ({ formModel }) => {
return { return {
api: GetCtnSelectList, api: GetCtnSelectList,
labelField: 'ctnName', labelField: 'ctnName',
valueField: 'ediCode', valueField: 'ediCode',
resultField: 'data', resultField: 'data',
onChange: (v, obj) => {
formModel.ctnall = obj.label
},
} }
}, },
}, },
@ -115,19 +137,19 @@ export const formSchema: FormSchema[] = [
component: 'InputNumber', component: 'InputNumber',
colProps: { span: 20 }, colProps: { span: 20 },
}, },
// { {
// field: 'ctnValue_Base', field: 'ctnValue_Base',
// label: '购入价格', label: '购入价格??',
// component: 'InputNumber', component: 'InputNumber',
// colProps: { span: 20 }, colProps: { span: 20 },
// }, },
// { {
// field: 'note', field: 'note',
// label: '备注', label: '备注??',
// component: 'InputTextArea', component: 'InputTextArea',
// colProps: { span: 20 }, colProps: { span: 20 },
// componentProps: { componentProps: {
// rows: 2, rows: 2,
// }, },
// }, },
] ]

@ -1,7 +1,8 @@
import { ref } from 'vue' import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common' import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -47,12 +48,12 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 200, width: 200,
}, },
// { {
// title: '所属分部', title: '所属分部',
// dataIndex: '', dataIndex: 'orgid',
// sorter: true, sorter: true,
// width: 200, width: 200,
// }, },
{ {
title: '箱来源', title: '箱来源',
dataIndex: 'ctnSource', dataIndex: 'ctnSource',
@ -60,12 +61,11 @@ export const columns: BasicColumn[] = [
width: 200, width: 200,
}, },
{ {
title: '变动来源', title: '当前箱业务状态',
dataIndex: 'changeSourceId', dataIndex: 'ctnBizState',
sorter: true, sorter: true,
width: 200, width: 200,
}, },
{ {
title: '箱业务编号', title: '箱业务编号',
dataIndex: 'billno', dataIndex: 'billno',
@ -100,7 +100,15 @@ export const columns: BasicColumn[] = [
title: '空重箱', title: '空重箱',
dataIndex: 'isHeavy', dataIndex: 'isHeavy',
sorter: true, sorter: true,
width: 150, width: 80,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
} else {
return <Tag color="error"></Tag>
}
return text
},
}, },
{ {
title: '当前港口', title: '当前港口',
@ -144,12 +152,12 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 200, width: 200,
}, },
// { {
// title: '生产日期', title: '生产日期??',
// dataIndex: '', dataIndex: '',
// sorter: true, sorter: true,
// width: 200, width: 200,
// }, },
{ {
title: '箱初期成本', title: '箱初期成本',
dataIndex: 'ctnValue_Base', dataIndex: 'ctnValue_Base',
@ -174,15 +182,25 @@ export const searchFormSchema: FormSchema[] = [
{ {
field: 'ctnOwner', field: 'ctnOwner',
label: '箱主', label: '箱主',
component: 'Select', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: ({ formModel }) => {
options: [], return {
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { api: GetClientListByCode,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 params: { code: 'leasing' },
}, labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}, },
}, },
// { // {
@ -387,15 +405,25 @@ export const formSchema: FormSchema[] = [
{ {
field: 'ctnOwner', field: 'ctnOwner',
label: '箱主', label: '箱主',
component: 'Select', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: ({ formModel }) => {
options: [], return {
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { api: GetClientListByCode,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 params: { code: 'leasing' },
}, labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}, },
}, },
{ {
@ -509,8 +537,8 @@ export const formSchema: FormSchema[] = [
defaultValue: false, defaultValue: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
checkedChildren: '', checkedChildren: '重箱',
unCheckedChildren: '', unCheckedChildren: '空箱',
}, },
}, },
{ {
@ -675,12 +703,12 @@ export const InfoColumns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// { {
// title: '状态变动', title: '状态变动',
// dataIndex: 'usedState', dataIndex: 'usedState',
// sorter: true, sorter: true,
// width: 150, width: 150,
// }, },
{ {
title: '新旧箱', title: '新旧箱',
dataIndex: 'usedState', dataIndex: 'usedState',
@ -703,7 +731,15 @@ export const InfoColumns: BasicColumn[] = [
title: '空重箱', title: '空重箱',
dataIndex: 'isHeavy', dataIndex: 'isHeavy',
sorter: true, sorter: true,
width: 150, width: 80,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
} else {
return <Tag color="error"></Tag>
}
return text
},
}, },
{ {
title: '当前港口', title: '当前港口',

@ -7,27 +7,12 @@
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"
> >
<BasicTable @register="registerTable"> <BasicTable @register="registerTable"> </BasicTable>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:profile-outlined',
tooltip: '详情',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineExpose, defineComponent, onMounted, ref } from 'vue' import { defineExpose, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { ApiExistList } from './api'
import { ApiChangeList } from '../StateChange/api' import { ApiChangeList } from '../StateChange/api'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { InfoColumns } from './columns' import { InfoColumns } from './columns'
@ -42,8 +27,6 @@
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '', // title: '',
maxHeight: 300, maxHeight: 300,
// rowSelection: { type: 'checkbox' },
// rowSelection: { type: 'radio' },
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiChangeList(p) const res: API.DataResult = await ApiChangeList(p)
return new Promise((resolve) => { return new Promise((resolve) => {
@ -70,26 +53,8 @@
bordered: true, bordered: true,
immediate: true, immediate: true,
showTableSetting: false, showTableSetting: false,
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: undefined,
// },
}) })
function handleCreate() {
openModal(true, {
record: {},
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function getSelectData() { function getSelectData() {
return getSelectRows() return getSelectRows()
} }

@ -1,7 +1,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common' import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -41,6 +41,12 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
{
title: '状态变动',
dataIndex: 'ctnState',
sorter: true,
width: 200,
},
{ {
title: '当前业务编号', title: '当前业务编号',
dataIndex: 'mblno', dataIndex: 'mblno',
@ -69,7 +75,15 @@ export const columns: BasicColumn[] = [
title: '空重箱', title: '空重箱',
dataIndex: 'isHeavy', dataIndex: 'isHeavy',
sorter: true, sorter: true,
width: 150, width: 80,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
} else {
return <Tag color="error"></Tag>
}
return text
},
}, },
{ {
title: '当前港口', title: '当前港口',
@ -256,15 +270,25 @@ export const formSchema: FormSchema[] = [
{ {
field: 'ctnOwner', field: 'ctnOwner',
label: '箱主', label: '箱主',
component: 'Select', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: ({ formModel }) => {
options: [], return {
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { api: GetClientListByCode,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 params: { code: 'leasing' },
}, labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}, },
}, },
{ {
@ -370,7 +394,6 @@ export const formSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
field: 'isHeavy', field: 'isHeavy',
label: '空重箱', label: '空重箱',
@ -378,8 +401,8 @@ export const formSchema: FormSchema[] = [
defaultValue: false, defaultValue: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
checkedChildren: '', checkedChildren: '重箱',
unCheckedChildren: '', unCheckedChildren: '空箱',
}, },
}, },
{ {

@ -0,0 +1,62 @@
{
"id": "",
"cntrno": "080801,080802",
"isOnlineId": "0",
"changeSourceId": "1",
"usedState": "used",
"ctnSourceId": "1",
"ctnBizState": "短租租出",
"ctnBizStateId": "6",
"billno": "WebTest001",
"ctnReleaseNo": "WebTest001",
"ctnStateId": "1",
"ctnBreakState": "WebTest001",
"isHeavy": true,
"port": "NINGBO",
"portid": "1816754346457698304",
"depot": "昭阳国际",
"vehicleName": "WebTest001",
"ctnall": "22G0",
"mblno": "WebTest001",
"customerName": "青岛东胜",
"customerId": "QDDS",
"etd": "2024-08-08T00:53:55.980Z",
"eta": "2024-08-08T00:54:08.455Z",
"changeTime": "2024-08-08T00:54:10.015Z",
"ctnWeight": 666,
"ctnValue_Base": 666
}
{
"id": "1821349203675320320",
"cntrno": "080801",
"ctnCode": null,
"ctnall": "22G0",
"usedState": "used",
"ctnOwner": null,
"ctnSourceId": 1,
"ctnSource": "短租租入",
"ctnBizStateId": 6,
"ctnBizState": "短租租出",
"billno": "WebTest001",
"ctnReleaseNo": null,
"ctnStateId": 1,
"ctnState": "可用",
"ctnBreakState": "WebTest001",
"isOnlineId": 0,
"isOnline": "待上线",
"isHeavy": true,
"portid": "1816754346457698304",
"port": null,
"depot": "昭阳国际",
"vehicleName": "WebTest001",
"mblno": "WebTest001",
"customerId": "",
"customerName": "青岛东胜",
"etd": "2024-08-08 00:53:55",
"eta": "2024-08-08 00:54:08",
"stateTime": "2024-08-08 00:54:10",
"ctnWeight": 0,
"ctnValue_Base": 0
},

@ -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>

@ -114,8 +114,27 @@ export const searchFormSchema: FormSchema[] = [
{ {
field: 'rentDirect', field: 'rentDirect',
label: '租箱/退租', label: '租箱/退租',
component: 'Input', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_RentDirect').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
}, },
{ {
field: 'etd', field: 'etd',
@ -157,8 +176,27 @@ export const formSchema: FormSchema[] = [
{ {
field: 'rentDirect', field: 'rentDirect',
label: '租箱/退租', label: '租箱/退租',
component: 'Input', component: 'ApiSelect',
colProps: { span: 6 }, colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_RentDirect').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
}, },
{ {
field: 'rentType', field: 'rentType',

@ -2,7 +2,11 @@
<div class="goods-table" style="width: 100%; overflow: auto"> <div class="goods-table" style="width: 100%; overflow: auto">
<a-spin :spinning="loadingTable"> <a-spin :spinning="loadingTable">
<div> <div>
<div class="flex" v-if="!isLockBooking && source == 'edit'" style="justify-content: space-between"> <div
class="flex"
v-if="!isLockBooking && source == 'edit'"
style="justify-content: space-between"
>
<div> <div>
<a-button type="link" v-repeat size="mini" @click="openDialog"> <a-button type="link" v-repeat size="mini" @click="openDialog">
<span class="iconfont icon-liebiao1"></span> <span class="iconfont icon-liebiao1"></span>
@ -254,7 +258,7 @@
'changeTotal', 'changeTotal',
'handleRefshTable', 'handleRefshTable',
'changeCtnInfo', 'changeCtnInfo',
'setGoodsTransform' 'setGoodsTransform',
]) ])
watch( watch(
() => props.details, () => props.details,
@ -943,7 +947,7 @@
// //
const props = { readOnly: true } const props = { readOnly: true }
return props return props
} },
}) })
} }
}) })
@ -991,7 +995,7 @@
// //
const checkDelete = () => { const checkDelete = () => {
let flag = false let flag = false
list.value.forEach(item => { list.value.forEach((item) => {
if (item?.selected) flag = true if (item?.selected) flag = true
}) })
if (!flag) { if (!flag) {
@ -1665,7 +1669,8 @@
list.value[changes[0][0]]['ctnCode'] = dict?.ediCode list.value[changes[0][0]]['ctnCode'] = dict?.ediCode
list.value[changes[0][0]]['size'] = dict?.ctnSize list.value[changes[0][0]]['size'] = dict?.ctnSize
if (list.value[changes[0][0]]['ctnNum']) { if (list.value[changes[0][0]]['ctnNum']) {
list.value[changes[0][0]]['teu'] = parseInt(dict.teu || 0) * parseInt(list.value[changes[0][0]]['ctnNum']) list.value[changes[0][0]]['teu'] =
parseInt(dict.teu || 0) * parseInt(list.value[changes[0][0]]['ctnNum'])
} }
list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight
} }
@ -1763,7 +1768,7 @@
} }
}) })
let teu = 0 let teu = 0
ctnDict.value.forEach(item => { ctnDict.value.forEach((item) => {
if (item.ctnName == list.value[changes[0][0]]['ctn']) { if (item.ctnName == list.value[changes[0][0]]['ctn']) {
teu = item.teu teu = item.teu
} }

Loading…
Cancel
Save