付费申请

feature-JimuReport-1106-yjl
lijingjia 4 weeks ago
parent 323fa26fb2
commit 8526e96167

@ -10,6 +10,7 @@ const optionsStore = useOptionsStore()
import { useRoute } from 'vue-router'
const route = useRoute()
import { GetClientListByCode, getOrgList, GetClientBank, GetFeeCurrencySelectList } from '/@/api/common'
import { GetOrgList, ClientCommonGetStlMode, GetClientBankList,GetOrgBankList } from '../../feeSettlement/api'
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
import { placeholderSign } from 'element-plus/es/components/table-v2/src/private'
@ -281,10 +282,7 @@ export const formSchema: FormSchema[] = [
if (e && obj) {
formModel.customerId = obj.id
}
if (!e && !obj) {
formModel.customerId = ''
}
},
}
}
}
},
@ -368,52 +366,147 @@ export const formSchema: FormSchema[] = [
{
field: 'customerBankName',
label: '客户银行',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// show: ({ values }) => {
// return values.mode=='free';
// },
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
return {
api: GetClientBank,
params: {
id: formModel.customerId
api: () => {
return new Promise((resolve) => {
console.log(formModel)
const queryStr = [
{
FieldName: 'ClientId',
FieldValue: formModel.customerId,
ConditionalType: '0',
},
]
const data = {
pageCondition: {
pageIndex: 1,
pageSize: 20,
sortConditions: [],
},
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
labelField: 'bankName',
valueField: 'id',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
labelField: 'showName',
valueField: 'bankName',
resultField: 'data',
onChange: (e, obj) => {
console.log(obj)
if (e && obj) {
formModel.customerBankId = obj.value
if (obj) {
formModel.customerBankId = obj.id
formModel.customerAccount = obj.bankAccountNo
}
if (!e && !obj) {
formModel.customerBankId = null
formModel.customerBankName = null
formModel.customerAccount = null
if (!obj && !e) {
formModel.customerBankId = ''
formModel.customerAccount = ''
}
}
}
}
},
{
field: 'customerBankId',
label: '',
component: 'Input',
show: false
field: 'customerAccount',
label: '客户账号',
// show: ({ values }) => {
// return values.mode=='free';
// },
colProps: { span: 4 },
dynamicDisabled:true,
component: 'Input'
},
{
field: 'customerAccount',
label: '银行账号',
component: 'Input',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }
field: 'orgBankName',
label: '收款账号',
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
GetOrgBankList().then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'showName',
valueField: 'showName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.orgBankId = obj.id
}
if (!obj && !e) {
formModel.orgBankId = ''
}
},
}
},
},
// {
// field: 'customerBankName',
// label: '客户银行',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetClientBank,
// params: {
// id: formModel.customerId
// },
// labelField: 'bankName',
// valueField: 'id',
// resultField: 'data',
// immediate: false,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// console.log(obj)
// if (e && obj) {
// formModel.customerBankId = obj.value
// formModel.customerAccount = obj.bankAccountNo
// }
// if (!e && !obj) {
// formModel.customerBankId = null
// formModel.customerBankName = null
// formModel.customerAccount = null
// }
// }
// }
// }
// },
// {
// field: 'customerBankId',
// label: '',
// component: 'Input',
// show: false
// },
// {
// field: 'customerAccount',
// label: '银行账号',
// component: 'Input',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 }
// },
{
field: 'relativeNO',
label: '相关号码',
@ -478,7 +571,6 @@ export const formSchema: FormSchema[] = [
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
showTime: true,
allowClear: true,
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD'

@ -253,8 +253,7 @@
const addInfos = async (type) => {
const selectRows = getSelectRows()
//
const currency = props.formData.currency
console.log(currency)
const currency = getFieldsValue().currency
if (selectRows.length == 0) {
return createMessage.warning('没有选择要添加的业务!')
}
@ -280,11 +279,10 @@
loading.value = false
})
} else {
return
//
props.setFieldsValue({
currency
})
// props.setFieldsValue({
// currency
// })
//
let currencyList = []
//
@ -294,10 +292,10 @@
customerId: item.customerId
}
})
console.log(postCurrency)
const items = await GetExchanges(postCurrency).then(res => {
return res.data
})
console.log(items)
items.forEach(item => {
if (item.exchangeRates) {
item.exchangeRates.forEach(c => {

@ -147,10 +147,9 @@
const applyInfo = ref(null)
//
const save = async () => {
const settlement = await validate()
const postData = {
description: '按申请单增加添加费用明细',
settlement,
settlement: getFieldsValue(),
documents: applyInfo.value.getSelectRows()
}
loading.value = true
@ -168,20 +167,22 @@
//
const init = () => {
id.value = route.query.id || getFieldsValue().id
console.log(id.value)
if (id.value) {
//
Get({ id: id.value }).then(res => {
if (res.succeeded) {
setFieldsValue({
...res.data
})
feeData.value = res.data.settlementDetails
}
setFieldsValue({
...res.data
})
feeData.value = res.data.settlementDetails
})
} else {
//
visible.value = true
const type = route.query.type
// mode
setFieldsValue({
mode: type
})
}
}
onMounted(() => {

@ -22,11 +22,11 @@
class="action-divider"
/>
<div style="padding-top: 8px;">
<a-button type="link" @click="create('free')">
<a-button type="link" @click="create('3')">
<span class="iconfont icon-lirun"></span>
新建自由结算
</a-button>
<a-button type="link" @click="create('apply')">
<a-button type="link" @click="create('1')">
<span class="iconfont icon-shenpi-pizhun"></span>
新建申请结算
</a-button>

Loading…
Cancel
Save