szh-new
sunzehua 2 months ago
parent f3efa5077e
commit f074bde479

@ -35,7 +35,6 @@
"dependencies": {
"@ant-design/colors": "^6.0.0",
"@ant-design/icons-vue": "^6.1.0",
"@element-plus/icons-vue": "^2.3.1",
"@handsontable/vue3": "^14.5.0",
"@iconify/iconify": "^2.2.1",
"@logicflow/core": "^1.1.13",

@ -429,6 +429,9 @@ function onSelectAmount() {
applyAmount: item.applyAmount ? Number(item.applyAmount).toFixed(2) : 0
})
})
amountArr.value.forEach(item=>{
item.applyAmount = Number(item.applyAmount)
})
amountArr.value = mergeByCurrency(amountArr.value)
}
//
@ -436,9 +439,10 @@ function mergeByCurrency(arr) {
const result = {};
arr.forEach(item => {
if (result[item.currency]) {
result[item.currency].applyAmount += item.applyAmount;
result[item.currency].applyAmount += item.applyAmount ;
result[item.currency].applyAmount = Number(result[item.currency].applyAmount.toFixed(2))
} else {
result[item.currency] = { currency: item.currency, applyAmount: item.applyAmount };
result[item.currency] = { currency: item.currency, applyAmount: Number(item.applyAmount.toFixed(2)) };
}
});
return Object.values(result);

@ -4,6 +4,10 @@
<div>
<span style="font-size: 12px;font-weight: bold;margin-right:20px ">发票明细</span>
<a-button type="link" @click="open">
<span class="iconfont icon-jia"></span>
引用发票明细
</a-button>
<a-button type="link" @click="add">
<span class="iconfont icon-jia"></span>
添加发票明细
</a-button>

@ -19,14 +19,14 @@
<img src="../../../../assets/svg/infoclient/baocun.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<!-- <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>打印</span>
</template>
<span class="ds-action-svg-btn" @click="handleSave">
<img src="../../../../assets/svg/infoclient/dayin.svg" class="SvgImg" />
</span>
</a-tooltip>
</a-tooltip> -->
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>提交审核</span>
@ -63,7 +63,7 @@
</a-menu>
</template>
</a-dropdown>
<div class="status">
<div class="status" >
<i class="icon-chenggong iconfont" style="font-size: 14px"></i>
{{ form.statusText }}
</div>
@ -275,7 +275,7 @@ const bankForm = [
},
{
field: 'customerBankName',
label: 'RMB开户行账号',
label: 'RMB开户行/账号',
colProps: { span: 24 },
component: 'Select',
componentProps: ({ formModel }) => {
@ -310,7 +310,7 @@ const bankForm = [
component: 'Select',
componentProps: ({ formModel }) => {
return {
options: bankList.value,
options: bankListUsd.value,
fieldNames: {
label: 'name',
value: 'name',
@ -489,11 +489,18 @@ const bottomForm = [
},
queryCondition: JSON.stringify(queryStr),
}
bankList.value = []
bankListUsd.value = []
GetClientBankList(data).then((res) => {
res.data.forEach((item) => {
item.name = item.bankName + ' ' + item.account
if (item.currency == 'RMB') {
bankList.value.push(item)
}
if (item.currency == 'USD') {
bankListUsd.value.push(item)
}
})
bankList.value = res.data
if (res.data.length > 0) {
setFieldsValue({
customerBankId: res.data[0].id,
@ -530,6 +537,7 @@ const bottomForm = [
}
if (!obj && !e) {
bankList.value = []
bankListUsd.value = []
formModel.customer = {}
formModel.customerId = ''
}
@ -899,6 +907,7 @@ function getDetail() {
applyAmount: item.amount
})
})
amountArr.value = mergeByCurrency(amountArr.value)
}
feeTableRef.value.init(res.data)
}
@ -913,7 +922,10 @@ function openTempName() {
})
})
}
const bankListUsd = ref([])
function getBankInfo(customerId) {
bankList.value = []
bankListUsd.value = []
const queryStr = [
{
FieldName: 'ClientId',
@ -932,8 +944,13 @@ function getBankInfo(customerId) {
GetClientBankList(data).then((res) => {
res.data.forEach((item) => {
item.name = item.bankName + ' ' + item.account
if (item.currency == 'RMB') {
bankList.value.push(item)
}
if (item.currency == 'USD') {
bankListUsd.value.push(item)
}
})
bankList.value = res.data
})
}
@ -962,14 +979,22 @@ function changeCust(id, name) {
queryCondition: JSON.stringify(queryStr),
}
GetClientInfo({ id: id }).then(ress => {
if (!route.query.id) {
setFieldsValue({
taxID: ress.data.organizationCode
})
bankList.value = []
bankListUsd.value = []
GetClientBankList(data).then((res) => {
res.data.forEach((item) => {
item.name = item.bankName + ' ' + item.account
if (item.currency == 'RMB') {
bankList.value.push(item)
}
if (item.currency == 'USD') {
bankListUsd.value.push(item)
}
})
bankList.value = res.data
if (res.data.length > 0) {
setFieldsValue({
customerBankId: res.data[0].id,
@ -998,6 +1023,11 @@ function changeCust(id, name) {
resolve(true);
}, 300)
})
} else {
resolve(true);
}
})
});
}
@ -1036,8 +1066,6 @@ function updateListSave(arr, type) {
loading.value = false
})
})
}
//
function addLeftSave(arr, query, exchang, type) {
@ -1109,6 +1137,18 @@ function handleRender() {
}
})
}
function mergeByCurrency(arr) {
const result = {};
arr.forEach(item => {
if (result[item.currency]) {
result[item.currency].applyAmount += item.applyAmount ;
result[item.currency].applyAmount = Number(result[item.currency].applyAmount.toFixed(2))
} else {
result[item.currency] = { currency: item.currency, applyAmount: Number(item.applyAmount.toFixed(2)) };
}
});
return Object.values(result);
}
const tempName = ref('')
const tempId = ref('')
const querySearch = (queryString: string, cb: any) => {
@ -1177,6 +1217,15 @@ function handleSelect(value) {
margin-left: 15px;
}
.status1 {
color: #d6d30c;
font-size: 12px;
padding-right: 15px;
border-right: 1px solid #ccc;
margin-left: 15px;
}
.invoiceNo {
color: #297cfa;
margin-left: 15px;

Loading…
Cancel
Save