uniapp 发展会员业绩

pull/2/head
Jruome 2023-05-26 18:23:34 +08:00
parent 0736bd8e20
commit db940da972
19 changed files with 326 additions and 38 deletions

View File

@ -31,7 +31,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-button size="mini" type="primary" @click="handleAddMenu({id:0,name:'顶层目录'})" v-hasPermi="['product:category:create']" >新增{{ biztype.name }}</el-button> <el-button size="mini" type="primary" @click="handleAddMenu({id:0,name:'顶层目录'})" v-hasPermi="['admin:category:save']" >新增{{ biztype.name }}</el-button>
</div> </div>
<el-table <el-table
ref="treeList" ref="treeList"
@ -88,6 +88,7 @@
active-text="显示" active-text="显示"
inactive-text="隐藏" inactive-text="隐藏"
@change="onchangeIsShow(scope.row)" @change="onchangeIsShow(scope.row)"
v-hasPermi="['admin:category:save']"
/> />
</template> </template>
</el-table-column> </el-table-column>
@ -100,8 +101,8 @@
size="small" size="small"
@click="handleAddMenu(scope.row)" @click="handleAddMenu(scope.row)"
>添加子目录</el-button> >添加子目录</el-button>
<el-button type="text" size="small" @click="handleEditMenu(scope.row)" v-hasPermi="['product:category:update']"></el-button> <el-button type="text" size="small" @click="handleEditMenu(scope.row)" v-hasPermi="['admin:category:update']"></el-button>
<el-button type="text" size="small" @click="handleDelMenu(scope.row)" v-hasPermi="['product:category:delete']"></el-button> <el-button type="text" size="small" @click="handleDelMenu(scope.row)" v-hasPermi="['admin:category:delete']"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>

View File

@ -17,8 +17,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<router-link :to=" { name: 'ProductSpuCreate' } "> <router-link :to=" { name: 'ProductSpuCreate' } " >
<el-button size="small" type="primary" class="mr10">添加商品</el-button> <el-button size="small" type="primary" class="mr10" v-hasPermi="['admin:product:save']"></el-button>
</router-link> </router-link>
<!-- <el-button size="small" type="success" class="mr10" @click="onCopy"></el-button>--> <!-- <el-button size="small" type="success" class="mr10" @click="onCopy"></el-button>-->
<el-button size="small" icon="el-icon-upload2" @click="exports"></el-button> <el-button size="small" icon="el-icon-upload2" @click="exports"></el-button>
@ -119,23 +119,24 @@
active-text="上架" active-text="上架"
inactive-text="下架" inactive-text="下架"
@change="onchangeIsShow(scope.row)" @change="onchangeIsShow(scope.row)"
v-hasPermi="['admin:product:u' && 'admin:product:down']"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="150" fixed="right" align="center"> <el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{path: '/store/add/' + scope.row.id + '/1'}"> <router-link :to="{path: '/store/add/' + scope.row.id + '/1'}">
<el-button type="text" size="small" class="mr10">详情</el-button> <el-button type="text" size="small" class="mr10" v-hasPermi="['admin:product:info']"></el-button>
</router-link> </router-link>
<router-link :to="{path: '/store/add/' + scope.row.id}"> <router-link :to="{path: '/store/add/' + scope.row.id}" >
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'"></el-button> <el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'" v-hasPermi="['admin:product:update']"></el-button>
</router-link> </router-link>
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)"></el-button> <el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)" v-hasPermi="['admin:product:restore']"></el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button> <el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)" v-hasPermi="['admin:product:delete']">{{ tableFrom.type === '5' ? '' : '' }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block" v-hasPermi="['admin:product:list']">
<el-pagination <el-pagination
:page-sizes="[20, 40, 60, 80]" :page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit" :page-size="tableFrom.limit"

View File

@ -74,6 +74,12 @@
"style": { "style": {
"navigationBarTitleText": "收银台" "navigationBarTitleText": "收银台"
} }
},
{
"path": "pages/sale_performance/index",
"style": {
"navigationBarTitleText": "发展会员业绩"
}
}, },
{ {
"path": "pages/user/index", "path": "pages/user/index",

View File

@ -198,9 +198,10 @@
payType: that.paytype, payType: that.paytype,
createOrderFun: wechatOrderPay, createOrderFun: wechatOrderPay,
payResultHandle: (res) => { payResultHandle: (res) => {
console.log(res)
return { return {
jsapiResult: res.jsapiConfig, jsapiResult: res.jsapiConfig,
body: res.data body: res.body
} }
}, },
wxPaySuccess: () => { wxPaySuccess: () => {

View File

@ -12,13 +12,13 @@
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList" <view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
:key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view> :key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
</scroll-view> </scroll-view>
</view> </view>
<view class='conter'> <view class='conter'>
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;margin-top: 96rpx;"' @scroll="scroll" <scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;margin-top: 96rpx;"' @scroll="scroll"
scroll-with-animation='true'> scroll-with-animation='true'>
<block v-for="(item,index) in productList" :key="index"> <block v-for="(item,index) in productList" :key="index">
<view class='listw' :id="'b'+index"> <view class='listw' :id="'b'+index">
<view class='title acea-row row-center-wrapper'> <view class='title acea-row row-center-wrapper'>
<view class='line'></view> <view class='line'></view>
@ -72,7 +72,7 @@
let len = that.productList.length; let len = that.productList.length;
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[]; let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[];
this.number = child?child.length:0; this.number = child?child.length:0;
// //
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
@ -145,7 +145,7 @@
z-index: 9; z-index: 9;
border-bottom: 1rpx solid #f5f5f5; border-bottom: 1rpx solid #f5f5f5;
} }
.productSort .header .input { .productSort .header .input {
width: 700rpx; width: 700rpx;
height: 60rpx; height: 60rpx;
@ -154,22 +154,22 @@
box-sizing: border-box; box-sizing: border-box;
padding: 0 25rpx; padding: 0 25rpx;
} }
.productSort .header .input .iconfont { .productSort .header .input .iconfont {
font-size: 26rpx; font-size: 26rpx;
color: #555; color: #555;
} }
.productSort .header .input .placeholder { .productSort .header .input .placeholder {
color: #999; color: #999;
} }
.productSort .header .input input { .productSort .header .input input {
font-size: 26rpx; font-size: 26rpx;
height: 100%; height: 100%;
width: 597rpx; width: 597rpx;
} }
.productSort .aside { .productSort .aside {
position: fixed; position: fixed;
width: 180rpx; width: 180rpx;
@ -178,18 +178,18 @@
background-color: #f7f7f7; background-color: #f7f7f7;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
height: auto; height: auto;
margin-top: 96rpx; margin-top: 96rpx;
} }
.productSort .aside .item { .productSort .aside .item {
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
font-size: 26rpx; font-size: 26rpx;
color: #424242; color: #424242;
} }
.productSort .aside .item.on { .productSort .aside .item.on {
background-color: #fff; background-color: #fff;
border-left: 4rpx solid #fc4141; border-left: 4rpx solid #fc4141;
@ -198,49 +198,49 @@
color: #fc4141; color: #fc4141;
font-weight: bold; font-weight: bold;
} }
.productSort .conter { .productSort .conter {
margin: 96rpx 0 0 180rpx; margin: 96rpx 0 0 180rpx;
padding: 0 14rpx; padding: 0 14rpx;
background-color: #fff; background-color: #fff;
} }
.productSort .conter .listw { .productSort .conter .listw {
padding-top: 20rpx; padding-top: 20rpx;
} }
.productSort .conter .listw .title { .productSort .conter .listw .title {
height: 90rpx; height: 90rpx;
} }
.productSort .conter .listw .title .line { .productSort .conter .listw .title .line {
width: 100rpx; width: 100rpx;
height: 2rpx; height: 2rpx;
background-color: #f0f0f0; background-color: #f0f0f0;
} }
.productSort .conter .listw .title .name { .productSort .conter .listw .title .name {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
margin: 0 30rpx; margin: 0 30rpx;
font-weight: bold; font-weight: bold;
} }
.productSort .conter .list { .productSort .conter .list {
flex-wrap: wrap; flex-wrap: wrap;
} }
.productSort .conter .list .item { .productSort .conter .list .item {
width: 177rpx; width: 177rpx;
margin-top: 26rpx; margin-top: 26rpx;
} }
.productSort .conter .list .item .picture { .productSort .conter .list .item .picture {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
border-radius: 50%; border-radius: 50%;
} }
.productSort .conter .list .item .picture image { .productSort .conter .list .item .picture image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -249,7 +249,7 @@
background-color: #f7f7f7; background-color: #f7f7f7;
} }
} }
.productSort .conter .list .item .name { .productSort .conter .list .item .name {
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;

View File

@ -221,7 +221,6 @@
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-attachment: fixed; background-attachment: fixed;
overflow: hidden;
.u-nav-slot{ .u-nav-slot{
::v-deep .u-popup__content{ ::v-deep .u-popup__content{
padding-bottom: 20% !important; padding-bottom: 20% !important;

View File

@ -10,7 +10,7 @@
<text>再升1级即可获得XX等6项权益</text> <text>再升1级即可获得XX等6项权益</text>
<view class="left-button"> <view class="left-button">
<view class="left-shopping" @click="handleRouter('购买记录')"> <view class="left-shopping" @click="handleRouter('购买记录')">
<text>购买记录</text> <text>购买记录</text>
<image src="../../static/images/shopping-right.png" ></image> <image src="../../static/images/shopping-right.png" ></image>
</view> </view>
<view class="left-others" @click="handleRouter('代他人充值')"> <view class="left-others" @click="handleRouter('代他人充值')">
@ -258,6 +258,7 @@
} }
.right-button { .right-button {
border: 1px solid;
border-radius: 18rpx; border-radius: 18rpx;
margin-top: 10rpx; margin-top: 10rpx;
padding: 7rpx 16rpx; padding: 7rpx 16rpx;

View File

@ -22,7 +22,7 @@
const res = await memberGradeInfo() const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){ if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 2,
pagePath: '/pages/member_equity/index' pagePath: '/pages/member_equity/index'
}) })
uni.switchTab({ uni.switchTab({
@ -30,7 +30,7 @@
}) })
}else{ }else{
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 2,
pagePath: '/pages/member_application/index' pagePath: '/pages/member_application/index'
}) })
uni.switchTab({ uni.switchTab({

View File

@ -121,7 +121,6 @@ import store from '@/store/index';
* *
*/ */
goPay() { goPay() {
console.log(this.activeIndex)
if(this.activeIndex.length){ if(this.activeIndex.length){
this.$set(this, 'pay_close', true); this.$set(this, 'pay_close', true);
const orderInfos = this.activeIndex.map((item) => { const orderInfos = this.activeIndex.map((item) => {

View File

@ -0,0 +1,280 @@
<template>
<view class="box">
<u-navbar autoBack title="发展会员业绩" bgColor="rgba(255,255,255,0)" :placeholder="true" leftIconSize="40"
leftIconColor="#fff" titleStyle="font-size:35rpx;color:#fff">
<view slot="right">
<u-icon name="more-dot-fill" color="#fff"></u-icon>
</view>
</u-navbar>
<u-sticky bgColor="#fff">
<u-tabs @change="handleChange" :list="list" itemStyle=" padding-left: 46rpx; padding-right: 46rpx; height: 46px;" lineColor="#DA2E55" lineWidth="48rpx" lineHeight="10rpx" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"></u-tabs>
</u-sticky>
<view class="sale_content">
<view class="sale_money">
<view class="money_total">
<view class="money_left">
<image src="../../static/images/money1.png" ></image>
<text>总计金额</text>
</view>
<view class="money_right"><text></text>2400</view>
</view>
<view class="money_statistics">
<view class="money_left">
<image class="logo" src="../../static/images/money2.png" ></image>
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #FFE0C5 47%, #FFFFFF 100%);"></view>
<text>已发展会员个数</text>
</view>
<view class="money_right" style="color: #FF4800;">10</view>
<image class="fillet" src="../../static/images/fillet1.png" ></image>
</view>
<view class="money_statistics">
<view class="money_left">
<image class="logo" src="../../static/images/money3.png" ></image>
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #C8EFFF 47%, #FFFFFF 100%);"></view>
<text>提成比例</text>
</view>
<view class="money_right" style="color: #1082FF;">5%</view>
<image class="fillet" src="../../static/images/fillet2.png" ></image>
</view>
<view class="money_statistics">
<view class="money_left">
<image class="logo" src="../../static/images/money4.png" ></image>
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #CEF0DA 47%, #FFFFFF 100%);"></view>
<text>预计提成金额</text>
</view>
<view class="money_right" style="color: #32A84F;">120</view>
<image class="fillet" src="../../static/images/fillet3.png" ></image>
</view>
</view>
<view class="sale_turnover">
<view class="turnover_title">
流水明细
</view>
<view class="turnover_list">
<view class="list_item">
<view>
<view class="item_radius"></view>
<text>客户1</text>
</view>
<text>640.00</text>
</view>
<view class="list_item">
<view>
<view class="item_radius"></view>
<text>客户1</text>
</view>
<text>640.00</text>
</view>
<view class="list_item">
<view>
<view class="item_radius"></view>
<text>客户1</text>
</view>
<text>640.00</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
memberGradeInfo
} from '@/api/member.js';
export default {
name: "member_loding",
data() {
return {
activeStyle:{
fontSize: '34rpx',
fontFamily: 'PingFang SC',
fontWeight: '400',
color: '#DA2E55'
},
inactiveStyle:{
fontSize: '30rpx',
fontFamily: 'PingFang SC',
fontWeight: '400',
color: '#fff'
},
list: [{
name: '今日',
}, {
name: '上周',
}, {
name: '上月'
}, {
name: '累计'
}]
};
},
async onLoad() {
try {
uni.showLoading({
title: '加载中'
});
} finally {
uni.hideLoading();
}
},
methods: {
handleChange(index){
}
}
};
</script>
<style lang="scss" scoped>
.box {
position: relative;
min-height: 100vh;
background: url(../../static/images/sale_bg.png);
background-size: 100%;
background-repeat: no-repeat;
background-attachment: fixed;
padding: 0 40rpx;
::v-deep .u-sticky{
background: rgba(255, 255, 255, 0) !important;
display: flex;
justify-content: center;
}
.sale_content{
display: flex;
flex-direction: column;
.sale_money{
display: flex;
flex-direction: column;
.money_total{
margin-bottom: 14rpx;
display: flex;
justify-content: space-between;
min-height: 160rpx;
background: url(../../static/images/money_total.png);
background-size: 100%;
background-repeat: no-repeat;
.money_left{
display: flex;
align-items: center;
text{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
margin-left: 37rpx;
}
image{
margin:10rpx 0 0 10rpx;
width: 100rpx;
height: 111rpx;
align-self: flex-start;
}
}
.money_right{
display: flex;
align-items: center;
margin-right: 48rpx;
font-size: 45rpx;
font-family: PingFang SC;
font-weight: 400;
color: #DA2E55;
text{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #DA2E55;
}
}
}
.money_statistics{
margin-bottom: 14rpx;
padding: 19rpx 36rpx 15rpx 19rpx;
background: #FFFFFF;
box-shadow: 0px 0px 18rpx 0px rgba(127,127,127,0.08);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
.fillet{
width: 23rpx;
height: 20rpx;
position: absolute;
bottom: 10rpx;
right: 10rpx;
}
.money_left{
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
.logo{
width: 80rpx;
height: 80rpx;
}
.segmentation{
margin: 0 24rpx 0 18rpx;
width: 6rpx;
height: 43rpx;
}
}
.money_right{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
}
}
}
.sale_turnover{
margin-top: 22rpx;
padding: 30rpx 32rpx;
background: #FFFFFF;
box-shadow: 0px 0px 18rpx 0px rgba(127,127,127,0.08);
border-radius: 20rpx;
.turnover_title{
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #000000;
}
.turnover_list{
display: flex;
flex-direction: column;
.list_item{
display: flex;
justify-content: space-between;
padding: 29rpx 0;
border-bottom: 1px solid #D8D8D8;
text{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
view{
display: flex;
align-items: center;
.item_radius{
margin-right: 19rpx;
width: 10rpx;
height: 10rpx;
background: #FF4106;
border-radius: 50%;
}
}
}
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 KiB