From 0ff5944417339039b20ca31d74d489ed42e073c0 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: Mon, 2 Sep 2024 17:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common/index.ts | 3 +- .../Form/src/Ds/components/DEdit.vue | 3 + src/views/baseinfo/infoclient/EditColumns.tsx | 112 +++--- src/views/baseinfo/infoclient/columns.tsx | 97 +++--- .../bookingcabin/CabinManagement/columns.tsx | 59 ++-- .../seaexport/detail/modules/baseInfo.tsx | 329 +++++++++--------- 6 files changed, 307 insertions(+), 296 deletions(-) diff --git a/src/api/common/index.ts b/src/api/common/index.ts index 4a5bfb34..4cc8c0dd 100644 --- a/src/api/common/index.ts +++ b/src/api/common/index.ts @@ -204,11 +204,10 @@ export function getCustomerServiceList() { method: 'get', }) } -export function getSaleUserList(query) { +export function getSaleUserList() { return request({ url: Api.getSaleUserList, method: 'get', - params: query, }) } export function getVouchingClerkList() { diff --git a/src/components/Form/src/Ds/components/DEdit.vue b/src/components/Form/src/Ds/components/DEdit.vue index fdf5cdd3..e257db8d 100644 --- a/src/components/Form/src/Ds/components/DEdit.vue +++ b/src/components/Form/src/Ds/components/DEdit.vue @@ -19,6 +19,9 @@ inheritAttrs: false, props: { value: [Array, Object, String, Number], + api: { + type: Function, + }, disabled: { type: Boolean, }, diff --git a/src/views/baseinfo/infoclient/EditColumns.tsx b/src/views/baseinfo/infoclient/EditColumns.tsx index 4244aa81..b3909013 100644 --- a/src/views/baseinfo/infoclient/EditColumns.tsx +++ b/src/views/baseinfo/infoclient/EditColumns.tsx @@ -1,4 +1,3 @@ -import { ref } from 'vue' import { FormSchema } from '/@/components/Table' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() @@ -15,6 +14,12 @@ import { GetUserList, GetAllClientList, } from '/@/api/common' +import { + GetSaleList, + GetCustomerServiceList, + GetOperatorUserList, + GetVouchingClerkList, +} from '/@/views/operation/seaexport/api/BookingLedger' let ClientCountryList = [] const res4: API.DataResult = await getClientCountrySelectList() if (res4.succeeded) { @@ -31,12 +36,12 @@ if (res11.succeeded) { OrgTree.push({ label: e.shortName, value: e.id }) }) } -const SaleUserList = ref([]) +let SaleUserList = [] const res8: API.DataResult = await getSaleUserList() if (res8.succeeded) { - SaleUserList.value.splice(0) + SaleUserList = [] res8.data.forEach((e) => { - SaleUserList.value.push({ label: e.userName, value: e.id }) + SaleUserList.push({ label: e.userName, value: e.id }) }) } let OperatorUserList = [] @@ -388,8 +393,8 @@ export const EditformSchema: FormSchema[] = [ }, }, { - label: '揽货人Name', - field: 'saleName', + label: '揽货人ID', + field: 'saleId', component: 'DEdit', defaultValue: '', show: false, @@ -403,43 +408,30 @@ export const EditformSchema: FormSchema[] = [ }, }, { - field: 'saleId', label: '揽货人', + field: 'sale', component: 'DEdit', colProps: { span: 4 }, defaultValue: '', componentProps: (e) => { const { formModel } = e return { - options: SaleUserList.value, - allowClear: true, - showSearch: true, - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - onChange: (e, obj) => { + api: GetSaleList, + labelField: 'pinYinCode', + showName: 'userName', + valueField: 'userName', + immediate: false, + resultField: 'data', + onChange: async (e, obj) => { if (e && obj) { - formModel.saleId = obj.value - formModel.saleName = obj.label + formModel.saleId = obj.id + formModel.sale = obj.pinYinCode } if (!e && !obj) { formModel.saleId = '' - formModel.saleName = '' + formModel.sale = '' } }, - onSearch: (val) => { - console.log(val) - - getSaleUserList({ queryKey: val }).then((res) => { - console.log(res) - res.data.forEach((item) => { - item.label = item.userName - item.value = item.id - }) - - SaleUserList.value = res.data - }) - }, onEdit: () => { const { formActionType } = e formActionType ? formActionType.linkageForm(e) : null @@ -448,14 +440,14 @@ export const EditformSchema: FormSchema[] = [ }, }, { - label: '客服Name', - field: 'customerServiceName', + label: '客服ID', + field: 'customerService', component: 'Input', defaultValue: '', show: false, }, { - field: 'customerService', + field: 'customerServiceName', label: '客服', component: 'DEdit', colProps: { span: 4 }, @@ -463,16 +455,18 @@ export const EditformSchema: FormSchema[] = [ componentProps: (e) => { const { formModel } = e return { - options: CustomerServiceList, + api: GetCustomerServiceList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', allowClear: true, showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { + immediate: false, + resultField: 'data', + onChange: async (e, obj) => { if (e && obj) { - formModel.customerService = obj.value - formModel.customerServiceName = obj.label + formModel.customerService = obj.id + formModel.customerServiceName = obj.pinYinCode } if (!e && !obj) { formModel.customerService = '' @@ -488,13 +482,13 @@ export const EditformSchema: FormSchema[] = [ }, { label: '操作人Name', - field: 'operatorName', + field: 'operatorId', component: 'Input', defaultValue: '', show: false, }, { - field: 'operatorId', + field: 'operatorName', label: '操作人', component: 'DEdit', colProps: { span: 4 }, @@ -502,16 +496,18 @@ export const EditformSchema: FormSchema[] = [ componentProps: (e) => { const { formModel } = e return { - options: OperatorUserList, + api: GetOperatorUserList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', allowClear: true, showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - formModel.operatorId = obj.value - formModel.operatorName = obj.label + formModel.operatorId = obj.id + formModel.operatorName = obj.pinYinCode } if (!e && !obj) { formModel.operatorId = '' @@ -527,13 +523,13 @@ export const EditformSchema: FormSchema[] = [ }, { label: '单证Name', - field: 'docName', + field: 'doc', component: 'Input', defaultValue: '', show: false, }, { - field: 'doc', + field: 'docName', label: '单证', component: 'DEdit', colProps: { span: 4 }, @@ -541,16 +537,16 @@ export const EditformSchema: FormSchema[] = [ componentProps: (e) => { const { formModel } = e return { - options: VouchingClerkList, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + api: GetVouchingClerkList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - formModel.doc = obj.value - formModel.docName = obj.label + formModel.doc = obj.id + formModel.docName = obj.pinYinCode } if (!e && !obj) { formModel.doc = '' diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 5f86c115..27bb7794 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -23,6 +23,10 @@ import { import { GetClientSourceDetailSelectList, GetServiceProjectList, + GetSaleList, + GetCustomerServiceList, + GetOperatorUserList, + GetVouchingClerkList, } from '/@/views/operation/seaexport/api/BookingLedger' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() @@ -552,32 +556,32 @@ export const formSchema: FormSchema[] = [ }, { label: '', - field: 'sale', + field: 'saleId', component: 'Input', show: false, }, { - field: 'saleId', label: '揽货人', - component: 'Select', + field: 'sale', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, colProps: { span: 4 }, - componentProps: ({ formModel }) => { return { - options: SaleUserList, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { + api: GetSaleList, + labelField: 'pinYinCode', + showName: 'userName', + valueField: 'userName', + resultField: 'data', + onChange: async (e, obj) => { if (e && obj) { - formModel.saleId = obj.value - formModel.saleName = obj.label + formModel.saleId = obj.id + formModel.sale = obj.pinYinCode } if (!e && !obj) { formModel.saleId = '' - formModel.saleName = '' + formModel.sale = '' } }, } @@ -585,27 +589,28 @@ export const formSchema: FormSchema[] = [ }, { label: '', - field: 'customerServiceName', + field: 'customerService', component: 'Input', show: false, }, { - field: 'customerService', + field: 'customerServiceName', label: '客服', - component: 'Select', + component: 'ApiSelect', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - options: CustomerServiceList, + api: GetCustomerServiceList, + labelField: 'pinYinCode', + showName: 'userName', + valueField: 'userName', allowClear: true, showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { + resultField: 'data', + onChange: async (e, obj) => { if (e && obj) { - formModel.customerService = obj.value - formModel.customerServiceName = obj.label + formModel.customerService = obj.id + formModel.customerServiceName = obj.pinYinCode } if (!e && !obj) { formModel.customerService = '' @@ -615,30 +620,32 @@ export const formSchema: FormSchema[] = [ } }, }, - // 操作人Name + // 操作人ID { label: '', - field: 'operatorName', + field: 'operatorId', component: 'Input', show: false, }, { - field: 'operatorId', + field: 'operatorName', label: '操作人', - component: 'Select', + component: 'ApiSelect', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - options: OperatorUserList, + api: GetOperatorUserList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', allowClear: true, showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - formModel.operatorId = obj.value - formModel.operatorName = obj.label + formModel.operatorId = obj.id + formModel.operatorName = obj.pinYinCode } if (!e && !obj) { formModel.operatorId = '' @@ -650,28 +657,28 @@ export const formSchema: FormSchema[] = [ }, { label: '', - field: 'docName', + field: 'doc', component: 'Input', show: false, }, { - field: 'doc', + field: 'docName', label: '单证', - component: 'Select', + component: 'ApiSelect', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - options: VouchingClerkList, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + api: GetVouchingClerkList, + labelField: 'pinYinCode', + valueField: 'userName', + showName: 'userName', + immediate: false, + resultField: 'data', onChange: (e, obj) => { if (e && obj) { - formModel.doc = obj.value - formModel.docName = obj.label + formModel.doc = obj.id + formModel.docName = obj.pinYinCode } if (!e && !obj) { formModel.doc = '' diff --git a/src/views/bookingcabin/CabinManagement/columns.tsx b/src/views/bookingcabin/CabinManagement/columns.tsx index 2cceb7b6..17bf4c58 100644 --- a/src/views/bookingcabin/CabinManagement/columns.tsx +++ b/src/views/bookingcabin/CabinManagement/columns.tsx @@ -4,14 +4,14 @@ import { useOptionsStore } from '/@/store/modules/options' import { SlotFlags } from '@vue/shared' import { getOptions } from '/@/hooks/dict' import { BookingLabelList, GetSlotUseToConfig } from './api' -import { GetClientListByCode, GetControllerClientList,GetCarrierSelectList } from '/@/api/common' +import { GetClientListByCode, GetControllerClientList, GetCarrierSelectList } from '/@/api/common' const optionsStore = useOptionsStore() import { GetCarrierlist, GetClientLanesSelectList, GetClientPortSelectList, GetSaleList, - GetClientGoodsList + GetClientGoodsList, } from '/@/views/operation/seaexport/api/BookingLedger' // 字典 import { getDictOption } from '/@/utils/dictUtil' @@ -37,7 +37,7 @@ const sharedOnCell = (_, index) => { } } } -const sharedOnCell1 = (_, index) => { } +const sharedOnCell1 = (_, index) => {} export const searchFormSchema: FormSchema[] = [ { field: 'slotBookingNo', @@ -96,11 +96,9 @@ export const searchFormSchema: FormSchema[] = [ valueField: 'ediCode', showName: 'ediCode', immediate: false, - onChange: (e, obj) => { - - } + onChange: (e, obj) => {}, } - } + }, }, { field: 'PORTDISCHARGE', @@ -117,11 +115,9 @@ export const searchFormSchema: FormSchema[] = [ valueField: 'ediCode', showName: 'ediCode', immediate: false, - onChange: (e, obj) => { - - } + onChange: (e, obj) => {}, } - } + }, }, { field: 'etd', @@ -299,7 +295,7 @@ export const searchFormSchema: FormSchema[] = [ filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, - onChange: (e, obj) => { }, + onChange: (e, obj) => {}, } }, }, @@ -875,7 +871,7 @@ export const detialForm: FormSchema[] = [ formModel.carrierId = '' formModel.carrierCode = '' } - } + }, } }, }, @@ -1038,16 +1034,16 @@ export const detialForm: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { - formModel.portLoadId = obj.id + formModel.portLoadId = obj.id formModel.portLoadCode = obj.ediCode } if (!e && !obj) { formModel.portLoadId = null formModel.portLoadCode = null } - } + }, } - } + }, }, { label: '', @@ -1234,7 +1230,7 @@ export const useDetailForm: FormSchema[] = [ options: useTypeList, fieldNames: { label: 'name', - value: 'code' + value: 'code', }, onChange: (e, obj) => { if (e && obj) { @@ -1312,7 +1308,7 @@ export const useDetailForm: FormSchema[] = [ if (!e && !obj) { formModel.useToVal = '' } - } + }, } }, }, @@ -1345,7 +1341,7 @@ export const useDetailForm: FormSchema[] = [ if (!e && !obj) { formModel.useToVal = null } - } + }, } }, }, @@ -1379,9 +1375,9 @@ export const useDetailForm: FormSchema[] = [ if (!v && !obj) { formModel.useToVal = null } - } + }, } - } + }, }, { field: 'useToValShow', @@ -1410,7 +1406,7 @@ export const useDetailForm: FormSchema[] = [ if (!v && !obj) { formModel.useToVal = null } - } + }, } }, }, @@ -1431,7 +1427,7 @@ export const useDetailForm: FormSchema[] = [ options: goodsList.value, fieldNames: { label: 'showName', - value: 'hsCode' + value: 'hsCode', }, onChange: (v, obj) => { if (v && obj) { @@ -1441,30 +1437,29 @@ export const useDetailForm: FormSchema[] = [ formModel.useToVal = null } }, - onSearch:(val)=>{ - GetClientGoodsList({queryKey:val}).then(res=>{ - res.data.forEach(item=>{ + onSearch: (val) => { + GetClientGoodsList({ queryKey: val }).then((res) => { + res.data.forEach((item) => { item.showName = item.hsCode + '/' + item.goodName }) goodsList.value = res.data }) - } + }, } }, }, - ] let useTypeList = [] const goodsList = ref([]) function getUseTypeList() { - GetSlotUseToConfig().then(res => { + GetSlotUseToConfig().then((res) => { useTypeList = res.data }) } function getGoodsList() { - GetClientGoodsList().then(res => { - res.data.forEach(item=>{ + GetClientGoodsList().then((res) => { + res.data.forEach((item) => { item.showName = item.hsCode + '/' + item.goodName }) goodsList.value = res.data @@ -1472,4 +1467,4 @@ function getGoodsList() { } getUseTypeList() -getGoodsList() \ No newline at end of file +getGoodsList() diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index f59a697b..30750123 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -5,7 +5,12 @@ import { ref, unref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 -import { GetClientListByCode, GetCarrierSelectList, GetControllerClientList, getOrgList } from '/@/api/common' +import { + GetClientListByCode, + GetCarrierSelectList, + GetControllerClientList, + getOrgList, +} from '/@/api/common' import { GetPackageSelectList, GetOrderContactListByClientId, @@ -25,7 +30,7 @@ import { GetVouchingClerkList, GetLaneUserList, GetClientSourceSelectList, - GetOperatorUserList + GetOperatorUserList, } from '/@/views/operation/seaexport/api/BookingLedger' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() @@ -105,14 +110,16 @@ export const basicInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { setTimeout(() => { - formActionType ? formActionType.linkageForm({ key: 'customerName', value: obj}) : null + formActionType + ? formActionType.linkageForm({ key: 'customerName', value: obj }) + : null }, 10) formModel.customerId = obj.id } if (!e && !obj) { formModel.customerId = '' } - } + }, } }, }, @@ -121,7 +128,7 @@ export const basicInfoFormSchema: FormSchema[] = [ label: '客户编号', component: 'Input', required: false, - colProps: { span: 5 } + colProps: { span: 5 }, }, { field: 'shipperCnId', @@ -152,9 +159,9 @@ export const basicInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.shipperCnId = null } - } + }, } - } + }, }, { field: 'contractClientId', @@ -185,9 +192,9 @@ export const basicInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.contractClientId = null } - } + }, } - } + }, }, { field: 'contractNo', @@ -212,9 +219,9 @@ export const basicInfoFormSchema: FormSchema[] = [ if (cno.value) { formActionType ? formActionType.linkageForm(cno) : null } - } + }, } - } + }, }, { label: '', @@ -246,15 +253,15 @@ export const basicInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.carrierId = '' } - } + }, } - } + }, }, { field: 'applyCtnRemark', label: '箱使需求', component: 'Input', - colProps: { span: 5 } + colProps: { span: 5 }, }, { label: '', @@ -286,7 +293,7 @@ export const basicInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.forwarderId = '' } - } + }, } }, }, @@ -297,7 +304,7 @@ export const basicInfoFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - colProps: { span: 5 } + colProps: { span: 5 }, }, { field: 'mblno', @@ -306,7 +313,7 @@ export const basicInfoFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - colProps: { span: 5 } + colProps: { span: 5 }, }, { field: 'hblno', @@ -315,7 +322,7 @@ export const basicInfoFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - colProps: { span: 5 } + colProps: { span: 5 }, }, { field: 'bookingRemark', @@ -324,7 +331,7 @@ export const basicInfoFormSchema: FormSchema[] = [ required: false, dynamicDisabled: false, // defaultValue: '', - colProps: { span: 19 } + colProps: { span: 19 }, }, // { // field: 'accountDate', @@ -459,9 +466,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ formModel.shipperContent = null formModel.shipper = '' } - } + }, } - } + }, }, { label: '', @@ -498,15 +505,15 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ formModel.consignee = null formModel.consigneeContent = '' } - } + }, } - } + }, }, { label: '', field: 'notifyPartyId', component: 'Input', - show: false + show: false, }, { label: '通知人', @@ -538,9 +545,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ formModel.notifyPartyContent = '' formModel.notifyParty = '' } - } + }, } - } + }, }, { label: ' ', @@ -548,8 +555,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ component: 'InputTextArea', colProps: { span: 8 }, componentProps: { - slice: [30, 35, 40] - } + slice: [30, 35, 40], + }, }, { label: ' ', @@ -557,8 +564,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ component: 'InputTextArea', colProps: { span: 8 }, componentProps: { - slice: [30, 35, 40] - } + slice: [30, 35, 40], + }, }, { label: ' ', @@ -568,29 +575,29 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ dynamicDisabled: false, colProps: { span: 8 }, componentProps: { - slice: [30, 35, 40] - } + slice: [30, 35, 40], + }, }, { label: '', field: 'secondNotifyPartyContent', defaultValue: '', component: 'Input', - show: false + show: false, }, { label: '', field: 'secondNotifyParty', defaultValue: '', component: 'Input', - show: false + show: false, }, { label: '', field: 'secondNotifyPartyId', defaultValue: '', component: 'Input', - show: false + show: false, }, // { // field: 'tzr', @@ -640,7 +647,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ colProps: { span: 5 }, componentProps: { allowClear: true, - valueFormat: 'YYYY-MM-DD' + valueFormat: 'YYYY-MM-DD', }, }, { @@ -653,7 +660,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ componentProps: { showTime: true, allowClear: true, - valueFormat: 'YYYY-MM-DD HH:mm' + valueFormat: 'YYYY-MM-DD HH:mm', }, }, { @@ -666,8 +673,8 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ componentProps: { showTime: true, allowClear: true, - valueFormat: 'YYYY-MM-DD HH:mm' - } + valueFormat: 'YYYY-MM-DD HH:mm', + }, }, { field: 'atd', @@ -679,7 +686,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ colProps: { span: 5 }, componentProps: { allowClear: true, - valueFormat: 'YYYY-MM-DD' + valueFormat: 'YYYY-MM-DD', }, }, { @@ -692,7 +699,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ colProps: { span: 5 }, componentProps: { allowClear: true, - valueFormat: 'YYYY-MM-DD' + valueFormat: 'YYYY-MM-DD', }, }, { @@ -751,7 +758,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ labelField: 'voyNo', valueField: 'voyNo', resultField: 'data', - immediate: false + immediate: false, } }, }, @@ -771,7 +778,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ componentProps: { allowClear: true, showTime: true, - valueFormat: 'YYYY-MM-DD HH:mm' + valueFormat: 'YYYY-MM-DD HH:mm', }, }, { @@ -799,9 +806,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ formModel.loadPortId = null formModel.loadPort = null } - } + }, } - } + }, }, { label: '卸货港', @@ -821,7 +828,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { - formActionType ? formActionType.linkageForm({ key: 'dischargePortCode', value: obj }) : null + formActionType + ? formActionType.linkageForm({ key: 'dischargePortCode', value: obj }) + : null formModel.dischargePortId = obj.id formModel.dischargePort = obj.portName // 带出交货地 @@ -830,13 +839,15 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ formModel.deliveryPlaceCode = e } if (!e && !obj) { - formActionType ? formActionType.linkageForm({ key: 'dischargePortCode', value: null }) : null + formActionType + ? formActionType.linkageForm({ key: 'dischargePortCode', value: null }) + : null formModel.dischargePortId = null formModel.dischargePort = null } - } + }, } - } + }, }, { label: '交货地', @@ -863,7 +874,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ formModel.deliveryPlaceId = null formModel.deliveryPlace = null } - } + }, } }, }, @@ -892,9 +903,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ formModel.receiptPlace = null formModel.receiptPlaceId = null } - } + }, } - } + }, }, { label: '中转港', @@ -923,7 +934,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ formModel.transPortId = null formModel.transPort = null } - } + }, } }, }, @@ -938,7 +949,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '', field: 'loadPortId', component: 'Input', - show: false + show: false, }, { label: '', @@ -951,7 +962,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '', field: 'dischargePortId', component: 'Input', - show: false + show: false, }, { label: '', @@ -964,7 +975,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '', field: 'deliveryPlaceId', component: 'Input', - show: false + show: false, }, { label: '', @@ -977,7 +988,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '', field: 'receiptPlaceId', component: 'Input', - show: false + show: false, }, { label: '', @@ -990,7 +1001,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '', field: 'transPortId', component: 'Input', - show: false + show: false, }, // { // field: 'deliveryDate', @@ -1058,8 +1069,8 @@ export const noteFormSchema: FormSchema[] = [ // defaultValue: '', colProps: { span: 8 }, componentProps: { - autoSize: { minRows: 3, maxRows: 3 } - } + autoSize: { minRows: 3, maxRows: 3 }, + }, }, { field: 'soRemark', @@ -1070,8 +1081,8 @@ export const noteFormSchema: FormSchema[] = [ // defaultValue: '', colProps: { span: 8 }, componentProps: { - autoSize: { minRows: 3, maxRows: 3 } - } + autoSize: { minRows: 3, maxRows: 3 }, + }, }, { field: 'closeDocRemark', @@ -1082,8 +1093,8 @@ export const noteFormSchema: FormSchema[] = [ // defaultValue: '', colProps: { span: 8 }, componentProps: { - autoSize: { minRows: 3, maxRows: 3 } - } + autoSize: { minRows: 3, maxRows: 3 }, + }, }, { field: 'issueType', @@ -1116,7 +1127,7 @@ export const noteFormSchema: FormSchema[] = [ // formModel.noBill = null // formModel.copyNoBill = null // } - } + }, } }, }, @@ -1124,13 +1135,13 @@ export const noteFormSchema: FormSchema[] = [ field: 'issueTypeCode', label: '', component: 'Input', - show: false + show: false, }, { field: 'issueRemark', label: '签单要求', component: 'Input', - colProps: { span: 5 } + colProps: { span: 5 }, }, { field: 'issueDate', @@ -1142,7 +1153,7 @@ export const noteFormSchema: FormSchema[] = [ colProps: { span: 5 }, componentProps: { allowClear: true, - valueFormat: 'YYYY-MM-DD' + valueFormat: 'YYYY-MM-DD', }, }, { @@ -1169,7 +1180,7 @@ export const noteFormSchema: FormSchema[] = [ formModel.issuePlace = null formModel.issuePlaceId = null } - } + }, } }, }, @@ -1178,13 +1189,13 @@ export const noteFormSchema: FormSchema[] = [ field: 'issuePlace', component: 'Input', required: false, - colProps: { span: 5 } + colProps: { span: 5 }, }, { label: '', field: 'issuePlaceId', component: 'Input', - show: false + show: false, }, { field: 'service', @@ -1213,15 +1224,15 @@ export const noteFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.serviceCode = null } - } + }, } - } + }, }, { field: 'serviceCode', label: '', component: 'Input', - show: false + show: false, }, { field: 'mblFrt', @@ -1250,7 +1261,7 @@ export const noteFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.mblFrtCode = null } - } + }, } }, }, @@ -1297,9 +1308,9 @@ export const noteFormSchema: FormSchema[] = [ formModel.prepareAtId = null formModel.prepareAtCode = null } - } + }, } - } + }, }, { field: 'noBill', @@ -1332,9 +1343,9 @@ export const noteFormSchema: FormSchema[] = [ showSearch: true, filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - } - } - } + }, + }, + }, ] // ediMore表单 @@ -1693,7 +1704,7 @@ export const cargoInfoFormSchema1: FormSchema[] = [ span: 10, }, componentProps: { - slice: [14, 15] + slice: [14, 15], }, }, { @@ -1704,22 +1715,22 @@ export const cargoInfoFormSchema1: FormSchema[] = [ dynamicDisabled: false, colProps: { span: 14 }, componentProps: { - slice: [30, 35, 40] - } - } + slice: [30, 35, 40], + }, + }, ] export const cargoInfoFormSchema2: FormSchema[] = [ { label: '', field: 'goodsId', component: 'Input', - show: false + show: false, }, { label: '', field: 'isPreOrder', component: 'Input', - show: false + show: false, }, { field: 'goodsName', @@ -1752,7 +1763,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [ formModel.goodsId = null formModel.hsCode = null } - } + }, } }, }, @@ -1784,7 +1795,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [ label: '', field: 'kindPkgs', component: 'Input', - show: false + show: false, }, { label: '包装', @@ -1814,7 +1825,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [ formActionType ? formActionType.submit() : null }, 10) } - } + }, } }, }, @@ -1838,7 +1849,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [ component: 'InputNumber', required: false, colProps: { span: 12 }, - } + }, ] export const cargoInfoFormSchema3: FormSchema[] = [ { @@ -1846,7 +1857,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [ field: 'cargoId', component: 'Input', defaultValue: 'S', - show: false + show: false, }, // 危险品 { @@ -1859,7 +1870,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [ colProps: { span: 5 }, show: ({ values }) => { return values.cargoId == 'D' - } + }, }, { label: '危险品编号', @@ -1871,7 +1882,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [ colProps: { span: 5 }, show: ({ values }) => { return values.cargoId == 'D' - } + }, }, { label: '危险品页号', @@ -1985,7 +1996,7 @@ export const cargoInfoFormSchema4: FormSchema[] = [ component: 'Input', required: false, defaultValue: [{}], - colProps: { span: 24 } + colProps: { span: 24 }, }, { field: 'totalNo', @@ -1994,8 +2005,8 @@ export const cargoInfoFormSchema4: FormSchema[] = [ required: false, colProps: { span: 24 }, show: false, - dynamicDisabled: true - } + dynamicDisabled: true, + }, ] export const otherInfoFormSchema: FormSchema[] = [ @@ -2004,7 +2015,7 @@ export const otherInfoFormSchema: FormSchema[] = [ label: '', component: 'Input', defaultValue: '整箱', - show: false + show: false, }, { label: '', @@ -2043,9 +2054,9 @@ export const otherInfoFormSchema: FormSchema[] = [ formModel.saleDeptName = null formModel.saleOrgName = null } - } + }, } - } + }, }, { label: '客服', @@ -2072,9 +2083,9 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.customerService = null } - } + }, } - } + }, }, { label: '操作', @@ -2094,14 +2105,14 @@ export const otherInfoFormSchema: FormSchema[] = [ immediate: false, resultField: 'data', onChange: (e, obj) => { - formActionType ? formActionType.linkageForm({ key: 'operatorName', value: obj}) : null + formActionType ? formActionType.linkageForm({ key: 'operatorName', value: obj }) : null if (e && obj) { formModel.operatorId = obj.id } if (!e && !obj) { formModel.operatorId = null } - } + }, } }, }, @@ -2109,7 +2120,7 @@ export const otherInfoFormSchema: FormSchema[] = [ field: 'operatorId', label: '', component: 'Input', - show: false + show: false, }, { label: '', @@ -2174,15 +2185,15 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.lanerId = null } - } + }, } - } + }, }, { label: '', field: 'lanerId', component: 'Input', - show: false + show: false, }, { label: '单证', @@ -2207,7 +2218,7 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.doc = null } - } + }, } }, }, @@ -2215,13 +2226,13 @@ export const otherInfoFormSchema: FormSchema[] = [ field: 'doc', label: '', component: 'Input', - show: false + show: false, }, { field: 'customerService', label: '', component: 'Input', - show: false + show: false, }, { label: '海外客服', @@ -2247,7 +2258,7 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.foreignCustomerService = null } - } + }, } }, }, @@ -2255,25 +2266,25 @@ export const otherInfoFormSchema: FormSchema[] = [ field: 'foreignCustomerService', label: '', component: 'Input', - show: false + show: false, }, { field: 'divider-selects', component: 'Divider', label: '', - colProps: { span: 24 } + colProps: { span: 24 }, }, { label: '', component: 'Input', field: 'sourceCode', - show: false + show: false, }, { label: '', component: 'Input', field: 'sourceId', - show: false + show: false, }, { label: '业务来源', @@ -2300,9 +2311,9 @@ export const otherInfoFormSchema: FormSchema[] = [ } formModel.sourceDetailId = null formModel.sourceDetailName = null - } + }, } - } + }, }, { label: '来源明细', @@ -2317,7 +2328,7 @@ export const otherInfoFormSchema: FormSchema[] = [ return { api: GetClientSourceDetailSelectList, params: { - id: formModel.sourceId + id: formModel.sourceId, }, immediate: false, labelField: 'detailName', @@ -2330,9 +2341,9 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!v && !obj) { formModel.sourceDetailId = null } - } + }, } - } + }, }, { label: '', @@ -2352,7 +2363,7 @@ export const otherInfoFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - colProps: { span: 12 } + colProps: { span: 12 }, }, { label: '', @@ -2383,15 +2394,15 @@ export const otherInfoFormSchema: FormSchema[] = [ formModel.saleOrgName = null formModel.saleOrgId = null } - } + }, } - } + }, }, { field: 'saleDeptId', label: '', component: 'Input', - show: false + show: false, }, { field: 'saleDeptName', @@ -2404,7 +2415,7 @@ export const otherInfoFormSchema: FormSchema[] = [ return { api: GetDeptList, params: { - orgId: formModel.saleOrgId + orgId: formModel.saleOrgId, }, labelField: 'orgName', valueField: 'orgName', @@ -2417,15 +2428,15 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.saleDeptId = null } - } + }, } - } + }, }, { field: 'divider-selects', component: 'Divider', label: '', - colProps: { span: 24 } + colProps: { span: 24 }, }, { label: '', @@ -2457,9 +2468,9 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.truckerId = '' } - } + }, } - } + }, }, { label: '', @@ -2520,9 +2531,9 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.yardId = '' } - } + }, } - } + }, }, { label: '', @@ -2555,9 +2566,9 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!e && !obj) { formModel.shipAgencyId = '' } - } + }, } - } + }, }, { label: '', @@ -2617,7 +2628,7 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!v && !obj) { formModel.termDelivery = null } - } + }, } }, }, @@ -2625,7 +2636,7 @@ export const otherInfoFormSchema: FormSchema[] = [ field: 'termDelivery', label: '', component: 'Select', - show: false + show: false, }, { field: 'tradeTermCode', @@ -2650,10 +2661,10 @@ export const otherInfoFormSchema: FormSchema[] = [ if (!v && !obj) { formModel.tradeTerm = null } - } + }, } }, - } + }, ] // 客户类别下拉框数据 @@ -2669,7 +2680,7 @@ export const personFormSchema: FormSchema[] = [ field: 'id', label: '', component: 'Input', - show: false + show: false, }, { field: 'customerType', @@ -2729,25 +2740,25 @@ export const personFormSchema: FormSchema[] = [ formModel.tel = '' } // 设置关系人下拉 - GetOrderContactListByClientId({ id: v }).then(res => { - personList.value = res.data.map(item => { + GetOrderContactListByClientId({ id: v }).then((res) => { + personList.value = res.data.map((item) => { return { label: item.name, value: item.id, email: item.email, - mobile: item.mobile + mobile: item.mobile, } }) }) - } + }, } - } + }, }, { field: 'customerName', label: '', component: 'Input', - show: false + show: false, }, { field: 'name', @@ -2772,20 +2783,20 @@ export const personFormSchema: FormSchema[] = [ formModel.email = obj.email formModel.mobile = obj.mobile } - if (!v && (!obj || obj == {})){ + if (!v && (!obj || obj == {})) { formModel.customerContactId = null formModel.email = null formModel.mobile = null } - } + }, } - } + }, }, { field: 'customerContactId', label: '', component: 'Input', - show: false + show: false, }, { label: '邮箱', @@ -2793,14 +2804,14 @@ export const personFormSchema: FormSchema[] = [ component: 'Input', colProps: { span: 12 }, required: true, - rules: [{ type: 'email', message: '请填写正确的邮箱地址' }] + rules: [{ type: 'email', message: '请填写正确的邮箱地址' }], }, { label: '电话', field: 'tel', component: 'Input', required: true, - colProps: { span: 12 } + colProps: { span: 12 }, }, { field: 'customerTypeName', @@ -2808,7 +2819,7 @@ export const personFormSchema: FormSchema[] = [ defaultValue: '', component: 'Input', show: false, - colProps: { span: 24 } + colProps: { span: 24 }, }, { field: 'note', @@ -2818,10 +2829,10 @@ export const personFormSchema: FormSchema[] = [ colProps: { span: 24 }, componentProps: { autoSize: { - minRows: 10 - } - } - } + minRows: 10, + }, + }, + }, ] // 关系人表格 @@ -2836,7 +2847,7 @@ export const personColumns: BasicColumn[] = [ dataIndex: 'email', title: '邮箱', sorter: true, - width: 150 + width: 150, }, { dataIndex: 'tel', @@ -2873,5 +2884,5 @@ export const basicInfoFormAllSchema: FormSchema[] = [ ...cargoInfoFormSchema1, ...cargoInfoFormSchema2, ...cargoInfoFormSchema4, - ...otherInfoFormSchema -] \ No newline at end of file + ...otherInfoFormSchema, +]