|
@@ -1,10 +1,30 @@
|
|
|
<template>
|
|
|
<div class="capitalClaim pagePadding">
|
|
|
- <div
|
|
|
- v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
|
|
|
- >
|
|
|
+ <div v-if="powers && powers.length > 0 && powers.some((item) => item == '001')">
|
|
|
<el-row :gutter="10" style="padding-bottom: 10px">
|
|
|
- <el-col :span="8" style="width: 440px">
|
|
|
+ <el-col :span="7" style="width: 145px">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="parmValue.status"
|
|
|
+ clearable
|
|
|
+ placeholder="认领状态"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in capitalFlowType"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8" style="width: 460px">
|
|
|
<el-select
|
|
|
v-model="code"
|
|
|
multiple
|
|
@@ -27,68 +47,33 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="width: 312px">
|
|
|
- <el-input :size="searchSize" v-model="input" placeholder="关键字">
|
|
|
- <el-select
|
|
|
- style="width: 103px"
|
|
|
- v-model="select"
|
|
|
- slot="prepend"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option label="资金编码" value="1"></el-option>
|
|
|
- <el-option label="付款方" value="2"></el-option>
|
|
|
- </el-select>
|
|
|
- <!-- <el-button
|
|
|
- slot="append"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="searchList"
|
|
|
- ></el-button> -->
|
|
|
- </el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :span="3" style="width: 216px" class="fr tr">
|
|
|
+
|
|
|
+ <el-col :span="4" style="width: 226px" class="fr tr">
|
|
|
<el-button
|
|
|
- v-if="powers.some((item) => item == '023')"
|
|
|
- :size="searchSize"
|
|
|
type="primary"
|
|
|
- :disabled="downLoading"
|
|
|
- @click="dlTemplate"
|
|
|
+ :size="searchSize"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="searchList"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ v-if="powers.some((item) => item == '024')"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="restSearch"
|
|
|
>
|
|
|
- 下载模板
|
|
|
+ 重置
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="powers.some((item) => item == '038')"
|
|
|
+ v-if="powers.some((item) => item == '002')"
|
|
|
:size="searchSize"
|
|
|
type="primary"
|
|
|
- @click="importshowModel = true"
|
|
|
+ @click="searchList"
|
|
|
>
|
|
|
- 导入数据
|
|
|
+ 刷新
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10" style="padding-bottom: 10px">
|
|
|
- <el-col :span="7" style="width: 138px">
|
|
|
- <el-select
|
|
|
- style="width: 100%"
|
|
|
- :size="searchSize"
|
|
|
- v-model="parmValue.status"
|
|
|
- clearable
|
|
|
- placeholder="认领状态"
|
|
|
- @change="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in capitalFlowType"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
-
|
|
|
<el-col :span="6" style="width: 302px">
|
|
|
<period-date-picker
|
|
|
:start="parmValue.start"
|
|
@@ -110,51 +95,92 @@
|
|
|
@numReturned="numReturned($event, 0)"
|
|
|
/>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="4" style="width: 226px" class="fr tr">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :size="searchSize"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="searchList"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- v-if="powers.some((item) => item == '024')"
|
|
|
- :size="searchSize"
|
|
|
- @click="restSearch"
|
|
|
- >
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-if="powers.some((item) => item == '023')"
|
|
|
+ style="width: 90px"
|
|
|
+ class="fr"
|
|
|
+ >
|
|
|
<el-button
|
|
|
- v-if="powers.some((item) => item == '002')"
|
|
|
:size="searchSize"
|
|
|
type="primary"
|
|
|
- @click="searchList"
|
|
|
+ :disabled="downLoading"
|
|
|
+ @click="dlTemplate"
|
|
|
>
|
|
|
- 刷新
|
|
|
+ 下载模板
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ style="width: 90px"
|
|
|
+ v-if="powers.some((item) => item == '038')"
|
|
|
+ class="fr"
|
|
|
+ >
|
|
|
+ <el-button :size="searchSize" type="primary" @click="importshowModel = true">
|
|
|
+ 导入数据
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row :gutter="10" style="padding-bottom: 10px">
|
|
|
+ <el-col :span="8" style="width: 470px">
|
|
|
+ <el-input :size="searchSize" v-model="input" placeholder="关键字">
|
|
|
+ <el-select
|
|
|
+ style="width: 103px"
|
|
|
+ v-model="select"
|
|
|
+ slot="prepend"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option label="资金编码" value="1"></el-option>
|
|
|
+ <el-option label="付款方" value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="searchList"
|
|
|
+ ></el-button> -->
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="4" style="width: 108px" class="fr">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ icon="el-icon-download"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="batchExport()"
|
|
|
+ >批量导出</el-button
|
|
|
+ ></el-col
|
|
|
+ >
|
|
|
+ </el-row>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
v-loading="loading"
|
|
|
+ ref="multipleTable"
|
|
|
border
|
|
|
:size="size"
|
|
|
row-key="traNo"
|
|
|
stripe
|
|
|
style="width: 100%"
|
|
|
:default-expand-all="false"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="45" show-overflow-tooltip>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="资金编号"
|
|
|
prop="traNo"
|
|
|
width="220px"
|
|
|
fixed="left"
|
|
|
+ show-overflow-tooltip
|
|
|
/>
|
|
|
|
|
|
- <el-table-column label="收入/支出" prop="trade_type" width="80px">
|
|
|
+ <el-table-column
|
|
|
+ label="收入/支出"
|
|
|
+ prop="trade_type"
|
|
|
+ width="80px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
:type="scope.row.trade_type === '0' ? 'success' : 'warning'"
|
|
@@ -164,7 +190,12 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="认领状态" prop="status" width="90px">
|
|
|
+ <el-table-column
|
|
|
+ label="认领状态"
|
|
|
+ prop="status"
|
|
|
+ width="90px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
:type="scope.row.status_type"
|
|
@@ -173,16 +204,30 @@
|
|
|
></el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="记录总金额" prop="total_fee" width="120px" />
|
|
|
- <el-table-column label="已认领金额" prop="amount" width="120px" />
|
|
|
- <el-table-column label="认领企业编码" prop="companyNo" width="130px" />
|
|
|
+ <el-table-column
|
|
|
+ label="记录总金额"
|
|
|
+ prop="total_fee"
|
|
|
+ width="120px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="已认领金额"
|
|
|
+ prop="amount"
|
|
|
+ width="120px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="认领企业编码"
|
|
|
+ prop="companyNo"
|
|
|
+ width="130px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
label="认领企业"
|
|
|
show-overflow-tooltip
|
|
|
prop="companyName"
|
|
|
min-width="170px"
|
|
|
/>
|
|
|
-
|
|
|
|
|
|
<el-table-column
|
|
|
label="对方公司"
|
|
@@ -210,8 +255,13 @@
|
|
|
width="180px"
|
|
|
/>
|
|
|
|
|
|
- <el-table-column label="交易时间" prop="trade_time" width="145px" />
|
|
|
- <el-table-column fixed="right" label="操作" width="85px">
|
|
|
+ <el-table-column
|
|
|
+ label="交易时间"
|
|
|
+ prop="trade_time"
|
|
|
+ width="145px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column fixed="right" label="操作" width="85px" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
@@ -224,7 +274,6 @@
|
|
|
scope.row.status === '6' &&
|
|
|
parseInt(scope.row.balance) !== 0)
|
|
|
"
|
|
|
-
|
|
|
effect="dark"
|
|
|
content="资金认领"
|
|
|
placement="top"
|
|
@@ -249,7 +298,6 @@
|
|
|
scope.row.logNo !== scope.row.traNo &&
|
|
|
scope.row.status === '2'
|
|
|
"
|
|
|
-
|
|
|
effect="dark"
|
|
|
content="认领审核"
|
|
|
placement="top"
|
|
@@ -276,15 +324,11 @@
|
|
|
scope.row.logNo !== scope.row.traNo &&
|
|
|
scope.row.status === '4')
|
|
|
"
|
|
|
-
|
|
|
effect="dark"
|
|
|
content="取消认领申请"
|
|
|
placement="top"
|
|
|
>
|
|
|
- <i
|
|
|
- class="el-icon-error tb-icon"
|
|
|
- @click="changeStatus(scope.row.traNo)"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-error tb-icon" @click="changeStatus(scope.row.traNo)"></i>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -337,6 +381,7 @@ import numberRange from "@/components/numberRange";
|
|
|
import { invoiceType, orderType, capitalFlowType } from "@/assets/js/linkType";
|
|
|
import { timestampToTime } from "@/utils/validate";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
+import { formatJson } from "@/utils/publicMethods";
|
|
|
export default {
|
|
|
name: "capitalClaim",
|
|
|
mixins: [mixinPage, resToken],
|
|
@@ -352,9 +397,8 @@ export default {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
powers() {
|
|
|
let tran =
|
|
|
- this.$store.getters.btnList.find(
|
|
|
- (item) => item.menu_route == "capitalClaim"
|
|
|
- ) || {};
|
|
|
+ this.$store.getters.btnList.find((item) => item.menu_route == "capitalClaim") ||
|
|
|
+ {};
|
|
|
if (tran && tran.action && tran.action.length > 0) {
|
|
|
return tran.action;
|
|
|
} else {
|
|
@@ -364,6 +408,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ multipleSelection: [],
|
|
|
select: "1",
|
|
|
sname: "",
|
|
|
stype: "",
|
|
@@ -410,6 +455,9 @@ export default {
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val;
|
|
|
+ },
|
|
|
restSearch() {
|
|
|
this.code = [];
|
|
|
// 表格 - 分页
|
|
@@ -432,6 +480,79 @@ export default {
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 批量导出
|
|
|
+ * @param {Array} selection 当前选择项
|
|
|
+ */
|
|
|
+ batchExport() {
|
|
|
+ if (!this.loading) {
|
|
|
+ if (this.multipleSelection.length == 0) {
|
|
|
+ this.$message.warning("请至少选择一条数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let selection = [];
|
|
|
+ this.multipleSelection.forEach((e) => {
|
|
|
+ selection.push(e);
|
|
|
+ if (e.children && e.children.length > 0) {
|
|
|
+ e.children.forEach((si) => {
|
|
|
+ selection.push(si);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(selection);
|
|
|
+
|
|
|
+ this.loading = true;
|
|
|
+ let data = [].concat(...selection);
|
|
|
+ let list = [];
|
|
|
+ data.forEach((item) => {
|
|
|
+ let model = Object.assign({}, item);
|
|
|
+ model.trade_type = model.trade_type === "0" ? "收入" : "支出";
|
|
|
+ list.push(model);
|
|
|
+ });
|
|
|
+ console.log(list);
|
|
|
+ const xlsName = `资金认领数据批量导出`;
|
|
|
+ import("@/vendor/Export2Excel").then((excel) => {
|
|
|
+ const tHeader = [
|
|
|
+ "资金编号",
|
|
|
+ "收入/支出",
|
|
|
+ "认领状态",
|
|
|
+ "记录总金额",
|
|
|
+ "已认领金额",
|
|
|
+ "认领企业编码",
|
|
|
+ "认领企业",
|
|
|
+ "对方公司",
|
|
|
+ "对方账号",
|
|
|
+ "付款备注",
|
|
|
+ "驳回原因",
|
|
|
+ "交易时间",
|
|
|
+ ];
|
|
|
+ const filterVal = [
|
|
|
+ "traNo",
|
|
|
+ "trade_type",
|
|
|
+ "statusName",
|
|
|
+ "total_fee",
|
|
|
+ "amount",
|
|
|
+ "companyNo",
|
|
|
+ "companyName",
|
|
|
+ "trade_out",
|
|
|
+ "trade_account",
|
|
|
+ "trade_used",
|
|
|
+ "exam_remark",
|
|
|
+ "trade_time",
|
|
|
+ ];
|
|
|
+ const data = formatJson(filterVal, list);
|
|
|
+ excel.export_json_to_excel({
|
|
|
+ header: tHeader,
|
|
|
+ data,
|
|
|
+ filename: `${xlsName}`,
|
|
|
+ });
|
|
|
+ this.$message.success("资金认领数据批量导出成功!");
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ }, 500);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 新建/编辑/详情
|
|
|
openModal(id, logNo, isDetail, exam_remark, status, trade_type) {
|
|
|
console.log(trade_type);
|
|
@@ -642,8 +763,7 @@ export default {
|
|
|
if (!this.downLoading) {
|
|
|
this.downLoading = true;
|
|
|
let elemIF = document.createElement("iframe");
|
|
|
- elemIF.src =
|
|
|
- this.fileUrl + "?time=" + timestampToTime(new Date().valueOf());
|
|
|
+ elemIF.src = this.fileUrl + "?time=" + timestampToTime(new Date().valueOf());
|
|
|
elemIF.style.display = "none";
|
|
|
document.body.appendChild(elemIF);
|
|
|
this.$message.success(`资金模板下载成功!`);
|
|
@@ -656,5 +776,4 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
-</style>
|
|
|
+<style lang="scss" scoped></style>
|