From 70ff1f0e4bdbd2eb30b24a0ed0587beeb91c3782 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 15 Aug 2024 13:58:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=B7=E8=BF=90=E5=87=BA=E5=8F=A3?= =?UTF-8?q?=E8=AF=A6=E6=83=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/operation/seaexport/columns.tsx | 15 --------------- src/views/operation/seaexport/detail/index.vue | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/views/operation/seaexport/columns.tsx b/src/views/operation/seaexport/columns.tsx index 4c13b3ef..479db69f 100644 --- a/src/views/operation/seaexport/columns.tsx +++ b/src/views/operation/seaexport/columns.tsx @@ -1181,21 +1181,6 @@ export const columns: BasicColumn[] = [ return RData }, }, - { - dataIndex: 'vessel2N', - title: '船名', - sorter: true, - width: 150, - customRender: ({ record }) => { - let RData = '' - // ListData.vessel.forEach((item) => { - // if (item.value == record.vessel2N) { - // RData = item.label - // } - // }) - return RData - }, - }, { title: '二程航次', dataIndex: 'voyno2N', diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 4129cabc..f1cf3f32 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -329,6 +329,7 @@ if (!res.data.ctnPriceInfo.length) { res.data.ctnPriceInfo = [{}] } + bookingDetails.value = res.data appStore.settopDown(false) inPageLoading.value = false // 解决 业务来源 联动问题 From 7bf8e98cac965330134d194f563e33cf95234c82 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 15 Aug 2024 17:48:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B5=B7=E8=BF=90=E5=87=BA=E5=8F=A3?= =?UTF-8?q?=E8=AF=A6=E6=83=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common/index.ts | 9 ++ src/api/system/role.ts | 7 +- src/hooks/web/common.ts | 1 + src/settings/componentSetting.ts | 2 +- src/views/baseinfo/lanes/columns.tsx | 94 ++++++++++++++++--- .../baseinfo/port/TenantAuditStepModal.vue | 2 +- src/views/baseinfo/port/columns.tsx | 40 ++++++-- src/views/flowcenter/flowInstances/api.ts | 2 +- .../seaexport/detail/modules/baseInfo.tsx | 20 ++-- .../seaexport/detail/modules/basicInfo.vue | 4 +- .../seaexport/detail/modules/mailingInfo.vue | 16 +++- src/views/system/datarule/columns.tsx | 3 +- 12 files changed, 159 insertions(+), 41 deletions(-) diff --git a/src/api/common/index.ts b/src/api/common/index.ts index 76dc18dd..c1f63cc9 100644 --- a/src/api/common/index.ts +++ b/src/api/common/index.ts @@ -449,6 +449,15 @@ export function GetClientFrtSelectList() { }) } +// 船公司下拉 +export function GetCarrierSelectList(params) { + return request({ + url: '/mainApi/ClientCommon/GetCarrierSelectList', + method: 'get', + params + }) +} + /** * 上传api路径 */ diff --git a/src/api/system/role.ts b/src/api/system/role.ts index 17ec03c5..bfd618e4 100644 --- a/src/api/system/role.ts +++ b/src/api/system/role.ts @@ -1,3 +1,8 @@ +/* + * @Desc: + * @Author: lijj + * @Date: 2024-07-17 08:39:50 + */ // @ts-ignore import { request } from '/@/utils/request' import { DataResult, PageRequest } from '/@/api/model/baseModel' @@ -9,7 +14,7 @@ enum Api { getRolePermission = '/mainApi/Role/GetRolePermission', updateRolePermission = '/mainApi/Role/UpdateClientRolePermission', - GetColumns = '/mainApi/Common/GetColumns', + GetColumns = '/mainApi/Common/GetColumnsByClient', GetTables = '/mainApi/Common/GetTables', GetClientPermissionList = '/mainApi/Common/GetClientPermissionList', } diff --git a/src/hooks/web/common.ts b/src/hooks/web/common.ts index ad8fdadc..df76a6f9 100644 --- a/src/hooks/web/common.ts +++ b/src/hooks/web/common.ts @@ -127,6 +127,7 @@ export function updateFormItem(updateSchema, formNo) { getFormSetInfoByModule({ permissionId: permissionsInfo().permissionId, formNo }).then(res => { if (res?.data?.content) { const content = JSON.parse(res.data.content) + console.log(content) updateSchema(content.columns) } }) diff --git a/src/settings/componentSetting.ts b/src/settings/componentSetting.ts index 289d6a81..89362c75 100644 --- a/src/settings/componentSetting.ts +++ b/src/settings/componentSetting.ts @@ -20,7 +20,7 @@ export default { // Number of pages that can be selected pageSizeOptions: ['10', '20', '50', '80', '100'], // Default display quantity on one page - defaultPageSize: 20, + defaultPageSize: 100, // Default Size defaultSize: 'small', // Custom general sort function diff --git a/src/views/baseinfo/lanes/columns.tsx b/src/views/baseinfo/lanes/columns.tsx index 65d3ddfb..e0c5cddf 100644 --- a/src/views/baseinfo/lanes/columns.tsx +++ b/src/views/baseinfo/lanes/columns.tsx @@ -1,4 +1,8 @@ import { BasicColumn, FormSchema } from '/@/components/Table' +import { + GetCustomerServiceList, + GetVouchingClerkList +} from '/@/views/operation/seaexport/api/BookingLedger' import { Tag } from 'ant-design-vue' export const columns: BasicColumn[] = [ { @@ -21,19 +25,19 @@ export const columns: BasicColumn[] = [ }, { title: '默认操作员', - dataIndex: 'operator', + dataIndex: 'operatorName', sorter: true, width: 200, }, { title: '默认单证', - dataIndex: 'vouchingClerk', + dataIndex: 'vouchingClerkName', sorter: true, width: 200, }, { title: '默认客服', - dataIndex: 'customerService', + dataIndex: 'customerServiceName', sorter: true, width: 200, }, @@ -112,31 +116,99 @@ export const formSchema: FormSchema[] = [ colProps: { span: 12 }, }, { - field: 'operator', + field: 'operatorName', label: '默认操作员', + component: 'ApiSelect', + colProps: { span: 12 }, + componentProps: ({ formModel }) => { + return { + api: GetCustomerServiceList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + immediate: false, + resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.operator = obj.id + } + if (!e && !obj) { + formModel.operator = null + } + } + } + } + }, + { + field: 'operator', + label: '', component: 'Input', - + show: false + }, + { + field: 'vouchingClerkName', + label: '默认单证', + component: 'ApiSelect', colProps: { span: 12 }, + componentProps: ({ formModel }) => { + return { + api: GetVouchingClerkList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + immediate: false, + resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.vouchingClerk = obj.id + } + if (!e && !obj) { + formModel.vouchingClerk = null + } + } + } + } }, { field: 'vouchingClerk', - label: '默认单证', + label: '', component: 'Input', - + show: false + }, + { + field: 'customerServiceName', + label: '默认客服', + component: 'ApiSelect', colProps: { span: 12 }, + componentProps: ({ formModel }) => { + return { + api: GetCustomerServiceList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + immediate: false, + resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.customerService = obj.id + } + if (!e && !obj) { + formModel.customerService = null + } + } + } + } }, { field: 'customerService', - label: '默认客服', + label: '', component: 'Input', - - colProps: { span: 12 }, + show: false }, { field: 'ediCode', label: 'EDI代码', component: 'Input', - colProps: { span: 12 }, }, { diff --git a/src/views/baseinfo/port/TenantAuditStepModal.vue b/src/views/baseinfo/port/TenantAuditStepModal.vue index f033d19b..813edb08 100644 --- a/src/views/baseinfo/port/TenantAuditStepModal.vue +++ b/src/views/baseinfo/port/TenantAuditStepModal.vue @@ -53,7 +53,7 @@ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ labelWidth: 100, schemas: formSchema, - showActionButtonGroup: false, + showActionButtonGroup: false }) const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { diff --git a/src/views/baseinfo/port/columns.tsx b/src/views/baseinfo/port/columns.tsx index 2a7dc5b0..43dfae05 100644 --- a/src/views/baseinfo/port/columns.tsx +++ b/src/views/baseinfo/port/columns.tsx @@ -7,7 +7,7 @@ const res: API.DataResult = await GetLanesSelectList() if (res.succeeded) { LanesSelectList = [] res.data.forEach((e) => { - LanesSelectList.push({ label: e.laneName, value: e.id }) + LanesSelectList.push({ label: e.laneName, value: e.id, code: e.ediCode }) }) } let CountrySelectList = [] @@ -247,15 +247,35 @@ export const formSchema: FormSchema[] = [ label: '航线', component: 'Select', colProps: { span: 12 }, - defaultValue: '', - componentProps: { - options: LanesSelectList, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - }, + required: true, + componentProps: ({ formModel }) => { + return { + options: LanesSelectList, + allowClear: false, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (v, obj) => { + if (v && obj) { + formModel.lane = obj.label + formModel.laneCode = obj.code + } + } + } + } + }, + { + field: 'lane', + label: '', + component: 'Input', + show: false + }, + { + field: 'laneCode', + label: '', + component: 'Input', + show: false }, { field: 'ediCode', diff --git a/src/views/flowcenter/flowInstances/api.ts b/src/views/flowcenter/flowInstances/api.ts index f8efa8f5..758b8d6c 100644 --- a/src/views/flowcenter/flowInstances/api.ts +++ b/src/views/flowcenter/flowInstances/api.ts @@ -5,7 +5,7 @@ enum Api { list = '/mainApi/ClientFlowInstance/GetFlowInstanceList', EditFlowTemplate = '/mainApi/ClientFlowTemplate/EditFlowTemplate', GetTables = '/mainApi/Common/GetTables', - GetColumns = '/mainApi/Common/GetColumns', + GetColumns = '/mainApi/Common/GetColumnsByClient', GetFlowInstanceInfo = '/mainApi/ClientFlowInstance/GetFlowInstanceInfo', AuditFlowInstance = '/mainApi/ClientFlowInstance/AuditFlowInstance', getClientPermissionTreeList = '/mainApi/Common/GetClientPermissionTreeList', diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index f9560a43..12e46cee 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -5,7 +5,7 @@ import { ref, unref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 -import { GetClientListByCode } from '/@/api/common' +import { GetClientListByCode, GetCarrierSelectList } from '/@/api/common' import { GetPackageSelectList, GetOrderContactListByClientId, @@ -234,11 +234,10 @@ export const basicInfoFormSchema: FormSchema[] = [ colProps: { span: 5 }, componentProps: ({ formModel }) => { return { - api: GetClientListByCode, - params: { code: 'carrier' }, + api: GetCarrierSelectList, labelField: 'pinYinCode', - showName: 'shortName', - valueField: 'shortName', + showName: 'cnName', + valueField: 'cnName', resultField: 'data', immediate: false, onChange: (e, obj) => { @@ -274,7 +273,7 @@ export const basicInfoFormSchema: FormSchema[] = [ componentProps: ({ formModel }) => { return { api: GetClientListByCode, - params: { code: 'agentcn' }, + params: { code: 'booking' }, labelField: 'pinYinCode', valueField: 'shortName', showName: 'shortName', @@ -754,7 +753,6 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ } }, }, - { label: '船司航线', field: 'carrierLane', @@ -762,18 +760,16 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ colProps: { span: 5 }, }, { - field: 'closeDocDate', + field: 'openPortDate', label: '开港时间', component: 'DatePicker', required: false, dynamicDisabled: false, - // defaultValue: '', colProps: { span: 5 }, componentProps: { - showTime: true, allowClear: true, valueFormat: 'YYYY-MM-DD HH:mm' - } + }, }, { label: '装货港', @@ -1687,7 +1683,7 @@ export const cargoInfoFormSchema1: FormSchema[] = [ component: 'InputTextArea', required: false, dynamicDisabled: false, - defaultValue: 'N.M', + defaultValue: 'N/M', colProps: { span: 10, }, diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue index 58a6d0ca..21211813 100644 --- a/src/views/operation/seaexport/detail/modules/basicInfo.vue +++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue @@ -18,7 +18,7 @@
- + @@ -238,7 +238,7 @@ } .customerNo { font-weight: 600; - width: 68px + min-width: 68px; } .icon-bianji1 { font-size: 10px; diff --git a/src/views/operation/seaexport/detail/modules/mailingInfo.vue b/src/views/operation/seaexport/detail/modules/mailingInfo.vue index 23c20bfe..d2b289a0 100644 --- a/src/views/operation/seaexport/detail/modules/mailingInfo.vue +++ b/src/views/operation/seaexport/detail/modules/mailingInfo.vue @@ -211,7 +211,21 @@ } else { // 新建模版 temFlag.value = true - temForm.templateName = null + let content = '' + if (key == 'shipper') { + content = model.shipperContent + } else if (key == 'consignee') { + content = model.consigneeContent + } else { + content = model.notifyPartyContent + } + if (content) { + const index = content.indexOf("\n"); + const firstline = content.substring(0, index); + temForm.templateName = firstline + } else { + temForm.templateName = null + } } } const form = ref(null) diff --git a/src/views/system/datarule/columns.tsx b/src/views/system/datarule/columns.tsx index 7fce075c..5b9ede7a 100644 --- a/src/views/system/datarule/columns.tsx +++ b/src/views/system/datarule/columns.tsx @@ -1,11 +1,12 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { getTables, getColumns, getClientPermissionList } from '/@/api/system/role' +import { GetTablesByClient } from '/@/views/baseinfo/clientflowtemplate/api' import { h, ref } from 'vue' import ConditionFilter from './Condition/index.vue' import { Field } from '/@/components/Render/interface' import { Tag } from 'ant-design-vue' const columnViewData = [] -const res: API.DataResult = await getTables() +const res: API.DataResult = await GetTablesByClient() if (res.succeeded) { res.data.forEach((item) => { columnViewData.push({