lijingjia 4 months ago
commit 02642a4f08

@ -54,27 +54,19 @@ export const searchFormSchema: FormSchema[] = [
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
immediate: false,
labelField: 'cnName',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
onChange: (e, obj) => {
}
}
} }
},
}, },
{ {
field: 'carrier', field: 'carrier',
@ -88,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
api: GetCarrierlist, api: GetCarrierlist,
immediate: false, immediate: false,
labelField: 'shortName', labelField: 'shortName',
valueField: 'shortName', valueField: 'id',
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
@ -140,27 +132,21 @@ export const searchFormSchema: FormSchema[] = [
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
immediate: false,
labelField: 'cnName',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { allowClear: true,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 showSearch: true,
}, labelField: 'pinYinCode',
showName: 'ediCode',
valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
}
}
} }
},
}, },
{ {
field: 'PORTDISCHARGE_COUNTRY_CODE', field: 'PORTDISCHARGE_COUNTRY_CODE',
@ -189,85 +175,85 @@ export const columns: BasicColumn[] = [
title: '订舱抬头', title: '订舱抬头',
align: 'center', align: 'center',
width: 200, width: 200,
dataIndex: 'bookinG_PARTY' dataIndex: 'bookingParty'
}, },
{ {
title: '合约号', title: '合约号',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'contracT_NO' dataIndex: 'contractNo'
}, },
{ {
title: '订舱方式', title: '订舱方式',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'bookinG_SLOT_TYPE_NAME' dataIndex: 'bookingSlotTypeName'
}, },
{ {
title: '总库存', title: '总库存',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'totaL_ORDERS' dataIndex: 'totalOrders'
}, },
{ {
title: '剩余库存', title: '剩余库存',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'remaiN_CTNS_NUM', dataIndex: 'remainCtnsNum',
}, },
{ {
title: '取消库存', title: '取消库存',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'canceL_NUM' dataIndex: 'cancelNum'
}, },
{ {
title: '收货地', title: '收货地',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'placereceipt' dataIndex: 'placeReceipt'
}, },
{ {
title: '交货地', title: '交货地',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'placedelivery' dataIndex: 'placeDelivery'
}, },
{ {
title: '装货港', title: '装货港',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'portload' dataIndex: 'portLoad'
}, },
{ {
title: '卸货港', title: '卸货港',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'portdischarge' dataIndex: 'portDischarge'
}, },
{ {
title: '卸货港国家', title: '卸货港国家',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'portdischargE_COUNTRY' dataIndex: 'portDischargeCountry'
}, },
{ {
title: '航线', title: '航线',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'lanename' dataIndex: 'laneName'
}, },
{ {
title: '箱型箱量', title: '箱型箱量',
align: 'center', align: 'center',
width: 100, width: 100,
dataIndex: 'ctN_STAT' dataIndex: 'ctnStat'
}, },
{ {
title: '剩余箱型箱量', title: '剩余箱型箱量',
align: 'center', align: 'center',
width: 110, width: 110,
dataIndex: 'remaiN_CTN_STAT' dataIndex: 'remainCtnStat'
}, },
{ {
title: 'ETD', title: 'ETD',

@ -80,14 +80,44 @@ export const searchFormSchema: FormSchema[] = [
{ {
field: 'PORTLOAD', field: 'PORTLOAD',
label: '装货港', label: '装货港',
component: 'Input', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
valueField: 'ediCode',
showName: 'ediCode',
immediate: false,
onChange: (e, obj) => {
}
}
}
}, },
{ {
field: 'PORTDISCHARGE', field: 'PORTDISCHARGE',
label: '卸货港', label: '卸货港',
component: 'Input', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
valueField: 'ediCode',
showName: 'ediCode',
immediate: false,
onChange: (e, obj) => {
}
}
}
}, },
{ {
field: 'etd', field: 'etd',
@ -126,8 +156,23 @@ export const searchFormSchema: FormSchema[] = [
{ {
field: 'CARRIER', field: 'CARRIER',
label: '船公司', label: '船公司',
component: 'Input', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {},
}
},
}, },
{ {
field: 'contractNo', field: 'contractNo',
@ -816,6 +861,7 @@ export const detialForm: FormSchema[] = [
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetCarrierlist, api: GetCarrierlist,
immediate: false,
labelField: 'shortName', labelField: 'shortName',
valueField: 'id', valueField: 'id',
resultField: 'data', resultField: 'data',
@ -971,22 +1017,12 @@ export const detialForm: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
labelField: 'cnName',
valueField: 'ediCode',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.portload = obj.portName formModel.portload = obj.portName
@ -1011,22 +1047,12 @@ export const detialForm: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
labelField: 'cnName',
valueField: 'ediCode',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.portdischarge = obj.portName formModel.portdischarge = obj.portName

@ -83,23 +83,12 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
immediate: false,
labelField: 'cnName',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
} }
}, },
}, },
@ -162,6 +151,7 @@ export const formSchema: FormSchema[] = [
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetCarrierlist, api: GetCarrierlist,
immediate: false,
labelField: 'shortName', labelField: 'shortName',
valueField: 'id', valueField: 'id',
resultField: 'data', resultField: 'data',
@ -200,22 +190,12 @@ export const formSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetClientPortSelectList,
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((item) => {
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
})
resolve(res)
})
})
},
labelField: 'cnName',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.podCode = obj.ediCode formModel.podCode = obj.ediCode
@ -225,9 +205,9 @@ export const formSchema: FormSchema[] = [
formModel.podCode = '' formModel.podCode = ''
formModel.podName = '' formModel.podName = ''
} }
},
} }
}, }
}
}, },
{ {
label: '航线港代码', label: '航线港代码',

@ -236,9 +236,9 @@ export const searchFormSchema: FormSchema[] = [
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
},
} }
} },
}
}, },
{ {
label: ' ', label: ' ',

@ -53,6 +53,7 @@ import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { getAvailableCtnsBySlot, CreateBookingOrder, GetEnableProjectDictTreeList,CreateBookingAndSlot } from './api' import { getAvailableCtnsBySlot, CreateBookingOrder, GetEnableProjectDictTreeList,CreateBookingAndSlot } from './api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { getOptions } from '/@/hooks/dict'
const { createMessage } = useMessage() const { createMessage } = useMessage()
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetControllerClientList, GetSaleUserList, GetCustomerServiceList, GetVouchingClerkList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetControllerClientList, GetSaleUserList, GetCustomerServiceList, GetVouchingClerkList } from '/@/views/operation/seaexport/api/BookingLedger'
@ -127,16 +128,17 @@ const formSchema: FormSchema[] = [
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: true,
showSearch: true,
api: () => { api: () => {
return new Promise((resolve) => { return new Promise((resolve) => {
GetControllerClientList().then((res) => { const arr = getOptions('controller')
resolve(res) resolve(arr)
})
}) })
}, },
immediate: false, labelField: 'name',
labelField: 'shortName',
valueField: 'id', valueField: 'id',
showName: 'shortName',
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

Loading…
Cancel
Save