lijingjia 2 weeks ago
commit 1ceec1e9dd

@ -75,7 +75,9 @@ if (res14.succeeded) {
if (e.accountName && e.id) {
rmbAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
label: `${e.bankName ? e.bankName : ''}${e.accountName ? `-${e.accountName}` : ''}${
e.bankAccountNo ? `-${e.bankAccountNo}` : ''
}`,
value: e.id,
...e,
})
@ -93,7 +95,9 @@ if (res15.succeeded) {
res15.data.forEach((e) => {
if (e.accountName && e.id) {
usdAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
label: `${e.bankName ? e.bankName : ''}${e.accountName ? `-${e.accountName}` : ''}${
e.bankAccountNo ? `-${e.bankAccountNo}` : ''
}${e.swiftCode ? `-${e.swiftCode}` : ''}`,
value: e.id,
...e,
})

@ -78,7 +78,9 @@ if (res14.succeeded) {
if (e.accountName && e.id) {
rmbAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
label: `${e.bankName ? e.bankName : ''}${e.accountName ? `-${e.accountName}` : ''}${
e.bankAccountNo ? `-${e.bankAccountNo}` : ''
}`,
value: e.id,
...e,
})
@ -96,7 +98,9 @@ if (res15.succeeded) {
res15.data.forEach((e) => {
if (e.accountName && e.id) {
usdAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}-${e.swiftCode}`,
label: `${e.bankName ? e.bankName : ''}${e.accountName ? `-${e.accountName}` : ''}${
e.bankAccountNo ? `-${e.bankAccountNo}` : ''
}${e.swiftCode ? `-${e.swiftCode}` : ''}`,
value: e.id,
...e,
})
@ -1406,7 +1410,7 @@ export const formSchema2: FormSchema[] = [
},
{
label: '进账美金SwiftCode',
field: 'usdSwiftCode',
field: 'swiftCode',
component: 'Input',
show: false,
},
@ -1430,13 +1434,13 @@ export const formSchema2: FormSchema[] = [
formModel.usdAccountId = obj.value
formModel.usdBankName = obj.bankName
formModel.usdBankAccountNo = obj.bankAccountNo
formModel.usdSwiftCode = obj.swiftCode
formModel.swiftCode = obj.swiftCode
}
if (!e && !obj) {
formModel.usdAccountId = ''
formModel.usdBankName = ''
formModel.usdBankAccountNo = ''
formModel.usdSwiftCode = ''
formModel.swiftCode = ''
}
},
}

@ -1320,7 +1320,7 @@ export const freeTableDetailColums: BasicColumn[] = [
},
{
title: '未结金额',
dataIndex: 'restAmount',
dataIndex: 'maxRestAmount',
width: 100,
},
{

@ -315,7 +315,7 @@ const onRowClick = (record, index) => {
}
PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) {
res.data.items.forEach(item=>{
res.data.items.forEach(item => {
item.maxRestAmount = item.restAmount
})
setTableData(res.data.items)
@ -407,6 +407,22 @@ function addInfos() {
})
}
if (route.query.type == 'free') {
const queryDataStr1 = JSON.parse(queryData.value.queryCondition)
const queryDataStrarr = [] as any
queryDataStr1.forEach(item => {
if (item.FieldName == 'feeType') {
queryDataStrarr.push(item)
}
if (item.FieldName == 'currency') {
queryDataStrarr.push(item)
}
if (item.FieldName == 'feeName') {
queryDataStrarr.push(item)
}
if (item.FieldName == 'FeeRange') {
queryDataStrarr.push(item)
}
})
const data = [] as any
arr.forEach(item => {
data.push({
@ -418,7 +434,11 @@ function addInfos() {
})
currenciesData.value = []
exchangarr.value = []
PaymentFreeSettlementGetExchangesAsync(data).then(res => {
const obj = {
items: data,
queryCondition: JSON.stringify(queryDataStrarr)
}
PaymentFreeSettlementGetExchangesAsync(obj).then(res => {
const cuArr = [] as any
currenciesData.value = res.data
res.data.forEach(item => {
@ -522,6 +542,11 @@ function addInfosFee() {
}
if (cuArr.length == 0) {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.restAmount
})
emits('updateListFree', list, currency.value)
}
}
@ -594,7 +619,7 @@ function handleSureExhange() {
arrQuery.push(item)
}
})
emits('updateListFreeLeft', currenciesData.value, currency.value,arrQuery)
emits('updateListFreeLeft', currenciesData.value, currency.value, arrQuery)
}
}

@ -1301,7 +1301,7 @@ export const freeTableDetailColums: BasicColumn[] = [
},
{
title: '未结金额',
dataIndex: 'restAmount',
dataIndex: 'maxRestAmount',
width: 100,
},
{

@ -315,7 +315,7 @@ const onRowClick = (record, index) => {
}
PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) {
res.data.items.forEach(item=>{
res.data.items.forEach(item => {
item.maxRestAmount = item.restAmount
})
setTableData(res.data.items)
@ -522,6 +522,11 @@ function addInfosFee() {
}
if (cuArr.length == 0) {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.restAmount
})
emits('updateListFree', list, currency.value)
}
}
@ -595,7 +600,7 @@ function handleSureExhange() {
arrQuery.push(item)
}
})
emits('updateListFreeLeft', currenciesData.value, currency.value,arrQuery)
emits('updateListFreeLeft', currenciesData.value, currency.value, arrQuery)
}
}

@ -464,7 +464,7 @@ const bottomForm = [
colProps: { span: 4 },
},
{
field: 'applyDate',
field: 'createTime',
label: '申请日期',
component: 'DatePicker',
colProps: { span: 4 },
@ -473,7 +473,6 @@ const bottomForm = [
{
label: '客户名称',
field: 'customerName',
required: true,
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
@ -637,7 +636,7 @@ const bottomFormEdit = [
colProps: { span: 4 },
},
{
field: 'applyDate',
field: 'createTime',
label: '申请日期',
component: 'DEdit',
colProps: { span: 4 },

@ -258,7 +258,6 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
},
useSearchForm: true,
showIndexColumn: false,
maxHeight: '600',
pagination: true,
rowKey: 'cindex',
id: '11',
@ -276,7 +275,6 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
columns: applyColumsDetail,
useSearchForm: false,
showIndexColumn: false,
maxHeight: '600',
pagination: false,
dataSource: dataSource.value,
striped: true,
@ -316,7 +314,6 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
},
useSearchForm: true,
showIndexColumn: false,
maxHeight: '600',
rowKey: 'cindex',
id: '33',
showTableSetting: true,
@ -336,7 +333,6 @@ const [registerTableFreeDetail, { getSelectRows: getSelectRowsFeeDetail, setProp
columns: columnsFreeDetail,
useSearchForm: false,
showIndexColumn: false,
maxHeight: '600',
pagination: false,
dataSource: freeDetailList.value,
striped: true,
@ -654,6 +650,7 @@ function handleClickFree(record, index) {
loading.value = false
})
}
const customerIdPName = ref('')
function init(data) {
if (route.query.type == 'apply') {
open.value = true
@ -665,12 +662,16 @@ function init(data) {
if (customerIdP.value) {
if (route.query.type == 'free') {
getFormFree().setFieldsValue({
customerId: customerIdP.value
customerId: customerIdP.value,
customerName: customerIdPName.value
})
} else {
console.log(customerIdP.value, customerIdPName.value)
getForm().setFieldsValue({
customerId: customerIdP.value
customerId: customerIdP.value,
customerName: customerIdPName.value
})
}
}
watch(
@ -752,18 +753,20 @@ function addDetailed(type) {
amountUSD: item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0
exchangeRate: 1
})
})
}
if (type == 'rmb') {
arr.forEach(ite => {
applications.value.push({
amountRMB: item.amountRMB,
applicationId: item.id,
currency: ite,
exchangeRate: 0
})
if (ite == 'RMB') {
applications.value.push({
amountRMB: item.amountRMB,
applicationId: item.id,
currency: ite,
exchangeRate: 1
})
}
})
}
if (type == 'usd') {
@ -772,61 +775,68 @@ function addDetailed(type) {
amountUSD: item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0
exchangeRate: 1
})
})
}
}
})
const currencySet = new Set();
const arr = [] as any
applications.value.forEach(item => {
if (item.currency != 'RMB') {
arr.push(item)
}
})
if (arr.length > 0) {
const uniqueData = arr.filter(item => {
if (!currencySet.has(item.currency)) {
currencySet.add(item.currency);
return true;
if (type != 'rmb') {
const currencySet = new Set();
const arr = [] as any
applications.value.forEach(item => {
if (item.currency != 'RMB') {
arr.push(item)
}
return false;
});
const promises = uniqueData.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: 1
})
if (arr.length > 0) {
const uniqueData = arr.filter(item => {
if (!currencySet.has(item.currency)) {
currencySet.add(item.currency);
return true;
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
return false;
});
});
return Promise.all(promises).then(() => {
applications.value.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
const promises = uniqueData.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: 1
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
applications.value.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
})
})
})
exchangeFlag.value = true
});
exchangeFlag.value = true
});
} else {
emits('updateList', applications.value)
open.value = false
exchangeFlag.value = false
}
} else {
emits('updateList', applications.value)
open.value = false
exchangeFlag.value = false
}
}
const customerIdP = ref('')
defineExpose({ init, customerIdP })
defineExpose({ init, customerIdP, customerIdPName })
</script>
<style lang="less" scoped>
.total {

@ -734,8 +734,9 @@ onMounted(() => {
}
})
function handleInto() {
applyInvoiceRef.value.init()
applyInvoiceRef.value.customerIdP = form.value.customerId
applyInvoiceRef.value.customerIdPName = form.value.customerName
applyInvoiceRef.value.init()
}
function handleSave() {
const data = {
@ -858,8 +859,9 @@ function updateListFreeLeft(val,arrQuery) {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`)
go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
@ -905,8 +907,9 @@ function handleUpdate(val) {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`)
go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
@ -940,8 +943,9 @@ function updateListFree(val) {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`)
go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
@ -1178,7 +1182,7 @@ const columns = [
const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data
if (!feeDict.value.length) feeDict.value = res
const dict = res.map((res) => {
return res.displayName
return res.name
})
process(dict)
},

Loading…
Cancel
Save