|
@@ -10,6 +10,10 @@
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
|
{
|
|
|
+ text: '内部转账',
|
|
|
+ action: () => openModalTwo('add'),
|
|
|
+ },
|
|
|
+ {
|
|
|
text: '导出Excel',
|
|
|
action: () => deriveExcel(),
|
|
|
},
|
|
@@ -19,10 +23,15 @@
|
|
|
},
|
|
|
]"
|
|
|
@moreSearch="moreSearch"
|
|
|
- @get-list="getList">
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
<template #amount="{ item }">
|
|
|
- <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
|
|
|
- <span style="padding-right: 4px" v-if="item.currency">{{ item.currency }}</span>
|
|
|
+ <div
|
|
|
+ :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')"
|
|
|
+ >
|
|
|
+ <span style="padding-right: 4px" v-if="item.currency">{{
|
|
|
+ item.currency
|
|
|
+ }}</span>
|
|
|
<span style="padding-right: 4px" v-else>
|
|
|
{{ accountCurrency[0].value }}
|
|
|
</span>
|
|
@@ -33,8 +42,15 @@
|
|
|
<template #contractCodes="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
<div v-if="item.contractCodes">
|
|
|
- <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
|
|
|
- <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(contract)">{{ contract }}</a>
|
|
|
+ <div
|
|
|
+ v-for="(contract, index) in item.contractCodes.split(',')"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="openDetails(contract)"
|
|
|
+ >{{ contract }}</a
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -42,11 +58,28 @@
|
|
|
</byTable>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
|
|
|
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
+ <el-dialog
|
|
|
+ :title="modalType == 'add' ? '添加流水' : '编辑流水'"
|
|
|
+ v-if="dialogVisible"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ width="600"
|
|
|
+ v-loading="loadingDialog"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.data"
|
|
|
+ :rules="rules"
|
|
|
+ ref="submit"
|
|
|
+ >
|
|
|
<template #transactionTime>
|
|
|
<div>
|
|
|
- <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formData.data.transactionTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="请选择交易时间"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #money>
|
|
@@ -54,15 +87,34 @@
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="status">
|
|
|
- <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
|
|
|
- <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-select
|
|
|
+ v-model="formData.data.status"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="changeStatus()"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in status"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="currency">
|
|
|
- <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%">
|
|
|
- <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <el-select
|
|
|
+ v-model="formData.data.currency"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in accountCurrency"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -75,7 +127,8 @@
|
|
|
style="width: 100%"
|
|
|
:precision="2"
|
|
|
:controls="false"
|
|
|
- :min="0" />
|
|
|
+ :min="0"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -85,7 +138,13 @@
|
|
|
<div>
|
|
|
<el-form-item prop="received">
|
|
|
<el-radio-group v-model="formData.data.received">
|
|
|
- <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
|
|
|
+ <el-radio
|
|
|
+ v-for="item in received"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ border
|
|
|
+ >{{ item.label }}</el-radio
|
|
|
+ >
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -93,12 +152,24 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
|
|
|
- <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
|
|
|
+ <el-dialog
|
|
|
+ title="高级检索"
|
|
|
+ v-if="openSearch"
|
|
|
+ v-model="openSearch"
|
|
|
+ width="600"
|
|
|
+ :before-close="cancelSearch"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formSearchConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="sourceList.pagination"
|
|
|
+ >
|
|
|
<template #money>
|
|
|
<div style="width: 100%">
|
|
|
<el-row :gutter="10">
|
|
@@ -110,7 +181,8 @@
|
|
|
style="width: 100%"
|
|
|
:precision="2"
|
|
|
:controls="false"
|
|
|
- :min="0" />
|
|
|
+ :min="0"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
<el-col :span="2" style="text-align: center">到</el-col>
|
|
|
<el-col :span="11">
|
|
@@ -121,7 +193,8 @@
|
|
|
style="width: 100%"
|
|
|
:precision="2"
|
|
|
:controls="false"
|
|
|
- :min="0" />
|
|
|
+ :min="0"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -135,7 +208,8 @@
|
|
|
type="datetime"
|
|
|
placeholder="请选择"
|
|
|
style="width: 100%"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
<el-col :span="2" style="text-align: center">到</el-col>
|
|
|
<el-col :span="11">
|
|
@@ -144,7 +218,8 @@
|
|
|
type="datetime"
|
|
|
placeholder="请选择"
|
|
|
style="width: 100%"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -152,7 +227,34 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="cancelSearch()" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitSearch()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :title="'内部转账'"
|
|
|
+ v-if="dialogVisibleTwo"
|
|
|
+ v-model="dialogVisibleTwo"
|
|
|
+ width="600"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfigTwo"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.dataTwo"
|
|
|
+ :rules="rulesTwo"
|
|
|
+ ref="submitTwo"
|
|
|
+ v-loading="loadingDialog"
|
|
|
+ >
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="dialogVisibleTwo = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="submitFormTwo()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -161,7 +263,9 @@
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
<el-button v-print="printObj" size="large">打印</el-button>
|
|
|
- <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="large"
|
|
|
+ >下载PDF</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -328,11 +432,15 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "此操作将永久删除该数据, 是否继续?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
proxy
|
|
|
.post("/accountRunningWater/delete", {
|
|
|
id: row.id,
|
|
@@ -370,27 +478,31 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- accountList.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.alias,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ accountList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.alias,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy.post("/accountRunningWater/page", sourceList.value.pagination).then((res) => {
|
|
|
- sourceList.value.data = res.rows;
|
|
|
- sourceList.value.pagination.total = res.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/accountRunningWater/page", sourceList.value.pagination)
|
|
|
+ .then((res) => {
|
|
|
+ sourceList.value.data = res.rows;
|
|
|
+ sourceList.value.pagination.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
getDict();
|
|
|
getList();
|
|
@@ -474,11 +586,17 @@ const formConfig = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const rules = ref({
|
|
|
- accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
|
|
|
- transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
|
|
|
+ accountManagementId: [
|
|
|
+ { required: true, message: "请选择账户", trigger: "change" },
|
|
|
+ ],
|
|
|
+ transactionTime: [
|
|
|
+ { required: true, message: "请选择交易时间", trigger: "change" },
|
|
|
+ ],
|
|
|
status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
|
|
|
currency: [{ required: true, message: "请选择币种", trigger: "change" }],
|
|
|
- received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
|
|
|
+ received: [
|
|
|
+ { required: true, message: "请选择合同是否到账", trigger: "change" },
|
|
|
+ ],
|
|
|
amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
|
|
|
// name: [{ required: true, message: "请输入账户名称", trigger: "blur" }],
|
|
|
// openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
|
|
@@ -616,7 +734,8 @@ const submitSearch = () => {
|
|
|
if (
|
|
|
sourceList.value.pagination.beginAmount &&
|
|
|
sourceList.value.pagination.endAmount &&
|
|
|
- Number(sourceList.value.pagination.beginAmount) > Number(sourceList.value.pagination.endAmount)
|
|
|
+ Number(sourceList.value.pagination.beginAmount) >
|
|
|
+ Number(sourceList.value.pagination.endAmount)
|
|
|
) {
|
|
|
return ElMessage("交易金额输入错误");
|
|
|
}
|
|
@@ -628,7 +747,7 @@ const submitSearch = () => {
|
|
|
return ElMessage("开始时间不能大于结束时间");
|
|
|
}
|
|
|
openSearch.value = false;
|
|
|
- sourceList.value.pagination.keyword = '';
|
|
|
+ sourceList.value.pagination.keyword = "";
|
|
|
sourceList.value.pagination.pageNum = 1;
|
|
|
getList();
|
|
|
};
|
|
@@ -643,12 +762,167 @@ const openDetails = (val) => {
|
|
|
const printObj = ref({
|
|
|
id: "printMe",
|
|
|
popTitle: "",
|
|
|
- extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
+ extraCss:
|
|
|
+ "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
|
|
});
|
|
|
const clickDownload = () => {
|
|
|
proxy.getPdf("外销合同PDF文件");
|
|
|
};
|
|
|
+
|
|
|
+const dialogVisibleTwo = ref(false);
|
|
|
+const submitTwo = ref(null);
|
|
|
+const formConfigTwo = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "转出信息",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "accountManagementId",
|
|
|
+ label: "转出账户",
|
|
|
+ data: accountList.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "转出币种",
|
|
|
+ prop: "currency",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ itemWidth: 50,
|
|
|
+ fn: (val) => {
|
|
|
+ formData.dataTwo.inCurrency = val;
|
|
|
+ formData.dataTwo.commissionCurrency = val;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ label: "转出金额",
|
|
|
+ prop: "amount",
|
|
|
+ itemWidth: 50,
|
|
|
+ precision: 2,
|
|
|
+ min: 0,
|
|
|
+ controls: false,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ prop: "transactionTime",
|
|
|
+ label: "转出时间",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "转入信息",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "inAccountManagementId",
|
|
|
+ label: "转入账户",
|
|
|
+ data: accountList.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "转入币种",
|
|
|
+ prop: "inCurrency",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ disabled: true,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ label: "转入金额",
|
|
|
+ prop: "inAmount",
|
|
|
+ itemWidth: 50,
|
|
|
+ precision: 2,
|
|
|
+ min: 0,
|
|
|
+ controls: false,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "其他信息",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "手续费币种",
|
|
|
+ prop: "commissionCurrency",
|
|
|
+ data: accountCurrency.value,
|
|
|
+ disabled: true,
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ label: "手续费",
|
|
|
+ prop: "commissionAmount",
|
|
|
+ itemWidth: 50,
|
|
|
+ precision: 2,
|
|
|
+ min: 0,
|
|
|
+ controls: false,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "remarks",
|
|
|
+ label: "摘要",
|
|
|
+ itemType: "textarea",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const rulesTwo = ref({
|
|
|
+ accountManagementId: [
|
|
|
+ { required: true, message: "请选择转出账户", trigger: "change" },
|
|
|
+ ],
|
|
|
+ inAccountManagementId: [
|
|
|
+ { required: true, message: "请选择转入账户", trigger: "change" },
|
|
|
+ ],
|
|
|
+ transactionTime: [
|
|
|
+ { required: true, message: "请选择转出时间", trigger: "change" },
|
|
|
+ ],
|
|
|
+ amount: [{ required: true, message: "请输入转出金额", trigger: "blur" }],
|
|
|
+ inAmount: [{ required: true, message: "请输入转入金额", trigger: "blur" }],
|
|
|
+ commissionAmount: [
|
|
|
+ { required: true, message: "请输入手续费", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ currency: [{ required: true, message: "请选择转出币种", trigger: "change" }],
|
|
|
+});
|
|
|
+const openModalTwo = () => {
|
|
|
+ modalType.value = "add";
|
|
|
+ formData.dataTwo = {
|
|
|
+ transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
|
|
|
+ currency: accountCurrency.value[0].value,
|
|
|
+ inCurrency: accountCurrency.value[0].value,
|
|
|
+ commissionCurrency: accountCurrency.value[0].value,
|
|
|
+ };
|
|
|
+ dialogVisibleTwo.value = true;
|
|
|
+};
|
|
|
+const submitFormTwo = () => {
|
|
|
+ submitTwo.value.handleSubmit(() => {
|
|
|
+ const submitData = { ...formData.dataTwo };
|
|
|
+ loadingDialog.value = true;
|
|
|
+ proxy.post("/accountRunningWater/internalTransfer", submitData).then(
|
|
|
+ () => {
|
|
|
+ ElMessage({
|
|
|
+ message: modalType.value == "add" ? "操作成功" : "编辑成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ dialogVisibleTwo.value = false;
|
|
|
+ loadingDialog.value = false;
|
|
|
+ getList();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ loadingDialog.value = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|