From eb35175041679947bcf9373fb709cfd1efc779a3 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, 14 Oct 2024 15:48:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=AE=B1=E7=AE=A1=20=E5=8D=95=E7=A8=8B?= =?UTF-8?q?=E7=A7=9F=E5=85=A5=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RentOneWayIn/TenantAuditStepModal.vue | 21 ++++++-------- .../RentOneWayIn/columns.tsx | 28 +++++++++---------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue index 5e3312e1..76d1dd06 100644 --- a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue @@ -158,7 +158,7 @@ import { registerAllModules } from 'handsontable/registry' registerAllModules() import 'handsontable/dist/handsontable.full.css' - import { formSchema, formSearchBoxSchema } from './columns' + import { formSchema } from './columns' import { GetCtnSelectList, GetClientPortSelectList, @@ -498,11 +498,6 @@ width: 120, data: 'dropoffPortCode', }, - { - title: '租箱客户ID', - width: 120, - data: 'rentCustomerId', - }, { title: '租箱业务ID', width: 120, @@ -538,9 +533,9 @@ }, }, { - title: '租箱客户', + title: '原箱主', width: 120, - data: 'rentCustomerName', + data: 'oldContainerOwner', type: 'dropdown', // 下拉框数据,可以同步或者异步返回(异步需要process返回) source: async (query, process) => { @@ -655,6 +650,7 @@ data: 'dropoffDate', type: 'date', dateFormat: 'YYYY-MM-DD', + readOnly: true, }, { title: '起租地点', @@ -691,6 +687,7 @@ width: 120, data: 'dropoffPort', type: 'dropdown', + readOnly: true, // 下拉框数据,可以同步或者异步返回(异步需要process返回) source: async (query, process) => { const res = (await GetClientPortSelectList({ queryKey: query }))?.data @@ -735,7 +732,7 @@ fixedColumnsLeft: 1, // 需要隐藏的列 hiddenColumns: { - columns: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + columns: [1, 2, 3, 4, 5, 6, 7, 8, 9], indicators: true, }, // 控制回车移动 @@ -764,7 +761,7 @@ list.value[changes[0][0]]['ctnall'] = dict?.ctnName list.value[changes[0][0]]['ctnCode'] = dict?.ediCode } - if (changes[0][1] === 'rentCustomerName') { + if (changes[0][1] === 'oldContainerOwner') { const res = ContainerOwnerDict.value.length ? ContainerOwnerDict.value : (await GetClientListByCode({ code: 'leasing' }))?.data @@ -773,8 +770,8 @@ return item.pinYinCode === changes[0][3] }) if (item) dict = item[0] - list.value[changes[0][0]]['rentCustomerName'] = dict?.pinYinCode - list.value[changes[0][0]]['rentCustomerId'] = dict?.id + list.value[changes[0][0]]['oldContainerOwner'] = dict?.pinYinCode + list.value[changes[0][0]]['oldContainerOwnerId'] = dict?.id } if (changes[0][1] === 'rentDirect') { const res = rentDirectDict.value.length diff --git a/src/views/ContainerManagement/RentOneWayIn/columns.tsx b/src/views/ContainerManagement/RentOneWayIn/columns.tsx index 3cbff4d2..5eb2c219 100644 --- a/src/views/ContainerManagement/RentOneWayIn/columns.tsx +++ b/src/views/ContainerManagement/RentOneWayIn/columns.tsx @@ -76,10 +76,10 @@ export const columns: BasicColumn[] = [ width: 200, }, { - title: '租箱客户', - dataIndex: 'rentCustomerName', + title: '原箱主', + dataIndex: 'oldContainerOwner', sorter: true, - width: 200, + width: 150, }, { title: '业务日期', @@ -149,8 +149,8 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, }, { - field: 'rentCustomerName', - label: '租箱客户', + field: 'oldContainerOwner', + label: '原箱主', component: 'ApiSelect', required: false, dynamicDisabled: false, @@ -372,15 +372,15 @@ export const formSchema: FormSchema[] = [ // }, // }, { - field: 'rentCustomerId', - label: '租箱客户', + field: 'oldContainerOwnerId', + label: '原箱主', component: 'Input', colProps: { span: 6 }, show: false, }, { - field: 'rentCustomerName', - label: '租箱客户', + field: 'oldContainerOwner', + label: '原箱主', component: 'ApiSelect', required: false, dynamicDisabled: false, @@ -401,10 +401,10 @@ export const formSchema: FormSchema[] = [ }, onChange: (e, obj) => { if (e && obj) { - formModel.rentCustomerId = obj.id + formModel.oldContainerOwnerId = obj.id } if (!e && !obj) { - formModel.rentCustomerId = '' + formModel.oldContainerOwnerId = '' } }, } @@ -473,12 +473,12 @@ export const formSchema: FormSchema[] = [ export const formSearchBoxSchema: FormSchema[] = [ { - field: 'rentCustomerName', - label: '租箱客户', + field: 'oldContainerOwner', + label: '原箱主', component: 'ApiSelect', required: false, dynamicDisabled: false, - colProps: { span: 6 }, + colProps: { span: 4 }, componentProps: ({ formModel }) => { return { allowClear: true, From 6a50652dc4ba6a1404b06b7513c4140f9eaf068e 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: Tue, 15 Oct 2024 08:58:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=AE=B1=E7=AE=A1=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ContainerManagement/RentOneWay/api.ts | 4 ++-- .../RentOneWayIn/TenantAuditStepModal.vue | 15 +++++++-------- src/views/fee/FeeCustTemplate/index.vue | 1 - 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/views/ContainerManagement/RentOneWay/api.ts b/src/views/ContainerManagement/RentOneWay/api.ts index 66768083..4de29641 100644 --- a/src/views/ContainerManagement/RentOneWay/api.ts +++ b/src/views/ContainerManagement/RentOneWay/api.ts @@ -10,11 +10,11 @@ enum Api { listDetail = '/containerManagementApi/CM_RentOneWay_Detail/GetCM_RentOneWay_DetailList', editDetail = '/containerManagementApi/CM_RentOneWay_Detail/EditCM_RentOneWay_Detail', delDetail = '/containerManagementApi/CM_RentOneWay_Detail/DeleteCM_RentOneWay_Detail', - + Confirm = '/containerManagementApi/CM_RentOneWay/CM_RentOneWay_Confirm', Cancel = '/containerManagementApi/CM_RentOneWay/CM_RentOneWay_Cancel', - DetailView = '/containerManagementApi/CM_RentOut/CM_RentOut_NeedRent_View', + DetailView = '/containerManagementApi/CM_RentOneWay/CM_RentOneWay_NeedRent_View', AddCtn = '/containerManagementApi/CM_RentOneWay/CM_RentOneWay_AddCtn', } // 列表 (Auth) diff --git a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue index 76d1dd06..7ad37190 100644 --- a/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOneWayIn/TenantAuditStepModal.vue @@ -595,6 +595,13 @@ type: 'date', dateFormat: 'YYYY-MM-DD', }, + { + title: '提箱日期', + width: 120, + data: 'pickupdate', + type: 'date', + dateFormat: 'YYYY-MM-DD', + }, { title: '开始计费日期', width: 120, @@ -714,14 +721,6 @@ // width: 120, // data: 'billState', // }, - - // { - // title: '提箱日期', - // width: 120, - // data: 'pickupDate', - // type: 'date', - // dateFormat: 'YYYY-MM-DD', - // }, ] const settings = { height: '260', diff --git a/src/views/fee/FeeCustTemplate/index.vue b/src/views/fee/FeeCustTemplate/index.vue index b4c1515d..fd4a81c3 100644 --- a/src/views/fee/FeeCustTemplate/index.vue +++ b/src/views/fee/FeeCustTemplate/index.vue @@ -2,7 +2,6 @@
- - diff --git a/src/views/approve/fee/index.vue b/src/views/approve/fee/index.vue index 2621b790..3a4d0262 100644 --- a/src/views/approve/fee/index.vue +++ b/src/views/approve/fee/index.vue @@ -66,7 +66,7 @@
RMB利润:{{ statisticData.profitCNY }} - USD利润:{{ statisticData.payableUSD }} + USD利润:{{ statisticData.profitUSD }} 其他利润: 合计利润:{{ statisticData.payableTotal }} 利润率:{{ statisticData.profitMargin }} @@ -192,10 +192,6 @@ // if (data.profitCNY) data.profitCNY = data.profitCNY.toLocaleString() if (data.payableTotal) data.payableTotal = data.payableTotal.toLocaleString() statisticData.value = data - // statisticData.value = data - // currencyData.value = data.byCurrency - // customerData.value = data.byCustomer - // billData.value = data.byBusiness }) } // 选中的业务行数据 @@ -208,8 +204,12 @@ } onMounted(() => { - //初始化 - reload() + //初始化 有id就是从任务跳转过来,直接打开这一票的费用 + if (route.query.id) { + mainFeeTable.value.init({ id: route.query.id, businessType: 1 }) + } else { + reload() + } }) defineExpose({ getDataSource diff --git a/src/views/operation/seaexport/api/BookingLedger.js b/src/views/operation/seaexport/api/BookingLedger.js index 06d88a60..a59664c0 100644 --- a/src/views/operation/seaexport/api/BookingLedger.js +++ b/src/views/operation/seaexport/api/BookingLedger.js @@ -24,6 +24,16 @@ export function BookingOrderGet(parameter) { params: parameter, }) } + +// copy详情 +export function GetSeaExportCopyInfo(data) { + return request({ + url: '/opApi/SeaExport/GetSeaExportCopyInfo', + method: 'post', + data + }) +} + // 业务单据批量删除 (Auth) export function SeaExportBatchDel(parameter) { return request({ @@ -2249,3 +2259,21 @@ export function IsLastMarker(params) { params, }) } + +// 确认退舱 +export function CreateRefundConfirm(data) { + return request({ + url: '/opApi/SeaExportRefund/CreateRefundConfirm', + method: 'post', + data + }) +} + +// 退出入池 +export function RefundPool(data) { + return request({ + url: '/opApi/SeaExportRefund/RefundPool', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/views/operation/seaexport/detail/components/journal.vue b/src/views/operation/seaexport/detail/components/journal.vue index b6eef219..f7d13341 100644 --- a/src/views/operation/seaexport/detail/components/journal.vue +++ b/src/views/operation/seaexport/detail/components/journal.vue @@ -56,11 +56,12 @@ // 初始化日志数据 const init = () => { const data = props.data - console.log(data) - data.forEach(item => { - item['flag'] = false - }) - logList.value = data + if (data && data.length) { + data.forEach(item => { + item['flag'] = false + }) + } + logList.value = data || [] } // 折叠日志详细信息 const foldLog = (item) => { diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index b0154b81..86b793e6 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -103,9 +103,15 @@ businessType="1" > - + {{ completeText }} + + 创建退舱任务 + + + 退出入池 +
@@ -179,14 +185,16 @@ BookingOrderGet, BookingOrderSave, GetCtnListRefsh, - SeaExportCopy, + CreateRefundConfirm, SeaExportTaskAudit, CreateTask, SetTaskStatus, AutomaticBooking, SubmitAudit, Withdraw, - IsLastMarker + IsLastMarker, + GetSeaExportCopyInfo, + RefundPool } from '../api/BookingLedger' import { GetFormSetInfoByModule } from '/@/api/common' const appStore = useAppStore() @@ -299,6 +307,8 @@ return '发送AMS' } else if (status == 'ORDER_AUDIT_REJECTED' || status == 'WAIT_SI_REJECTED') { return '重新提交' + } else if (status == 'RETURN_CABIN') { + return '退舱' } else { return '完成任务' } @@ -384,7 +394,7 @@ } } // 复制新建保存后置为true。刷新不情况指定字段 - let copyFlag = false + var copyFlag = false // 获取详情 function getDetail() { if (inPageLoading.value) { @@ -394,15 +404,18 @@ inChildLoading.value = true detailsLoadOver.value = false loading.value = true - BookingOrderGet({ - id: id.value, - }) - .then(async (res) => { + // 复制过来的数据清除指定字段 + if (route.query.source == 'copy' && !copyFlag) { + createMessage.success('复制成功,保存后生效!') + GetSeaExportCopyInfo({ + id: id.value, + isCopyFee: false + }).then(async (res) => { bookingDetails.value = { orderContactList: [] } // 复制过来的数据清除指定字段 - if (route.query.source == 'copy' && !copyFlag) { + if (route.query.source == 'copy') { res.data = { ...res.data, id: null, @@ -432,19 +445,42 @@ } bookingDetails.value = res.data // 如果是审批页面切状态是已审单弹出选择现舱非现舱 - // if (res.data.businessStatusName == '已审单' && route.query.taskId) { - // cvisible.value = true - // } + inPageLoading.value = false + }) + .catch(() => { + loading.value = false + }) + } else { + BookingOrderGet({ + id: id.value, + }) + .then(async (res) => { + bookingDetails.value = { + orderContactList: [] + } + // 根据permission获取表单设置数据 + getFormSet(res.data.businessStatus) + loading.value = false + if (!res.data.ctnPriceInfo.length) { + res.data.ctnPriceInfo = [{}] + } + // 如果存在应结日期,去掉时分秒 + if (res.data.stlDate) { + res.data.stlDate = res.data.stlDate.split(' ')[0] + } + bookingDetails.value = res.data + // 如果是审批页面切状态是已审单弹出选择现舱非现舱 inPageLoading.value = false // 如果存在表单修改规则,重新更新表单 - if (res.data.formSetList && res.data.formSetList.length) { - const formSetContent = JSON.parse(res.data.formSetList[0].content) + // if (res.data.formSetList && res.data.formSetList.length) { + // const formSetContent = JSON.parse(res.data.formSetList[0].content) // RefbasicInfo.value.updateSchema() - } + // } }) .catch(() => { loading.value = false }) + } } // 点击保存 const save = async (task) => { @@ -537,8 +573,39 @@ if (!task) { createMessage.success('保存成功!') } else { + // 创建退舱和退舱入池 + if (task == 'cjtc' || task == 'tcrc') { + if (task == 'cjtc') { + CreateRefundConfirm({ + id: id.value, + businessType: 1 + }).then(res => { + // createMessage.success(res.message) + completeTask(null, null) + }) + } else { + RefundPool({ + id: id.value, + businessType: 1 + }).then(res => { + // createMessage.success(res.message) + completeTask(null, null) + }) + } + } else { + // 订舱审核过来不需要调用完成任务接口 + if (task != 'dc') completeTask(null, null) + } // 订舱审核过来不需要调用完成任务接口 if (task != 'dc') completeTask(null, null) + // if (completeText.value == '退舱') { + // CreateRefundConfirm({ + // id: id.value, + // businessType: 1 + // }).then(res => { + // console.log(res) + // }) + // } } } else { createMessage.success('新增成功!') @@ -550,10 +617,10 @@ go(`/BookingDetail?id=${res.data}&source=edit`) }, 50) } - init() if (route.query.source == 'copy') { copyFlag = true } + init() } // 如果是改配保存,恢复字段原元素 if (changeFlag.value) { @@ -992,10 +1059,11 @@ } // 拷贝数据跳转 const copyData = () => { - SeaExportCopy({ id: id.value }).then((res) => { - createMessage.success('复制成功') - go(`/BookingDetail?id=${res.data}&source=copy`) - }) + go(`/BookingDetail?id=${id.value}&source=copy`) + // SeaExportCopy({ id: id.value }).then((res) => { + // createMessage.success('复制成功') + // go(`/BookingDetail?id=${res.data}&source=copy`) + // }) } function getRules(data) { const { rows, type } = data @@ -1108,6 +1176,12 @@ }) } } + watch( + () => copyFlag, + (b) => { + console.log(b) + } + )