海运出口详情bug

szh-new
lijingjia 4 months ago
parent c2c7dba8fd
commit 2a82dd2d5e

@ -337,7 +337,6 @@
// { immediate: true, deep: true },
// )
onMounted(() => {
console.log(document.getElementsByClassName('main-tab')[0])
// tab
if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none'
})

@ -25,7 +25,7 @@ let Rtime = (type) => {
let RData = ''
const today = new Date()
const year = today.getFullYear() // 获取当前年份
const month = today.getMonth() + 1 // 获取当前月份,+1因为getMonth()返回0-11
let month = today.getMonth() + 1 // 获取当前月份,+1因为getMonth()返回0-11
const day = today.getDate() // 获取当前日期
switch (type) {
case 'Month':
@ -38,9 +38,6 @@ let Rtime = (type) => {
}
return RData
}
let ListData: any = {
goodsName: [],
}
// 装运方式字典
const FnblType = ref([])
getDictOption('bl_type').then((res) => {
@ -199,6 +196,7 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: {
valueFormat: 'YYYY-MM',
format: 'YYYY-MM'
},
},
{
@ -691,39 +689,35 @@ export const basicInfoFormSchema: FormSchema[] = [
},
{
label: '',
field: 'agent',
field: 'agentId',
component: 'Input',
show: false,
},
{
field: 'agentId',
field: 'agent',
label: '国外代理',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: ({ formActionType, formModel }) => {
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('agent')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'agent' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.agent = obj.label
} else {
formModel.agent = ''
if (e && obj) {
formModel.agentId = obj.id
}
if (!e && !obj) {
formModel.agentId = ''
}
},
}
@ -754,14 +748,15 @@ export const basicInfoFormSchema: FormSchema[] = [
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (obj) {
if (e && obj) {
formModel.truckerId = obj.id
} else {
}
if (!e && !obj) {
formModel.truckerId = ''
}
},
}
}
},
}
},
{
label: '船公司id',
@ -787,25 +782,27 @@ export const basicInfoFormSchema: FormSchema[] = [
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (e) {
if (e && obj) {
formModel.carrierId = obj.id
} else {
}
if (!e && !obj) {
formModel.carrierId = ''
}
}
}
},
}
},
{
label: '订舱代理',
field: 'forwarder',
field: 'forwarderId',
component: 'Input',
show: false,
},
{
label: '订舱代理',
field: 'forwarderId',
field: 'forwarder',
labelSlot: 'forwarderId',
component: 'ApiSelect',
required: false,
@ -814,38 +811,33 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const arr = getOptions('agentcn')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'agentcn' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.forwarder = obj.shortName
} else {
formModel.forwarder = ''
if (e && obj) {
formModel.forwarderId = obj.id
}
},
if (!e && !obj) {
formModel.forwarderId = ''
}
}
}
},
},
{
label: '船代Name',
field: 'shipAgency',
label: '船代Id',
field: 'shipAgencyId',
component: 'Input',
show: false,
},
{
label: '船代',
field: 'shipAgencyId',
field: 'shipAgency',
component: 'ApiSelect',
labelSlot: 'shipAgencyId',
required: false,
@ -854,39 +846,34 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'controller' },
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'id',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.shipAgency = obj.shortName
} else {
formModel.shipAgency = ''
if (e && obj) {
formModel.shipAgencyId = obj.id
}
},
if (!e && !obj) {
formModel.shipAgencyId = ''
}
}
}
},
}
},
{
label: '',
field: 'yard',
field: 'yardId',
component: 'Input',
show: false,
},
{
field: 'yardId',
field: 'yard',
label: '场站',
component: 'ApiSelect',
required: false,
@ -896,36 +883,32 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const arr = getOptions('yard')
resolve(arr)
})
},
labelField: 'name',
api: GetClientListByCode,
params: { code: 'yard' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
valueField: 'shortName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.yard = obj.shortName
} else {
formModel.yard = ''
if (e && obj) {
formModel.yardId = obj.id
}
},
if (!e && !obj) {
formModel.yardId = ''
}
}
}
},
}
},
{
label: '',
field: 'customser',
field: 'customserId',
component: 'Input',
show: false,
},
{
field: 'customserId',
field: 'customser',
label: '报关行',
component: 'ApiSelect',
labelSlot: 'customserId',
@ -935,26 +918,20 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'custom' },
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('custom')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.customser = obj.shortName
} else {
formModel.customser = ''
if (e && obj) {
formModel.customserId = obj.id
}
if (!e && !obj) {
formModel.customserId = ''
}
},
}
@ -1338,19 +1315,18 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'pinYinCode',
valueField: 'id',
valueField: 'ediCode',
showName: 'ediCode',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
if (e && obj) {
formModel.receiptPlace = obj.portName
} else {
}
if (!e && !obj) {
formModel.receiptPlace = ''
}
},
@ -1364,24 +1340,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
required: false,
colProps: { span: 6 },
},
// {
// field: 'financialStaffCode',
// label: '场站费自结',
// component: 'RadioGroup',
// required: false,
// dynamicDisabled: false,
// defaultValue: true,
// colProps: { span: 5 },
// componentProps: {
// options: [
// { label: '是', value: 'true' },
// { label: '否', value: 'false' },
// ],
// },
// },
{
label: '装货港代码',
field: 'loadPortId',
field: 'loadPort',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
@ -1391,30 +1352,31 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
return {
api: GetClientPortSelectList,
resultField: 'data',
// option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
labelField: 'pinYinCode',
valueField: 'ediCode',
showName: 'ediCode',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.loadPort = obj.portName
} else {
formModel.loadPort = ''
if (e && obj) {
formModel.loadPortId = obj.id
}
},
if (!e && !obj) {
formModel.loadPortId = ''
}
}
}
},
}
},
{
label: '装货港',
field: 'loadPort',
field: 'loadPortId',
component: 'Input',
required: false,
colProps: { span: 6 },
},
{
label: '中转港代码',
field: 'transPortId',
field: 'transPort',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
@ -1422,36 +1384,35 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'pinYinCode',
showName: 'ediCode',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
console.log()
if (obj) {
formModel.transPort = obj.portName
} else {
formModel.transPort = ''
if (e && obj) {
formModel.transPortId = obj.id
}
},
if (!e && !obj) {
formModel.transPortId = ''
}
}
}
},
},
{
label: '中转港',
field: 'transPort',
field: 'transPortId',
component: 'Input',
required: false,
colProps: { span: 6 },
},
{
label: '卸货港代码',
field: 'dischargePortId',
field: 'dischargePort',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
@ -1459,35 +1420,35 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'pinYinCode',
showName: 'ediCode',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.dischargePort = obj.portName
} else {
formModel.dischargePort = ''
if (e && obj) {
formModel.dischargePortId = obj.id
}
if (!e && !obj) {
formModel.dischargePortId = ''
}
}
}
},
}
},
{
label: '卸货港',
field: 'dischargePort',
field: 'dischargePortId',
component: 'Input',
required: false,
colProps: { span: 6 },
},
{
label: '目的地代码',
field: 'destinationId',
field: 'destination',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
@ -1495,20 +1456,20 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'pinYinCode',
valueField: 'id',
valueField: 'ediCode',
showName: 'ediCode',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.destination = obj.portName
} else {
formModel.destination = ''
if (e && obj) {
formModel.destinationId = obj.id
}
if (!e && !obj) {
formModel.destinationId = ''
}
},
}
@ -1516,7 +1477,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
},
{
label: '目的地',
field: 'destination',
field: 'destinationId',
component: 'Input',
required: false,
colProps: { span: 6 },
@ -2395,18 +2356,18 @@ export const cargoInfoFormSchema4: FormSchema[] = [
]
export const otherInfoFormSchema: FormSchema[] = [
{
field: 'agent',
label: 'AGENT',
component: 'InputTextArea',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
},
// {
// field: 'agent',
// label: 'AGENT',
// component: 'InputTextArea',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 8 },
// componentProps: {
// autoSize: { minRows: 3, maxRows: 3 }
// }
// },
{
field: 'bookingRemark',
label: '订舱备注',

@ -197,12 +197,20 @@
}
})
}
const today = new Date()
const year = today.getFullYear() //
let month = today.getMonth() + 1 // +1getMonth()0-11
if (month < 10) month = '0' + month
const acDate = `${year}-${month}`
setFieldsValue({
accountDate: acDate
})
})
defineExpose({
// RefbasicFrom,
getFieldsValue,
updateSchema,
validate,
validate
})
</script>
<style lang="less">

Loading…
Cancel
Save