|
@@ -22,13 +22,43 @@
|
|
|
type="primary"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-hasPermi="['proxyscore:index:exportExcel']"
|
|
|
+ class="ml20"
|
|
|
+ @click="exportExcel"
|
|
|
+ >导出excel</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-hasPermi="['proxyscore:index:balance']"
|
|
|
+ class="ml20"
|
|
|
+ @click="balanceSelectedScore"
|
|
|
+ type="primary"
|
|
|
+ >批量结算积分</el-button
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ v-hasPermi="['proxyscore:index:balance']"
|
|
|
+ class="ml20"
|
|
|
+ @click="exportExcelBalance"
|
|
|
+ type="primary"
|
|
|
+ >导出和全部结算</el-button
|
|
|
+ >
|
|
|
|
|
|
<span class="pl20 font14" :underline="false"
|
|
|
>总积分 {{ allProxySCore }}</span
|
|
|
>
|
|
|
</div>
|
|
|
<div class="pl20 pr20">
|
|
|
- <el-table :data="tableData">
|
|
|
+ <el-table
|
|
|
+ @selection-change="
|
|
|
+ (selection) => {
|
|
|
+ tableDataSelection = selection;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :data="tableData"
|
|
|
+ >
|
|
|
+ <el-table-column label="微信名" type="selection"></el-table-column>
|
|
|
<el-table-column label="微信名" prop="nickName"></el-table-column>
|
|
|
<el-table-column label="微信头像" prop="extensionCount">
|
|
|
<template slot-scope="scope">
|
|
@@ -74,6 +104,15 @@
|
|
|
label="消费金额"
|
|
|
prop="costCount"
|
|
|
></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="结算积分">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link @click="balanceSingleScore(scope.row)" type="primary"
|
|
|
+ >结算</el-link
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<!-- achievement -->
|
|
|
</el-table>
|
|
|
</div>
|
|
@@ -183,11 +222,11 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
proxySchoolList: [],
|
|
|
+ tableDataSelection: [],
|
|
|
ProxySchoolSelected: "",
|
|
|
tableData: [],
|
|
|
subTableVisible: false,
|
|
|
subTableData: [],
|
|
|
-
|
|
|
sub1TableVisible: false,
|
|
|
sub1TableData: [],
|
|
|
};
|
|
@@ -203,6 +242,92 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ exportExcelBalance() {
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ this.$confirm("是否导出当前全部代理的数据并且结算?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(function () {
|
|
|
+ that.$message.success("正在处理中,请稍等");
|
|
|
+ return proxyscoreApi.extensionIncomeExport({
|
|
|
+ openid: that.ProxySchoolSelected,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.download(response.data);
|
|
|
+ let ids = this.tableData.map((item) => {
|
|
|
+ return item.id;
|
|
|
+ });
|
|
|
+ proxyscoreApi
|
|
|
+ .extensionIncomeExtensionIncomePriceIds(ids.join(","))
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("成功");
|
|
|
+ this.getPage(this.ProxySchoolSelected);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ exportExcel() {
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ this.$confirm("是否导出当前全部代理的数据?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(function () {
|
|
|
+ that.$message.success("正在导出中,请稍等");
|
|
|
+ return proxyscoreApi.extensionIncomeExport({
|
|
|
+ openid: that.ProxySchoolSelected,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.download(response.data);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ balanceSingleScore(item) {
|
|
|
+ this.$confirm("是否结算当前积分?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ proxyscoreApi
|
|
|
+ .extensionIncomeExtensionIncomePriceIds(item.id || 0)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("成功");
|
|
|
+ this.getPage(this.ProxySchoolSelected);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ balanceSelectedScore() {
|
|
|
+ this.$confirm("是否结算当前选中的积分?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ if (
|
|
|
+ Array.isArray(this.tableDataSelection) &&
|
|
|
+ this.tableDataSelection.length > 0
|
|
|
+ ) {
|
|
|
+ let ids = this.tableDataSelection.map((item) => {
|
|
|
+ return item.id;
|
|
|
+ });
|
|
|
+
|
|
|
+ proxyscoreApi
|
|
|
+ .extensionIncomeExtensionIncomePriceIds(ids.join(","))
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("成功");
|
|
|
+ this.tableDataSelection = [];
|
|
|
+ this.getPage(this.ProxySchoolSelected);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getSubPage(openid) {
|
|
|
proxyscoreApi
|
|
|
.extensionIncomeExtensionPoints({
|