feat:奖励金
This commit is contained in:
parent
7ee421a467
commit
783db5f499
|
@ -4,7 +4,8 @@ ENV = 'development'
|
|||
# http://mer.crmeb.net/admin
|
||||
# base api
|
||||
# www.shop.xyz
|
||||
VUE_APP_BASE_API = 'http://test.tropjoin.com'
|
||||
VUE_APP_BASE_API = 'http://www.shop.xyz'
|
||||
# VUE_APP_BASE_API = 'http://test.tropjoin.com'
|
||||
# VUE_APP_BASE_API = 'https://api.tropjoin.com'
|
||||
|
||||
# socket 连接地址
|
||||
|
|
|
@ -379,6 +379,12 @@ export function integralLogLst(data) {
|
|||
export function brokerageLogLst(data) {
|
||||
return request.get(`user/brokerage/lst/log`, data)
|
||||
}
|
||||
/**
|
||||
* @description 奖励金 -- 列表
|
||||
*/
|
||||
export function bonusLogLst(data) {
|
||||
return request.get(`user/brokerage/bonus/log`, data)
|
||||
}
|
||||
/**
|
||||
* @description 积分日志 -- 导出
|
||||
*/
|
||||
|
|
|
@ -104,6 +104,8 @@ export default {
|
|||
this.$nextTick(() => {
|
||||
let value = JSON.parse(JSON.stringify(this.$store.state.mobildConfig.defaultArray[this.num]))
|
||||
this.configObj = value;
|
||||
console.log(this.configObj);
|
||||
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -119,6 +119,9 @@ export default {
|
|||
handler (nVal, oVal) {
|
||||
this.defaults = nVal
|
||||
this.configData = nVal[this.configNme]
|
||||
console.log(this.configData);
|
||||
console.log(this.configNme);
|
||||
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
|
|
|
@ -30,6 +30,15 @@ const promoterRouter =
|
|||
},
|
||||
component: () => import('@/views/promoter/brokerage/index')
|
||||
},
|
||||
{
|
||||
path: 'bonusLog',
|
||||
name: 'bonusLog',
|
||||
meta: {
|
||||
title: '奖励金记录',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/promoter/bonusLog/index')
|
||||
},
|
||||
{
|
||||
path: 'user',
|
||||
name: 'AccountsUser',
|
||||
|
|
|
@ -640,7 +640,7 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<div style="display: flex">
|
||||
<el-form-item label="商品封面图:" prop="image">
|
||||
<!-- <el-form-item label="商品封面图:" prop="image">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 60px; height: 60px"
|
||||
|
@ -648,8 +648,21 @@
|
|||
:preview-src-list="[formValidate.image]"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="商品封面图:" prop="image">
|
||||
<div
|
||||
class="upLoadPicBox"
|
||||
title="750*750px"
|
||||
@click="modalPicTap('1')"
|
||||
>
|
||||
<div v-if="formValidate.image" class="pictrue">
|
||||
<img :src="formValidate.image" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
style="margin-left: 100px"
|
||||
label="定制产品:"
|
||||
|
@ -1163,7 +1176,7 @@ export default {
|
|||
this.$modalUpload(function (img) {
|
||||
if (tit === "1" && !num) {
|
||||
_this.formValidate.image = img[0];
|
||||
_this.OneattrValue[0].image = img[0];
|
||||
// _this.OneattrValue[0].image = img[0];
|
||||
}
|
||||
if (tit === "2" && !num) {
|
||||
img.map((item) => {
|
||||
|
|
|
@ -0,0 +1,245 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<div class="selCard mb14">
|
||||
<el-form
|
||||
:model="tableFrom"
|
||||
ref="searchForm"
|
||||
inline
|
||||
size="small"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="选择时间:">
|
||||
<el-date-picker
|
||||
v-model="timeVal"
|
||||
value-format="yyyy/MM/dd"
|
||||
format="yyyy/MM/dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="daterange"
|
||||
placement="bottom-end"
|
||||
placeholder="自定义时间"
|
||||
style="width: 280px"
|
||||
@change="onchangeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="category">
|
||||
<el-select
|
||||
v-model="tableFrom.category"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
class="selWidth"
|
||||
@change="getList(1)"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, key) in categoryList"
|
||||
:key="key"
|
||||
:label="item"
|
||||
:value="key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索:" prop="keyword">
|
||||
<el-input
|
||||
v-model="tableFrom.keyword"
|
||||
@keyup.enter.native="getList(1)"
|
||||
placeholder="请输入用户ID用户昵称、标题"
|
||||
class="selWidth"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="getList(1)"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <cards-data v-if="cardLists.length > 0" :card-lists="cardLists" /> -->
|
||||
<el-card>
|
||||
<!-- <div class="mb20">
|
||||
<el-button size="small" type="primary" @click="exports">导出</el-button>
|
||||
</div> -->
|
||||
<el-table v-loading="listLoading" :data="tableData.data" size="small">
|
||||
<el-table-column prop="bill_id" label="ID" min-width="50" />
|
||||
<el-table-column label="用户昵称" prop="nickname" min-width="150" />
|
||||
<el-table-column label="标题" prop="title" min-width="120" />
|
||||
<el-table-column label="变动值" prop="number" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.pm == 1" style="color: #ff3b30"
|
||||
>+{{ scope.row.number }}</span
|
||||
>
|
||||
<span v-if="scope.row.pm == 0" style="color: #82e493"
|
||||
>-{{ scope.row.number }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前额度" prop="balance" min-width="90" />
|
||||
<el-table-column prop="mark" label="备注" min-width="150" />
|
||||
<el-table-column prop="create_time" label="添加时间" min-width="90" />
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
background
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
integralLogTitle,
|
||||
bonusLogLst,
|
||||
brokerageLogExport,
|
||||
} from "@/api/marketing";
|
||||
import fileList from "@/components/exportFile/fileList";
|
||||
import cardsData from "@/components/cards/index";
|
||||
import createWorkBook from "@/utils/newToExcel.js";
|
||||
import { roterPre } from "@/settings";
|
||||
import timeOptions from "@/utils/timeOptions";
|
||||
export default {
|
||||
name: "IntergralLog",
|
||||
components: { fileList, cardsData },
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: timeOptions,
|
||||
timeVal: [],
|
||||
listLoading: true,
|
||||
roterPre: roterPre,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
keyword: "",
|
||||
date: "",
|
||||
},
|
||||
loading: false,
|
||||
cardLists: [],
|
||||
categoryList: {},
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.getList("");
|
||||
// this.getTitle();
|
||||
},
|
||||
methods: {
|
||||
/**重置 */
|
||||
searchReset() {
|
||||
this.timeVal = [];
|
||||
this.tableFrom.date = "";
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.getList(1);
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e;
|
||||
this.tableFrom.date = e ? this.timeVal.join("-") : "";
|
||||
this.tableFrom.page = 1;
|
||||
this.getList("");
|
||||
},
|
||||
async exports() {
|
||||
let excelData = JSON.parse(JSON.stringify(this.tableFrom)),
|
||||
data = [];
|
||||
excelData.page = 1;
|
||||
excelData.limit = 100;
|
||||
let pageCount = 1;
|
||||
let lebData = {};
|
||||
for (let i = 0; i < pageCount; i++) {
|
||||
lebData = await this.downData(excelData);
|
||||
pageCount = Math.ceil(lebData.count / excelData.limit);
|
||||
if (lebData.export.length) {
|
||||
data = data.concat(lebData.export);
|
||||
excelData.page++;
|
||||
}
|
||||
}
|
||||
createWorkBook(
|
||||
lebData.header,
|
||||
lebData.title,
|
||||
data,
|
||||
lebData.foot,
|
||||
lebData.filename
|
||||
);
|
||||
return;
|
||||
},
|
||||
/**列表 */
|
||||
downData(excelData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
brokerageLogExport(excelData).then((res) => {
|
||||
return resolve(res.data);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 导出
|
||||
exportRecord() {
|
||||
brokerageLogExport(this.tableFrom)
|
||||
.then((res) => {
|
||||
const h = this.$createElement;
|
||||
this.$msgbox({
|
||||
title: "提示",
|
||||
message: h("p", null, [
|
||||
h("span", null, '文件正在生成中,请稍后点击"'),
|
||||
h("span", { style: "color: teal" }, "导出记录"),
|
||||
h("span", null, '"查看~ '),
|
||||
]),
|
||||
confirmButtonText: "我知道了",
|
||||
}).then((action) => {
|
||||
this.$router.push({ path: this.roterPre + "/group/exportList" });
|
||||
});
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
//头部
|
||||
getTitle() {
|
||||
integralLogTitle()
|
||||
.then((res) => {
|
||||
this.cardLists = res.data;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true;
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
bonusLogLst(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list;
|
||||
this.tableData.total = res.data.count;
|
||||
this.categoryList = res.data.category_list;
|
||||
|
||||
this.listLoading = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.listLoading = false;
|
||||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getList("");
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val;
|
||||
this.getList("");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.scollhide::-webkit-scrollbar {
|
||||
display: none; /* Chrome Safari */
|
||||
}
|
||||
</style>
|
|
@ -672,6 +672,8 @@ export default {
|
|||
let tempItem = JSON.parse(JSON.stringify(item));
|
||||
this.rConfig.push(tempItem);
|
||||
this.activeIndex = index;
|
||||
console.log(this.rConfig);
|
||||
|
||||
this.$store.commit("mobildConfig/SETCONFIGNAME", item.name);
|
||||
},
|
||||
// 组件删除
|
||||
|
@ -859,6 +861,7 @@ export default {
|
|||
this.$store.commit('mobildConfig/radioUpdata', data.info.bg_tab_val || 0);
|
||||
this.$store.commit('mobildConfig/picurlUpdata', data.info.bg_pic || '');
|
||||
this.defaultData(data.info.value);
|
||||
|
||||
});
|
||||
},
|
||||
defaultData(data) {
|
||||
|
|
Loading…
Reference in New Issue