|
@@ -17,7 +17,7 @@
|
|
|
text: '添加借款',
|
|
|
action: () => addloan(),
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
text: '添加流水',
|
|
|
action: () => openModal('add'),
|
|
@@ -293,8 +293,7 @@
|
|
|
<template #loanUserName>
|
|
|
<div style="width: 100%">
|
|
|
<el-autocomplete
|
|
|
- v-model="formData.loanData.loanUserName"
|
|
|
- value-key="loanUserName"
|
|
|
+ v-model="formData.data.loanUserName"
|
|
|
:fetch-suggestions="querySearch"
|
|
|
:disabled="submitType == 'edit'"
|
|
|
clearable
|
|
@@ -319,7 +318,7 @@
|
|
|
</el-dialog>
|
|
|
<!-- 结汇 -->
|
|
|
<el-dialog
|
|
|
- title="结汇"
|
|
|
+ title="结汇"
|
|
|
v-if="settlementModal"
|
|
|
v-model="settlementModal"
|
|
|
width="600"
|
|
@@ -334,7 +333,9 @@
|
|
|
>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
- <el-button @click="settlementModal = false" size="large">取 消</el-button>
|
|
|
+ <el-button @click="settlementModal = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
<el-button type="primary" @click="settlementSubmitForm()" size="large"
|
|
|
>确 定</el-button
|
|
|
>
|
|
@@ -396,21 +397,21 @@ const sourceList = ref({
|
|
|
});
|
|
|
|
|
|
//结汇
|
|
|
-const contractList2 = ref([])
|
|
|
+const contractList2 = ref([]);
|
|
|
const settlementModal = ref(false);
|
|
|
const openSettlementModal = (type, row) => {
|
|
|
- formData3.data = {
|
|
|
- accountManagementId:null,
|
|
|
- amount:null,
|
|
|
- currency:null,
|
|
|
- inAccountManagementId:null,
|
|
|
- inAmount:null,
|
|
|
- inCurrency:"CNY",
|
|
|
- rate:null,
|
|
|
- commissionAmount:null,
|
|
|
- commissionCurrency:null,
|
|
|
- remarks:null,
|
|
|
- businessId:null,
|
|
|
+ formData3.data = {
|
|
|
+ accountManagementId: null,
|
|
|
+ amount: null,
|
|
|
+ currency: null,
|
|
|
+ inAccountManagementId: null,
|
|
|
+ inAmount: null,
|
|
|
+ inCurrency: "CNY",
|
|
|
+ rate: null,
|
|
|
+ commissionAmount: null,
|
|
|
+ commissionCurrency: null,
|
|
|
+ remarks: null,
|
|
|
+ businessId: null,
|
|
|
};
|
|
|
settlementModal.value = true;
|
|
|
};
|
|
@@ -440,7 +441,7 @@ const rules3 = ref({
|
|
|
received: [
|
|
|
{ required: true, message: "请选择合同是否到账", trigger: "change" },
|
|
|
],
|
|
|
- amount:[
|
|
|
+ amount: [
|
|
|
{ required: true, message: "请输入金额和选择币种", trigger: "blur" },
|
|
|
{ required: true, validator: validatePass4, trigger: "blur" },
|
|
|
],
|
|
@@ -451,42 +452,43 @@ const rules3 = ref({
|
|
|
{ required: true, message: "请输入金额和选择币种", trigger: "blur" },
|
|
|
{ required: true, validator: validatePass3, trigger: "blur" },
|
|
|
],
|
|
|
- businessId:[
|
|
|
- { required: true, message: "请选择合同", trigger: "change" },
|
|
|
- ],
|
|
|
+ businessId: [{ required: true, message: "请选择合同", trigger: "change" }],
|
|
|
});
|
|
|
|
|
|
const formData3 = reactive({
|
|
|
data: {
|
|
|
- accountManagementId:null,
|
|
|
- amount:null,
|
|
|
- currency:null,
|
|
|
- inAccountManagementId:null,
|
|
|
- inAmount:null,
|
|
|
- inCurrency:"CNY",
|
|
|
- rate:null,
|
|
|
- commissionAmount:null,
|
|
|
- commissionCurrency:null,
|
|
|
- remarks:null,
|
|
|
- businessId:null,
|
|
|
+ accountManagementId: null,
|
|
|
+ amount: null,
|
|
|
+ currency: null,
|
|
|
+ inAccountManagementId: null,
|
|
|
+ inAmount: null,
|
|
|
+ inCurrency: "CNY",
|
|
|
+ rate: null,
|
|
|
+ commissionAmount: null,
|
|
|
+ commissionCurrency: null,
|
|
|
+ remarks: null,
|
|
|
+ businessId: null,
|
|
|
},
|
|
|
});
|
|
|
const submit3 = ref(null);
|
|
|
const settlementSubmitForm = () => {
|
|
|
submit3.value.handleSubmit(() => {
|
|
|
//汇出汇入账号不能相同
|
|
|
- if(formData3.data.accountManagementId === formData3.data.inAccountManagementId) {
|
|
|
+ if (
|
|
|
+ formData3.data.accountManagementId ===
|
|
|
+ formData3.data.inAccountManagementId
|
|
|
+ ) {
|
|
|
ElMessage({
|
|
|
- message:"汇出汇入账号不能相同",
|
|
|
+ message: "汇出汇入账号不能相同",
|
|
|
type: "error",
|
|
|
});
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
loadingDialog.value = true;
|
|
|
proxy.post("/accountRunningWater/exchangeSettlement", formData3.data).then(
|
|
|
() => {
|
|
|
ElMessage({
|
|
|
- message:"结汇成功",
|
|
|
+ message: "结汇成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
settlementModal.value = false;
|
|
@@ -522,7 +524,7 @@ const settlementFormConfig = computed(() => {
|
|
|
selectPlaceholder: "币种",
|
|
|
selectProp: "currency",
|
|
|
fn: (value) => {
|
|
|
- console.log(formData3.data)
|
|
|
+ console.log(formData3.data);
|
|
|
//判断value的类型
|
|
|
if (isNaN(value)) {
|
|
|
formData3.data.commissionCurrency = formData3.data.currency;
|
|
@@ -536,8 +538,10 @@ const settlementFormConfig = computed(() => {
|
|
|
}
|
|
|
formData3.data.inAmount = formData3.data.amount;
|
|
|
}
|
|
|
- if(formData3.data.amount && formData3.data.inAmount) {
|
|
|
- formData3.data.rate = (formData3.data.inAmount / formData3.data.amount).toFixed(4)
|
|
|
+ if (formData3.data.amount && formData3.data.inAmount) {
|
|
|
+ formData3.data.rate = (
|
|
|
+ formData3.data.inAmount / formData3.data.amount
|
|
|
+ ).toFixed(4);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -555,13 +559,12 @@ const settlementFormConfig = computed(() => {
|
|
|
data: accountCurrency.value,
|
|
|
placeholder: "请输入",
|
|
|
selectPlaceholder: "币种",
|
|
|
- selectDisabled:true,
|
|
|
+ selectDisabled: true,
|
|
|
selectProp: "inCurrency",
|
|
|
fn: (value) => {
|
|
|
//判断value的类型
|
|
|
if (isNaN(value)) {
|
|
|
formData2.data.commissionCurrency = formData2.data.currency;
|
|
|
-
|
|
|
} else {
|
|
|
if (value != "") {
|
|
|
if (value.indexOf(".") > -1) {
|
|
@@ -572,8 +575,10 @@ const settlementFormConfig = computed(() => {
|
|
|
}
|
|
|
formData2.data.inAmount = formData2.data.amount;
|
|
|
}
|
|
|
- if(formData3.data.amount && formData3.data.inAmount) {
|
|
|
- formData3.data.rate = (formData3.data.inAmount / formData3.data.amount).toFixed(4)
|
|
|
+ if (formData3.data.amount && formData3.data.inAmount) {
|
|
|
+ formData3.data.rate = (
|
|
|
+ formData3.data.inAmount / formData3.data.amount
|
|
|
+ ).toFixed(4);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -609,14 +614,12 @@ const settlementFormConfig = computed(() => {
|
|
|
type: "select",
|
|
|
prop: "businessId",
|
|
|
label: "选择合同",
|
|
|
- filterable:true,
|
|
|
+ filterable: true,
|
|
|
data: contractList2.value,
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
const loading = ref(false);
|
|
|
const selectConfig = computed(() => {
|
|
|
return [
|
|
@@ -775,7 +778,11 @@ const getDict = () => {
|
|
|
}
|
|
|
});
|
|
|
proxy
|
|
|
- .post("/contract/page1", { pageNum: 1, pageSize: 9999, isExchangeSettlement: 0 })
|
|
|
+ .post("/contract/page1", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ isExchangeSettlement: 0,
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
contractList2.value = res.rows.map((item) => {
|
|
|
return {
|
|
@@ -1556,28 +1563,27 @@ const openLoanDialog = ref(false);
|
|
|
const byform = ref(null);
|
|
|
const submitLoading = ref(false);
|
|
|
const submitType = ref("add");
|
|
|
-const historyData = ref([]);
|
|
|
const addloan = () => {
|
|
|
- proxy.get("/loanInfo/getLoanUserList").then((res) => {
|
|
|
- historyData.value = res.data;
|
|
|
- });
|
|
|
formData.loanData = {};
|
|
|
openLoanDialog.value = true;
|
|
|
};
|
|
|
|
|
|
-const querySearch = (queryString, cb) => {
|
|
|
- const results = queryString
|
|
|
- ? historyData.value.filter(createFilter(queryString))
|
|
|
- : historyData.value;
|
|
|
- cb(results);
|
|
|
-};
|
|
|
-
|
|
|
-const createFilter = (queryString) => {
|
|
|
- return (restaurant) => {
|
|
|
- return (
|
|
|
- restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
|
|
- );
|
|
|
- };
|
|
|
+const querySearch = (queryString, callback) => {
|
|
|
+ proxy
|
|
|
+ .post("/loanInfo/getLoanUserList", { keyword: queryString })
|
|
|
+ .then((res) => {
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ res = res.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ value: item.loanUserName,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ callback(res);
|
|
|
+ } else {
|
|
|
+ callback([]);
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const handleSubmitLoan = () => {
|