优化后台界面显示
This commit is contained in:
@@ -2,14 +2,14 @@ import request from '@/axios';
|
|||||||
|
|
||||||
export const getList = (current, size, params) => {
|
export const getList = (current, size, params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/market/benefit-commission/list',
|
url: '/market/benefit-commission/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
current,
|
current,
|
||||||
size,
|
size,
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getDetail = (id) => {
|
export const getDetail = (id) => {
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import request from '@/axios';
|
|||||||
|
|
||||||
export const getList = (current, size, params) => {
|
export const getList = (current, size, params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/market/benefit-commission-log/list',
|
url: '/market/benefit-commission-log/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
current,
|
current,
|
||||||
size,
|
size,
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getDetail = (id) => {
|
export const getDetail = (id) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
height:'auto',
|
height: 'auto',
|
||||||
calcHeight: 30,
|
calcHeight: 30,
|
||||||
tip: false,
|
tip: false,
|
||||||
searchShow: true,
|
searchShow: true,
|
||||||
@@ -14,216 +14,216 @@ export default {
|
|||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: "主键",
|
label: '主键',
|
||||||
prop: "id",
|
prop: 'id',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "统计日期",
|
label: '统计日期',
|
||||||
prop: "statisticalDate",
|
prop: 'statisticalDate',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 140,
|
width: 140,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户id",
|
label: '用户id',
|
||||||
prop: "userId",
|
prop: 'userId',
|
||||||
type: "input",search : true,
|
type: 'input',
|
||||||
|
hide: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户手机号",
|
label: '用户账号',
|
||||||
prop: "phone",
|
prop: 'phone',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 140,
|
width: 140,
|
||||||
search : true,
|
search: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户名",
|
label: '用户名',
|
||||||
prop: "userName",
|
prop: 'userName',
|
||||||
type: "input",
|
type: 'input',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "积分包id",
|
label: '积分包id',
|
||||||
prop: "packageId",
|
prop: 'packageId',
|
||||||
type: "input",
|
type: 'input',
|
||||||
|
hide: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "积分包名称",
|
label: '积分包名称',
|
||||||
prop: "packageName",
|
prop: 'packageName',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 150,
|
width: 150,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "来源",
|
label: '来源',
|
||||||
prop: "type",
|
prop: 'type',
|
||||||
type: "select",
|
type: 'select',
|
||||||
dicUrl: "/api/blade-system/dict/dictionary?code=app_package_type",
|
dicUrl: '/api/blade-system/dict/dictionary?code=app_package_type',
|
||||||
dataType: "number",
|
dataType: 'number',
|
||||||
props: {
|
props: {
|
||||||
label: "dictValue",
|
label: 'dictValue',
|
||||||
value: "dictKey"
|
value: 'dictKey',
|
||||||
},
|
},
|
||||||
width : 140,
|
width: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "兑换包需要的福利积分",
|
label: '兑换包需要的福利积分',
|
||||||
prop: "userBenefit",
|
prop: 'userBenefit',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "兑换包需要的现金券",
|
label: '兑换包需要的现金券',
|
||||||
prop: "userCash",
|
prop: 'userCash',
|
||||||
type: "input",width : 180,
|
type: 'input',
|
||||||
overHidden: true,
|
width: 180,
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "购买赠与福利值",
|
|
||||||
prop: "giveAmount",
|
|
||||||
type: "input",
|
|
||||||
width : 180,
|
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "产出总天数",
|
label: '购买赠与福利值',
|
||||||
prop: "dayTotal",
|
prop: 'giveAmount',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "总产出福利积分",
|
label: '产出总天数',
|
||||||
prop: "amountTotal",
|
prop: 'dayTotal',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "每日产出福利积分",
|
label: '总产出福利积分',
|
||||||
prop: "amountDay",
|
prop: 'amountTotal',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "已产出福利积分",
|
label: '每日产出福利积分',
|
||||||
prop: "amountOut",
|
prop: 'amountDay',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "已产出天数",
|
label: '已产出福利积分',
|
||||||
prop: "outDay",
|
prop: 'amountOut',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
|
overHidden: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '已产出天数',
|
||||||
|
prop: 'outDay',
|
||||||
|
type: 'input',
|
||||||
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "过期时间",
|
label: '过期时间',
|
||||||
prop: "expiredDate",
|
prop: 'expiredDate',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
overHidden: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
label: "激活时间",
|
|
||||||
prop: "activeTime",
|
|
||||||
type: "input",
|
|
||||||
width : 180,
|
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "备注",
|
label: '激活时间',
|
||||||
prop: "remark",
|
prop: 'activeTime',
|
||||||
type: "input",
|
type: 'input',
|
||||||
width : 180,
|
width: 180,
|
||||||
|
overHidden: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark',
|
||||||
|
type: 'input',
|
||||||
|
width: 180,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建人",
|
label: '创建人',
|
||||||
prop: "createUser",
|
prop: 'createUser',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建部门",
|
label: '创建部门',
|
||||||
prop: "createDept",
|
prop: 'createDept',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建时间",
|
label: '创建时间',
|
||||||
prop: "createTime",
|
prop: 'createTime',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "修改人",
|
label: '修改人',
|
||||||
prop: "updateUser",
|
prop: 'updateUser',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "修改时间",
|
label: '修改时间',
|
||||||
prop: "updateTime",
|
prop: 'updateTime',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "状态",
|
label: '状态',
|
||||||
prop: "status",
|
prop: 'status',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
hide: false,
|
hide: false,
|
||||||
dicUrl: "/api/blade-system/dict/dictionary?code=app_package_status",
|
dicUrl: '/api/blade-system/dict/dictionary?code=app_package_status',
|
||||||
dataType: "number",
|
dataType: 'number',
|
||||||
props: {
|
props: {
|
||||||
label: "dictValue",
|
label: 'dictValue',
|
||||||
value: "dictKey"
|
value: 'dictKey',
|
||||||
},
|
},
|
||||||
width : 140,
|
width: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "是否已删除",
|
label: '是否已删除',
|
||||||
prop: "isDeleted",
|
prop: 'isDeleted',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '用户id',
|
label: '用户id',
|
||||||
prop: 'userId',
|
prop: 'userId',
|
||||||
search: true,
|
|
||||||
type: 'input',
|
type: 'input',
|
||||||
|
hide: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '用户手机号',
|
label: '用户账号',
|
||||||
prop: 'phone',
|
prop: 'phone',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
search: true,
|
search: true,
|
||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
label: '积分包id',
|
label: '积分包id',
|
||||||
prop: 'userPackageId',
|
prop: 'userPackageId',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
|
hide: true,
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,16 @@ export default {
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
|
hide: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '用户账户',
|
||||||
|
prop: 'account',
|
||||||
|
type: 'input',
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '佣金金额',
|
label: '佣金金额',
|
||||||
prop: 'amount',
|
prop: 'amount',
|
||||||
|
|||||||
@@ -26,7 +26,17 @@ export default {
|
|||||||
label: '用户id',
|
label: '用户id',
|
||||||
prop: 'userId',
|
prop: 'userId',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
|
hide: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '用户账户',
|
||||||
|
prop: 'account',
|
||||||
|
type: 'input',
|
||||||
|
search: true,
|
||||||
|
overHidden: true,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '金额',
|
label: '金额',
|
||||||
prop: 'amount',
|
prop: 'amount',
|
||||||
@@ -37,6 +47,11 @@ export default {
|
|||||||
prop: 'lastAmount',
|
prop: 'lastAmount',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '手续费',
|
||||||
|
prop: 'fee',
|
||||||
|
type: 'input',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '业务类型',
|
label: '业务类型',
|
||||||
prop: 'sourceType',
|
prop: 'sourceType',
|
||||||
|
|||||||
@@ -1,225 +1,232 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-crud :option="option"
|
<avue-crud
|
||||||
v-model:search="search"
|
:option="option"
|
||||||
v-model:page="page"
|
v-model:search="search"
|
||||||
v-model="form"
|
v-model:page="page"
|
||||||
:table-loading="loading"
|
v-model="form"
|
||||||
:data="data"
|
:table-loading="loading"
|
||||||
:permission="permissionList"
|
:data="data"
|
||||||
:before-open="beforeOpen"
|
:permission="permissionList"
|
||||||
ref="crud"
|
:before-open="beforeOpen"
|
||||||
@row-update="rowUpdate"
|
ref="crud"
|
||||||
@row-save="rowSave"
|
@row-update="rowUpdate"
|
||||||
@row-del="rowDel"
|
@row-save="rowSave"
|
||||||
@search-change="searchChange"
|
@row-del="rowDel"
|
||||||
@search-reset="searchReset"
|
@search-change="searchChange"
|
||||||
@selection-change="selectionChange"
|
@search-reset="searchReset"
|
||||||
@current-change="currentChange"
|
@selection-change="selectionChange"
|
||||||
@size-change="sizeChange"
|
@current-change="currentChange"
|
||||||
@refresh-change="refreshChange"
|
@size-change="sizeChange"
|
||||||
@on-load="onLoad">
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<!-- <el-button type="danger"-->
|
<!-- <el-button type="danger"-->
|
||||||
<!-- icon="el-icon-delete"-->
|
<!-- icon="el-icon-delete"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- v-if="permission.userMarketBenefitPackage_delete"-->
|
<!-- v-if="permission.userMarketBenefitPackage_delete"-->
|
||||||
<!-- @click="handleDelete">删 除-->
|
<!-- @click="handleDelete">删 除-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- <el-button type="warning"-->
|
<!-- <el-button type="warning"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- @click="handleExport">导 出-->
|
<!-- @click="handleExport">导 出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getList, getDetail, add, update, remove} from "@/api/market/marketBenefitPackage";
|
import { getList, getDetail, add, update, remove } from '@/api/market/marketBenefitPackage';
|
||||||
import option from "@/option/market/marketBenefitPackage";
|
import option from '@/option/market/marketBenefitPackage';
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex';
|
||||||
import {exportBlob} from "@/api/common";
|
import { exportBlob } from '@/api/common';
|
||||||
import {getToken} from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import {downloadXls} from "@/utils/util";
|
import { downloadXls } from '@/utils/util';
|
||||||
import {dateNow} from "@/utils/date";
|
import { dateNow } from '@/utils/date';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
query: {},
|
||||||
|
search: {},
|
||||||
|
loading: true,
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
selectionList: [],
|
||||||
|
option: option,
|
||||||
|
data: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission']),
|
||||||
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
addBtn: this.validData(this.permission.userMarketBenefitPackage_add, false),
|
||||||
query: {},
|
viewBtn: this.validData(this.permission.userMarketBenefitPackage_view, false),
|
||||||
search: {},
|
delBtn: this.validData(this.permission.userMarketBenefitPackage_delete, false),
|
||||||
loading: true,
|
editBtn: this.validData(this.permission.userMarketBenefitPackage_edit, false),
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
selectionList: [],
|
|
||||||
option: option,
|
|
||||||
data: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
ids() {
|
||||||
...mapGetters(["permission"]),
|
let ids = [];
|
||||||
permissionList() {
|
this.selectionList.forEach(ele => {
|
||||||
return {
|
ids.push(ele.id);
|
||||||
addBtn: this.validData(this.permission.userMarketBenefitPackage_add, false),
|
});
|
||||||
viewBtn: this.validData(this.permission.userMarketBenefitPackage_view, false),
|
return ids.join(',');
|
||||||
delBtn: this.validData(this.permission.userMarketBenefitPackage_delete, false),
|
|
||||||
editBtn: this.validData(this.permission.userMarketBenefitPackage_edit, false)
|
|
||||||
};
|
|
||||||
},
|
|
||||||
ids() {
|
|
||||||
let ids = [];
|
|
||||||
this.selectionList.forEach(ele => {
|
|
||||||
ids.push(ele.id);
|
|
||||||
});
|
|
||||||
return ids.join(",");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
},
|
||||||
rowSave(row, done, loading) {
|
methods: {
|
||||||
add(row).then(() => {
|
rowSave(row, done, loading) {
|
||||||
|
add(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
window.console.log(error);
|
window.console.log(error);
|
||||||
});
|
}
|
||||||
},
|
);
|
||||||
rowUpdate(row, index, done, loading) {
|
},
|
||||||
update(row).then(() => {
|
rowUpdate(row, index, done, loading) {
|
||||||
|
update(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
|
||||||
},
|
|
||||||
rowDel(row) {
|
|
||||||
this.$confirm("确定将选择数据删除?", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return remove(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.onLoad(this.page);
|
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleDelete() {
|
|
||||||
if (this.selectionList.length === 0) {
|
|
||||||
this.$message.warning("请选择至少一条数据");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.$confirm("确定将选择数据删除?", {
|
);
|
||||||
confirmButtonText: "确定",
|
},
|
||||||
cancelButtonText: "取消",
|
rowDel(row) {
|
||||||
type: "warning"
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(row.id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return remove(this.ids);
|
this.onLoad(this.page);
|
||||||
})
|
this.$message({
|
||||||
.then(() => {
|
type: 'success',
|
||||||
this.onLoad(this.page);
|
message: '操作成功!',
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
this.$refs.crud.toggleSelection();
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
let downloadUrl = `/blade-usermarketbenefitpackage/userMarketBenefitPackage/export-userMarketBenefitPackage?${this.website.tokenHeader}=${getToken()}`;
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
this.$confirm("是否导出数据?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
NProgress.start();
|
|
||||||
exportBlob(downloadUrl, values).then(res => {
|
|
||||||
downloadXls(res.data, `用户积分包信息表${dateNow()}.xlsx`);
|
|
||||||
NProgress.done();
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
handleDelete() {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (this.selectionList.length === 0) {
|
||||||
getDetail(this.form.id).then(res => {
|
this.$message.warning('请选择至少一条数据');
|
||||||
this.form = res.data.data;
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(this.ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
}
|
this.$refs.crud.toggleSelection();
|
||||||
done();
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
handleExport() {
|
||||||
this.query = {};
|
let downloadUrl = `/blade-usermarketbenefitpackage/userMarketBenefitPackage/export-userMarketBenefitPackage?${
|
||||||
this.onLoad(this.page);
|
this.website.tokenHeader
|
||||||
},
|
}=${getToken()}`;
|
||||||
searchChange(params, done) {
|
const {} = this.query;
|
||||||
this.query = params;
|
let values = {};
|
||||||
this.page.currentPage = 1;
|
this.$confirm('是否导出数据?', '提示', {
|
||||||
this.onLoad(this.page, params);
|
confirmButtonText: '确定',
|
||||||
done();
|
cancelButtonText: '取消',
|
||||||
},
|
type: 'warning',
|
||||||
selectionChange(list) {
|
}).then(() => {
|
||||||
this.selectionList = list;
|
NProgress.start();
|
||||||
},
|
exportBlob(downloadUrl, values).then(res => {
|
||||||
selectionClear() {
|
downloadXls(res.data, `用户积分包信息表${dateNow()}.xlsx`);
|
||||||
this.selectionList = [];
|
NProgress.done();
|
||||||
this.$refs.crud.toggleSelection();
|
});
|
||||||
},
|
});
|
||||||
currentChange(currentPage){
|
},
|
||||||
this.page.currentPage = currentPage;
|
beforeOpen(done, type) {
|
||||||
},
|
if (['edit', 'view'].includes(type)) {
|
||||||
sizeChange(pageSize){
|
getDetail(this.form.id).then(res => {
|
||||||
this.page.pageSize = pageSize;
|
this.form = res.data.data;
|
||||||
},
|
|
||||||
refreshChange() {
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
},
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
|
|
||||||
getList(page.currentPage, page.pageSize, values).then(res => {
|
|
||||||
const data = res.data.data;
|
|
||||||
this.page.total = data.total;
|
|
||||||
this.data = data.records;
|
|
||||||
this.loading = false;
|
|
||||||
this.selectionClear();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
done();
|
||||||
};
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud.toggleSelection();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
const {} = this.query;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
phone : params.phone,
|
||||||
|
};
|
||||||
|
|
||||||
|
getList(page.currentPage, page.pageSize, values).then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
this.page.total = data.total;
|
||||||
|
this.data = data.records;
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,225 +1,232 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-crud :option="option"
|
<avue-crud
|
||||||
v-model:search="search"
|
:option="option"
|
||||||
v-model:page="page"
|
v-model:search="search"
|
||||||
v-model="form"
|
v-model:page="page"
|
||||||
:table-loading="loading"
|
v-model="form"
|
||||||
:data="data"
|
:table-loading="loading"
|
||||||
:permission="permissionList"
|
:data="data"
|
||||||
:before-open="beforeOpen"
|
:permission="permissionList"
|
||||||
ref="crud"
|
:before-open="beforeOpen"
|
||||||
@row-update="rowUpdate"
|
ref="crud"
|
||||||
@row-save="rowSave"
|
@row-update="rowUpdate"
|
||||||
@row-del="rowDel"
|
@row-save="rowSave"
|
||||||
@search-change="searchChange"
|
@row-del="rowDel"
|
||||||
@search-reset="searchReset"
|
@search-change="searchChange"
|
||||||
@selection-change="selectionChange"
|
@search-reset="searchReset"
|
||||||
@current-change="currentChange"
|
@selection-change="selectionChange"
|
||||||
@size-change="sizeChange"
|
@current-change="currentChange"
|
||||||
@refresh-change="refreshChange"
|
@size-change="sizeChange"
|
||||||
@on-load="onLoad">
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<!-- <el-button type="danger"-->
|
<!-- <el-button type="danger"-->
|
||||||
<!-- icon="el-icon-delete"-->
|
<!-- icon="el-icon-delete"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- v-if="permission.userMarketBenefitPackageLog_delete"-->
|
<!-- v-if="permission.userMarketBenefitPackageLog_delete"-->
|
||||||
<!-- @click="handleDelete">删 除-->
|
<!-- @click="handleDelete">删 除-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- <el-button type="warning"-->
|
<!-- <el-button type="warning"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- @click="handleExport">导 出-->
|
<!-- @click="handleExport">导 出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getList, getDetail, add, update, remove} from "@/api/market/marketBenefitPackageLog";
|
import { getList, getDetail, add, update, remove } from '@/api/market/marketBenefitPackageLog';
|
||||||
import option from "@/option/market/marketBenefitPackageLog";
|
import option from '@/option/market/marketBenefitPackageLog';
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex';
|
||||||
import {exportBlob} from "@/api/common";
|
import { exportBlob } from '@/api/common';
|
||||||
import {getToken} from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import {downloadXls} from "@/utils/util";
|
import { downloadXls } from '@/utils/util';
|
||||||
import {dateNow} from "@/utils/date";
|
import { dateNow } from '@/utils/date';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
query: {},
|
||||||
|
search: {},
|
||||||
|
loading: true,
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
selectionList: [],
|
||||||
|
option: option,
|
||||||
|
data: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission']),
|
||||||
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
addBtn: this.validData(this.permission.userMarketBenefitPackageLog_add, false),
|
||||||
query: {},
|
viewBtn: this.validData(this.permission.userMarketBenefitPackageLog_view, false),
|
||||||
search: {},
|
delBtn: this.validData(this.permission.userMarketBenefitPackageLog_delete, false),
|
||||||
loading: true,
|
editBtn: this.validData(this.permission.userMarketBenefitPackageLog_edit, false),
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
selectionList: [],
|
|
||||||
option: option,
|
|
||||||
data: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
ids() {
|
||||||
...mapGetters(["permission"]),
|
let ids = [];
|
||||||
permissionList() {
|
this.selectionList.forEach(ele => {
|
||||||
return {
|
ids.push(ele.id);
|
||||||
addBtn: this.validData(this.permission.userMarketBenefitPackageLog_add, false),
|
});
|
||||||
viewBtn: this.validData(this.permission.userMarketBenefitPackageLog_view, false),
|
return ids.join(',');
|
||||||
delBtn: this.validData(this.permission.userMarketBenefitPackageLog_delete, false),
|
|
||||||
editBtn: this.validData(this.permission.userMarketBenefitPackageLog_edit, false)
|
|
||||||
};
|
|
||||||
},
|
|
||||||
ids() {
|
|
||||||
let ids = [];
|
|
||||||
this.selectionList.forEach(ele => {
|
|
||||||
ids.push(ele.id);
|
|
||||||
});
|
|
||||||
return ids.join(",");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
},
|
||||||
rowSave(row, done, loading) {
|
methods: {
|
||||||
add(row).then(() => {
|
rowSave(row, done, loading) {
|
||||||
|
add(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
window.console.log(error);
|
window.console.log(error);
|
||||||
});
|
}
|
||||||
},
|
);
|
||||||
rowUpdate(row, index, done, loading) {
|
},
|
||||||
update(row).then(() => {
|
rowUpdate(row, index, done, loading) {
|
||||||
|
update(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
|
||||||
},
|
|
||||||
rowDel(row) {
|
|
||||||
this.$confirm("确定将选择数据删除?", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return remove(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.onLoad(this.page);
|
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleDelete() {
|
|
||||||
if (this.selectionList.length === 0) {
|
|
||||||
this.$message.warning("请选择至少一条数据");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.$confirm("确定将选择数据删除?", {
|
);
|
||||||
confirmButtonText: "确定",
|
},
|
||||||
cancelButtonText: "取消",
|
rowDel(row) {
|
||||||
type: "warning"
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(row.id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return remove(this.ids);
|
this.onLoad(this.page);
|
||||||
})
|
this.$message({
|
||||||
.then(() => {
|
type: 'success',
|
||||||
this.onLoad(this.page);
|
message: '操作成功!',
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
this.$refs.crud.toggleSelection();
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
let downloadUrl = `/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/export-userMarketBenefitPackageLog?${this.website.tokenHeader}=${getToken()}`;
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
this.$confirm("是否导出数据?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
NProgress.start();
|
|
||||||
exportBlob(downloadUrl, values).then(res => {
|
|
||||||
downloadXls(res.data, `划拨积分记录${dateNow()}.xlsx`);
|
|
||||||
NProgress.done();
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
handleDelete() {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (this.selectionList.length === 0) {
|
||||||
getDetail(this.form.id).then(res => {
|
this.$message.warning('请选择至少一条数据');
|
||||||
this.form = res.data.data;
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(this.ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
}
|
this.$refs.crud.toggleSelection();
|
||||||
done();
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
handleExport() {
|
||||||
this.query = {};
|
let downloadUrl = `/blade-usermarketbenefitpackagelog/userMarketBenefitPackageLog/export-userMarketBenefitPackageLog?${
|
||||||
this.onLoad(this.page);
|
this.website.tokenHeader
|
||||||
},
|
}=${getToken()}`;
|
||||||
searchChange(params, done) {
|
const {} = this.query;
|
||||||
this.query = params;
|
let values = {};
|
||||||
this.page.currentPage = 1;
|
this.$confirm('是否导出数据?', '提示', {
|
||||||
this.onLoad(this.page, params);
|
confirmButtonText: '确定',
|
||||||
done();
|
cancelButtonText: '取消',
|
||||||
},
|
type: 'warning',
|
||||||
selectionChange(list) {
|
}).then(() => {
|
||||||
this.selectionList = list;
|
NProgress.start();
|
||||||
},
|
exportBlob(downloadUrl, values).then(res => {
|
||||||
selectionClear() {
|
downloadXls(res.data, `划拨积分记录${dateNow()}.xlsx`);
|
||||||
this.selectionList = [];
|
NProgress.done();
|
||||||
this.$refs.crud.toggleSelection();
|
});
|
||||||
},
|
});
|
||||||
currentChange(currentPage){
|
},
|
||||||
this.page.currentPage = currentPage;
|
beforeOpen(done, type) {
|
||||||
},
|
if (['edit', 'view'].includes(type)) {
|
||||||
sizeChange(pageSize){
|
getDetail(this.form.id).then(res => {
|
||||||
this.page.pageSize = pageSize;
|
this.form = res.data.data;
|
||||||
},
|
|
||||||
refreshChange() {
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
},
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
|
|
||||||
getList(page.currentPage, page.pageSize, values).then(res => {
|
|
||||||
const data = res.data.data;
|
|
||||||
this.page.total = data.total;
|
|
||||||
this.data = data.records;
|
|
||||||
this.loading = false;
|
|
||||||
this.selectionClear();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
done();
|
||||||
};
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud.toggleSelection();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
const {} = this.query;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
phone: params.phone,
|
||||||
|
};
|
||||||
|
|
||||||
|
getList(page.currentPage, page.pageSize, values).then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
this.page.total = data.total;
|
||||||
|
this.data = data.records;
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ import { downloadXls } from '@/utils/util';
|
|||||||
import { dateNow } from '@/utils/date';
|
import { dateNow } from '@/utils/date';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
import { doGivePack } from '@/api/market/marketBenefitPackageTemplate';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -1,225 +1,232 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-crud :option="option"
|
<avue-crud
|
||||||
v-model:search="search"
|
:option="option"
|
||||||
v-model:page="page"
|
v-model:search="search"
|
||||||
v-model="form"
|
v-model:page="page"
|
||||||
:table-loading="loading"
|
v-model="form"
|
||||||
:data="data"
|
:table-loading="loading"
|
||||||
:permission="permissionList"
|
:data="data"
|
||||||
:before-open="beforeOpen"
|
:permission="permissionList"
|
||||||
ref="crud"
|
:before-open="beforeOpen"
|
||||||
@row-update="rowUpdate"
|
ref="crud"
|
||||||
@row-save="rowSave"
|
@row-update="rowUpdate"
|
||||||
@row-del="rowDel"
|
@row-save="rowSave"
|
||||||
@search-change="searchChange"
|
@row-del="rowDel"
|
||||||
@search-reset="searchReset"
|
@search-change="searchChange"
|
||||||
@selection-change="selectionChange"
|
@search-reset="searchReset"
|
||||||
@current-change="currentChange"
|
@selection-change="selectionChange"
|
||||||
@size-change="sizeChange"
|
@current-change="currentChange"
|
||||||
@refresh-change="refreshChange"
|
@size-change="sizeChange"
|
||||||
@on-load="onLoad">
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<!-- <el-button type="danger"-->
|
<!-- <el-button type="danger"-->
|
||||||
<!-- icon="el-icon-delete"-->
|
<!-- icon="el-icon-delete"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- v-if="permission.userCommission_delete"-->
|
<!-- v-if="permission.userCommission_delete"-->
|
||||||
<!-- @click="handleDelete">删 除-->
|
<!-- @click="handleDelete">删 除-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- <el-button type="warning"-->
|
<!-- <el-button type="warning"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- @click="handleExport">导 出-->
|
<!-- @click="handleExport">导 出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getList, getDetail, add, update, remove} from "@/api/market/marketUserCommission";
|
import { getList, getDetail, add, update, remove } from '@/api/market/marketUserCommission';
|
||||||
import option from "@/option/market/marketUserCommission";
|
import option from '@/option/market/marketUserCommission';
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex';
|
||||||
import {exportBlob} from "@/api/common";
|
import { exportBlob } from '@/api/common';
|
||||||
import {getToken} from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import {downloadXls} from "@/utils/util";
|
import { downloadXls } from '@/utils/util';
|
||||||
import {dateNow} from "@/utils/date";
|
import { dateNow } from '@/utils/date';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
query: {},
|
||||||
|
search: {},
|
||||||
|
loading: true,
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
selectionList: [],
|
||||||
|
option: option,
|
||||||
|
data: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission']),
|
||||||
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
addBtn: this.validData(this.permission.userCommission_add, false),
|
||||||
query: {},
|
viewBtn: this.validData(this.permission.userCommission_view, false),
|
||||||
search: {},
|
delBtn: this.validData(this.permission.userCommission_delete, false),
|
||||||
loading: true,
|
editBtn: this.validData(this.permission.userCommission_edit, false),
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
selectionList: [],
|
|
||||||
option: option,
|
|
||||||
data: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
ids() {
|
||||||
...mapGetters(["permission"]),
|
let ids = [];
|
||||||
permissionList() {
|
this.selectionList.forEach(ele => {
|
||||||
return {
|
ids.push(ele.id);
|
||||||
addBtn: this.validData(this.permission.userCommission_add, false),
|
});
|
||||||
viewBtn: this.validData(this.permission.userCommission_view, false),
|
return ids.join(',');
|
||||||
delBtn: this.validData(this.permission.userCommission_delete, false),
|
|
||||||
editBtn: this.validData(this.permission.userCommission_edit, false)
|
|
||||||
};
|
|
||||||
},
|
|
||||||
ids() {
|
|
||||||
let ids = [];
|
|
||||||
this.selectionList.forEach(ele => {
|
|
||||||
ids.push(ele.id);
|
|
||||||
});
|
|
||||||
return ids.join(",");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
},
|
||||||
rowSave(row, done, loading) {
|
methods: {
|
||||||
add(row).then(() => {
|
rowSave(row, done, loading) {
|
||||||
|
add(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
window.console.log(error);
|
window.console.log(error);
|
||||||
});
|
}
|
||||||
},
|
);
|
||||||
rowUpdate(row, index, done, loading) {
|
},
|
||||||
update(row).then(() => {
|
rowUpdate(row, index, done, loading) {
|
||||||
|
update(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
|
||||||
},
|
|
||||||
rowDel(row) {
|
|
||||||
this.$confirm("确定将选择数据删除?", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return remove(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.onLoad(this.page);
|
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleDelete() {
|
|
||||||
if (this.selectionList.length === 0) {
|
|
||||||
this.$message.warning("请选择至少一条数据");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.$confirm("确定将选择数据删除?", {
|
);
|
||||||
confirmButtonText: "确定",
|
},
|
||||||
cancelButtonText: "取消",
|
rowDel(row) {
|
||||||
type: "warning"
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(row.id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return remove(this.ids);
|
this.onLoad(this.page);
|
||||||
})
|
this.$message({
|
||||||
.then(() => {
|
type: 'success',
|
||||||
this.onLoad(this.page);
|
message: '操作成功!',
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
this.$refs.crud.toggleSelection();
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
let downloadUrl = `/blade-usercommission/userCommission/export-userCommission?${this.website.tokenHeader}=${getToken()}`;
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
this.$confirm("是否导出数据?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
NProgress.start();
|
|
||||||
exportBlob(downloadUrl, values).then(res => {
|
|
||||||
downloadXls(res.data, `用户佣金表${dateNow()}.xlsx`);
|
|
||||||
NProgress.done();
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
handleDelete() {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (this.selectionList.length === 0) {
|
||||||
getDetail(this.form.id).then(res => {
|
this.$message.warning('请选择至少一条数据');
|
||||||
this.form = res.data.data;
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(this.ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
}
|
this.$refs.crud.toggleSelection();
|
||||||
done();
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
handleExport() {
|
||||||
this.query = {};
|
let downloadUrl = `/blade-usercommission/userCommission/export-userCommission?${
|
||||||
this.onLoad(this.page);
|
this.website.tokenHeader
|
||||||
},
|
}=${getToken()}`;
|
||||||
searchChange(params, done) {
|
const {} = this.query;
|
||||||
this.query = params;
|
let values = {};
|
||||||
this.page.currentPage = 1;
|
this.$confirm('是否导出数据?', '提示', {
|
||||||
this.onLoad(this.page, params);
|
confirmButtonText: '确定',
|
||||||
done();
|
cancelButtonText: '取消',
|
||||||
},
|
type: 'warning',
|
||||||
selectionChange(list) {
|
}).then(() => {
|
||||||
this.selectionList = list;
|
NProgress.start();
|
||||||
},
|
exportBlob(downloadUrl, values).then(res => {
|
||||||
selectionClear() {
|
downloadXls(res.data, `用户佣金表${dateNow()}.xlsx`);
|
||||||
this.selectionList = [];
|
NProgress.done();
|
||||||
this.$refs.crud.toggleSelection();
|
});
|
||||||
},
|
});
|
||||||
currentChange(currentPage){
|
},
|
||||||
this.page.currentPage = currentPage;
|
beforeOpen(done, type) {
|
||||||
},
|
if (['edit', 'view'].includes(type)) {
|
||||||
sizeChange(pageSize){
|
getDetail(this.form.id).then(res => {
|
||||||
this.page.pageSize = pageSize;
|
this.form = res.data.data;
|
||||||
},
|
|
||||||
refreshChange() {
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
},
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
|
|
||||||
getList(page.currentPage, page.pageSize, values).then(res => {
|
|
||||||
const data = res.data.data;
|
|
||||||
this.page.total = data.total;
|
|
||||||
this.data = data.records;
|
|
||||||
this.loading = false;
|
|
||||||
this.selectionClear();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
done();
|
||||||
};
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud.toggleSelection();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
const {} = this.query;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
account: params.account,
|
||||||
|
};
|
||||||
|
|
||||||
|
getList(page.currentPage, page.pageSize, values).then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
this.page.total = data.total;
|
||||||
|
this.data = data.records;
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,225 +1,232 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-crud :option="option"
|
<avue-crud
|
||||||
v-model:search="search"
|
:option="option"
|
||||||
v-model:page="page"
|
v-model:search="search"
|
||||||
v-model="form"
|
v-model:page="page"
|
||||||
:table-loading="loading"
|
v-model="form"
|
||||||
:data="data"
|
:table-loading="loading"
|
||||||
:permission="permissionList"
|
:data="data"
|
||||||
:before-open="beforeOpen"
|
:permission="permissionList"
|
||||||
ref="crud"
|
:before-open="beforeOpen"
|
||||||
@row-update="rowUpdate"
|
ref="crud"
|
||||||
@row-save="rowSave"
|
@row-update="rowUpdate"
|
||||||
@row-del="rowDel"
|
@row-save="rowSave"
|
||||||
@search-change="searchChange"
|
@row-del="rowDel"
|
||||||
@search-reset="searchReset"
|
@search-change="searchChange"
|
||||||
@selection-change="selectionChange"
|
@search-reset="searchReset"
|
||||||
@current-change="currentChange"
|
@selection-change="selectionChange"
|
||||||
@size-change="sizeChange"
|
@current-change="currentChange"
|
||||||
@refresh-change="refreshChange"
|
@size-change="sizeChange"
|
||||||
@on-load="onLoad">
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<!-- <el-button type="danger"-->
|
<!-- <el-button type="danger"-->
|
||||||
<!-- icon="el-icon-delete"-->
|
<!-- icon="el-icon-delete"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- v-if="permission.userCommissionLog_delete"-->
|
<!-- v-if="permission.userCommissionLog_delete"-->
|
||||||
<!-- @click="handleDelete">删 除-->
|
<!-- @click="handleDelete">删 除-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- <el-button type="warning"-->
|
<!-- <el-button type="warning"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="el-icon-download"-->
|
<!-- icon="el-icon-download"-->
|
||||||
<!-- @click="handleExport">导 出-->
|
<!-- @click="handleExport">导 出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getList, getDetail, add, update, remove} from "@/api/market/marketUserCommissionLog";
|
import { getList, getDetail, add, update, remove } from '@/api/market/marketUserCommissionLog';
|
||||||
import option from "@/option/market/marketUserCommissionLog";
|
import option from '@/option/market/marketUserCommissionLog';
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex';
|
||||||
import {exportBlob} from "@/api/common";
|
import { exportBlob } from '@/api/common';
|
||||||
import {getToken} from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import {downloadXls} from "@/utils/util";
|
import { downloadXls } from '@/utils/util';
|
||||||
import {dateNow} from "@/utils/date";
|
import { dateNow } from '@/utils/date';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
query: {},
|
||||||
|
search: {},
|
||||||
|
loading: true,
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
selectionList: [],
|
||||||
|
option: option,
|
||||||
|
data: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission']),
|
||||||
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
addBtn: this.validData(this.permission.userCommissionLog_add, false),
|
||||||
query: {},
|
viewBtn: this.validData(this.permission.userCommissionLog_view, false),
|
||||||
search: {},
|
delBtn: this.validData(this.permission.userCommissionLog_delete, false),
|
||||||
loading: true,
|
editBtn: this.validData(this.permission.userCommissionLog_edit, false),
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
selectionList: [],
|
|
||||||
option: option,
|
|
||||||
data: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
ids() {
|
||||||
...mapGetters(["permission"]),
|
let ids = [];
|
||||||
permissionList() {
|
this.selectionList.forEach(ele => {
|
||||||
return {
|
ids.push(ele.id);
|
||||||
addBtn: this.validData(this.permission.userCommissionLog_add, false),
|
});
|
||||||
viewBtn: this.validData(this.permission.userCommissionLog_view, false),
|
return ids.join(',');
|
||||||
delBtn: this.validData(this.permission.userCommissionLog_delete, false),
|
|
||||||
editBtn: this.validData(this.permission.userCommissionLog_edit, false)
|
|
||||||
};
|
|
||||||
},
|
|
||||||
ids() {
|
|
||||||
let ids = [];
|
|
||||||
this.selectionList.forEach(ele => {
|
|
||||||
ids.push(ele.id);
|
|
||||||
});
|
|
||||||
return ids.join(",");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
},
|
||||||
rowSave(row, done, loading) {
|
methods: {
|
||||||
add(row).then(() => {
|
rowSave(row, done, loading) {
|
||||||
|
add(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
window.console.log(error);
|
window.console.log(error);
|
||||||
});
|
}
|
||||||
},
|
);
|
||||||
rowUpdate(row, index, done, loading) {
|
},
|
||||||
update(row).then(() => {
|
rowUpdate(row, index, done, loading) {
|
||||||
|
update(row).then(
|
||||||
|
() => {
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "操作成功!"
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
}, error => {
|
},
|
||||||
|
error => {
|
||||||
loading();
|
loading();
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
|
||||||
},
|
|
||||||
rowDel(row) {
|
|
||||||
this.$confirm("确定将选择数据删除?", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return remove(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.onLoad(this.page);
|
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleDelete() {
|
|
||||||
if (this.selectionList.length === 0) {
|
|
||||||
this.$message.warning("请选择至少一条数据");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.$confirm("确定将选择数据删除?", {
|
);
|
||||||
confirmButtonText: "确定",
|
},
|
||||||
cancelButtonText: "取消",
|
rowDel(row) {
|
||||||
type: "warning"
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(row.id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return remove(this.ids);
|
this.onLoad(this.page);
|
||||||
})
|
this.$message({
|
||||||
.then(() => {
|
type: 'success',
|
||||||
this.onLoad(this.page);
|
message: '操作成功!',
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
this.$refs.crud.toggleSelection();
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
let downloadUrl = `/blade-usercommissionlog/userCommissionLog/export-userCommissionLog?${this.website.tokenHeader}=${getToken()}`;
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
this.$confirm("是否导出数据?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
NProgress.start();
|
|
||||||
exportBlob(downloadUrl, values).then(res => {
|
|
||||||
downloadXls(res.data, `用户佣金流水表${dateNow()}.xlsx`);
|
|
||||||
NProgress.done();
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
handleDelete() {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (this.selectionList.length === 0) {
|
||||||
getDetail(this.form.id).then(res => {
|
this.$message.warning('请选择至少一条数据');
|
||||||
this.form = res.data.data;
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return remove(this.ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.onLoad(this.page);
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!',
|
||||||
});
|
});
|
||||||
}
|
this.$refs.crud.toggleSelection();
|
||||||
done();
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
handleExport() {
|
||||||
this.query = {};
|
let downloadUrl = `/blade-usercommissionlog/userCommissionLog/export-userCommissionLog?${
|
||||||
this.onLoad(this.page);
|
this.website.tokenHeader
|
||||||
},
|
}=${getToken()}`;
|
||||||
searchChange(params, done) {
|
const {} = this.query;
|
||||||
this.query = params;
|
let values = {};
|
||||||
this.page.currentPage = 1;
|
this.$confirm('是否导出数据?', '提示', {
|
||||||
this.onLoad(this.page, params);
|
confirmButtonText: '确定',
|
||||||
done();
|
cancelButtonText: '取消',
|
||||||
},
|
type: 'warning',
|
||||||
selectionChange(list) {
|
}).then(() => {
|
||||||
this.selectionList = list;
|
NProgress.start();
|
||||||
},
|
exportBlob(downloadUrl, values).then(res => {
|
||||||
selectionClear() {
|
downloadXls(res.data, `用户佣金流水表${dateNow()}.xlsx`);
|
||||||
this.selectionList = [];
|
NProgress.done();
|
||||||
this.$refs.crud.toggleSelection();
|
});
|
||||||
},
|
});
|
||||||
currentChange(currentPage){
|
},
|
||||||
this.page.currentPage = currentPage;
|
beforeOpen(done, type) {
|
||||||
},
|
if (['edit', 'view'].includes(type)) {
|
||||||
sizeChange(pageSize){
|
getDetail(this.form.id).then(res => {
|
||||||
this.page.pageSize = pageSize;
|
this.form = res.data.data;
|
||||||
},
|
|
||||||
refreshChange() {
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
},
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
const {
|
|
||||||
} = this.query;
|
|
||||||
|
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
|
|
||||||
getList(page.currentPage, page.pageSize, values).then(res => {
|
|
||||||
const data = res.data.data;
|
|
||||||
this.page.total = data.total;
|
|
||||||
this.data = data.records;
|
|
||||||
this.loading = false;
|
|
||||||
this.selectionClear();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
done();
|
||||||
};
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud.toggleSelection();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
const {} = this.query;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
account: params.account,
|
||||||
|
};
|
||||||
|
|
||||||
|
getList(page.currentPage, page.pageSize, values).then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
this.page.total = data.total;
|
||||||
|
this.data = data.records;
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user