From 42aa4ca14e9a3fa73c06d242e217dd4d453dcf0b Mon Sep 17 00:00:00 2001 From: sunzehua Date: Fri, 9 Aug 2024 10:31:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=90=E8=BE=93?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/taskmanage/api.ts | 2 +- src/views/taskmanage/taskList/taskStyle.less | 2 +- .../taskList/transPlanHasChange.vue | 453 ++++-------------- 3 files changed, 108 insertions(+), 349 deletions(-) diff --git a/src/views/taskmanage/api.ts b/src/views/taskmanage/api.ts index 00a72f63..33f06a9b 100644 --- a/src/views/taskmanage/api.ts +++ b/src/views/taskmanage/api.ts @@ -379,7 +379,7 @@ export function TaskManageBCSendEmai1(parameter) { } export function TaskTransPlanHasChange(parameter) { return request({ - url: '/TaskTransPlanHasChange/taskPKId', + url: '/taskApi/TaskTransPlanHasChange/GetInfoByTaskId', method: 'get', params: parameter }) diff --git a/src/views/taskmanage/taskList/taskStyle.less b/src/views/taskmanage/taskList/taskStyle.less index 6ffb65c1..626823fc 100644 --- a/src/views/taskmanage/taskList/taskStyle.less +++ b/src/views/taskmanage/taskList/taskStyle.less @@ -29,7 +29,7 @@ } .box { - border: 1px solid rgba(232, 235, 237, 1); + border-bottom: 1px solid rgba(232, 235, 237, 1); padding: 15px 20px; margin-bottom: 16px; diff --git a/src/views/taskmanage/taskList/transPlanHasChange.vue b/src/views/taskmanage/taskList/transPlanHasChange.vue index 508c47e3..91c9a83f 100644 --- a/src/views/taskmanage/taskList/transPlanHasChange.vue +++ b/src/views/taskmanage/taskList/transPlanHasChange.vue @@ -1,121 +1,120 @@ \ No newline at end of file + diff --git a/src/views/ContainerManagement/BaseInfo/columns.tsx b/src/views/ContainerManagement/BaseInfo/columns.tsx index 438af7cb..c1754b3d 100644 --- a/src/views/ContainerManagement/BaseInfo/columns.tsx +++ b/src/views/ContainerManagement/BaseInfo/columns.tsx @@ -26,8 +26,8 @@ export const columns: BasicColumn[] = [ width: 200, }, { - title: '备注??', - dataIndex: '', + title: '备注', + dataIndex: 'remark', sorter: true, width: 200, }, @@ -38,8 +38,8 @@ export const columns: BasicColumn[] = [ width: 200, }, { - title: '购入价格??', - dataIndex: '', + title: '购入价格', + dataIndex: 'ctnValue_BuyingPrice', sorter: true, width: 200, }, @@ -138,14 +138,14 @@ export const formSchema: FormSchema[] = [ colProps: { span: 20 }, }, { - field: 'ctnValue_Base', - label: '购入价格??', + field: 'ctnValue_BuyingPrice', + label: '购入价格', component: 'InputNumber', colProps: { span: 20 }, }, { - field: 'note', - label: '备注??', + field: 'remark', + label: '备注', component: 'InputTextArea', colProps: { span: 20 }, componentProps: { diff --git a/src/views/ContainerManagement/CurrentState/TenantAuditStepModal.vue b/src/views/ContainerManagement/CurrentState/TenantAuditStepModal.vue index 8831fe60..5ab231ad 100644 --- a/src/views/ContainerManagement/CurrentState/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/CurrentState/TenantAuditStepModal.vue @@ -47,9 +47,9 @@ import { useMessage } from '/@/hooks/web/useMessage' // 声明Emits const emit = defineEmits(['success', 'register']) - const isUpdate = ref(true) + const select = ref([]) const loading = ref(false) - const rowId = ref('') + const rowId = ref() const { createMessage } = useMessage() const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ labelWidth: 100, @@ -60,21 +60,14 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { resetFields() setModalProps({ confirmLoading: false, loading: true }) - isUpdate.value = !!data?.isUpdate - if (unref(isUpdate)) { - // setModalProps({ confirmLoading: true }); - rowId.value = data.record.id - const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) - if (res.succeeded) { - setFieldsValue({ - ...res.data, - }) - // console.log('返回数据Form', getFieldsValue()); - // setFieldsValue({ trainId: unref(res.data.trainId) }); - } - // setModalProps({ confirmLoading: false }); - } else { - setFieldsValue({ permissionIdentity: unref(2) }) + select.value = data.select + if (select.value.length) { + console.log(select.value) + let cntrno = '' + select.value.forEach((item: any) => { + cntrno = cntrno ? `${cntrno},${item.cntrno}` : item.cntrno + }) + setFieldsValue({ cntrno }) } setModalProps({ loading: false }) }) @@ -83,23 +76,16 @@ try { const values = await validate() setModalProps({ confirmLoading: true, loading: true }) - // TODO custom api - console.log(values) - // loading.value = true; + const res: API.DataResult = await ApiMultiEdit(values) - console.log(res) if (res.succeeded) { createMessage.success(res.message) emit('success') //刷新页面 if (!exit) { - if (unref(isUpdate)) { - await refresh() - } else { - rowId.value = res.data - isUpdate.value = true - await refresh() - } + rowId.value = res.data + select.value = [] + await refresh() } } else { createMessage.error(res.message) diff --git a/src/views/ContainerManagement/CurrentState/columns.tsx b/src/views/ContainerManagement/CurrentState/columns.tsx index 276fe50e..9f813d3d 100644 --- a/src/views/ContainerManagement/CurrentState/columns.tsx +++ b/src/views/ContainerManagement/CurrentState/columns.tsx @@ -504,7 +504,7 @@ export const formSchema: FormSchema[] = [ component: 'ApiSelect', colProps: { span: 6 }, defaultValue: '', - componentProps: ({ formModel }) => { + componentProps: () => { return { api: () => { return new Promise((resolve) => { @@ -519,17 +519,57 @@ export const formSchema: FormSchema[] = [ filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, - onChange: (v, obj) => {}, } }, }, { - field: 'ctnBreakState', + field: 'ctnBreakStateId', label: '箱损坏', - component: 'Input', + component: 'ApiSelect', colProps: { span: 6 }, + defaultValue: '', + componentProps: () => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('CM_BreakState').then((res) => { + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'ctnFlowStateId', + label: '状态变动', + component: 'ApiSelect', + colProps: { span: 6 }, + defaultValue: '', + componentProps: () => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('CM_CtnFlowState').then((res) => { + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, }, - { field: 'isHeavy', label: '空重箱', @@ -548,6 +588,13 @@ export const formSchema: FormSchema[] = [ defaultValue: '', show: false, }, + { + label: '', + field: 'portCode', + component: 'Input', + defaultValue: '', + show: false, + }, { field: 'portid', label: '当前港口', @@ -565,6 +612,7 @@ export const formSchema: FormSchema[] = [ }, onChange: (v, obj) => { formModel.port = obj?.label || '' + formModel.portCode = obj?.ediCode || '' }, } }, @@ -704,8 +752,8 @@ export const InfoColumns: BasicColumn[] = [ width: 150, }, { - title: '状态变动???', - dataIndex: 'usedState', + title: '状态变动', + dataIndex: 'ctnFlowState', sorter: true, width: 150, }, diff --git a/src/views/ContainerManagement/CurrentState/index.vue b/src/views/ContainerManagement/CurrentState/index.vue index b0224309..8dc42923 100644 --- a/src/views/ContainerManagement/CurrentState/index.vue +++ b/src/views/ContainerManagement/CurrentState/index.vue @@ -40,7 +40,7 @@ const [registerModal, { openModal }] = useModal() const [registerInfoModal, { openModal: openInfoModal }] = useModal() - const [registerTable, { reload, getForm }] = useTable({ + const [registerTable, { reload, getForm, getSelectRows }] = useTable({ title: '集装箱信息列表', api: async (p) => { const res: API.DataResult = await ApiList(p) @@ -105,9 +105,11 @@ }, }) function handleCreate() { + const select = getSelectRows() openModal(true, { isParent: false, isUpdate: false, + select, }) } function handleAudit(record: Recordable) { diff --git a/src/views/ContainerManagement/CurrentState/infoModal.vue b/src/views/ContainerManagement/CurrentState/infoModal.vue index cf2d5a83..45580d6b 100644 --- a/src/views/ContainerManagement/CurrentState/infoModal.vue +++ b/src/views/ContainerManagement/CurrentState/infoModal.vue @@ -5,8 +5,8 @@ title="箱状态详情" width="55%" @register="registerModal" - @ok="handleSave" > + @@ -16,11 +16,12 @@ import { ApiChangeList } from '../StateChange/api' import { BasicModal, useModalInner } from '/@/components/Modal' import { InfoColumns } from './columns' + import { formatParams } from '/@/hooks/web/common' const cntrno = ref('') const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { setModalProps({ confirmLoading: false, loading: true }) - reload() cntrno.value = data.cntrno + reload() setModalProps({ loading: false }) }) @@ -33,20 +34,9 @@ resolve({ data: [...res.data], total: res.count }) }) }, - beforeFetch: () => { - var currentPageInfo: any = getPaginationRef() - var data = getForm().getFieldsValue() - const postParam: API.PageRequest = { - queryCondition: '', - pageCondition: { - pageIndex: currentPageInfo.current, - pageSize: currentPageInfo.pageSize, - sortConditions: [], - }, - } - let condition: API.ConditionItem[] = [] - postParam.queryCondition = JSON.stringify(condition) - return postParam + beforeFetch: (p) => { + p['cntrno'] = cntrno.value + return formatParams(p) }, columns: InfoColumns, pagination: true, diff --git a/src/views/ContainerManagement/xxzr/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue similarity index 74% rename from src/views/ContainerManagement/xxzr/TenantAuditStepModal.vue rename to src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue index 44bf46b0..f9d6dbb8 100644 --- a/src/views/ContainerManagement/xxzr/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue @@ -51,8 +51,32 @@ - - + + + + +
+ +
+ +
+ +
+