diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index 3111f7ec..225506b1 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -181,6 +181,7 @@ removeSchemaByField, resetFields, scrollToField, + linkageForm } = useFormEvents({ emit, getProps, @@ -280,6 +281,7 @@ clearValidate, validateFields, validate, + linkageForm, submit: handleSubmit, scrollToField: scrollToField, } diff --git a/src/components/Form/src/components/InputTextArea.vue b/src/components/Form/src/components/InputTextArea.vue index 399bb675..4e489748 100644 --- a/src/components/Form/src/components/InputTextArea.vue +++ b/src/components/Form/src/components/InputTextArea.vue @@ -56,6 +56,7 @@ setup(props, { emit }) { const attrs = useAttrs() const { t } = useI18n() + console.log(props) const [state] = useRuleFormItem(props, 'value', 'change') // 切割的字符数组 const cutList = attrs.value.slice || [] diff --git a/src/components/Form/src/hooks/useFormEvents.ts b/src/components/Form/src/hooks/useFormEvents.ts index 2df78542..0e1db052 100644 --- a/src/components/Form/src/hooks/useFormEvents.ts +++ b/src/components/Form/src/hooks/useFormEvents.ts @@ -331,7 +331,15 @@ export function useFormEvents({ } } + /** + * @description: Form submission + */ + async function linkageForm(item) { + emit('linkageForm', item) + } + return { + linkageForm, handleSubmit, clearValidate, validate, diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts index aae5d025..e6e4eaa6 100644 --- a/src/components/Form/src/types/form.ts +++ b/src/components/Form/src/types/form.ts @@ -43,6 +43,7 @@ export interface FormActionType { validate: (nameList?: NamePath[]) => Promise getFieldList: (nameList?: NamePath[]) => Promise scrollToField: (name: NamePath, options?: ScrollOptions) => Promise + linkageForm: () => Promise } export type RegisterFn = (formInstance: FormActionType) => void diff --git a/src/views/baseinfo/port/columns.tsx b/src/views/baseinfo/port/columns.tsx index 3b534bc9..86e4b03b 100644 --- a/src/views/baseinfo/port/columns.tsx +++ b/src/views/baseinfo/port/columns.tsx @@ -241,7 +241,8 @@ export const formSchema: FormSchema[] = [ field: 'ediCode', label: 'EDI代码', component: 'Input', - colProps: { span: 12 }, + required: true, + colProps: { span: 12 } }, { diff --git a/src/views/baseinfo/shipping/api.ts b/src/views/baseinfo/shipping/api.ts new file mode 100644 index 00000000..56a6ade9 --- /dev/null +++ b/src/views/baseinfo/shipping/api.ts @@ -0,0 +1,47 @@ +/* + * @Description: 运输条款api + * @Author: lijj + * @Date: 2024-04-25 15:48:33 + */ + +import { request } from '/@/utils/request' +import { DataResult, PageRequest } from '/@/api/model/baseModel' +enum Api { + list = '/mainApi/CodeService/GetCodeServiceList', + edit = '/mainApi/CodeService/EditCodeService', + info = '/mainApi/CodeService/GetCodeServiceInfo', + delete = '/mainApi/CodeService/BatchDelCodeService' +} +// 列表 (Auth) +export function GetCodeServiceList(data: PageRequest) { + return request({ + url: Api.list, + method: 'post', + data + }) +} +// 编辑 (Auth) +export function EditCodeService(data: PageRequest) { + return request({ + url: Api.edit, + method: 'post', + data + }) +} +// 详情 (Auth) +export function GetCodeServiceInfo(query) { + return request({ + url: Api.info, + method: 'get', + params: query + }) +} + +// 删除 (Auth) +export function BatchDelCodeService(data: PageRequest) { + return request({ + url: Api.delete, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/views/baseinfo/shipping/columns.tsx b/src/views/baseinfo/shipping/columns.tsx new file mode 100644 index 00000000..3c39e179 --- /dev/null +++ b/src/views/baseinfo/shipping/columns.tsx @@ -0,0 +1,99 @@ +/* + * @Description: 场站映射tsx + * @Author: lijj + * @Date: 2024-04-25 15:48:33 + */ +import { BasicColumn, FormSchema } from '/@/components/Table' +import { Tag } from 'ant-design-vue' +export const columns: BasicColumn[] = [ + { + title: '中文名称', + dataIndex: 'cnName', + width: 150, + }, + { + title: '英文名称', + dataIndex: 'enName', + width: 150, + }, + { + title: '国家', + dataIndex: 'countryName', + width: 120, + }, + { + title: 'EDI代码', + dataIndex: 'ediCode', + width: 120, + }, + { + title: '备注', + dataIndex: 'note', + width: 200, + } +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'cnName', + label: '中文名称', + colProps: { span: 6 }, + component: 'Input', + }, + { + field: 'ediCode', + label: 'EDI代码', + colProps: { span: 6 }, + component: 'Input', + }, +] +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + defaultValue: '', + show: false, + }, + { + field: 'cnName', + label: '中文名称', + colProps: { span: 6 }, + component: 'Input', + }, + { + field: 'serviceName', + label: '英文名称', + colProps: { span: 6 }, + required: true, + component: 'Input', + }, + { + field: 'ediCode', + label: 'EDI代码', + colProps: { span: 6 }, + required: true, + component: 'Input', + componentProps: { + maxlength: 5, + }, + }, + { + field: 'status', + label: '是否可用', + component: 'Switch', + slot: 'status', + colProps: { span: 6 }, + }, + { + field: 'note', + label: '备注', + component: 'InputTextArea', + colProps: { span: 24 }, + componentProps: { + autoSize: { + minRows: 5 + } + } + } +] diff --git a/src/views/baseinfo/shipping/components/Modal.vue b/src/views/baseinfo/shipping/components/Modal.vue new file mode 100644 index 00000000..7e5eca10 --- /dev/null +++ b/src/views/baseinfo/shipping/components/Modal.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/baseinfo/shipping/index.vue b/src/views/baseinfo/shipping/index.vue new file mode 100644 index 00000000..561b47b7 --- /dev/null +++ b/src/views/baseinfo/shipping/index.vue @@ -0,0 +1,138 @@ + + diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index ebe72732..74783072 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -73,6 +73,9 @@ + + + @@ -200,6 +203,7 @@ import cargoInfo from './modules/cargoInfo.vue' import goodsTable from './modules/goodsTable.vue' import ediMore from './modules/ediMore.vue' + import noteInfo from './modules/noteInfo.vue' import rightContent from './modules/rightContent.vue' import { useGo } from '/@/hooks/web/usePage' // 提单信息 @@ -228,16 +232,14 @@ const RefrightContent = ref() const excuteRules = ref([]) const excuteRulesType = ref('') - const RefsedOrder = ref() const RefgoodsTable = ref() const OtherInfo = ref() const RefbasicInfo = ref() const RefmailingInfo = ref() const RefcargoInfo = ref() const RefediMore = ref(null) + const RefNoteInfo = ref(null) const mainOrderActiveKey = ref('1-1') - // const checkFrom = ref([]) - const isAdd = ref(false) const inPageLoading = ref(false) const detailsLoadOver = ref(false) // const cargoRules = ref(rules.cargoRules) @@ -289,7 +291,6 @@ init() // 初始化 function init() { - console.log('init') if (route.query.id && !id.value) { id.value = route.query.id } @@ -298,24 +299,11 @@ excuteRulesType.value = '' Showtabs.value = false if (id.value) { - isAdd.value = false getDetail() getRightAll() } else { - isAdd.value = true detailsLoadOver.value = false - // bookingDetails.value.carrierid = type.value - // bookingDetails.value.carrier = type.value isLockBooking.value = false - // setTimeout(() => { - // if (Object.keys(that.$refs).includes('RefsedOrder')) { - // RefsedOrder.value.init([]) - // } - // if (Object.keys(that.$refs).includes('goodsTable')) { - // RefgoodsTable.value.init() - // } - // detailsLoadOver.value = true - // }, 200) } } // 获取详情 @@ -331,15 +319,6 @@ id: id.value, }) .then(async (res) => { - //处理 后端 返回默认值的 0 || 0001-01-01 00:00:00 - - res.data = JSON.parse( - JSON.stringify(res.data) - .replaceAll('"0001-01-01 00:00:00"', '""') - .replaceAll(':"0"', ':""') - .replaceAll(':0,', ':"",'), - ) - if (route.query.isCopy) { res.data = { ...res.data, @@ -354,115 +333,115 @@ appStore.settopDown(false) inPageLoading.value = false // 解决 业务来源 联动问题 - if (res.data.sourceId) { - let sourceDetailIdArr: any = [] - await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => { - res.data.forEach((item) => { - sourceDetailIdArr.push({ label: item.detailName, value: item.id }) - }) - }) - RefbasicInfo.value.updateSchema({ - label: '来源明细', - field: 'sourceDetailId', - component: 'Select', - required: false, - dynamicDisabled: ({ values }) => { - return !values.sourceId || source.value != 'edit' - }, - colProps: { span: 4 }, - componentProps: { - allowClear: true, - options: sourceDetailIdArr, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - }, - }) - } - if (res.data.saleId) { - const FnsaleId: any = await GetSaleList() - FnsaleId.data.forEach(async (item) => { - if (item.id == res.data.saleId) { - let saleDeptIdArr: any = [] - let saleOrgIdArr: any = [] - item.saleOrgList.forEach((item) => { - saleOrgIdArr.push({ label: item.orgName, value: item.orgId }) - }) - if (item.defaultOrgId) { - await GetDeptList({ orgId: item.defaultOrgId }).then((res) => { - console.log(res, '所属分部 查询 所属部门') - res.data.forEach((item) => { - saleDeptIdArr.push({ label: item.orgName, value: item.id }) - }) - }) - } - RefbasicInfo.value.updateSchema([ - { - label: '所属分部', - field: 'saleOrgId', - component: 'Select', - required: false, - dynamicDisabled: source.value == 'edit' ? false : true, - // defaultValue: '', - colProps: { span: 4 }, - componentProps: { - allowClear: true, - options: saleOrgIdArr, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { - // formModel.saleDeptId = '' - GetDeptList({ orgId: e }).then((res) => { - console.log(res, '所属分部 查询 所属部门') - let Arr: any = [] - res.data.forEach((item) => { - Arr.push({ label: item.orgName, value: item.id }) - }) - updateSchema({ - label: '所属部门', - field: 'saleDeptId', - component: 'Select', - required: false, - dynamicDisabled: source.value == 'edit' ? false : true, - // defaultValue: '', - colProps: { span: 4 }, - componentProps: { - allowClear: true, - options: Arr, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - }, - }) - }) - }, - }, - }, - { - label: '所属部门', - field: 'saleDeptId', - component: 'Select', - required: false, - dynamicDisabled: source.value == 'edit' ? false : true, - // defaultValue: '', - colProps: { span: 4 }, - componentProps: { - allowClear: true, - options: saleDeptIdArr, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - }, - }, - ]) - } - }) - } + // if (res.data.sourceId) { + // let sourceDetailIdArr: any = [] + // await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => { + // res.data.forEach((item) => { + // sourceDetailIdArr.push({ label: item.detailName, value: item.id }) + // }) + // }) + // RefbasicInfo.value.updateSchema({ + // label: '来源明细', + // field: 'sourceDetailId', + // component: 'Select', + // required: false, + // dynamicDisabled: ({ values }) => { + // return !values.sourceId || source.value != 'edit' + // }, + // colProps: { span: 4 }, + // componentProps: { + // allowClear: true, + // options: sourceDetailIdArr, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // }, + // }) + // } + // if (res.data.saleId) { + // const FnsaleId: any = await GetSaleList() + // FnsaleId.data.forEach(async (item) => { + // if (item.id == res.data.saleId) { + // let saleDeptIdArr: any = [] + // let saleOrgIdArr: any = [] + // item.saleOrgList.forEach((item) => { + // saleOrgIdArr.push({ label: item.orgName, value: item.orgId }) + // }) + // if (item.defaultOrgId) { + // await GetDeptList({ orgId: item.defaultOrgId }).then((res) => { + // console.log(res, '所属分部 查询 所属部门') + // res.data.forEach((item) => { + // saleDeptIdArr.push({ label: item.orgName, value: item.id }) + // }) + // }) + // } + // RefbasicInfo.value.updateSchema([ + // { + // label: '所属分部', + // field: 'saleOrgId', + // component: 'Select', + // required: false, + // dynamicDisabled: source.value == 'edit' ? false : true, + // // defaultValue: '', + // colProps: { span: 4 }, + // componentProps: { + // allowClear: true, + // options: saleOrgIdArr, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // onChange: (e, obj) => { + // // formModel.saleDeptId = '' + // GetDeptList({ orgId: e }).then((res) => { + // console.log(res, '所属分部 查询 所属部门') + // let Arr: any = [] + // res.data.forEach((item) => { + // Arr.push({ label: item.orgName, value: item.id }) + // }) + // updateSchema({ + // label: '所属部门', + // field: 'saleDeptId', + // component: 'Select', + // required: false, + // dynamicDisabled: source.value == 'edit' ? false : true, + // // defaultValue: '', + // colProps: { span: 4 }, + // componentProps: { + // allowClear: true, + // options: Arr, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // }, + // }) + // }) + // }, + // }, + // }, + // { + // label: '所属部门', + // field: 'saleDeptId', + // component: 'Select', + // required: false, + // dynamicDisabled: source.value == 'edit' ? false : true, + // // defaultValue: '', + // colProps: { span: 4 }, + // componentProps: { + // allowClear: true, + // options: saleDeptIdArr, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // }, + // }, + // ]) + // } + // }) + // } }) .catch(() => { appStore.settopDown(false) @@ -485,6 +464,8 @@ const otherForm = await OtherInfo.value.validate() // EDI补充表单 const ediFrom = await RefediMore.value.validate() + // 备注信息表单 + const noteForm = await RefNoteInfo.value.validate() // 箱型数据表格 const ctnInfo = RefgoodsTable.value.list // 整理箱型表格数据,只传有值的字段 @@ -505,6 +486,7 @@ ...goodsForm, ...otherForm, ...customerForm, + ...noteForm, ediInfo: ediFrom, ctnInfo } @@ -872,6 +854,7 @@ result: remark ? 2 : 1, ids: [id.value], businessType: '1', + taskTypeName: route.query.status } if (remark) postData['remark'] = remark loading.value = true diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 87b20560..d4d8a58f 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -98,7 +98,7 @@ export const basicInfoFormSchema: FormSchema[] = [ required: false, dynamicDisabled: false, colProps: { span: 5 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetClientListByCode, params: { code: 'controller' }, @@ -109,6 +109,9 @@ export const basicInfoFormSchema: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { + setTimeout(() => { + formActionType ? formActionType.linkageForm(obj) : null + }, 10) formModel.customerId = obj.id } if (!e && !obj) { @@ -440,13 +443,15 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, onChange: (e, obj) => { + console.log(e, obj) if (e && obj) { formModel.shipperId = obj.id formModel.shipperContent = obj.content } - if (!e && !obj) { + if (e === undefined && obj === undefined) { formModel.shipperId = null formModel.shipperContent = null + formModel.shipper = '' } } } @@ -478,13 +483,16 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, onChange: (e, obj) => { + console.log(e) + console.log(obj) if (e && obj) { formModel.consigneeId = obj.id formModel.consigneeContent = obj.content } - if (!e && !obj) { + if (e === undefined && obj === undefined) { formModel.consigneeId = null - formModel.consigneeContent = null + formModel.consignee = null + formModel.consigneeContent = '' } } } @@ -520,9 +528,10 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ formModel.notifyPartyId = obj.id formModel.notifyPartyContent = obj.content } - if (!e && !obj) { + if (e === undefined && obj === undefined) { formModel.notifyPartyId = null formModel.notifyPartyContent = null + formModel.notifyParty = '' } } } @@ -532,7 +541,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ label: ' ', field: 'shipperContent', component: 'InputTextArea', - defaultValue: '', colProps: { span: 8 }, componentProps: { slice: [30, 35, 40] @@ -542,7 +550,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ label: ' ', field: 'consigneeContent', component: 'InputTextArea', - defaultValue: '', colProps: { span: 8 }, componentProps: { slice: [30, 35, 40] @@ -552,7 +559,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ label: ' ', field: 'notifyPartyContent', component: 'InputTextArea', - defaultValue: '', + required: false, + dynamicDisabled: false, colProps: { span: 8 }, componentProps: { slice: [30, 35, 40] @@ -801,7 +809,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ dynamicDisabled: false, // defaultValue: '', colProps: { span: 5 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetClientPortSelectList, resultField: 'data', @@ -811,10 +819,12 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { + formActionType ? formActionType.linkageForm(obj) : null formModel.dischargePortId = obj.id formModel.dischargePort = obj.portName } if (!e && !obj) { + formActionType ? formActionType.linkageForm(obj) : null formModel.dischargePortId = null formModel.dischargePort = null } @@ -899,6 +909,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ valueField: 'ediCode', immediate: false, onChange: (e, obj) => { + console.log(obj) if (e && obj) { formModel.transPortId = obj.id formModel.transPort = obj.portName @@ -1031,6 +1042,297 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ // }, ] +// 备注信息表单 +export const noteFormSchema: FormSchema[] = [ + { + field: 'agentContent', + label: 'AGENT', + component: 'InputTextArea', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 8 }, + componentProps: { + autoSize: { minRows: 3, maxRows: 3 } + } + }, + { + field: 'soRemark', + label: 'SO备注', + component: 'InputTextArea', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 8 }, + componentProps: { + autoSize: { minRows: 3, maxRows: 3 } + } + }, + { + field: 'closeDocRemark', + label: 'SI备注', + component: 'InputTextArea', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 8 }, + componentProps: { + autoSize: { minRows: 3, maxRows: 3 } + } + }, + { + field: 'issueType', + label: '签单方式', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: ({ formModel }) => { + return { + api: GetIssueTypeSelectList, + allowClear: true, + showSearch: true, + labelField: 'billType', + valueField: 'billType', + immediate: false, + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + console.log(obj) + if (e && obj) { + formModel.issueTypeCode = obj.ediCode + formModel.noBill = obj.noBill + formModel.copyNoBill = obj.copyNoBill + } + if (!e && !obj) { + formModel.issueTypeCode = null + formModel.noBill = null + formModel.copyNoBill = null + } + } + } + }, + }, + { + field: 'issueTypeCode', + label: '签单方式code', + component: 'Input', + show: false + }, + { + field: 'issueRemark', + label: '签单要求', + component: 'Input', + colProps: { span: 5 } + }, + { + field: 'issueDate', + label: '签单日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: { + allowClear: true, + valueFormat: 'YYYY-MM-DD' + }, + }, + { + label: '签单地代码', + field: 'issuePlaceCode', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 5 }, + componentProps: ({ formModel }) => { + return { + api: GetClientPortSelectList, + resultField: 'data', + labelField: 'pinYinCode', + valueField: 'ediCode', + showName: 'ediCode', + immediate: false, + onChange: (e, obj) => { + if (e && obj) { + formModel.issuePlace = obj.portName + formModel.issuePlaceId = obj.id + } + if (!e && !obj) { + formModel.issuePlace = null + formModel.issuePlaceId = null + } + } + } + }, + }, + { + label: '签单地点', + field: 'issuePlace', + component: 'Input', + required: false, + colProps: { span: 5 } + }, + { + label: '签单地Id', + field: 'issuePlaceId', + component: 'Input', + show: false + }, + { + field: 'service', + label: '运输条款', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: ({ formModel }) => { + return { + api: GetServiceSelectList, + allowClear: true, + showSearch: true, + labelField: 'cnName', + valueField: 'cnName', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + immediate: false, + onChange: (e, obj) => { + if (e && obj) { + formModel.serviceCode = obj.ediCode + } + if (!e && !obj) { + formModel.serviceCode = null + } + } + } + }, + }, + { + field: 'serviceCode', + label: '运输条款代码', + component: 'Input', + show: false + }, + { + field: 'mblFrt', + label: '付费方式', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: ({ formModel }) => { + return { + api: GetClientFrtSelectList, + allowClear: true, + showSearch: true, + labelField: 'cnName', + valueField: 'cnName', + resultField: 'data', + immediate: false, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + if (e && obj) { + formModel.mblFrtCode = obj.ediCode + } + if (!e && !obj) { + formModel.mblFrtCode = null + } + } + } + }, + }, + { + label: '付费方式代码', + field: 'mblFrtCode', + component: 'Input', + show: false, + }, + { + label: '', + field: 'prepareAtCode', + component: 'Input', + show: false, + }, + { + label: '', + field: 'prepareAtId', + component: 'Input', + show: false, + }, + { + field: 'prepareAt', + label: '付费地点', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: ({ formModel }) => { + return { + api: GetClientPortSelectList, + resultField: 'data', + labelField: 'pinYinCode', + valueField: 'portName', + showName: 'portName', + immediate: false, + onChange: (e, obj) => { + if (e && obj) { + formModel.prepareAtId = obj.id + formModel.prepareAtCode = obj.ediCode + } + if (!e && !obj) { + formModel.prepareAtId = null + formModel.prepareAtCode = null + } + } + } + } + }, + { + field: 'noBill', + label: '提单份数', + component: 'Select', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: { + options: FnnoBill, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + }, + }, + { + field: 'copyNoBill', + label: '副本份数', + component: 'Select', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 5 }, + componentProps: { + options: FncopyNoBill, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + } + } + } +] + // ediMore表单 export const ediMoreFormSchema: FormSchema[] = [ { @@ -1306,72 +1608,72 @@ export const ediMoreFormSchema: FormSchema[] = [ ] export const mastetMoreFormSchema: FormSchema[] = [ - { - label: '', - field: 'masterShipperContent', - component: 'Input', - // defaultValue: '', - show: false, - }, - { - field: 'masterShipperId', - component: 'SelectTextArea', - colProps: { span: 12 }, - componentProps: ({ formModel }) => { - return { - label: '发货人', - onChange: (e) => { - if (e) { - formModel.masterShipperContent = e.res - } - }, - } - }, - }, - { - label: '', - field: 'masterConsigneeContent', - component: 'Input', - // defaultValue: '', - show: false, - }, - { - field: 'masterConsigneeId', - component: 'SelectTextArea', - colProps: { span: 12 }, - componentProps: ({ formModel }) => { - return { - label: '收货人', - onChange: (e) => { - if (e) { - formModel.masterConsigneeContent = e.res - } - } - } - } - }, - { - label: '', - field: 'masterNotifyPartyContent', - component: 'Input', - // defaultValue: '', - show: false, - }, - { - field: 'masterNotifyPartyId', - component: 'SelectTextArea', - colProps: { span: 12 }, - componentProps: ({ formModel }) => { - return { - label: '通知人', - onChange: (e) => { - if (e) { - formModel.masterNotifyPartyContent = e.res - } - }, - } - }, - }, + // { + // label: '', + // field: 'masterShipperContent', + // component: 'Input', + // // defaultValue: '', + // show: false, + // }, + // { + // field: 'masterShipperId', + // component: 'SelectTextArea', + // colProps: { span: 12 }, + // componentProps: ({ formModel }) => { + // return { + // label: '发货人', + // onChange: (e) => { + // if (e) { + // formModel.masterShipperContent = e.res + // } + // }, + // } + // }, + // }, + // { + // label: '', + // field: 'masterConsigneeContent', + // component: 'Input', + // // defaultValue: '', + // show: false, + // }, + // { + // field: 'masterConsigneeId', + // component: 'SelectTextArea', + // colProps: { span: 12 }, + // componentProps: ({ formModel }) => { + // return { + // label: '收货人', + // onChange: (e) => { + // if (e) { + // formModel.masterConsigneeContent = e.res + // } + // } + // } + // } + // }, + // { + // label: '', + // field: 'masterNotifyPartyContent', + // component: 'Input', + // // defaultValue: '', + // show: false, + // }, + // { + // field: 'masterNotifyPartyId', + // component: 'SelectTextArea', + // colProps: { span: 12 }, + // componentProps: ({ formModel }) => { + // return { + // label: '通知人', + // onChange: (e) => { + // if (e) { + // formModel.masterNotifyPartyContent = e.res + // } + // }, + // } + // }, + // }, ] // cargoInfo表单 @@ -2367,276 +2669,7 @@ export const otherInfoFormSchema: FormSchema[] = [ } } }, - }, - // { - // field: 'agentContent', - // label: 'AGENT', - // component: 'InputTextArea', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 8 }, - // componentProps: { - // autoSize: { minRows: 3, maxRows: 3 } - // } - // }, - // { - // field: 'closeDocRemark', - // label: '截单备注', - // component: 'InputTextArea', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 8 }, - // componentProps: { - // autoSize: { minRows: 3, maxRows: 3 } - // } - // }, - // { - // field: 'issueType', - // label: '签单方式', - // component: 'ApiSelect', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetIssueTypeSelectList, - // allowClear: true, - // showSearch: true, - // labelField: 'billType', - // valueField: 'billType', - // immediate: false, - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // onChange: (e, obj) => { - // console.log(obj) - // if (e && obj) { - // formModel.issueTypeCode = obj.ediCode - // formModel.noBill = obj.noBill - // formModel.copyNoBill = obj.copyNoBill - // } - // if (!e && !obj) { - // formModel.issueTypeCode = null - // formModel.noBill = null - // formModel.copyNoBill = null - // } - // } - // } - // }, - // }, - // { - // field: 'issueTypeCode', - // label: '签单方式code', - // component: 'Input', - // show: false - // }, - // { - // field: 'issueDate', - // label: '签单日期', - // component: 'DatePicker', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: { - // allowClear: true, - // valueFormat: 'YYYY-MM-DD' - // }, - // }, - // { - // label: '签单地代码', - // field: 'issuePlaceCode', - // component: 'ApiSelect', - // required: false, - // dynamicDisabled: false, - // colProps: { span: 4 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetClientPortSelectList, - // resultField: 'data', - // labelField: 'pinYinCode', - // valueField: 'ediCode', - // showName: 'ediCode', - // immediate: false, - // onChange: (e, obj) => { - // if (e && obj) { - // formModel.issuePlace = obj.portName - // formModel.issuePlaceId = obj.id - // } - // if (!e && !obj) { - // formModel.issuePlace = null - // formModel.issuePlaceId = null - // } - // } - // } - // }, - // }, - // { - // label: '签单地点', - // field: 'issuePlace', - // component: 'Input', - // required: false, - // colProps: { span: 4 } - // }, - // { - // label: '签单地Id', - // field: 'issuePlaceId', - // component: 'Input', - // show: false - // }, - // { - // field: 'mblFrt', - // label: '付费方式', - // component: 'ApiSelect', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetClientFrtSelectList, - // allowClear: true, - // showSearch: true, - // labelField: 'cnName', - // valueField: 'cnName', - // resultField: 'data', - // immediate: false, - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // onChange: (e, obj) => { - // if (e && obj) { - // formModel.mblFrtCode = obj.ediCode - // } - // if (!e && !obj) { - // formModel.mblFrtCode = null - // } - // } - // } - // }, - // }, - // { - // label: '付费方式代码', - // field: 'mblFrtCode', - // component: 'Input', - // show: false, - // }, - // { - // label: '', - // field: 'prepareAtCode', - // component: 'Input', - // show: false, - // }, - // { - // label: '', - // field: 'prepareAtId', - // component: 'Input', - // show: false, - // }, - // { - // field: 'prepareAt', - // label: '付费地点', - // component: 'ApiSelect', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetClientPortSelectList, - // resultField: 'data', - // labelField: 'pinYinCode', - // valueField: 'portName', - // showName: 'portName', - // immediate: false, - // onChange: (e, obj) => { - // if (e && obj) { - // formModel.prepareAtId = obj.id - // formModel.prepareAtCode = obj.ediCode - // } - // if (!e && !obj) { - // formModel.prepareAtId = null - // formModel.prepareAtCode = null - // } - // } - // } - // } - // }, - // { - // field: 'service', - // label: '运输条款', - // component: 'ApiSelect', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetServiceSelectList, - // allowClear: true, - // showSearch: true, - // labelField: 'cnName', - // valueField: 'cnName', - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // immediate: false, - // onChange: (e, obj) => { - // if (e && obj) { - // formModel.serviceCode = obj.ediCode - // } - // if (!e && !obj) { - // formModel.serviceCode = null - // } - // } - // } - // }, - // }, - // { - // field: 'serviceCode', - // label: '运输条款代码', - // component: 'Input', - // show: false - // }, - // { - // field: 'noBill', - // label: '正本份数', - // component: 'Select', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: { - // options: FnnoBill, - // allowClear: true, - // showSearch: true, - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // }, - // }, - // { - // field: 'copyNoBill', - // label: '副本份数', - // component: 'Select', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 4 }, - // componentProps: { - // options: FncopyNoBill, - // allowClear: true, - // showSearch: true, - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // } - // } - // } + } ] // 客户类别下拉框数据 @@ -2716,8 +2749,10 @@ export const personFormSchema: FormSchema[] = [ GetOrderContactListByClientId({ id: v }).then(res => { personList.value = res.data.map(item => { return { - label: item.shortName, - value: item.id + label: item.name, + value: item.id, + email: item.email, + mobile: item.mobile } }) }) @@ -2747,8 +2782,12 @@ export const personFormSchema: FormSchema[] = [ onChange: (v, obj) => { if (obj) { formModel.name = obj.label + formModel.email = obj.email + formModel.mobile = obj.mobile } else { formModel.name = null + formModel.email = null + formModel.mobile = null } } } diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue index 8b92e582..e9102b4e 100644 --- a/src/views/operation/seaexport/detail/modules/basicInfo.vue +++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue @@ -63,7 +63,7 @@ - +