+
{{ form.statusText }}
@@ -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,42 +979,55 @@ function changeCust(id, name) {
queryCondition: JSON.stringify(queryStr),
}
GetClientInfo({ id: id }).then(ress => {
- setFieldsValue({
- taxID: ress.data.organizationCode
- })
- GetClientBankList(data).then((res) => {
- res.data.forEach((item) => {
- item.name = item.bankName + ' ' + item.account
+ if (!route.query.id) {
+ setFieldsValue({
+ taxID: ress.data.organizationCode
})
- bankList.value = res.data
- if (res.data.length > 0) {
- setFieldsValue({
- customerBankId: res.data[0].id,
- customerBankName: res.data[0].name,
+ 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)
+ }
})
- if (res.data[0].invoiceHeaders.length > 0) {
+ if (res.data.length > 0) {
setFieldsValue({
- invoiceHeader: res.data[0].invoiceHeaders[0].header,
- customerAddTel: res.data[0].invoiceHeaders[0].addressTel
+ customerBankId: res.data[0].id,
+ customerBankName: res.data[0].name,
})
+ if (res.data[0].invoiceHeaders.length > 0) {
+ setFieldsValue({
+ invoiceHeader: res.data[0].invoiceHeaders[0].header,
+ customerAddTel: res.data[0].invoiceHeaders[0].addressTel
+ })
+ } else {
+ setFieldsValue({
+ invoiceHeaders: '',
+ customerAddTel: ''
+ })
+ }
} else {
setFieldsValue({
+ customerBankId: '',
+ customerBankName: '',
invoiceHeaders: '',
customerAddTel: ''
})
}
- } else {
- setFieldsValue({
- customerBankId: '',
- customerBankName: '',
- invoiceHeaders: '',
- customerAddTel: ''
- })
- }
- setTimeout(() => {
- resolve(true);
- }, 300)
- })
+ setTimeout(() => {
+ 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;