|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { FormSchema, BasicColumn } from '/@/components/Table'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { GetPackageSelectList, GetShippingBillTemplateSelectList, GetClientPortSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
@ -21,129 +21,171 @@ export const formSchema1: FormSchema[] = [
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'shipperContent',
|
|
|
|
|
field: 'shipperId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '发货人',
|
|
|
|
|
field: 'shipper',
|
|
|
|
|
labelSlot: 'shipper',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetShippingBillTemplateSelectList,
|
|
|
|
|
params: { type: 2, id: formModel.wtdwId },
|
|
|
|
|
labelField: 'templateName',
|
|
|
|
|
valueField: 'templateName',
|
|
|
|
|
immediate: false,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.shipperId = obj.id
|
|
|
|
|
formModel.shipperContent = obj.content
|
|
|
|
|
}
|
|
|
|
|
if (e === undefined && obj === undefined) {
|
|
|
|
|
formModel.shipperId = null
|
|
|
|
|
formModel.shipperContent = null
|
|
|
|
|
formModel.shipper = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'shipperContent',
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'shipperId',
|
|
|
|
|
field: 'consigneeId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'fhr',
|
|
|
|
|
component: 'SelectTextArea',
|
|
|
|
|
label: '收货人',
|
|
|
|
|
field: 'consignee',
|
|
|
|
|
labelSlot: 'consignee',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
label: '发货人',
|
|
|
|
|
details: formModel,
|
|
|
|
|
field: 'shipper',
|
|
|
|
|
onChange: (e) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
switch (e.type) {
|
|
|
|
|
case 'Content':
|
|
|
|
|
formModel[`shipper${e.type}`] = e.res
|
|
|
|
|
break
|
|
|
|
|
case 'Id':
|
|
|
|
|
formModel.shipperId = e.res.id
|
|
|
|
|
formModel.shipperContent = e.res.content
|
|
|
|
|
break
|
|
|
|
|
default:
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
api: GetShippingBillTemplateSelectList,
|
|
|
|
|
params: { type: 1, id: formModel.wtdwId },
|
|
|
|
|
labelField: 'templateName',
|
|
|
|
|
valueField: 'templateName',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: false,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.consigneeId = obj.id
|
|
|
|
|
formModel.consigneeContent = obj.content
|
|
|
|
|
}
|
|
|
|
|
if (e === undefined && obj === undefined) {
|
|
|
|
|
formModel.consigneeId = null
|
|
|
|
|
formModel.consignee = null
|
|
|
|
|
formModel.consigneeContent = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'consigneeContent',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'consigneeId',
|
|
|
|
|
field: 'notifyPartyId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'shr',
|
|
|
|
|
component: 'SelectTextArea',
|
|
|
|
|
label: '通知人',
|
|
|
|
|
field: 'notifyParty',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
labelSlot: 'notifyParty',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
label: '发货人',
|
|
|
|
|
details: formModel,
|
|
|
|
|
field: 'consignee',
|
|
|
|
|
onChange: (e) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
switch (e.type) {
|
|
|
|
|
case 'Content':
|
|
|
|
|
formModel[`consignee${e.type}`] = e.res
|
|
|
|
|
break
|
|
|
|
|
case 'Id':
|
|
|
|
|
formModel.consigneeId = e.res.id
|
|
|
|
|
formModel.consigneeContent = e.res.content
|
|
|
|
|
break
|
|
|
|
|
default:
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
api: GetShippingBillTemplateSelectList,
|
|
|
|
|
params: { type: 3, id: formModel.wtdwId },
|
|
|
|
|
labelField: 'templateName',
|
|
|
|
|
valueField: 'templateName',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: false,
|
|
|
|
|
alwaysLoad: false,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.notifyPartyId = obj.id
|
|
|
|
|
formModel.notifyPartyContent = obj.content
|
|
|
|
|
}
|
|
|
|
|
if (e === undefined && obj === undefined) {
|
|
|
|
|
formModel.notifyPartyId = null
|
|
|
|
|
formModel.notifyPartyContent = ''
|
|
|
|
|
formModel.notifyParty = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'notifyPartyContent',
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'notifyPartyContent',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
field: 'secondNotifyPartyContent',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'notifyPartyId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
field: 'secondNotifyParty',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tzr',
|
|
|
|
|
component: 'SelectTextArea',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'secondNotifyPartyId',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
label: '通知人',
|
|
|
|
|
details: formModel,
|
|
|
|
|
field: 'notifyParty',
|
|
|
|
|
onChange: (e) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
switch (e.type) {
|
|
|
|
|
case 'Content':
|
|
|
|
|
formModel[`notifyParty${e.type}`] = e.res
|
|
|
|
|
break
|
|
|
|
|
case 'Id':
|
|
|
|
|
formModel.notifyPartyId = e.res.id
|
|
|
|
|
formModel.notifyPartyContent = e.res.content
|
|
|
|
|
break
|
|
|
|
|
default:
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -153,15 +195,23 @@ export const formSchema2: FormSchema[] = [
|
|
|
|
|
field: 'etd',
|
|
|
|
|
label: '开船日期',
|
|
|
|
|
component: 'DatePicker',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
defaultValue: ''
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'eta',
|
|
|
|
|
label: '预抵日期',
|
|
|
|
|
component: 'DatePicker',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
defaultValue: ''
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
valueFormat: 'YYYY-MM-DD'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '船名Name',
|
|
|
|
@ -176,7 +226,7 @@ export const formSchema2: FormSchema[] = [
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
colProps: { span: 10 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetVesselSelectList'),
|
|
|
|
@ -196,252 +246,274 @@ export const formSchema2: FormSchema[] = [
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '装货港',
|
|
|
|
|
field: 'loadPortId',
|
|
|
|
|
label: '海关航次',
|
|
|
|
|
field: 'voyno',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: () => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
const data = JSON.parse(
|
|
|
|
|
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
|
|
|
|
|
)
|
|
|
|
|
data.forEach((e) => {
|
|
|
|
|
e.ediCode = `${e.portName}/${e.ediCode}`
|
|
|
|
|
})
|
|
|
|
|
resolve({ data })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
labelField: 'ediCode',
|
|
|
|
|
showName: 'portName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetVoynoSelectList'),
|
|
|
|
|
labelField: 'voyNo',
|
|
|
|
|
valueField: 'voyNo',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '装货港',
|
|
|
|
|
field: 'loadPortCode',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetClientPortSelectList,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
valueField: 'ediCode',
|
|
|
|
|
showName: 'ediCode',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.loadPortId = obj.id
|
|
|
|
|
formModel.loadPort = obj.portName
|
|
|
|
|
} else {
|
|
|
|
|
formModel.loadPort = ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.loadPortId = null
|
|
|
|
|
formModel.loadPort = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'loadPort',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 3 }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '卸货港代码',
|
|
|
|
|
field: 'dischargePortId',
|
|
|
|
|
label: '卸货港',
|
|
|
|
|
field: 'dischargePortCode',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
const data = JSON.parse(
|
|
|
|
|
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
|
|
|
|
|
)
|
|
|
|
|
data.forEach((e) => {
|
|
|
|
|
e.ediCode = `${e.portName}/${e.ediCode}`
|
|
|
|
|
})
|
|
|
|
|
resolve({ data })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
labelField: 'ediCode',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
api: GetClientPortSelectList,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
showName: 'ediCode',
|
|
|
|
|
valueField: 'ediCode',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.dischargePortId = obj.id
|
|
|
|
|
formModel.dischargePort = obj.portName
|
|
|
|
|
} else {
|
|
|
|
|
formModel.dischargePort = ''
|
|
|
|
|
// 带出交货地
|
|
|
|
|
formModel.deliveryPlaceId = obj.id
|
|
|
|
|
formModel.deliveryPlace = obj.portName
|
|
|
|
|
formModel.deliveryPlaceCode = e
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.dischargePortId = null
|
|
|
|
|
formModel.dischargePort = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'dischargePort',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '海关航次',
|
|
|
|
|
field: 'voyno',
|
|
|
|
|
label: '交货地',
|
|
|
|
|
field: 'deliveryPlaceCode',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
componentProps: () => {
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetVoynoSelectList'),
|
|
|
|
|
labelField: 'voyNo',
|
|
|
|
|
valueField: 'voyNo',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
api: GetClientPortSelectList,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
showName: 'ediCode',
|
|
|
|
|
valueField: 'ediCode',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.deliveryPlaceId = obj.id
|
|
|
|
|
formModel.deliveryPlace = obj.portName
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.deliveryPlaceId = null
|
|
|
|
|
formModel.deliveryPlace = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '目的地',
|
|
|
|
|
field: 'destinationId',
|
|
|
|
|
label: '收货地',
|
|
|
|
|
field: 'receiptPlaceCode',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
const data = JSON.parse(
|
|
|
|
|
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
|
|
|
|
|
)
|
|
|
|
|
data.forEach((e) => {
|
|
|
|
|
e.ediCode = `${e.portName}/${e.ediCode}`
|
|
|
|
|
})
|
|
|
|
|
resolve({ data })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
labelField: 'ediCode',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
api: GetClientPortSelectList,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
immediate: false,
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
valueField: 'ediCode',
|
|
|
|
|
showName: 'ediCode',
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.destination = obj.portName
|
|
|
|
|
} else {
|
|
|
|
|
formModel.destination = ''
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.receiptPlace = obj.portName
|
|
|
|
|
formModel.receiptPlaceId = obj.id
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.receiptPlace = null
|
|
|
|
|
formModel.receiptPlaceId = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'destination',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 3 }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '交货地',
|
|
|
|
|
field: 'deliveryPlaceId',
|
|
|
|
|
label: '中转港',
|
|
|
|
|
field: 'transPortCode',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetClientPortSelectList,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
const data = JSON.parse(
|
|
|
|
|
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
|
|
|
|
|
)
|
|
|
|
|
data.forEach((e) => {
|
|
|
|
|
e.ediCode = `${e.portName}/${e.ediCode}`
|
|
|
|
|
})
|
|
|
|
|
resolve({ data })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
labelField: 'ediCode',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
showName: 'ediCode',
|
|
|
|
|
valueField: 'ediCode',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.deliveryPlace = obj.portName
|
|
|
|
|
} else {
|
|
|
|
|
formModel.deliveryPlace = ''
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.transPortId = obj.id
|
|
|
|
|
formModel.transPort = obj.portName
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.transPortId = null
|
|
|
|
|
formModel.transPort = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
field: 'deliveryPlace',
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'loadPort',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.loadPort = formModel.loadPort.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '收货地',
|
|
|
|
|
field: 'receiptPlaceId',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'loadPortId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'dischargePort',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 3 },
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
const data = JSON.parse(
|
|
|
|
|
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
|
|
|
|
|
)
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
item.portName = `${item.portName}(${item.ediCode})`
|
|
|
|
|
})
|
|
|
|
|
resolve({ data })
|
|
|
|
|
})
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.dischargePort = formModel.dischargePort.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
labelField: 'portName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'dischargePortId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.receiptPlace = obj.label
|
|
|
|
|
} else {
|
|
|
|
|
formModel.receiptPlace = ''
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'deliveryPlace',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.deliveryPlace = formModel.deliveryPlace.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'deliveryPlaceId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: ' ',
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'receiptPlace',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 3 }
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.receiptPlace = formModel.receiptPlace.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'receiptPlaceId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'transPort',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.transPort = formModel.transPort.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'transPortId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -889,7 +961,8 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true
|
|
|
|
|
allowClear: true,
|
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|