From eba844b8f79d3d840f4c9b2774854fc285baf1ce Mon Sep 17 00:00:00 2001 From: sunzehua Date: Tue, 10 Sep 2024 15:49:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bookingcabin/ContractnoList/columns.tsx | 52 +++++++++++++++---- .../bookingcabin/ContractnoList/detail.vue | 3 ++ .../bookingcabin/ContractnoList/index.vue | 51 +++++++++++++----- src/views/taskmanage/taskList/data.json | 6 +-- 4 files changed, 86 insertions(+), 26 deletions(-) diff --git a/src/views/bookingcabin/ContractnoList/columns.tsx b/src/views/bookingcabin/ContractnoList/columns.tsx index e910df67..1197b94d 100644 --- a/src/views/bookingcabin/ContractnoList/columns.tsx +++ b/src/views/bookingcabin/ContractnoList/columns.tsx @@ -9,7 +9,7 @@ import { GetClientListByCode } from '/@/api/common' // 字典 import { getDictOption } from '/@/utils/dictUtil' import { getOptions } from '/@/hooks/dict' -import { GetCtnSelectList,GetCarrierSelectList } from '/@/api/common' +import { GetCtnSelectList, GetCarrierSelectList } from '/@/api/common' const FnblType = ref([]) const FncargoId = ref([]) getDictOption('bl_type').then((res) => { @@ -53,23 +53,39 @@ export const searchFormSchema: FormSchema[] = [ } }, }, + { + label: '', + field: 'laneId', + component: 'Input', + defaultValue: '', + show: false, + }, { label: '航线', - field: 'laneCName', + field: 'laneCode', component: 'ApiSelect', required: false, dynamicDisabled: false, colProps: { span: 5 }, - componentProps: () => { + componentProps: ({formModel}) => { return { api: GetClientLanesSelectList, immediate: false, labelField: 'laneName', - valueField: 'id', + valueField: 'laneCode', resultField: 'data', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + onChange: (e, obj) => { + if (e && obj) { + console.log(obj) + formModel.laneId = obj.id + } + if (!e && !obj) { + formModel.laneId = '' + } + } } }, }, @@ -100,7 +116,7 @@ export const columns: BasicColumn[] = [ { dataIndex: 'contractNote', title: '合约号备注', width: 100 }, { dataIndex: 'carrier', title: '船公司', width: 100 }, { dataIndex: 'podName', title: '目的港', width: 100 }, - { dataIndex: 'laneCName', title: '航线', width: 100 }, + { dataIndex: 'laneList', title: '航线', width: 150 }, { dataIndex: 'createUserName', title: '创建者名称', width: 100 }, { dataIndex: 'createTime', title: '创建时间', width: 100 }, { dataIndex: 'updateTime', title: '更新时间', width: 100 }, @@ -222,9 +238,15 @@ export const formSchema: FormSchema[] = [ component: 'Input', show: false, }, + { + label: '', + field: 'laneList', + component: 'Input', + show: false, + }, { label: '航线', - field: 'laneId', + field: 'laneListId', component: 'ApiSelect', colProps: { span: 6 }, componentProps: ({ formModel }) => { @@ -232,18 +254,28 @@ export const formSchema: FormSchema[] = [ api: GetClientLanesSelectList, labelField: 'laneName', valueField: 'id', + mode: 'multiple', resultField: 'data', + class: 'NoLimitHeight', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, onChange: (e, obj) => { if (e && obj) { - formModel.laneCode = obj.ediCode - formModel.laneCName = obj.label + const arr = [] as any + obj.forEach(item => { + arr.push({ + laneCode: item.laneCode, + laneId: item.value, + laneCName: item.label + }) + }) + formModel.laneList =arr + // formModel.laneCode = obj.ediCode + // formModel.laneCName = obj.label } if (!obj && !e) { - formModel.laneCode = '' - formModel.laneCName = '' + formModel.laneList = [] } }, } diff --git a/src/views/bookingcabin/ContractnoList/detail.vue b/src/views/bookingcabin/ContractnoList/detail.vue index 2c74d8e8..2195f152 100644 --- a/src/views/bookingcabin/ContractnoList/detail.vue +++ b/src/views/bookingcabin/ContractnoList/detail.vue @@ -35,6 +35,9 @@ function getInfo(id) { setModalProps({ confirmLoading: true, loading: true }) GetParaContractNoInfo({id:id}).then(res => { if (res.succeeded) { + res.data.laneListId = res.data.laneList.map(item => { + return item.laneId + }) setFieldsValue({ ...res.data }) diff --git a/src/views/bookingcabin/ContractnoList/index.vue b/src/views/bookingcabin/ContractnoList/index.vue index dc69929b..fe99e9cc 100644 --- a/src/views/bookingcabin/ContractnoList/index.vue +++ b/src/views/bookingcabin/ContractnoList/index.vue @@ -10,24 +10,30 @@ @@ -56,7 +62,26 @@ const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, setPro }) }, beforeFetch: (p) => { - return formatParams(p) + const data = {} as any + const queryData = JSON.parse(formatParams(p).queryCondition) + data.pageCondition = formatParams(p).pageCondition + const obj = {} as any + queryData.forEach(item => { + if (item.FieldName == 'laneCode') { + obj.laneCode = item.FieldValue + } + if (item.FieldName == 'laneId') { + obj.laneId = item.FieldValue + } + }) + data.queryCondition = JSON.stringify(queryData) + console.log(data) + data.otherQueryCondition = {} + if (obj.laneCode || obj.laneId) { + data.otherQueryCondition.laneCode = obj.laneCode + data.otherQueryCondition.laneId = obj.laneId + } + return data }, columns, formConfig: { diff --git a/src/views/taskmanage/taskList/data.json b/src/views/taskmanage/taskList/data.json index 1f7b288a..436c114f 100644 --- a/src/views/taskmanage/taskList/data.json +++ b/src/views/taskmanage/taskList/data.json @@ -5,11 +5,13 @@ "list":[ {"dataIndex":"tasK_NO","title":"任务流水号","width":150}, {"dataIndex":"tasK_USER_STATUS_NAME","width": 120,"title":"任务个人状态" }, - {"dataIndex":"tasK_TYPE_NAME","title":"任务类型","width":100, "sortable": true}, {"dataIndex":"tasK_SOURCE_NAME","title":"任务来源","width":100}, {"dataIndex":"statuS_NAME","title":"任务状态","width":100}, {"dataIndex":"tasK_TITLE","title":"任务标题","width":200,"sortable": true}, {"dataIndex":"tasK_DESP","title":"任务描述","width":100}, + {"dataIndex":"customeR_NO","title":"委托编号","width":100}, + {"dataIndex":"ouT_BS_NO","title":"外业务主键","width":100}, + {"dataIndex":"createUserName","title":"创建人","width":100}, {"dataIndex":"ouT_BUSI_NO","title":"外业务编号","width":120}, {"dataIndex":"ouT_BUSI_TYPE","title":"外业务类型","width":120}, {"dataIndex":"tasK_BASE_TYPE","title":"基础业务类型","width":120}, @@ -19,13 +21,11 @@ {"dataIndex":"iS_EXCEPT","title":"是否异常","width":100}, {"dataIndex":"iS_PUBLIC","title":"是否公共","width":100}, {"dataIndex":"iS_COMPLETE","title":"是否完成","width":100}, - {"dataIndex":"begiN_DATE","title":"任务启动时间","width":120}, {"dataIndex":"completE_DATE","title":"任务完成时间","width":120}, {"dataIndex":"resulT_NOTE","title":"反馈结果","width":100}, {"dataIndex":"etd","title":"开船日期","width":100, "sortable": true}, {"dataIndex":"completE_DEAL","title":"任务完成方式","width":120}, {"dataIndex":"issuE_TYPE_NAME","title":"签单方式","width":100}, - {"dataIndex":"tasK_REQ_USERNAME","title":"操作名称","width":100, "sortable": true}, {"dataIndex":"contA_INFO","title":"箱型箱量","width":150, "sortable": true}, {"dataIndex":"vesseL_VOYNO","title":"船名航次","width":100, "sortable": true}, {"dataIndex":"yarD_NAME","title":"场站","width":150, "sortable": true},