lijingjia 5 months ago
commit adb06d6b01

@ -10,7 +10,7 @@
<BasicForm @register="registerForm" />
<BasicTable @register="registerTable" class="Table">
<template #toolbar>
<a-button type="primary" @click="handleCreate"> </a-button>
<!-- <a-button type="primary" @click="handleCreate"> </a-button> -->
</template>
</BasicTable>
<!--右下角按钮-->
@ -123,12 +123,12 @@
tableSetting: { fullScreen: true },
canResize: true,
resizeHeightOffset: 35,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: 'right',
// },
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))

@ -37,15 +37,18 @@
optionLabelProp="label"
@change="handleChange2"
>
<!-- :label="item.shortName"
:title="`${item.shortName}(${item.codeName})`" -->
<a-select-option
v-for="item in companyList"
:key="item.id"
:value="item.id"
:label="item.shortName"
:title="`${item.shortName}(${item.codeName})`"
:label="item.name"
:title="`${item.name}`"
:blContent="item.blContent"
>
{{ item.shortName }} ({{ item.codeName }})
{{ item.name }}
<!-- {{ item.shortName }} ({{ item.codeName }}) -->
</a-select-option>
</a-select>
<div class="right">
@ -91,7 +94,7 @@
optionLabelProp="label"
@change="handleChange"
>
<a-select-option
<!-- <a-select-option
v-for="item in companyList"
:key="item.id"
:value="item.id"
@ -100,6 +103,19 @@
:blContent="item.blContent"
>
{{ item.shortName }} ({{ item.codeName }})
</a-select-option> -->
<!-- :label="item.shortName"
:title="`${item.shortName}(${item.codeName})`" -->
<a-select-option
v-for="item in companyList"
:key="item.id"
:value="item.id"
:label="item.name"
:title="`${item.name}`"
:blContent="item.blContent"
>
{{ item.name }}
<!-- {{ item.shortName }} ({{ item.codeName }}) -->
</a-select-option>
</a-select>
@ -143,6 +159,7 @@
GetShipperClientList,
GetConsigneeClientList,
GetNotifyPartyClientList,
GetShippingBillTemplateSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { getOptions } from '/@/hooks/dict'
// import selectView from '../detail/components/selectView.vue'
@ -173,7 +190,7 @@
deep: true,
},
)
const emit = defineEmits(['spliceMore', 'Change'])
const emit = defineEmits(['spliceMore', 'change'])
const visible = ref(false)
const modalType = ref(0)
const modelTitle = ref('')
@ -183,22 +200,38 @@
const modelVisible = ref(false)
const modelType = ref('')
const modelContent = ref('')
const company = ref()
const company2 = ref()
const company = ref('')
const company2 = ref('')
const Content2 = ref()
//
const companyList = ref<any>([])
//
const init = async () => {
if (props.field == 'shipper') {
companyList.value = getOptions('shipper')
} else if (props.field == 'consignee') {
GetConsigneeClientList().then((res) => {
// if (props.field == 'shipper') {
// companyList.value = getOptions('shipper')
// } else if (props.field == 'consignee') {
// GetConsigneeClientList().then((res) => {
// companyList.value = res.data
// })
// } else {
// companyList.value = getOptions('notifyparty')
// }
let TypeList = [
{ label: '发货人', value: '2', code: 'shipper' },
{ label: '收货人', value: '1', code: 'consignee' },
{ label: '通知人', value: '3', code: 'notifyParty' },
]
TypeList.forEach((e) => {
if (props.field == e.code) {
GetShippingBillTemplateSelectList({ type: e.value }).then((res) => {
console.log(res.data, '????????????????????????')
res.data.label = res.data.name
res.data.value = res.data.id
companyList.value = res.data
// SFTList[`${e.code}List`] = res.data
})
} else {
companyList.value = getOptions('notifyparty')
}
})
}
init()
function handleOpen(type) {
@ -232,7 +265,7 @@
return RData
}
function getSelectViewRes({ type, res }) {
emit('Change', { type, res })
emit('change', { type, res })
}
function getTextareaChange(e) {
Content.value = e.value
@ -243,6 +276,7 @@
getSelectViewRes({ type: 'Content2', res: e.value })
}
const handleChange = (v, obj) => {
console.log(v, obj)
getSelectViewRes({ type: 'Id', res: obj })
Content.value = obj.blContent
}

@ -837,27 +837,28 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
label: '',
field: 'shipperContent',
component: 'Input',
// defaultValue: '',
defaultValue: '',
show: false,
},
{
label: '',
field: 'shipper',
component: 'Input',
// defaultValue: '',
defaultValue: '',
show: false,
},
{
label: '',
field: 'shipperId',
component: 'Input',
// defaultValue: '',
defaultValue: '',
show: false,
},
{
field: 'shipper',
field: 'fhr',
component: 'SelectTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
label: '发货人',
@ -865,11 +866,16 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
field: 'shipper',
onChange: (e) => {
if (e) {
if (e.type == 'Id') {
formModel.shipper = e.label
formModel.shipperId = e.value
} else {
switch (e.type) {
case 'Content':
formModel[`shipper${e.type}`] = e.res
break
case 'Id':
formModel.shipper = e.res.label
formModel.shipperId = e.res.value
break
default:
break
}
}
},
@ -908,11 +914,16 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
field: 'consignee',
onChange: (e) => {
if (e) {
if (e.type == 'Id') {
formModel.consignee = e.label
formModel.consigneeId = e.value
} else {
switch (e.type) {
case 'Content':
formModel[`consignee${e.type}`] = e.res
break
case 'Id':
formModel.consignee = e.res.label
formModel.consigneeId = e.res.value
break
default:
break
}
}
},

@ -1017,13 +1017,18 @@
GetShippingBillCtnList,
BatchDelShippingBillCtn,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { preOrderD } from '/@/views/operation/seaexport/detail/modules/preOrderColumns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
import { useRoute } from 'vue-router'
const route = useRoute()
import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'
import { object } from 'vue-types'
registerAllModules()
const route = useRoute()
const props = defineProps({
details: { type: Object, default: {} },
})
const openPreOrderShow = ref(false)
const id = ref()
const labelCol = {
@ -1109,6 +1114,20 @@
} else {
orderList.value.push({ checked: false })
orderList.value[editIndex.value].mblno = route.query.mblno
// formState.voyno = '????'
setTimeout(() => {
// formState.vesselId = '1763455594347499520'
preOrderD.forEach((item) => {
Object.keys(props.details).forEach((e) => {
if (item == e) {
orderList.value[editIndex.value][e] = props.details[e]
console.log(e, formState[e], props.details[e])
} else if (item == 'cargoid') {
orderList.value[editIndex.value].cargoid = props.details.cargoId
}
})
})
}, 200)
formState.value = orderList.value[editIndex.value]
}
GetCtnList()

@ -75,3 +75,44 @@ export const schemas1: FormSchema[] = [
colProps: { span: 5 },
},
]
export const preOrderD = [
'vesselId',
'voyno',
'carrierId',
'etd',
'shipperId',
'shipperName',
'shipperAddress',
'shipperCountry',
'shipperCountryTel',
'consigneeId',
'consigneeName',
'consigneeAddress',
'consigneeCountry',
'consigneeCountryTel',
'notifyPartyId',
'notifyPartyName',
'notifyPartyAddress',
'notifyPartyCountry',
'notifyPartyCountryTel',
'loadPortId',
'loadPort',
'dischargePortId',
'dischargePort',
'deliveryPlaceId',
'deliveryPlace',
'marks',
'description',
'cargoid',
'kindPkgs',
'temperatureSet',
'temperatureUnit',
'reeferQuantity',
'dangerClass',
'dangerNo',
'dangerAttn',
'dangerTel',
'remark',
'yardId',
]

Loading…
Cancel
Save