|
|
|
@ -13,10 +13,8 @@ import {
|
|
|
|
|
GetClientSourceSelectList,
|
|
|
|
|
GetClientSourceDetailSelectList,
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
// 往来单位下拉框数据
|
|
|
|
|
const companyDict = ref([])
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
|
import { GetFeeCodeSelectList, GetFeeCurrencySelectList } from '/@/api/common'
|
|
|
|
|
import { feeUnitDict } from '/@/hooks/dict/index'
|
|
|
|
|
let businessType: any = [
|
|
|
|
|
{ value: 1, label: '海运出口' },
|
|
|
|
|
{ value: 2, label: '海运进口' },
|
|
|
|
@ -423,7 +421,7 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
|
|
|
componentProps: () => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetClientFrtSelectList,
|
|
|
|
|
allowClear: true,
|
|
|
|
@ -910,3 +908,269 @@ export const formSchema: FormSchema[] = [
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
export const detailsFormSchema: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
label: '费用名称Code',
|
|
|
|
|
field: 'feeCode',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '费用名称ID',
|
|
|
|
|
field: 'feeId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'feeName',
|
|
|
|
|
label: '费用名称',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetFeeCodeSelectList,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'name',
|
|
|
|
|
valueField: 'name',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
console.log(e, obj)
|
|
|
|
|
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.feeName = obj.label
|
|
|
|
|
formModel.feeCode = obj.code
|
|
|
|
|
formModel.feeId = obj.id
|
|
|
|
|
formModel.unit = obj.defaultUnit
|
|
|
|
|
formModel.unitText = obj.defaultUnitName
|
|
|
|
|
formModel.currency = obj.defaultCurrency
|
|
|
|
|
if (formModel.currency == 'RMB') {
|
|
|
|
|
formModel.exchangeRate = 1
|
|
|
|
|
} else {
|
|
|
|
|
formModel.exchangeRate = ''
|
|
|
|
|
}
|
|
|
|
|
formModel.taxRate = obj.taxRate
|
|
|
|
|
formModel.isInvoice = obj.isInvoice
|
|
|
|
|
formModel.isAdvancedPay = obj.isAdvancedPay
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.feeName = ''
|
|
|
|
|
formModel.feeCode = ''
|
|
|
|
|
formModel.feeId = ''
|
|
|
|
|
formModel.unit = ''
|
|
|
|
|
formModel.unitText = ''
|
|
|
|
|
formModel.currency = ''
|
|
|
|
|
formModel.exchangeRate = ''
|
|
|
|
|
formModel.taxRate = ''
|
|
|
|
|
formModel.isInvoice = ''
|
|
|
|
|
formModel.isAdvancedPay = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '客户类别',
|
|
|
|
|
field: 'customerType',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customerTypeText',
|
|
|
|
|
label: '客户类别',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: () => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
getDictOption('djy_cust_prop').then((res) => {
|
|
|
|
|
resolve(res)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'label',
|
|
|
|
|
valueField: 'value',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
console.log(e, obj)
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.customerTypeText = obj.label
|
|
|
|
|
formModel.customerType = obj.value
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.customerTypeText = ''
|
|
|
|
|
formModel.customerType = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '单位标准',
|
|
|
|
|
field: 'unit',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'unitText',
|
|
|
|
|
label: '单位标准',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: feeUnitDict,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'label',
|
|
|
|
|
valueField: 'value',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
console.log(e, obj)
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.unitText = obj.label
|
|
|
|
|
formModel.unit = obj.value
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.unitText = ''
|
|
|
|
|
formModel.unit = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'isCtn',
|
|
|
|
|
label: '是否箱型',
|
|
|
|
|
component: 'Switch',
|
|
|
|
|
componentProps: {
|
|
|
|
|
checkedChildren: '是',
|
|
|
|
|
checkedValue: true,
|
|
|
|
|
unCheckedChildren: '否',
|
|
|
|
|
unCheckedValue: false,
|
|
|
|
|
},
|
|
|
|
|
defaultValue: false,
|
|
|
|
|
colProps: {
|
|
|
|
|
span: 6,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'currency',
|
|
|
|
|
label: '币别',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 6 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetFeeCurrencySelectList,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'codeName',
|
|
|
|
|
valueField: 'codeName',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e) => {
|
|
|
|
|
if (e == 'RMB') {
|
|
|
|
|
formModel.exchangeRate = 1
|
|
|
|
|
} else {
|
|
|
|
|
formModel.exchangeRate = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'unitPrice',
|
|
|
|
|
label: '单价',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'exchangeRate',
|
|
|
|
|
label: '汇率',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'taxRate',
|
|
|
|
|
label: '税率',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'accTaxRate',
|
|
|
|
|
label: '财务税率',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tax',
|
|
|
|
|
label: '税额',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'taxUnitPrice',
|
|
|
|
|
label: '含税单价',
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'isInvoice',
|
|
|
|
|
label: '是否开票',
|
|
|
|
|
component: 'Switch',
|
|
|
|
|
componentProps: {
|
|
|
|
|
checkedChildren: '是',
|
|
|
|
|
checkedValue: true,
|
|
|
|
|
unCheckedChildren: '否',
|
|
|
|
|
unCheckedValue: false,
|
|
|
|
|
},
|
|
|
|
|
defaultValue: false,
|
|
|
|
|
colProps: {
|
|
|
|
|
span: 6,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'isAdvancedPay',
|
|
|
|
|
label: '是否垫付',
|
|
|
|
|
component: 'Switch',
|
|
|
|
|
componentProps: {
|
|
|
|
|
checkedChildren: '是',
|
|
|
|
|
checkedValue: true,
|
|
|
|
|
unCheckedChildren: '否',
|
|
|
|
|
unCheckedValue: false,
|
|
|
|
|
},
|
|
|
|
|
defaultValue: false,
|
|
|
|
|
colProps: {
|
|
|
|
|
span: 6,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|