|
|
|
@ -15,23 +15,24 @@ import {
|
|
|
|
|
GetAgentCnClientList,
|
|
|
|
|
GetClientPortSelectList,
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger.js'
|
|
|
|
|
import { GetClientListByCode } from '/@/api/common'
|
|
|
|
|
import { GetClientListByCode, GetSupplierListByCode } from '/@/api/common'
|
|
|
|
|
import { billTypeData } from '/@/views/operation/CustomerReconciliation/detail/detailColumns'
|
|
|
|
|
export const TFData = [
|
|
|
|
|
{ value: true, label: '是' },
|
|
|
|
|
{ value: false, label: '否' },
|
|
|
|
|
]
|
|
|
|
|
export const RQueryArr = [
|
|
|
|
|
'customerId',
|
|
|
|
|
'createTime',
|
|
|
|
|
'billType',
|
|
|
|
|
// 'customerId',
|
|
|
|
|
'isDebit',
|
|
|
|
|
'stlName',
|
|
|
|
|
'currency',
|
|
|
|
|
'feeName',
|
|
|
|
|
'forwarderId',
|
|
|
|
|
'dischargePortId',
|
|
|
|
|
'loadPortId',
|
|
|
|
|
'currency',
|
|
|
|
|
// 'createTime',
|
|
|
|
|
// // 'billType',
|
|
|
|
|
// 'isDebit',
|
|
|
|
|
// 'stlName',
|
|
|
|
|
// 'forwarderId',
|
|
|
|
|
// // 'dischargePortId',
|
|
|
|
|
// // 'loadPortId',
|
|
|
|
|
]
|
|
|
|
|
// 表单
|
|
|
|
|
export const schemas: FormSchema[] = [
|
|
|
|
@ -90,13 +91,13 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customNo',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
label: '编号检索',
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field: 'customNo',
|
|
|
|
|
// component: 'Input',
|
|
|
|
|
// label: '编号检索',
|
|
|
|
|
// dynamicDisabled: false,
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field: 'etd',
|
|
|
|
|
label: '业务日期',
|
|
|
|
@ -139,26 +140,26 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
options: TFData,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '结算方式',
|
|
|
|
|
field: 'stlName',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: () => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetClientStlModeSelectList,
|
|
|
|
|
immediate: true,
|
|
|
|
|
labelField: 'stlName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label: '结算方式',
|
|
|
|
|
// field: 'stlName',
|
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: false,
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: () => {
|
|
|
|
|
// return {
|
|
|
|
|
// api: GetClientStlModeSelectList,
|
|
|
|
|
// immediate: true,
|
|
|
|
|
// labelField: 'stlName',
|
|
|
|
|
// valueField: 'id',
|
|
|
|
|
// resultField: 'data',
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label: '币别',
|
|
|
|
|
field: 'currency',
|
|
|
|
@ -199,7 +200,7 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
immediate: true,
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
valueField: 'name',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
// mode: 'multiple',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
@ -208,26 +209,26 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'isSeaFreight',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
label: '是否海运费',
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
options: TFData,
|
|
|
|
|
onchange: (e) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
formModel.feeName = '海运费'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field: 'isSeaFreight',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// label: '是否海运费',
|
|
|
|
|
// dynamicDisabled: false,
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: ({ formModel }) => {
|
|
|
|
|
// return {
|
|
|
|
|
// options: TFData,
|
|
|
|
|
// onchange: (e) => {
|
|
|
|
|
// if (e) {
|
|
|
|
|
// formModel.feeName = '海运费'
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label: '船名',
|
|
|
|
|
field: 'vessel',
|
|
|
|
|
field: 'vesselId',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
@ -256,42 +257,43 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
api: GetVoynoSelectList,
|
|
|
|
|
immediate: true,
|
|
|
|
|
labelField: 'voyNo',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '国外代理',
|
|
|
|
|
field: 'forwarderId',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetAgentCnClientList,
|
|
|
|
|
labelField: 'shortName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
valueField: 'voyNo',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e) {
|
|
|
|
|
formModel.forwarder = obj.label
|
|
|
|
|
} else {
|
|
|
|
|
formModel.forwarder = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label: '国外代理',
|
|
|
|
|
// field: 'forwarderId',
|
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: false,
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: ({ formModel }) => {
|
|
|
|
|
// return {
|
|
|
|
|
// api: GetSupplierListByCode,
|
|
|
|
|
// params: { code: 'agent' },
|
|
|
|
|
// labelField: 'shortName',
|
|
|
|
|
// valueField: 'id',
|
|
|
|
|
// resultField: 'data',
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: (e, obj) => {
|
|
|
|
|
// if (e) {
|
|
|
|
|
// formModel.forwarder = obj.label
|
|
|
|
|
// } else {
|
|
|
|
|
// formModel.forwarder = ''
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label: '港口(国外)',
|
|
|
|
|
label: '卸货港',
|
|
|
|
|
field: 'dischargePortId',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
@ -303,7 +305,8 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
GetClientPortSelectList().then((res) => {
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
|
|
|
|
|
if (item.ediCode)
|
|
|
|
|
item.cnName = item.ediCode + '/' + item.cnName + '/' + item.portName
|
|
|
|
|
})
|
|
|
|
|
resolve(res)
|
|
|
|
|
})
|
|
|
|
@ -320,7 +323,7 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '港口(国内)',
|
|
|
|
|
label: '装货港',
|
|
|
|
|
field: 'loadPortId',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
@ -332,7 +335,8 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
GetClientPortSelectList().then((res) => {
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
|
|
|
|
|
if (item.ediCode)
|
|
|
|
|
item.cnName = item.ediCode + '/' + item.cnName + '/' + item.portName
|
|
|
|
|
})
|
|
|
|
|
resolve(res)
|
|
|
|
|
})
|
|
|
|
|