From 74d5041711ce99e430fdcb947988d9b136402c87 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: Wed, 14 Aug 2024 16:09:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E7=AE=B1=E6=9C=88=E7=BB=93=E8=B4=A6?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustFeeDui/TenantAuditStepModal.vue | 844 ++++++++++++++++++ .../ContainerManagement/CustFeeDui/api.ts | 118 +++ .../CustFeeDui/columns.tsx | 402 +++++++++ .../ContainerManagement/CustFeeDui/index.vue | 123 +++ 4 files changed, 1487 insertions(+) create mode 100644 src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue create mode 100644 src/views/ContainerManagement/CustFeeDui/api.ts create mode 100644 src/views/ContainerManagement/CustFeeDui/columns.tsx create mode 100644 src/views/ContainerManagement/CustFeeDui/index.vue diff --git a/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue b/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue new file mode 100644 index 00000000..067612da --- /dev/null +++ b/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue @@ -0,0 +1,844 @@ + + + diff --git a/src/views/ContainerManagement/CustFeeDui/api.ts b/src/views/ContainerManagement/CustFeeDui/api.ts new file mode 100644 index 00000000..25f2ae53 --- /dev/null +++ b/src/views/ContainerManagement/CustFeeDui/api.ts @@ -0,0 +1,118 @@ +// @ts-ignore +import { request } from '/@/utils/request' +import { DataResult, PageRequest } from '/@/api/model/baseModel' +enum Api { + list = '/containerManagementApi/CM_CustFeeDui/GetCM_CustFeeDuiList', + edit = '/containerManagementApi/CM_CustFeeDui/EditCM_CustFeeDui', + info = '/containerManagementApi/CM_CustFeeDui/GetCM_CustFeeDui', + del = '/containerManagementApi/CM_CustFeeDui/DeleteCM_CustFeeDui', + + listDetail = '/containerManagementApi/CM_CustFeeDui_Detail/GetCM_CustFeeDui_DetailList', + // editDetail = '/containerManagementApi/CM_RentIn_Detail/EditCM_RentIn_Detail', + delDetail = '/containerManagementApi/CM_CustFeeDui_Detail/DeleteCM_CustFeeDui_Detail', + + // Confirm = '/containerManagementApi/CM_RentIn/CM_RentIn_Confirm', + // Cancel = '/containerManagementApi/CM_RentIn/CM_RentIn_Cancel', + // MakeFee = '/containerManagementApi/CM_RentIn/CM_RentIn_MakeFee', + + DetailView = '/containerManagementApi/CM_CustFeeDui/GetVW_CM_FeeBase_Detail', + AddCtn = '/containerManagementApi/CM_CustFeeDui/AddVW_CM_FeeBase_Detail', + +} +// 租箱租入明细视图 (Auth) +export function ApiDetailView(data: PageRequest) { + return request({ + url: Api.DetailView, + method: 'post', + data, + }) +} +// 租箱租入退租_添加 (Auth) +export function ApiAddCtn(data: PageRequest) { + return request({ + url: Api.AddCtn, + method: 'post', + data, + }) +} +// 租箱租入_生成费用 (Auth) +export function ApiMakeFee(data: PageRequest) { + return request({ + url: Api.MakeFee, + method: 'post', + data, + }) +} +// 租箱租入_确认 (Auth) +export function ApiConfirm(data: PageRequest) { + return request({ + url: Api.Confirm, + method: 'post', + data, + }) +} +// 租箱租入_取消 (Auth) +export function ApiCancel(data: PageRequest) { + return request({ + url: Api.Cancel, + method: 'post', + data, + }) +} +// 列表 (Auth) +export function ApiList(data: PageRequest) { + return request({ + url: Api.list, + method: 'post', + data, + }) +} +// 编辑 (Auth) +export function ApiEdit(data: PageRequest) { + return request({ + url: Api.edit, + method: 'post', + data, + }) +} +// 详情 (Auth) +export function ApiInfo(query) { + return request({ + url: Api.info, + method: 'get', + params: query, + }) +} +// 删除 (Auth) +export function ApiDel(data: PageRequest) { + return request({ + url: Api.del, + method: 'post', + data, + }) +} + +// 列表详情 (Auth) +export function ApiListDetail(data: PageRequest) { + return request({ + url: Api.listDetail, + method: 'post', + data, + }) +} +// // 编辑详情 (Auth) +// export function ApiEditDetail(data: PageRequest) { +// return request({ +// url: Api.editDetail, +// method: 'post', +// data, +// }) +// } +// 删除详情 (Auth) +export function ApiDelDetail(data: PageRequest) { + return request({ + url: Api.delDetail, + method: 'post', + data, + }) +} \ No newline at end of file diff --git a/src/views/ContainerManagement/CustFeeDui/columns.tsx b/src/views/ContainerManagement/CustFeeDui/columns.tsx new file mode 100644 index 00000000..3e1b21d7 --- /dev/null +++ b/src/views/ContainerManagement/CustFeeDui/columns.tsx @@ -0,0 +1,402 @@ +import { ref } from 'vue' +import { BasicColumn, FormSchema } from '/@/components/Table' +import { Tag } from 'ant-design-vue' +import { GetCtnSelectList, GetClientListByCode } from '/@/api/common' +import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger' +import { useOptionsStore } from '/@/store/modules/options' +// 下拉数据 +import { getOptions } from '/@/hooks/dict' +const optionsStore = useOptionsStore() +// 字典 +import { getDictOption } from '/@/utils/dictUtil' +// 新旧箱数据 +const usedStateList = [ + { + label: '', + value: '', + }, + { + label: 'used', + value: 'used', + }, + { + label: 'new', + value: 'new', + }, +] +// 业务类型字典 +const businessTypeDict = ref([]) +getDictOption('CM_BusinessType').then((res) => { + businessTypeDict.value = res +}) +// 租箱类型字典 +const rentTypeIdDict = ref([]) +getDictOption('CM_RentType').then((res) => { + rentTypeIdDict.value = res +}) + +export const columns: BasicColumn[] = [ + { + title: '租箱月结账单号', + dataIndex: 'billno', + sorter: true, + width: 150, + }, + { + title: '客户名称', + dataIndex: 'customerName', + sorter: true, + width: 150, + }, + { + title: '开始日期', + dataIndex: 'billStartDate', + sorter: true, + width: 150, + }, + { + title: '结束日期', + dataIndex: 'billEndDate', + sorter: true, + width: 150, + }, + { + title: '会计期间', + dataIndex: 'accdate', + sorter: true, + width: 200, + }, + { + title: '总金额', + dataIndex: 'amount', + sorter: true, + width: 150, + }, + { + title: '业务锁定', + dataIndex: 'isBusinessLocking', + sorter: true, + width: 200, + customRender: ({ text }) => { + if (text) { + return + } else { + return + } + return text + }, + }, + { + title: '费用锁定', + dataIndex: 'isFeeLocking', + sorter: true, + width: 200, + customRender: ({ text }) => { + if (text) { + return + } else { + return + } + return text + }, + }, + { + title: '费用状态??', + dataIndex: 'billno', + sorter: true, + width: 150, + }, + { + title: '备注', + dataIndex: 'remark', + sorter: true, + width: 200, + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'billno', + label: '租箱业务号', + component: 'Input', + colProps: { span: 4 }, + }, + { + field: 'oldContainerOwner', + label: '原箱主', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: ({ formModel }) => { + return { + allowClear: true, + showSearch: true, + api: GetClientListByCode, + params: { code: 'leasing' }, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'shortName', + resultField: 'data', + immediate: false, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + + { + field: 'rentDirectId', + label: '租箱业务', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: ({}) => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('CM_RentDirect').then((res) => { + let data: any = [] + res.forEach((item) => { + item.value = parseInt(item.value) + if (!item.label.indexOf('租入')) { + data.push(item) + } + }) + resolve(data) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'etd', + label: 'ETD', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: true, + style: 'width:100%', + }, + }, + { + field: 'eta', + label: 'ETA', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: true, + style: 'width:100%', + }, + }, +] +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + defaultValue: '', + show: false, + }, + { + field: 'billno', + label: '月结账单号', + component: 'Input', + colProps: { span: 6 }, + dynamicDisabled: ({}) => { + return true + }, + }, + { + field: 'customerName', + label: '客户名称', + component: 'Input', + colProps: { span: 6 }, + show: false, + }, + { + field: 'customerId', + label: '客户名称', + required: true, + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + const arr = getOptions('custom') + resolve(arr) + }) + }, + labelField: 'shortName', + valueField: 'codeName', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + if (obj) { + formModel.customerName = obj.label + formModel.customerId = obj.value + } else { + formModel.customerName = '' + formModel.customerId = '' + } + }, + } + }, + }, + { + field: 'billStartDate', + label: '开始日期', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + required: true, + componentProps: { + showTime: false, + allowClear: true, + valueFormat: 'YYYY-MM-DD', + format: 'YYYY-MM-DD', + style: 'width:100%', + }, + }, + { + field: 'billEndDate', + label: '结束日期', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + required: true, + componentProps: { + showTime: false, + allowClear: true, + valueFormat: 'YYYY-MM-DD', + format: 'YYYY-MM-DD', + style: 'width:100%', + }, + }, + { + field: 'amount', + label: '总金额', + component: 'InputNumber', + colProps: { span: 6 }, + defaultValue: '', + dynamicDisabled: ({}) => { + return true + }, + }, + { + field: 'accdate', + label: '会计期间', + component: 'MonthPicker', + colProps: { span: 6 }, + defaultValue: '', + componentProps: { + showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM', + format: 'YYYY-MM', + }, + }, + { + field: 'isBusinessLocking', + label: '业务锁定', + component: 'Switch', + defaultValue: false, + colProps: { span: 6 }, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + dynamicDisabled: ({}) => { + return true + }, + }, + { + field: 'isFeeLocking', + label: '费用锁定', + component: 'Switch', + defaultValue: false, + colProps: { span: 6 }, + componentProps: { + checkedChildren: '是', + unCheckedChildren: '否', + }, + dynamicDisabled: ({}) => { + return true + }, + }, + { + field: 'remark', + label: '备注', + component: 'Input', + colProps: { span: 12 }, + }, +] + +export const formSearchBoxSchema: FormSchema[] = [ + { + field: 'oldContainerOwner', + label: '原箱主', + component: 'ApiSelect', + required: false, + + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + allowClear: true, + showSearch: true, + api: GetClientListByCode, + params: { code: 'leasing' }, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'shortName', + resultField: 'data', + immediate: false, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'ctnall', + label: '箱型', + component: 'ApiSelect', + required: false, + + colProps: { span: 6 }, + componentProps: () => { + return { + allowClear: true, + showSearch: true, + api: GetCtnSelectList, + params: { code: 'leasing' }, + labelField: 'ctnName', + showName: 'ctnName', + valueField: 'ctnName', + resultField: 'data', + immediate: false, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'cntrno', + label: '箱号', + component: 'Input', + colProps: { span: 10 }, + }, +] diff --git a/src/views/ContainerManagement/CustFeeDui/index.vue b/src/views/ContainerManagement/CustFeeDui/index.vue new file mode 100644 index 00000000..f64ac7c9 --- /dev/null +++ b/src/views/ContainerManagement/CustFeeDui/index.vue @@ -0,0 +1,123 @@ + +