箱管 调整

szh-new
张同海 3 months ago
commit b20f15df40

@ -89,8 +89,20 @@ enum Api {
GetControllerClientList = '/mainApi/ClientCommon/GetControllerClientListByKey', GetControllerClientList = '/mainApi/ClientCommon/GetControllerClientListByKey',
// 用户下拉 // 用户下拉
GetUserList = '/mainApi/Common/GetUserList', GetUserList = '/mainApi/Common/GetUserList',
// 根据权限id获取表单设置 // 根据权限id获取表单设置
GetFormSetListByModule = '/mainApi/FormSet/GetFormSetListByModule' GetFormSetListByModule = '/mainApi/FormSet/GetFormSetListByModule',
// 获取所有往来单位下拉列表 (Auth)
GetAllClientList = '/mainApi/ClientCommon/GetAllClientList',
}
// 所有往来单位下拉数据
export function GetAllClientList(params) {
return request<DataResult>({
url: Api.GetAllClientList,
method: 'get',
params,
})
} }
// 用户下拉数据 // 用户下拉数据
export function GetUserList(params) { export function GetUserList(params) {

@ -166,7 +166,7 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '状态时间', title: '状态时间',
dataIndex: 'statetime', dataIndex: 'stateTime',
sorter: true, sorter: true,
width: 200, width: 200,
}, },
@ -643,17 +643,28 @@ export const formSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{
label: '',
field: 'ctnCode',
component: 'Input',
defaultValue: '',
show: false,
},
{ {
field: 'ctnall', field: 'ctnall',
label: '箱型', label: '箱型',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: () => { componentProps: ({ formModel }) => {
return { return {
api: GetCtnSelectList, api: GetCtnSelectList,
labelField: 'ctnName', labelField: 'ctnName',
valueField: 'ediCode', valueField: 'ctnName',
resultField: 'data', 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: '状态时间', label: '状态时间',
required: true, required: true,
component: 'DatePicker', component: 'DatePicker',

@ -528,38 +528,21 @@
process(dict) process(dict)
}, },
}, },
// { {
// title: '', title: '租箱客户?',
// width: 120, width: 120,
// data: 'oldContainerOwner', data: 'cntrno',
// type: 'dropdown', },
// // (process) {
// source: async (query, process) => { title: '租箱业务?',
// const res = ContainerOwnerDict.value.length width: 120,
// ? ContainerOwnerDict.value data: 'cmRentDirectEnum',
// : (await GetClientListByCode({ code: 'leasing' }))?.data },
// if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res {
// const dict = res.map((res) => { title: '租箱类型?',
// return res.pinYinCode width: 120,
// }) data: 'rentType',
// process(dict) },
// },
// },
// {
// title: '',
// width: 120,
// data: 'cmRentDirectEnum',
// },
// {
// title: '',
// width: 120,
// data: 'rentType',
// },
// {
// title: '',
// width: 120,
// data: 'billState',
// },
{ {
title: '放箱单号', title: '放箱单号',
width: 120, width: 120,
@ -614,19 +597,12 @@
type: 'numeric', type: 'numeric',
format: '0', format: '0',
}, },
// {
// title: '',
// width: 120,
// data: 'dropoffFee',
// type: 'numeric',
// format: '0',
// },
{ {
title: '提箱日期', title: '当前状态?',
width: 120, width: 120,
data: 'pickupDate', data: 'dropoffFee',
type: 'date', type: 'numeric',
dateFormat: 'YYYY-MM-DD', format: '0',
}, },
{ {
title: '还箱日期', title: '还箱日期',
@ -635,7 +611,21 @@
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', 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: '提箱港口', title: '提箱港口',
width: 120, width: 120,
@ -676,6 +666,37 @@
width: 120, width: 120,
data: 'vesselVoyno', 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 = { const settings = {
height: '163', height: '163',

@ -2,14 +2,14 @@
import { request } from '/@/utils/request' import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel' import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api { enum Api {
list = '/containerManagementApi/CM_RentOut/GetCM_RentOutList', list = '/containerManagementApi/CM_RentOneWay/GetCM_RentOneWayList',
edit = '/containerManagementApi/CM_RentOut/EditCM_RentOut', edit = '/containerManagementApi/CM_RentOneWay/EditCM_RentOneWay',
info = '/containerManagementApi/CM_RentOut/GetCM_RentOut', info = '/containerManagementApi/CM_RentOneWay/GetCM_RentOneWay',
del = '/containerManagementApi/CM_RentOut/DeleteCM_RentOut', del = '/containerManagementApi/CM_RentOneWay/DeleteCM_RentOneWay',
listDetail = '/containerManagementApi/CM_RentOut_Detail/GetCM_RentOut_DetailList', listDetail = '/containerManagementApi/CM_RentOneWay_Detail/GetCM_RentOneWay_DetailList',
editDetail = '/containerManagementApi/CM_RentOut_Detail/EditCM_RentOut_Detail', editDetail = '/containerManagementApi/CM_RentOneWay_Detail/EditCM_RentOneWay_Detail',
delDetail = '/containerManagementApi/CM_RentOut_Detail/DeleteCM_RentOut_Detail', delDetail = '/containerManagementApi/CM_RentOneWay_Detail/DeleteCM_RentOneWay_Detail',
// Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm', // Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm',
// Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel', // Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel',

@ -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', field: 'bsdate',
label: '租箱业务', 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', component: 'DatePicker',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
showTime: true, allowClear: true,
valueFormat: 'YYYY-MM-DD 00:00:00',
style: 'width:100%', style: 'width:100%',
}, },
}, },
{ {
field: 'eta', field: 'accdate',
label: 'ETA', label: '会计期间',
component: 'DatePicker', component: 'MonthPicker',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
showTime: true, 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[] = [ export const formSchema: FormSchema[] = [
{ {
@ -240,7 +265,7 @@ export const formSchema: FormSchema[] = [
label: '业务类型', label: '业务类型',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 6 }, colProps: { span: 6 },
defaultValue: 102, defaultValue: 103,
dynamicDisabled: ({}) => { dynamicDisabled: ({}) => {
return true return true
}, },
@ -266,87 +291,87 @@ export const formSchema: FormSchema[] = [
}, },
}, },
{ // {
field: 'rentDirectId', // field: 'rentDirectId',
label: '租箱业务', // label: '租箱业务',
component: 'ApiSelect', // component: 'ApiSelect',
colProps: { span: 6 }, // colProps: { span: 6 },
defaultValue: 2, // defaultValue: 2,
dynamicDisabled: ({ values }) => { // dynamicDisabled: ({ values }) => {
return !!values.id // return !!values.id
}, // },
componentProps: ({ formModel, formActionType }) => { // componentProps: ({ formModel, formActionType }) => {
return { // return {
api: () => { // api: () => {
return new Promise((resolve) => { // return new Promise((resolve) => {
getDictOption('CM_RentDirect').then((res) => { // getDictOption('CM_RentDirect').then((res) => {
let data: any = [] // let data: any = []
res.forEach((item) => { // res.forEach((item) => {
item.value = parseInt(item.value) // item.value = parseInt(item.value)
if (!item.label.indexOf('租出')) { // if (!item.label.indexOf('租出')) {
data.push(item) // data.push(item)
} // }
}) // })
resolve(data) // resolve(data)
}) // })
}) // })
}, // },
labelField: 'label', // labelField: 'label',
valueField: 'value', // valueField: 'value',
resultField: 'data', // resultField: 'data',
filterOption: (input: string, option: any) => { // filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, // },
onChange: (e, obj) => { // onChange: (e, obj) => {
formActionType ? formActionType.submit() : null // formActionType ? formActionType.submit() : null
if (e && obj) { // if (e && obj) {
formModel.rentDirect = obj.label // formModel.rentDirect = obj.label
} else { // } else {
formModel.rentDirect = '' // formModel.rentDirect = ''
} // }
}, // },
} // }
}, // },
}, // },
{ // {
field: 'rentTypeId', // field: 'rentTypeId',
label: '租箱类型', // label: '租箱类型',
component: 'ApiSelect', // component: 'ApiSelect',
colProps: { span: 6 }, // colProps: { span: 6 },
defaultValue: 1, // defaultValue: 1,
dynamicDisabled: ({ values }) => { // dynamicDisabled: ({ values }) => {
return !!values.id // return !!values.id
}, // },
componentProps: ({}) => { // componentProps: ({}) => {
return { // return {
api: () => { // api: () => {
return new Promise((resolve) => { // return new Promise((resolve) => {
getDictOption('CM_RentType').then((res) => { // getDictOption('CM_RentType').then((res) => {
res.forEach((item) => { // res.forEach((item) => {
item.value = parseInt(item.value) // item.value = parseInt(item.value)
}) // })
resolve(res) // resolve(res)
}) // })
}) // })
}, // },
labelField: 'label', // labelField: 'label',
valueField: 'value', // valueField: 'value',
resultField: 'data', // resultField: 'data',
filterOption: (input: string, option: any) => { // filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, // },
} // }
}, // },
}, // },
{ // {
field: 'billState', // field: 'billState',
label: '业务状态', // label: '业务状态',
component: 'Input', // component: 'Input',
colProps: { span: 6 }, // colProps: { span: 6 },
dynamicDisabled: ({}) => { // dynamicDisabled: ({}) => {
return true // return true
}, // },
}, // },
{ {
field: 'rentCustomerId', field: 'rentCustomerId',
label: '租箱客户', label: '租箱客户',

@ -205,27 +205,52 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'etd', field: 'bsdate',
label: 'ETD', label: '业务日期',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
showTime: true, allowClear: true,
valueFormat: 'YYYY-MM-DD 00:00:00',
style: 'width:100%', style: 'width:100%',
}, },
}, },
{ {
field: 'eta', field: 'accdate',
label: 'ETA', label: '会计期间',
component: 'DatePicker', component: 'MonthPicker',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
showTime: true, 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[] = [ export const formSchema: FormSchema[] = [
{ {

@ -20,6 +20,7 @@ import {
getDeptList, getDeptList,
GetFeeCurrencySelectList, GetFeeCurrencySelectList,
GetUserList, GetUserList,
GetAllClientList,
} from '/@/api/common' } from '/@/api/common'
import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { getOrgTree } from '/@/api/system/org' import { getOrgTree } from '/@/api/system/org'
@ -546,39 +547,67 @@ export const formSchema: FormSchema[] = [
{ {
field: 'pcorpId', field: 'pcorpId',
label: '所属集团', label: '所属集团',
component: 'TreeSelect',
defaultValue: '', defaultValue: '',
component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
treeData: OrgTree, api: GetAllClientList,
allowClear: true, labelField: 'shortName',
showSearch: true, valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: (e) => { onChange: (e, obj) => {
if (e) { if (e && obj) {
const ForTree = (data, key, callback) => { formModel.pcorpId = obj.value
for (let i = 0; i < data.length; i++) { formModel.pcorpName = obj.label
if (data[i].value == key) { }
return callback(data[i], i, data) if (!e && !obj) {
} formModel.pcorpId = ''
if (data[i].children) { formModel.pcorpName = ''
ForTree(data[i].children, key, callback)
}
}
}
let obj: any = {}
ForTree(OrgTree, e, (item, index, arr) => {
obj = item
})
formModel.pcorpName = obj.title
} }
}, },
} }
}, },
}, },
// {
// 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', field: 'Divider1',
component: 'Divider', component: 'Divider',

Loading…
Cancel
Save