From 9427ede34093a2afd49cd59e2f72d2cc2fb25722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Thu, 27 Jun 2024 17:49:27 +0800 Subject: [PATCH] 06/27 --- .../autodui/TenantAuditStepModal.vue | 14 ++-- .../seaexport/components/SelectTextArea.vue | 68 ++++++++++++++----- .../seaexport/detail/modules/asd.json | 0 .../seaexport/detail/modules/baseInfo.tsx | 39 +++++++---- .../seaexport/detail/modules/preOrder.vue | 21 +++++- .../detail/modules/preOrderColumns.tsx | 41 +++++++++++ 6 files changed, 144 insertions(+), 39 deletions(-) create mode 100644 src/views/operation/seaexport/detail/modules/asd.json diff --git a/src/views/operation/autodui/TenantAuditStepModal.vue b/src/views/operation/autodui/TenantAuditStepModal.vue index 1e5ef4dd..329a6f20 100644 --- a/src/views/operation/autodui/TenantAuditStepModal.vue +++ b/src/views/operation/autodui/TenantAuditStepModal.vue @@ -10,7 +10,7 @@ @@ -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) ? '新增' : '编辑')) diff --git a/src/views/operation/seaexport/components/SelectTextArea.vue b/src/views/operation/seaexport/components/SelectTextArea.vue index bc3588a2..d9df34ec 100644 --- a/src/views/operation/seaexport/components/SelectTextArea.vue +++ b/src/views/operation/seaexport/components/SelectTextArea.vue @@ -37,15 +37,18 @@ optionLabelProp="label" @change="handleChange2" > + - {{ item.shortName }} ({{ item.codeName }}) + {{ item.name }} +
@@ -91,7 +94,7 @@ optionLabelProp="label" @change="handleChange" > - {{ item.shortName }} ({{ item.codeName }}) + --> + + + {{ item.name }} + @@ -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([]) // 页面初始化下拉数据 const init = async () => { - 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') - } + // 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 + }) + } + }) } 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 } diff --git a/src/views/operation/seaexport/detail/modules/asd.json b/src/views/operation/seaexport/detail/modules/asd.json new file mode 100644 index 00000000..e69de29b diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 7e2b33c1..a37f35b1 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -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 { - formModel[`shipper${e.type}`] = e.res + 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 { - formModel[`consignee${e.type}`] = e.res + 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 } } }, diff --git a/src/views/operation/seaexport/detail/modules/preOrder.vue b/src/views/operation/seaexport/detail/modules/preOrder.vue index 5ba63b99..5c3bfe3f 100644 --- a/src/views/operation/seaexport/detail/modules/preOrder.vue +++ b/src/views/operation/seaexport/detail/modules/preOrder.vue @@ -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() diff --git a/src/views/operation/seaexport/detail/modules/preOrderColumns.tsx b/src/views/operation/seaexport/detail/modules/preOrderColumns.tsx index 47d6dbf8..4d798fb2 100644 --- a/src/views/operation/seaexport/detail/modules/preOrderColumns.tsx +++ b/src/views/operation/seaexport/detail/modules/preOrderColumns.tsx @@ -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', +]