feat: 推广效果

pull/4/head
TianYu 2023-05-30 17:18:42 +08:00
parent 26c44490cb
commit 4129741036
3 changed files with 373 additions and 0 deletions

View File

@ -0,0 +1,155 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="组织名称" prop="tenantName">
<el-input v-model="queryParams.tenantName" placeholder="请输入组织名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单编号" prop="orderId">
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="加入时间" prop="payTime">
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="推广员" prop="nickname">
<el-input v-model="queryParams.nickname" placeholder="请输入推广员" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="手机号" prop="nickname">
<el-input v-model="queryParams.nickname" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
<!-- v-hasPermi="['shop:recharge-order:create']">新增</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['shop:recharge-order:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="组织名称" align="center" prop="orderId" />
<el-table-column label="推广员" align="center" prop="parentOrganizationName" >
<template v-slot="scope">
<span>{{ scope.row.parentOrganizationName }}</span>
<span v-if="scope.row.nickname!=='' && scope.row.nickname!==null">-{{ scope.row.nickname }}</span>
</template>
</el-table-column>
<el-table-column label="手机号" align="center" prop="orderId" />
<el-table-column label="加入时间" align="center" prop="payTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.payTime) }}</span>
</template>
</el-table-column>
<el-table-column label="成交定单数" align="center" prop="orderId" />
<el-table-column label="成交金额" align="center" prop="commissionPrice" />
<el-table-column label="累计金额" align="center" prop="tenantName" />
<el-table-column label="可提现金额" align="center" prop="tenantName" />
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {
getRechargeOrderPage,
exportRechargeOrderExcel
} from '@/api/shop/rechargeOrder';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
export default {
name: "MemberRecharge",
computed: {
DICT_TYPE() {
return DICT_TYPE
}
},
components: {
ElementForm
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
orderId: null,
tenantName: null,
payTime: [],
nickname: null
},
statusDictDatas: getDictDatas(DICT_TYPE.PAY_STATUS),
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getRechargeOrderPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return exportRechargeOrderExcel(params);
}).then(response => {
this.$download.excel(response, '抽佣明细-会员充值.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -0,0 +1,160 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="商铺名称" prop="tenantName">
<el-input v-model="queryParams.tenantName" placeholder="请输入商铺名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单编号" prop="orderId">
<el-input v-model="queryParams.orderId" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单支付时间" prop="payTime">
<el-date-picker v-model="queryParams.payTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="推广员" prop="nickname">
<el-input v-model="queryParams.nickname" placeholder="请输入推广员" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
<!-- v-hasPermi="['shop:recharge-order:create']">新增</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['shop:recharge-order:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="订单编号" align="center" prop="orderId" />
<el-table-column label="订单支付时间" align="center" prop="payTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.payTime) }}</span>
</template>
</el-table-column>
<el-table-column label="推广员" align="center" prop="parentOrganizationName" >
<template v-slot="scope">
<span>{{ scope.row.parentOrganizationName }}</span>
<span v-if="scope.row.nickname!=='' && scope.row.nickname!==null">-{{ scope.row.nickname }}</span>
</template>
</el-table-column>
<el-table-column label="提成金额" align="center" prop="commissionPrice" />
<el-table-column label="商铺名称" align="center" prop="tenantName" />
<el-table-column label="支付方式" align="center" prop="payType" >
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="订单状态" align="center" prop="paid">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.PAY_STATUS" :value="scope.row.paid"/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {
getRechargeOrderPage,
exportRechargeOrderExcel
} from '@/api/shop/rechargeOrder';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import ElementForm from "@/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue";
export default {
name: "MemberRecharge",
computed: {
DICT_TYPE() {
return DICT_TYPE
}
},
components: {
ElementForm
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
orderId: null,
tenantName: null,
payTime: [],
nickname: null
},
statusDictDatas: getDictDatas(DICT_TYPE.PAY_STATUS),
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.queryParams.paid = 1
//
getRechargeOrderPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return exportRechargeOrderExcel(params);
}).then(response => {
this.$download.excel(response, '推广效果-会员充值.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -20,6 +20,11 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['system:dept:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport"
v-hasPermi="['system:dept:export']">导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">/</el-button>
</el-col>
@ -104,6 +109,22 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 商户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm" :loading="submitLoading" :disabled="submitLoading"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -115,6 +136,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {CommonStatusEnum} from '@/utils/constants'
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import {listSimpleUsers} from "@/api/system/user";
import {getBaseHeader} from '@/utils/request';
export default {
name: "SystemDept",
@ -141,6 +163,19 @@ export default {
refreshTable: true,
//
expand: false,
submitLoading: false,
upload: {
//
open: false,
//
title: '商户导入',
//
isUploading: false,
//
headers: getBaseHeader(),
//
url: process.env.VUE_APP_BASE_API + '/admin-api/system/dept/batch/import'
},
//
queryParams: {
name: undefined,
@ -189,6 +224,29 @@ export default {
});
},
methods: {
submitFileForm() {
this.$refs.upload.submit();
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '推广员导入';
this.upload.open = true;
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
if (response.code !== 0) {
this.$modal.msgError(response.msg)
return;
}
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.getList();
},
/** 查询组织列表 */
getList() {
this.loading = true;