diff --git a/src/api/common/index.ts b/src/api/common/index.ts index 79c74986..4cc8c0dd 100644 --- a/src/api/common/index.ts +++ b/src/api/common/index.ts @@ -89,8 +89,20 @@ enum Api { GetControllerClientList = '/mainApi/ClientCommon/GetControllerClientListByKey', // 用户下拉 GetUserList = '/mainApi/Common/GetUserList', + // 根据权限id获取表单设置 - GetFormSetListByModule = '/mainApi/FormSet/GetFormSetListByModule' + GetFormSetListByModule = '/mainApi/FormSet/GetFormSetListByModule', + // 获取所有往来单位下拉列表 (Auth) + GetAllClientList = '/mainApi/ClientCommon/GetAllClientList', +} +// 所有往来单位下拉数据 +export function GetAllClientList(params) { + return request({ + url: Api.GetAllClientList, + method: 'get', + params, + }) + } // 用户下拉数据 export function GetUserList(params) { diff --git a/src/views/ContainerManagement/CurrentState/columns.tsx b/src/views/ContainerManagement/CurrentState/columns.tsx index d89d8a76..23a22f66 100644 --- a/src/views/ContainerManagement/CurrentState/columns.tsx +++ b/src/views/ContainerManagement/CurrentState/columns.tsx @@ -166,7 +166,7 @@ export const columns: BasicColumn[] = [ }, { title: '状态时间', - dataIndex: 'statetime', + dataIndex: 'stateTime', sorter: true, width: 200, }, @@ -643,17 +643,28 @@ export const formSchema: FormSchema[] = [ component: 'Input', colProps: { span: 6 }, }, + { + label: '', + field: 'ctnCode', + component: 'Input', + defaultValue: '', + show: false, + }, { field: 'ctnall', label: '箱型', component: 'ApiSelect', colProps: { span: 6 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCtnSelectList, labelField: 'ctnName', - valueField: 'ediCode', + valueField: 'ctnName', resultField: 'data', + onChange: (e, obj) => { + formModel.ctnall = obj?.label || '' + formModel.ctnCode = obj?.ediCode || '' + }, } }, }, @@ -717,7 +728,7 @@ export const formSchema: FormSchema[] = [ }, }, { - field: 'statetime', + field: 'stateTime', label: '状态时间', required: true, component: 'DatePicker', diff --git a/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue index 3abb0152..608e5a9d 100644 --- a/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOneWay/TenantAuditStepModal.vue @@ -528,38 +528,21 @@ process(dict) }, }, - // { - // title: '原箱主', - // width: 120, - // data: 'oldContainerOwner', - // type: 'dropdown', - // // 下拉框数据,可以同步或者异步返回(异步需要process返回) - // source: async (query, process) => { - // const res = ContainerOwnerDict.value.length - // ? ContainerOwnerDict.value - // : (await GetClientListByCode({ code: 'leasing' }))?.data - // if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res - // const dict = res.map((res) => { - // return res.pinYinCode - // }) - // process(dict) - // }, - // }, - // { - // title: '租箱业务', - // width: 120, - // data: 'cmRentDirectEnum', - // }, - // { - // title: '租箱类型', - // width: 120, - // data: 'rentType', - // }, - // { - // title: '业务状态', - // width: 120, - // data: 'billState', - // }, + { + title: '租箱客户?', + width: 120, + data: 'cntrno', + }, + { + title: '租箱业务?', + width: 120, + data: 'cmRentDirectEnum', + }, + { + title: '租箱类型?', + width: 120, + data: 'rentType', + }, { title: '放箱单号', width: 120, @@ -614,19 +597,12 @@ type: 'numeric', format: '0', }, - // { - // title: '当前状态??', - // width: 120, - // data: 'dropoffFee', - // type: 'numeric', - // format: '0', - // }, { - title: '提箱日期', + title: '当前状态?', width: 120, - data: 'pickupDate', - type: 'date', - dateFormat: 'YYYY-MM-DD', + data: 'dropoffFee', + type: 'numeric', + format: '0', }, { title: '还箱日期', @@ -635,7 +611,21 @@ type: 'date', dateFormat: 'YYYY-MM-DD', }, - + { + title: '起租地点', + width: 120, + data: 'rentalPort', + type: 'dropdown', + // 下拉框数据,可以同步或者异步返回(异步需要process返回) + source: async (query, process) => { + const res = PortDict.value.length ? PortDict.value : (await GetClientPortSelectList())?.data + if (!PortDict.value.length) PortDict.value = res + const dict = res.map((res) => { + return res.portName + }) + process(dict) + }, + }, { title: '提箱港口', width: 120, @@ -676,6 +666,37 @@ width: 120, data: 'vesselVoyno', }, + // { + // title: '原箱主', + // width: 120, + // data: 'oldContainerOwner', + // type: 'dropdown', + // // 下拉框数据,可以同步或者异步返回(异步需要process返回) + // source: async (query, process) => { + // const res = ContainerOwnerDict.value.length + // ? ContainerOwnerDict.value + // : (await GetClientListByCode({ code: 'leasing' }))?.data + // if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res + // const dict = res.map((res) => { + // return res.pinYinCode + // }) + // process(dict) + // }, + // }, + + // { + // title: '业务状态', + // width: 120, + // data: 'billState', + // }, + + // { + // title: '提箱日期', + // width: 120, + // data: 'pickupDate', + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // }, ] const settings = { height: '163', diff --git a/src/views/ContainerManagement/RentOneWay/api.ts b/src/views/ContainerManagement/RentOneWay/api.ts index f18de517..52106b38 100644 --- a/src/views/ContainerManagement/RentOneWay/api.ts +++ b/src/views/ContainerManagement/RentOneWay/api.ts @@ -2,14 +2,14 @@ import { request } from '/@/utils/request' import { DataResult, PageRequest } from '/@/api/model/baseModel' enum Api { - list = '/containerManagementApi/CM_RentOut/GetCM_RentOutList', - edit = '/containerManagementApi/CM_RentOut/EditCM_RentOut', - info = '/containerManagementApi/CM_RentOut/GetCM_RentOut', - del = '/containerManagementApi/CM_RentOut/DeleteCM_RentOut', + list = '/containerManagementApi/CM_RentOneWay/GetCM_RentOneWayList', + edit = '/containerManagementApi/CM_RentOneWay/EditCM_RentOneWay', + info = '/containerManagementApi/CM_RentOneWay/GetCM_RentOneWay', + del = '/containerManagementApi/CM_RentOneWay/DeleteCM_RentOneWay', - listDetail = '/containerManagementApi/CM_RentOut_Detail/GetCM_RentOut_DetailList', - editDetail = '/containerManagementApi/CM_RentOut_Detail/EditCM_RentOut_Detail', - delDetail = '/containerManagementApi/CM_RentOut_Detail/DeleteCM_RentOut_Detail', + 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_RentOut/CM_RentOut_Confirm', // Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel', diff --git a/src/views/ContainerManagement/RentOneWay/columns.tsx b/src/views/ContainerManagement/RentOneWay/columns.tsx index da0a3005..b92743cf 100644 --- a/src/views/ContainerManagement/RentOneWay/columns.tsx +++ b/src/views/ContainerManagement/RentOneWay/columns.tsx @@ -174,58 +174,83 @@ export const searchFormSchema: FormSchema[] = [ }, }, + // { + // 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: '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', + field: 'bsdate', + label: '业务日期', component: 'DatePicker', colProps: { span: 4 }, defaultValue: '', componentProps: { - showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM-DD 00:00:00', style: 'width:100%', }, }, { - field: 'eta', - label: 'ETA', - component: 'DatePicker', + field: 'accdate', + label: '会计期间', + component: 'MonthPicker', colProps: { span: 4 }, defaultValue: '', componentProps: { showTime: true, - style: 'width:100%', + allowClear: true, + valueFormat: 'YYYY-MM', + format: 'YYYY-MM', }, }, + // { + // 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[] = [ { @@ -240,7 +265,7 @@ export const formSchema: FormSchema[] = [ label: '业务类型', component: 'ApiSelect', colProps: { span: 6 }, - defaultValue: 102, + defaultValue: 103, dynamicDisabled: ({}) => { return true }, @@ -266,87 +291,87 @@ export const formSchema: FormSchema[] = [ }, }, - { - field: 'rentDirectId', - label: '租箱业务', - component: 'ApiSelect', - colProps: { span: 6 }, - defaultValue: 2, - dynamicDisabled: ({ values }) => { - return !!values.id - }, - componentProps: ({ formModel, formActionType }) => { - 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 - }, - onChange: (e, obj) => { - formActionType ? formActionType.submit() : null - if (e && obj) { - formModel.rentDirect = obj.label - } else { - formModel.rentDirect = '' - } - }, - } - }, - }, - { - field: 'rentTypeId', - label: '租箱类型', - component: 'ApiSelect', - colProps: { span: 6 }, - defaultValue: 1, - dynamicDisabled: ({ values }) => { - return !!values.id - }, - componentProps: ({}) => { - return { - api: () => { - return new Promise((resolve) => { - getDictOption('CM_RentType').then((res) => { - res.forEach((item) => { - item.value = parseInt(item.value) - }) - resolve(res) - }) - }) - }, - labelField: 'label', - valueField: 'value', - resultField: 'data', - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - } - }, - }, - { - field: 'billState', - label: '业务状态', - component: 'Input', - colProps: { span: 6 }, - dynamicDisabled: ({}) => { - return true - }, - }, + // { + // field: 'rentDirectId', + // label: '租箱业务', + // component: 'ApiSelect', + // colProps: { span: 6 }, + // defaultValue: 2, + // dynamicDisabled: ({ values }) => { + // return !!values.id + // }, + // componentProps: ({ formModel, formActionType }) => { + // 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 + // }, + // onChange: (e, obj) => { + // formActionType ? formActionType.submit() : null + // if (e && obj) { + // formModel.rentDirect = obj.label + // } else { + // formModel.rentDirect = '' + // } + // }, + // } + // }, + // }, + // { + // field: 'rentTypeId', + // label: '租箱类型', + // component: 'ApiSelect', + // colProps: { span: 6 }, + // defaultValue: 1, + // dynamicDisabled: ({ values }) => { + // return !!values.id + // }, + // componentProps: ({}) => { + // return { + // api: () => { + // return new Promise((resolve) => { + // getDictOption('CM_RentType').then((res) => { + // res.forEach((item) => { + // item.value = parseInt(item.value) + // }) + // resolve(res) + // }) + // }) + // }, + // labelField: 'label', + // valueField: 'value', + // resultField: 'data', + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // } + // }, + // }, + // { + // field: 'billState', + // label: '业务状态', + // component: 'Input', + // colProps: { span: 6 }, + // dynamicDisabled: ({}) => { + // return true + // }, + // }, { field: 'rentCustomerId', label: '租箱客户', diff --git a/src/views/ContainerManagement/RentOut/columns.tsx b/src/views/ContainerManagement/RentOut/columns.tsx index fdf5b92d..11276b45 100644 --- a/src/views/ContainerManagement/RentOut/columns.tsx +++ b/src/views/ContainerManagement/RentOut/columns.tsx @@ -205,27 +205,52 @@ export const searchFormSchema: FormSchema[] = [ }, }, { - field: 'etd', - label: 'ETD', + field: 'bsdate', + label: '业务日期', component: 'DatePicker', colProps: { span: 4 }, defaultValue: '', componentProps: { - showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM-DD 00:00:00', style: 'width:100%', }, }, { - field: 'eta', - label: 'ETA', - component: 'DatePicker', + field: 'accdate', + label: '会计期间', + component: 'MonthPicker', colProps: { span: 4 }, defaultValue: '', componentProps: { showTime: true, - style: 'width:100%', + allowClear: true, + valueFormat: 'YYYY-MM', + format: 'YYYY-MM', }, }, + // { + // 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[] = [ { diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 5e1d77d0..9f4925f1 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -20,6 +20,7 @@ import { getDeptList, GetFeeCurrencySelectList, GetUserList, + GetAllClientList, } from '/@/api/common' import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { getOrgTree } from '/@/api/system/org' @@ -546,39 +547,67 @@ export const formSchema: FormSchema[] = [ { field: 'pcorpId', label: '所属集团', - component: 'TreeSelect', defaultValue: '', + component: 'ApiSelect', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - treeData: OrgTree, - allowClear: true, - showSearch: true, + api: GetAllClientList, + labelField: 'shortName', + valueField: 'id', + resultField: 'data', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, - onChange: (e) => { - if (e) { - const ForTree = (data, key, callback) => { - for (let i = 0; i < data.length; i++) { - if (data[i].value == key) { - return callback(data[i], i, data) - } - if (data[i].children) { - ForTree(data[i].children, key, callback) - } - } - } - let obj: any = {} - ForTree(OrgTree, e, (item, index, arr) => { - obj = item - }) - formModel.pcorpName = obj.title + onChange: (e, obj) => { + if (e && obj) { + formModel.pcorpId = obj.value + formModel.pcorpName = obj.label + } + if (!e && !obj) { + formModel.pcorpId = '' + formModel.pcorpName = '' } }, } }, }, + // { + // field: 'pcorpId', + // label: '所属集团', + // component: 'TreeSelect', + // defaultValue: '', + // colProps: { span: 4 }, + // componentProps: ({ formModel }) => { + // return { + // treeData: OrgTree, + // allowClear: true, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // onChange: (e) => { + // if (e) { + // const ForTree = (data, key, callback) => { + // for (let i = 0; i < data.length; i++) { + // if (data[i].value == key) { + // return callback(data[i], i, data) + // } + // if (data[i].children) { + // ForTree(data[i].children, key, callback) + // } + // } + // } + // let obj: any = {} + // ForTree(OrgTree, e, (item, index, arr) => { + // obj = item + // }) + // formModel.pcorpName = obj.title + // } + // }, + // } + // }, + // }, { field: 'Divider1', component: 'Divider',