Commit 52a8a6ac authored by zhengke's avatar zhengke

修改

parent 64cf2e9d
<template> <template>
<view class="userManage" :style="{height: contentHeight,}"> <view class="userManage" :style="{height: contentHeight,}">
<view style="padding: 10px 0; background: #fff;"> <view style="padding: 10px 0; background: #fff;">
<u-tabs :list="list" :is-scroll="false" :current="current" name="Name" @change="change" :active-color="mainColor" <u-tabs :list="list" :is-scroll="false" :current="current" name="Name" @change="change"
bg-color="#FFF" height="80" bar-width="100"></u-tabs> :active-color="mainColor" bg-color="#FFF" height="80" bar-width="100"></u-tabs>
</view> </view>
<view class="Um_Search" v-if="current==0"> <view class="Um_Search" v-if="current==0">
<u-search :show-action="false" @search="init(1)" style="background-color: #fff;" height="70" shape="round" placeholder="请输入昵称" v-model="msg.Name"></u-search> <u-search :show-action="false" @search="init(1)" style="background-color: #fff;" height="70" shape="round"
placeholder="请输入昵称" v-model="msg.Name"></u-search>
</view> </view>
<view class="Um_Search" v-if="current==1"> <view class="Um_Search" v-if="current==1">
<u-search :show-action="false" @search="getDistriData(1)" style="background-color: #fff;" <u-search :show-action="false" @search="getDistriData(1)" style="background-color: #fff;" height="70"
height="70" shape="round" placeholder="请输入昵称" v-model="dsMsg.Name"></u-search> shape="round" placeholder="请输入昵称" v-model="dsMsg.Name"></u-search>
</view> </view>
<view style="height: calc(100vh - 50px); background: #fff;" v-if="dataList.length == 0"> <view style="height: calc(100vh - 50px); background: #fff;" v-if="dataList.length == 0">
...@@ -50,14 +51,20 @@ ...@@ -50,14 +51,20 @@
<text class="user_Number">{{item.Balance}}</text> <text class="user_Number">{{item.Balance}}</text>
</view> </view>
</view> </view>
<view v-if="item.Remark" style="display: flex;margin-top:20rpx;">
<view style="flex-shrink: 0;">备注:</view>
<view>{{item.Remark}}</view>
</view>
<view style="display: flex;justify-content:flex-end;margin-top: 20rpx;"> <view style="display: flex;justify-content:flex-end;margin-top: 20rpx;">
<u-button size="mini" class="ucustomStyle" shape="circle">修改信息</u-button> <u-button size="mini" class="ucustomStyle" shape="circle" @click="getItemInfo(item)">修改信息
<u-button size="mini" class="ucustomStyle" shape="circle">扣除</u-button> </u-button>
<u-button size="mini" shape="circle">充值</u-button> <u-button size="mini" class="ucustomStyle" shape="circle" @click="kouchuBtn(item,2)">扣除
</u-button>
<u-button size="mini" shape="circle" @click="kouchuBtn(item,1)">充值</u-button>
</view> </view>
</view> </view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
bg-color="#f3f4f6" /> :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
...@@ -81,16 +88,48 @@ ...@@ -81,16 +88,48 @@
</view> </view>
<view> <view>
<text class="user_ComBg" style="font-size:24rpx;">可体现金额</text> <text class="user_ComBg" style="font-size:24rpx;">可体现金额</text>
<text class="user_Number" style="font-size:24rpx;">{{item.CommissionWithdrawal}}</text> <text class="user_Number"
style="font-size:24rpx;">{{item.CommissionWithdrawal}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
bg-color="#f3f4f6" /> :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<u-action-sheet :list="listTwo" v-model="showInfoModel"></u-action-sheet>
<u-modal v-model="showRemarkBox" :show-cancel-button="true" title="修改备注" contentSlot @confirm="Save">
<textarea style="height: 120px;" class="inputRemark" v-model="addMsg.Remark" />
</u-modal>
<!-- 扣除积分 -->
<u-modal v-model="showKouchu" :show-title="false" :show-cancel-button="true" contentSlot @confirm="SaveScore">
<!-- 扣除 -->
<template v-if="ScoreMsg.Type==2">
<u-tabs :list="listThree" :is-scroll="false" :current="currentScore" @change="changeScore"
:active-color="mainColor" bg-color="#FFF" height="80"></u-tabs>
<view style="margin-top:20rpx;">
<input v-if="currentScore==0" class="uni-input userManInput" v-model="ScoreMsg.Integral"
placeholder="请填写扣除积分" />
<input v-if="currentScore==1" class="uni-input userManInput" v-model="ScoreMsg.Balance"
placeholder="请填写扣除金额" />
<input class="uni-input userManInput" v-model="ScoreMsg.Description" placeholder="请输入备注信息" />
</view>
</template>
<!-- 充值 -->
<template v-if="ScoreMsg.Type==1">
<u-tabs :list="listFour" :is-scroll="false" :current="currentScore" @change="changeScore"
:active-color="mainColor" bg-color="#FFF" height="80"></u-tabs>
<view style="margin-top:20rpx;">
<input v-if="currentScore==0" class="uni-input userManInput" v-model="ScoreMsg.Integral"
placeholder="请填写充值积分" />
<input v-if="currentScore==1" class="uni-input userManInput" v-model="ScoreMsg.Balance"
placeholder="请填写充值金额" />
<input class="uni-input userManInput" v-model="ScoreMsg.Description" placeholder="请输入备注信息" />
</view>
</template>
</u-modal>
</view> </view>
</template> </template>
...@@ -120,7 +159,7 @@ ...@@ -120,7 +159,7 @@
EndTime: "" EndTime: ""
}, },
//分销商msg //分销商msg
dsMsg:{ dsMsg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
UserId: '', UserId: '',
...@@ -138,12 +177,49 @@ ...@@ -138,12 +177,49 @@
}, { }, {
name: '核销员' name: '核销员'
}], }],
listTwo: [{
text: '修改备注'
}, {
text: '修改会员等级'
}],
listThree: [{
name: '扣积分'
}, {
name: '扣金额'
}],
listFour: [{
name: '充积分'
}, {
name: '充金额'
}],
status: "loadmore", status: "loadmore",
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
showInfoModel: false,
addMsg: {
Id: '',
SuperiorId: '',
MemberGrade: '',
ContactWay: '',
Remark: '',
AliasName: '',
PostId: 0, //职位
},
showRemarkBox: false,
showKouchu: false,
currentScore: 0,
ScoreMsg: {
MallBaseId: 0,
Type: 1,
UserId: 0,
Integral: '',
Image: "",
Description: "",
Balance: ''
},
}; };
}, },
created() { created() {
...@@ -163,17 +239,17 @@ ...@@ -163,17 +239,17 @@
change(index) { change(index) {
this.current = index; this.current = index;
this.dataList = []; this.dataList = [];
if(index==0){ if (index == 0) {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.init(); this.init();
} }
//分销商 //分销商
if(index==1){ if (index == 1) {
this.getDistriData(); this.getDistriData();
} }
}, },
init(type) { init(type) {
if(type==1){ if (type == 1) {
this.dataList = []; this.dataList = [];
} }
uni.showLoading({ uni.showLoading({
...@@ -202,7 +278,7 @@ ...@@ -202,7 +278,7 @@
} }
}, },
//加载分销商 //加载分销商
lowerTwo(e){ lowerTwo(e) {
if (this.dsMsg.pageIndex < this.page_count) { if (this.dsMsg.pageIndex < this.page_count) {
this.dsMsg.pageIndex++; this.dsMsg.pageIndex++;
this.status = "loading"; this.status = "loading";
...@@ -212,8 +288,8 @@ ...@@ -212,8 +288,8 @@
} }
}, },
//获取分销商 //获取分销商
getDistriData(type){ getDistriData(type) {
if(type==1){ if (type == 1) {
this.dataList = []; this.dataList = [];
} }
uni.showLoading({ uni.showLoading({
...@@ -232,10 +308,67 @@ ...@@ -232,10 +308,67 @@
} }
); );
}, },
goback() { //点击修改获取信息
uni.navigateBack() getItemInfo(obj) {
console.log(obj);
this.addMsg.Id = obj.Id;
this.addMsg.Remark = obj.Remark;
this.showRemarkBox = true;
}, },
//保存修改信息
Save() {
this.requestAdmin("/api/user/SetMemberUserInfoForHT", this.addMsg, res => {
if (res.resultCode == 1) {
this.init(1);
this.showRemarkBox = false;
} else {
uni.showToast({
title: res.data.message
});
}
})
},
//点击扣除按钮
kouchuBtn(item, type) {
console.log(item, 'item');
this.ScoreMsg.Balance='';
this.ScoreMsg.Integral='';
this.ScoreMsg.Description='';
this.ScoreMsg.Type = type;
this.ScoreMsg.UserId = item.Id;
this.ScoreMsg.MallBaseId = uni.getStorageSync('mall_UserInfo').MallBaseId
this.showKouchu = true;
},
//change
changeScore(index) {
this.currentScore = index;
},
//保存积分扣除充值
SaveScore() {
let cmd=''
if (this.currentScore == 0) {
cmd = "/api/user/SetMemberIntegralInfo";
} else {
cmd = "/api/user/SetMemberBalanceInfo";
}
this.requestAdmin(cmd,this.ScoreMsg,(res) => {
if (res.resultCode === 1) {
this.init();
this.showKouchu = false;
uni.showToast({
title: '保存成功',
icon: 'none',
})
} else {
uni.showToast({
title: res.data.message
});
}
}, },
null
);
}
}
}; };
</script> </script>
<style> <style>
...@@ -248,12 +381,14 @@ ...@@ -248,12 +381,14 @@
.userManage .userList { .userManage .userList {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
padding:20rpx; padding: 20rpx;
margin-bottom:25rpx; margin-bottom: 25rpx;
} }
.user_Top{
.user_Top {
display: flex; display: flex;
} }
.orderList .listBox { .orderList .listBox {
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
...@@ -366,57 +501,82 @@ ...@@ -366,57 +501,82 @@
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
/** 显示的行数 **/ /** 显示的行数 **/
} }
.Um_Search{
width:100%; .Um_Search {
padding:30rpx 40rpx; width: 100%;
padding: 30rpx 40rpx;
background-color: #EFEFF4; background-color: #EFEFF4;
} }
.userManage .u-content{
background-color: #fff!important; .userManage .u-content {
background-color: #fff !important;
} }
.userName{
font-size:30rpx; .userName {
color:#000; font-size: 30rpx;
color: #000;
} }
.userLevel{
font-size:26rpx; .userLevel {
color:#999999; font-size: 26rpx;
margin-left:10rpx; color: #999999;
margin-left: 10rpx;
} }
.user_Header{
width:100rpx; .user_Header {
height:100rpx; width: 100rpx;
height: 100rpx;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
margin-right:20rpx; margin-right: 20rpx;
} }
.user_Header img{
.user_Header img {
border-radius: 10rpx; border-radius: 10rpx;
} }
.user_ScoreBwt{
.user_ScoreBwt {
display: flex; display: flex;
margin-top:20rpx; margin-top: 20rpx;
} }
.user_ComBg{
.user_ComBg {
background-color: #EFEFF4; background-color: #EFEFF4;
color:#999999; color: #999999;
margin-right:20rpx; margin-right: 20rpx;
padding:3rpx 8rpx; padding: 3rpx 8rpx;
} }
.user_Number{
color:#999999; .user_Number {
color: #999999;
} }
.user_ScoreBwt >view{
width:50%; .user_ScoreBwt>view {
width: 50%;
} }
.ucustomStyle{
.ucustomStyle {
margin-right: 20rpx; margin-right: 20rpx;
} }
.user_DisHeader{
.user_DisHeader {
width: 130rpx; width: 130rpx;
height: 130rpx; height: 130rpx;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
margin-right: 20rpx; margin-right: 20rpx;
} }
.inputRemark {
border: 1px solid #d1d1d1;
margin: 40rpx 0 40rpx 28rpx;
}
.userManInput {
height: 30px;
border: 1px solid #F2F3F6;
width: 90%;
margin: auto;
margin-bottom: 20rpx;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment