币别代码bug

szh-new
lijingjia 5 months ago
parent 35c4070633
commit a145108480

@ -21,12 +21,6 @@ const reconciliationCategorygDict = ref([])
const costGroupingDict = ref([])
// 发票商品名称字典
const productNameDict = ref([])
// 自定义绑定参数
export const dsParams = {
defaultCreditName: '',
defaultDebitName: '',
defaultUnitName: ''
}
export const columns: BasicColumn[] = [
{
title: '费用代码',
@ -222,62 +216,90 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: () => {
componentProps: ({ formModel }) => {
return {
api: feeUnitDict,
labelField: 'name',
valueField: 'value',
resultField: 'data',
onChange: (v, obj) => {
dsParams.defaultUnitName = obj?.label || ''
formModel.defaultUnitName = obj?.label || ''
}
}
}
},
{
label: '',
field: 'defaultUnitName',
component: 'Input',
show: false
},
{
field: 'defaultDebit',
label: '默认收费客户类型',
component: 'Select',
component: 'ApiSelect',
defaultValue: '',
colProps: { span: 8 },componentProps: () => {
getDictOption('djy_cust_prop').then(data => {
customTypeDict.value = data
})
colProps: { span: 8 },
componentProps: ({ formModel }) => {
return {
options: customTypeDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
dsParams.defaultDebitName = obj?.label || ''
formModel.defaultDebitName = obj?.label || ''
}
}
}
},
{
label: '',
field: 'defaultDebitName',
component: 'Input',
show: false
},
{
field: 'defaultCredit',
label: '默认付费客户类型',
component: 'Select',
component: 'ApiSelect',
defaultValue: '',
colProps: { span: 8 },componentProps: () => {
getDictOption('djy_cust_prop').then(data => {
customTypeDict.value = data
})
colProps: { span: 8 },
componentProps: ({ formModel }) => {
return {
options: customTypeDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
dsParams.defaultCreditName = obj?.label || ''
formModel.defaultCreditName = obj?.label || ''
}
}
}
},
{
label: '',
field: 'defaultCreditName',
component: 'Input',
show: false
},
{
field: 'defaultCurrency',
label: '默认币别',
@ -296,16 +318,21 @@ export const formSchema: FormSchema[] = [
{
field: 'feeFrt',
label: '默认FRT',
component: 'Select',
component: 'ApiSelect',
defaultValue: '',
colProps: { span: 8 },componentProps: () => {
getDictOption('payment_method').then(data => {
payMethodsDict.value = data
})
colProps: { span: 8 },
componentProps: () => {
return {
options: payMethodsDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('payment_method').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
@ -327,16 +354,20 @@ export const formSchema: FormSchema[] = [
field: 'feeGroup',
label: '费用分组',
defaultValue: '',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: () => {
getDictOption('cost_grouping').then(data => {
costGroupingDict.value = data
})
return {
options: costGroupingDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('cost_grouping').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
@ -347,16 +378,20 @@ export const formSchema: FormSchema[] = [
field: 'checkingType',
label: '对账类别',
defaultValue: '',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: () => {
getDictOption('reconciliation_category').then(data => {
reconciliationCategorygDict.value = data
})
return {
options: reconciliationCategorygDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('reconciliation_category').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
@ -370,13 +405,17 @@ export const formSchema: FormSchema[] = [
component: 'Select',
colProps: { span: 8 },
componentProps: () => {
getDictOption('product_name').then(data => {
productNameDict.value = data
})
return {
options: productNameDict.value,
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
getDictOption('product_name').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}

@ -15,15 +15,18 @@
>
<!-- 表单 -->
<BasicForm @register="registerForm">
<template #checkboxs>
<a-checkbox v-model:checked="formData.isSea">是否海运</a-checkbox>
<a-checkbox v-model:checked="formData.isAir">是否空运</a-checkbox>
<a-checkbox v-model:checked="formData.isTrucking">是否陆运</a-checkbox>
<a-checkbox v-model:checked="formData.isTruckingFixed">是否陆运固定费用</a-checkbox>
<a-checkbox v-model:checked="formData.isWms">是否仓储费用</a-checkbox>
<a-checkbox v-model:checked="formData.isAdvancedPay">是否垫付费用</a-checkbox>
<a-checkbox v-model:checked="formData.isOpen">默认是否机密</a-checkbox>
<a-checkbox v-model:checked="formData.isInvoice">默认是否开票</a-checkbox>
<a-form-item-rest>
<a-checkbox v-model:checked="formData.isSea">是否海运</a-checkbox>
<a-checkbox v-model:checked="formData.isAir">是否空运</a-checkbox>
<a-checkbox v-model:checked="formData.isTrucking">是否陆运</a-checkbox>
<a-checkbox v-model:checked="formData.isTruckingFixed">是否陆运固定费用</a-checkbox>
<a-checkbox v-model:checked="formData.isWms">是否仓储费用</a-checkbox>
<a-checkbox v-model:checked="formData.isAdvancedPay">是否垫付费用</a-checkbox>
<a-checkbox v-model:checked="formData.isOpen">默认是否机密</a-checkbox>
<a-checkbox v-model:checked="formData.isInvoice">默认是否开票</a-checkbox>
</a-form-item-rest>
</template>
</BasicForm>
<!--右下角按钮-->
@ -64,7 +67,7 @@
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
//
import { formSchema, dsParams } from '../columns'
import { formSchema } from '../columns'
//
import { EditFeeCode, GetFeeCodeInfo } from '../api'
//
@ -128,7 +131,7 @@
const values = await validate()
loading.value = true
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await EditFeeCode(Object.assign(values, formData, dsParams))
const res: API.DataResult = await EditFeeCode(Object.assign(values, formData))
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)

Loading…
Cancel
Save