Commit 5448a405 by 张权

feat:v2.0.0版本提交,校验暂无问题

1 parent d90b22ea
...@@ -84,6 +84,23 @@ const getQrUrl = params => { ...@@ -84,6 +84,23 @@ const getQrUrl = params => {
returnAll:true returnAll:true
}) })
} }
/*获取用户明细列表*/
const getcardRecordList = params => {
params.method = 'scrm.api.equity.card.merchant.record.get'
return http({
data: params
})
}
/**导出用户明细列表Excel*/
const exportcardRecordList = params => {
params.method = 'scrm.api.equity.card.merchant.record.export'
return http({
data: params,
returnAll: true
})
}
export default { export default {
getEquityCardList, getEquityCardList,
newEquityCard, newEquityCard,
...@@ -95,5 +112,7 @@ export default { ...@@ -95,5 +112,7 @@ export default {
getMerchantList, getMerchantList,
cardExport, cardExport,
getCollectionMerchantList, getCollectionMerchantList,
getQrUrl getQrUrl,
getcardRecordList,
exportcardRecordList
} }
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="成本含税价" prop="costPrice"> <el-form-item label="成本含税价" prop="costPrice">
<el-input v-model="ruleForm.costPrice" :disabled="isEdit"> <el-input v-model="ruleForm.costPrice">
<span slot="suffix">元</span> <span slot="suffix">元</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
......
<template>
<div>
<!-- 领卡用户明细 -->
<el-dialog title="领卡用户明细" :visible.sync="isVisible" width="1080px" class="user-detail-dialog" @close="handleReset()">
<div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important">
<glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="userDetailForm">
<span slot="footer" class="footer-btns">
</span>
</glsx-combi-form>
<div style="padding:0 20px 20px">
<div style="float: right; margin-right: 0;margin-bottom:10px;">
<el-button size="small" @click="handleReset()">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" size="small" @click="handleExport" class="selectBtn">导出</el-button>
</div>
<GLTable ref="userDetailTable" :hasNum="false" @hook:mounted="setTabelHeight" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn">
<div slot="status" slot-scope="scope">
<p :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</p>
</div>
</GLTable>
</div>
</div>
</el-dialog>
</div>
</template>
<script type='text/ecmascript-6'>
import url from '@/assets/empty.png'
function date_format(date, e) {
date = new Date(date)
var YY = date.getFullYear() + '/'
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/'
var DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
if (e == 'detail') {
return YY + MM + DD
} else {
return YY + MM + DD + ' ' + hh + mm + ss
}
}
const activeTypeList = [
{
confId: '',
confName: '全部'
},
{
confId: 1,
confName: '输入设备号激活'
},
{
confId: 2,
confName: '输入权益卡号激活'
},
{
confId: 3,
confName: '零一裂变激活'
},
{
confId: 4,
confName: '会员赠送激活'
},
{
confId: 5,
confName: '挪车贴绑定激活'
},
{
confId: 6,
confName: '购买权益卡激活'
},
{
confId: 9,
confName: '嘀加购买权益订单赠送'
},
{
confId: 10,
confName: '通过裂变激活'
},
{
confId: 11,
confName: '门店套餐赠送'
},
{
confId: 12,
confName: '购买数字化权益赠送'
},
];
export default {
name: 'detailDialog',
data() {
return {
url,
cardClassId: '',
tableData:[],
isVisible:false,
getListApi:this.$apis.equityApi.getcardRecordList,
// getListApi: this.$apis.equityApi.getEquityCardList,
batchListSearch:{
mobile:'', //手机号
merchantName:'', //开通门店
activeType:'', //开通方式
status:'', // 状态
activeTime: [], // 开通日期
memberType:''
},
baseData:{
activeTypeList: [
{
confId: 1,
confName: '输入设备号激活'
},
{
confId: 2,
confName: '输入权益卡号激活'
},
{
confId: 3,
confName: '零一裂变激活'
},
{
confId: 4,
confName: '会员赠送激活'
},
{
confId: 5,
confName: '挪车贴绑定激活'
},
{
confId: 6,
confName: '购买权益卡激活'
},
{
confId: 9,
confName: '嘀加购买权益订单赠送'
},
{
confId: 10,
confName: '通过裂变激活'
},
{
confId: 11,
confName: '门店套餐赠送'
},
{
confId: 12,
confName: '购买数字化权益赠送'
},
],
},
userDetailForm:[
{
label: '用户信息',
name: 'mobile',
type: 'input',
maxlength: 11,
placeholder: '请输入手机号'
},
{
label: '门店',
name: 'merchantName',
type: 'input',
maxlength: 15,
placeholder: '请输入门店名称'
},
{
label: '会员类型',
name: 'memberType',
type: 'select',
optionList: [
{
memberId: '',
memberName: '全部'
},
{
memberId: 1,
memberName: '正式会员'
},
{
memberId: 2,
memberName: '非正式会员'
}
],
optionId: 'memberId',
optionLabel: 'memberName',
optionsName: 'memberType'
},
{
label: '开通方式',
name: 'activeType',
type: 'select',
optionList: activeTypeList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'activeType'
},
{
label: '状态',
name: 'status',
type: 'select',
optionList: [
{
statusId: '',
statusName: '全部'
},
{
statusId: 1,
statusName: '生效中'
},
{
statusId: 2,
statusName: '已失效'
}
],
optionId: 'statusId',
optionLabel: 'statusName',
optionsName: 'status'
},
{
label: '开通日期',
name: 'activeTime',
type: 'datePicker',
valueFormat:'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions'
},
],
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号码',
prop: 'mobile'
// minWidth: '200'
},
{
label: '会员类型',
prop: 'memberType',
formatter: cellValue => {
return cellValue.memberType==1 ? '正式会员' : '非正式会员'
}
},
{
label: '开通门店',
prop: 'merchantName',
width: 200
},
{
label: '开通方式',
prop: 'activeType',
width: 200,
formatter: cellValue => {
return activeTypeList.map(item => item.confId).includes(cellValue.activeType) ? activeTypeList.find(item => item.confId == cellValue.activeType).confName : '-'
}
},
{
label: '状态',
prop: 'status',
addHtml: 'status'
},
{
label: '开通日期',
prop: 'activeTime',
width: 200
}
]
},
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
},
methods: {
show(row){
this.isVisible = !this.isVisible
this.$nextTick(()=>{
this.cardClassId = row.id
this.$refs.userDetailTable.refreshTable()
})
},
setStatusVal(status){
return {1: '生效中', 2: '已失效'}[status]
},
setTableFinishFun() {
//接收到的数据为空
this.afterSearchresetDate()
},
afterSearchresetDate(){
if(this.batchListSearch.startTime && this.batchListSearch.endTime){
const {startTime, endTime } = this.batchListSearch
let activeTime = [startTime.split(" ")[0], endTime.split(" ")[0]]
this.$set(this.batchListSearch, 'activeTime', activeTime)
}
this.$set(this.batchListSearch, 'mobile', this.batchListSearch.userInfo)
delete this.batchListSearch.endTime
delete this.batchListSearch.startTime
delete this.batchListSearch.userInfo
console.log( this.batchListSearch)
},
setTabelHeight() {
this.$refs.userDetailTable.tableHeightValues = '328'
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.setParams()
resolve()
})
},
setParams(){
if(Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length>0){
this.batchListSearch.startTime = this.batchListSearch.activeTime[0] + ' 00:00:00'
this.batchListSearch.endTime = this.batchListSearch.activeTime[1] + ' 23:59:59'
}
this.batchListSearch.cardClassId = this.cardClassId
this.batchListSearch.userInfo = this.batchListSearch.mobile
delete this.batchListSearch.activeTime
delete this.batchListSearch.mobile
},
handleExport(){
this.setParams()
this.$apis.orderApi.exportBalanceList(this.batchListSearch).then(({ code, data, message }) => {
this.afterSearchresetDate()
if (code == 0) {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} else {
this.$message.error(message)
}
})
},
handleSearch(){
this.$refs.userDetailTable.refreshTable()
},
CLOSE(){
console.log(11111)
},
handleReset(){
this.batchListSearch = {
mobile:'',
merchantName:'',
activeType:'',
status:'',
activeTime: [],
memberType:''
}
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .user-detail-dialog{
.el-form-item{
margin-right: 0;
}
.el-input--small .el-input__inner{
width: 215px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -9,17 +9,36 @@ ...@@ -9,17 +9,36 @@
</div> </div>
<div class="tableBox" style="margin-left: 40px; margin-top: 20px; margin-right: 20px"> <div class="tableBox" style="margin-left: 40px; margin-top: 20px; margin-right: 20px">
<div class="topline"> <div class="topline">
<div class="selectStore">搜索门店</div> <!-- <div class="selectStore">搜索门店</div>
<el-select size="small" v-model="searchForm.merchantName" filterable remote reserve-keyword placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable style="margin-left: 10px"> <el-select size="small" v-model="searchForm.merchantName" filterable remote reserve-keyword placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable style="margin-left: 10px">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> -->
<el-form :inline="true" style="width: 100%; margin-left: 10px;" :model="searchForm" label-width="108px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="搜索门店">
<el-select size="small" v-model="searchForm.merchantName" remote reserve-keyword filterable placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable >
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
<div class="operationBtn"> </el-form-item>
<el-form-item size="small" label="权益卡名称">
<el-input size="small" v-model="searchForm.cardClassName" placeholder="请输入权益卡名称"></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button> <el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button> <el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</div> </el-form-item>
</el-row>
</el-form>
<!-- <div class="operationBtn">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</div> -->
</div> </div>
<div class="tableCtn"> <div class="tableCtn">
<GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"> <GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<div slot="recipientCount" slot-scope="scope">
<p class="cursor-pointer" style="color:#5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn ='权益卡管理编辑' type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton> <GLButton fn ='权益卡管理编辑' type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton>
<el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button> <el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button>
...@@ -116,6 +135,7 @@ ...@@ -116,6 +135,7 @@
<el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button> <el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<detail-dialog ref="detailDetailRef"></detail-dialog>
</div> </div>
</template> </template>
...@@ -139,6 +159,7 @@ function date_format(date) { ...@@ -139,6 +159,7 @@ function date_format(date) {
return YY + MM + DD + ' ' + hh + mm + ss return YY + MM + DD + ' ' + hh + mm + ss
} }
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import detailDialog from './cardDetail'
// import {memberCardDetails} from "@/api/test"; // import {memberCardDetails} from "@/api/test";
export default { export default {
data() { data() {
...@@ -212,7 +233,8 @@ export default { ...@@ -212,7 +233,8 @@ export default {
getListApi: this.$apis.equityApi.getEquityCardList, getListApi: this.$apis.equityApi.getEquityCardList,
// getListApi: none, // getListApi: none,
searchForm: { searchForm: {
merchantName: '' merchantName: '',
cardClassName:''
}, },
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -260,9 +282,10 @@ export default { ...@@ -260,9 +282,10 @@ export default {
}, },
{ {
label: '领卡用户', label: '领卡用户',
prop: 'recipientCount' prop: 'recipientCount',
// width: 110, // width: 110,
// tagLabel: true // tagLabel: true
addHtml: 'recipientCount'
}, },
{ {
label: '状态', label: '状态',
...@@ -283,7 +306,9 @@ export default { ...@@ -283,7 +306,9 @@ export default {
} }
} }
}, },
components: {
detailDialog
},
mounted() { mounted() {
this.list = this.states.map(item => { this.list = this.states.map(item => {
return { value: `value:${item}`, label: `label:${item}` } return { value: `value:${item}`, label: `label:${item}` }
...@@ -305,6 +330,10 @@ export default { ...@@ -305,6 +330,10 @@ export default {
} }
}, },
methods: { methods: {
handleDetail(row){
this.$refs.detailDetailRef.show(row);
// this.getcardRecordList()
},
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.table.data.length) { if (!this.$refs.table.data.length) {
...@@ -489,6 +518,7 @@ export default { ...@@ -489,6 +518,7 @@ export default {
selectStore(e) { selectStore(e) {
if (e == 'reset') { if (e == 'reset') {
this.searchForm.merchantName = '' this.searchForm.merchantName = ''
this.searchForm.cardClassName = ''
this.$apis.equityApi.getEquityCardList(this.searchForm).then(res => { this.$apis.equityApi.getEquityCardList(this.searchForm).then(res => {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!