parent
60efa27c21
commit
125da454eb
File diff suppressed because one or more lines are too long
@ -1,318 +1,352 @@ |
||||
<template> |
||||
<view> |
||||
<view class="onorder width100" v-if="agentCouponList.length==0"> |
||||
<image :src="imagewxUrl+imgadres"></image> |
||||
</view> |
||||
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index"> |
||||
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null" |
||||
src='../../../static/img/logo.png'></image> |
||||
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image> |
||||
<view class="agent_title paddtop13"> |
||||
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view> |
||||
<view class="width100 mart5 font14 fcor333 height22"> |
||||
<!-- <view class="agent_left_num flleft text1"> |
||||
{{agent.highCouponCode.salesCode}} |
||||
</view> --> |
||||
<view class="agent_right_num flright fotrt"> |
||||
{{agent.highCoupon.salesPrice}}.00 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="width100 line1 mart5"></view> |
||||
<view class="width90"> |
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)" |
||||
v-if="typeId == 1">生成油码</button> |
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)" |
||||
v-if="typeId == 2">查看详情</button> |
||||
<view class="agent_ts font15 fcor333 fotlt text1" v-if="typeId == 2 && agent.remark !=null "> |
||||
备注:{{agent.remark}}</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- /弹窗 --> |
||||
<view :hidden="userFeedbackHidden" class="popup_content"> |
||||
<view class="popup_title">填写备注</view> |
||||
<view class="popup_textarea_item"> |
||||
<textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent"> |
||||
</textarea> |
||||
<view @click="submitFeedback()"> |
||||
<button class="popup_button">提交备注</button> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="popup_overlay" :hidden="userFeedbackHidden" @click="hideDiv()"></view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getCodeListByAgentCoupon, |
||||
generateCode |
||||
} from "../../../Utils/Api.js"; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
pageNum: 1, |
||||
pageSize: 10, |
||||
agentCouponList: [], |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
imgadres:'noorder.png', |
||||
isNoMoreData: false, |
||||
typeId: '', |
||||
reFreshs: '', |
||||
couponId: '', |
||||
image_url: app.globalData.imgUrl, |
||||
userFeedbackHidden: true, // 默认隐藏 |
||||
feedbackContent: '', // 用户备注信息 |
||||
couId: '' |
||||
} |
||||
}, |
||||
filters: { |
||||
//过滤器 用于格式化时间 |
||||
formatDate: function(value, spe = '/') { |
||||
let data = new Date(value); |
||||
let year = data.getFullYear(); |
||||
let month = data.getMonth() + 1; |
||||
let day = data.getDate(); |
||||
let h = data.getHours(); |
||||
let mm = data.getMinutes(); |
||||
let s = data.getSeconds(); |
||||
month = month >= 10 ? month : "0" + month; |
||||
day = day >= 10 ? day : "0" + day; |
||||
h = h >= 10 ? h : "0" + h; |
||||
mm = mm >= 10 ? mm : "0" + mm; |
||||
s = s >= 10 ? s : "0" + s; |
||||
return `${year}${spe}${month}${spe}${day}`; |
||||
} |
||||
}, |
||||
onReachBottom() { |
||||
this.getCodeListByAgentCoupon(); |
||||
}, |
||||
onLoad(option) { |
||||
this.typeId = option.id; |
||||
this.couponId = option.couponsId; |
||||
}, |
||||
onShow() { |
||||
this.getCodeListByAgentCoupon(); |
||||
}, |
||||
watch: { |
||||
//监听reFresh,如果有修改就执行监听器 |
||||
reFreshs: function() { |
||||
this.pageNum = 1; |
||||
this.agentCouponList = [] |
||||
this.isNoMoreData = false; |
||||
this.getCodeListByAgentCoupon(); |
||||
} |
||||
}, |
||||
methods: { |
||||
//查询列表 |
||||
getCodeListByAgentCoupon() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
if (this.isNoMoreData) { |
||||
uni.hideLoading(); |
||||
return false; |
||||
} |
||||
let pagenum = this.pageNum; |
||||
let params; |
||||
if (this.typeId == 1) { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: 1, |
||||
pageSize: this.pageSize |
||||
} |
||||
} else if (this.typeId == 2) { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: '2,3', |
||||
pageSize: this.pageSize |
||||
} |
||||
} |
||||
|
||||
getCodeListByAgentCoupon(params).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
||||
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
||||
this.isNoMoreData = true; |
||||
} |
||||
this.agentCouponList = this.agentCouponList.concat(res.return_data.list); |
||||
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
||||
} else { |
||||
this.agentCouponList = []; |
||||
} |
||||
}) |
||||
}, |
||||
|
||||
//生成二维码 |
||||
generateCode(item) { |
||||
this.userFeedbackHidden = false; |
||||
this.couId = item; |
||||
}, |
||||
hideDiv() { // 隐藏输入弹出框 |
||||
this.userFeedbackHidden = true; |
||||
}, |
||||
// 提交备注 |
||||
submitFeedback() { |
||||
if (this.feedbackContent == '') { |
||||
uni.showToast({ |
||||
title: '请填写备注信息', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} else { |
||||
uni.showLoading({ |
||||
title: '油码生成中...' |
||||
}) |
||||
let datas = { |
||||
couponAgentCodeId: this.couId, |
||||
remark: this.feedbackContent |
||||
} |
||||
generateCode(datas).then(res => { |
||||
uni.hideLoading() |
||||
if (res.return_code == '000000') { |
||||
this.userFeedbackHidden = true; |
||||
uni.navigateTo({ |
||||
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this.couId |
||||
}) |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}); |
||||
} |
||||
}, |
||||
|
||||
//查看详情 |
||||
jumpCouponDes(ids) { |
||||
uni.navigateTo({ |
||||
url: '../../goods/coupons-info-details/coupons-info-details?id=' + ids |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
page { |
||||
background-color: #f5f5f5; |
||||
} |
||||
|
||||
.onorder { |
||||
width: 100%; |
||||
height: 50vw; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-content: center; |
||||
flex-wrap: wrap; |
||||
|
||||
image { |
||||
width: 70vw; |
||||
margin-top: 150px; |
||||
} |
||||
|
||||
.text { |
||||
width: 100%; |
||||
height: 60upx; |
||||
font-size: 28upx; |
||||
color: #444; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
} |
||||
|
||||
.agent_img { |
||||
width: 50px; |
||||
height: 50px; |
||||
} |
||||
|
||||
.agent_title { |
||||
margin-left: 60px; |
||||
} |
||||
|
||||
.agent_left_num { |
||||
width: 55%; |
||||
} |
||||
|
||||
.agent_right_num { |
||||
width: 40%; |
||||
margin-right: 5%; |
||||
} |
||||
|
||||
.agent_btn { |
||||
width: 88px; |
||||
height: 35px; |
||||
line-height: 35px; |
||||
} |
||||
|
||||
.agent_ts { |
||||
margin-right: 95px; |
||||
padding-top: 18px; |
||||
} |
||||
|
||||
// 弹窗 |
||||
.popup_overlay { |
||||
|
||||
position: fixed; |
||||
top: 0%; |
||||
left: 0%; |
||||
width: 100%; |
||||
height: 100%; |
||||
background-color: black; |
||||
z-index: 1001; |
||||
-moz-opacity: 0.8; |
||||
opacity: .80; |
||||
filter: alpha(opacity=88); |
||||
} |
||||
|
||||
.popup_content { |
||||
position: fixed; |
||||
top: 50%; |
||||
left: 50%; |
||||
width: 520upx; |
||||
height: 550upx; |
||||
margin-left: -270upx; |
||||
margin-top: -270upx; |
||||
border: 10px solid white; |
||||
background-color: white; |
||||
z-index: 1002; |
||||
overflow: auto; |
||||
border-radius: 20upx; |
||||
} |
||||
|
||||
.popup_title { |
||||
padding-top: 20upx; |
||||
width: 480upx; |
||||
text-align: center; |
||||
font-size: 40rpx; |
||||
} |
||||
|
||||
.popup_textarea_item { |
||||
padding-top: 20rpx; |
||||
height: 240rpx; |
||||
width: 90%; |
||||
background-color: #F1F1F1; |
||||
margin-top: 30rpx; |
||||
margin-left: 5%; |
||||
} |
||||
|
||||
.popup_textarea { |
||||
width: 410upx; |
||||
font-size: 26upx; |
||||
margin-left: 20upx; |
||||
} |
||||
|
||||
.popup_button { |
||||
color: white; |
||||
background-color: #4399FC; |
||||
border-radius: 10upx; |
||||
} |
||||
<template> |
||||
<view> |
||||
<view class="onorder width100" v-if="agentCouponList.length==0"> |
||||
<image :src="imagewxUrl+imgadres"></image> |
||||
</view> |
||||
<view class="width90 height130 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index"> |
||||
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null" |
||||
src='../../../static/img/logo.png'></image> |
||||
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image> |
||||
<view class="agent_title paddtop13"> |
||||
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view> |
||||
<view class="width100 mart5 font14 fcor333 height22"> |
||||
<!-- <view class="agent_left_num flleft text1"> |
||||
{{agent.highCouponCode.salesCode}} |
||||
</view> --> |
||||
<view class="agent_right_num flright fotrt"> |
||||
{{agent.highCoupon.salesPrice}}.00 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="width100 line1 mart5"></view> |
||||
<view class="width90"> |
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)" |
||||
v-if="typeId == 1 && typeid == 1">生成油码</button> |
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)" |
||||
v-if="typeId == 2 && typeid == 1">查看详情</button> |
||||
<view class="agent_ts font15 fcor333 fotlt text1" |
||||
v-if="typeId == 2 && agent.remark !=null && typeid == 1"> |
||||
备注:{{agent.remark}}</view> |
||||
|
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)" |
||||
v-if="typeId == 1 && typeid == 2">生成兑换码</button> |
||||
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)" |
||||
v-if="typeId == 2 && typeid == 2">查看详情</button> |
||||
<view class="agent_ts font15 fcor333 fotlt text1" |
||||
v-if="typeId == 2 && typeid == 2 && agent.remark !=null "> |
||||
备注:{{agent.remark}}</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- /弹窗 --> |
||||
<view :hidden="userFeedbackHidden" class="popup_content"> |
||||
<view class="popup_title">填写备注</view> |
||||
<view class="popup_textarea_item"> |
||||
<textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent"> |
||||
</textarea> |
||||
<view @click="submitFeedback()"> |
||||
<button class="popup_button">提交备注</button> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="popup_overlay" :hidden="userFeedbackHidden" @click="hideDiv()"></view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getCodeListByAgentCoupon, |
||||
generateCode |
||||
} from "../../../Utils/Api.js"; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
pageNum: 1, |
||||
pageSize: 10, |
||||
agentCouponList: [], |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
imgadres: 'noorder.png', |
||||
isNoMoreData: false, |
||||
typeId: '', |
||||
reFreshs: '', |
||||
couponId: '', |
||||
image_url: app.globalData.imgUrl, |
||||
userFeedbackHidden: true, // 默认隐藏 |
||||
feedbackContent: '', // 用户备注信息 |
||||
couId: '', |
||||
typeid: '' |
||||
} |
||||
}, |
||||
filters: { |
||||
//过滤器 用于格式化时间 |
||||
formatDate: function(value, spe = '/') { |
||||
let data = new Date(value); |
||||
let year = data.getFullYear(); |
||||
let month = data.getMonth() + 1; |
||||
let day = data.getDate(); |
||||
let h = data.getHours(); |
||||
let mm = data.getMinutes(); |
||||
let s = data.getSeconds(); |
||||
month = month >= 10 ? month : "0" + month; |
||||
day = day >= 10 ? day : "0" + day; |
||||
h = h >= 10 ? h : "0" + h; |
||||
mm = mm >= 10 ? mm : "0" + mm; |
||||
s = s >= 10 ? s : "0" + s; |
||||
return `${year}${spe}${month}${spe}${day}`; |
||||
} |
||||
}, |
||||
onReachBottom() { |
||||
this.getCodeListByAgentCoupon(); |
||||
}, |
||||
onLoad(option) { |
||||
this.typeId = option.id; |
||||
this.typeid = option.typeid; |
||||
this.couponId = option.couponsId; |
||||
}, |
||||
onShow() { |
||||
this.getCodeListByAgentCoupon(); |
||||
}, |
||||
watch: { |
||||
//监听reFresh,如果有修改就执行监听器 |
||||
reFreshs: function() { |
||||
this.pageNum = 1; |
||||
this.agentCouponList = [] |
||||
this.isNoMoreData = false; |
||||
this.getCodeListByAgentCoupon(); |
||||
} |
||||
}, |
||||
methods: { |
||||
//查询列表 |
||||
getCodeListByAgentCoupon() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
if (this.isNoMoreData) { |
||||
uni.hideLoading(); |
||||
return false; |
||||
} |
||||
let pagenum = this.pageNum; |
||||
let params; |
||||
if (this.typeId == 1) { |
||||
if (this.typeid == 1) { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: 1, |
||||
type: 1, |
||||
pageSize: this.pageSize |
||||
} |
||||
} else { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: 1, |
||||
type: 2, |
||||
pageSize: this.pageSize |
||||
} |
||||
} |
||||
} else if (this.typeId == 2) { |
||||
if (this.typeid == 1) { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: '2,3', |
||||
type: 1, |
||||
pageSize: this.pageSize |
||||
} |
||||
} else { |
||||
params = { |
||||
pageNum: pagenum, |
||||
couponId: this.couponId, |
||||
status: '2,3', |
||||
type: 2, |
||||
pageSize: this.pageSize |
||||
} |
||||
} |
||||
} |
||||
|
||||
getCodeListByAgentCoupon(params).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
||||
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
||||
this.isNoMoreData = true; |
||||
} |
||||
this.agentCouponList = this.agentCouponList.concat(res.return_data.list); |
||||
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
||||
} else { |
||||
this.agentCouponList = []; |
||||
} |
||||
}) |
||||
}, |
||||
|
||||
//生成二维码 |
||||
generateCode(item) { |
||||
this.userFeedbackHidden = false; |
||||
this.couId = item; |
||||
}, |
||||
hideDiv() { // 隐藏输入弹出框 |
||||
this.userFeedbackHidden = true; |
||||
}, |
||||
// 提交备注 |
||||
submitFeedback() { |
||||
if (this.feedbackContent == '') { |
||||
uni.showToast({ |
||||
title: '请填写备注信息', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} else { |
||||
uni.showLoading({ |
||||
title: '生成中...' |
||||
}) |
||||
let datas = { |
||||
couponAgentCodeId: this.couId, |
||||
remark: this.feedbackContent |
||||
} |
||||
generateCode(datas).then(res => { |
||||
uni.hideLoading() |
||||
if (res.return_code == '000000') { |
||||
this.userFeedbackHidden = true; |
||||
uni.navigateTo({ |
||||
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this |
||||
.couId |
||||
}) |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}); |
||||
} |
||||
}, |
||||
|
||||
//查看详情 |
||||
jumpCouponDes(ids) { |
||||
uni.navigateTo({ |
||||
url: '../../goods/coupons-info-details/coupons-info-details?id=' + ids |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
page { |
||||
background-color: #f5f5f5; |
||||
} |
||||
|
||||
.onorder { |
||||
width: 100%; |
||||
height: 50vw; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-content: center; |
||||
flex-wrap: wrap; |
||||
|
||||
image { |
||||
width: 70vw; |
||||
margin-top: 150px; |
||||
} |
||||
|
||||
.text { |
||||
width: 100%; |
||||
height: 60upx; |
||||
font-size: 28upx; |
||||
color: #444; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
} |
||||
|
||||
.agent_img { |
||||
width: 50px; |
||||
height: 50px; |
||||
} |
||||
|
||||
.agent_title { |
||||
margin-left: 60px; |
||||
} |
||||
|
||||
.agent_left_num { |
||||
width: 55%; |
||||
} |
||||
|
||||
.agent_right_num { |
||||
width: 40%; |
||||
margin-right: 5%; |
||||
} |
||||
|
||||
.agent_btn { |
||||
width: 88px; |
||||
height: 35px; |
||||
line-height: 35px; |
||||
} |
||||
|
||||
.agent_ts { |
||||
margin-right: 95px; |
||||
padding-top: 18px; |
||||
} |
||||
|
||||
// 弹窗 |
||||
.popup_overlay { |
||||
|
||||
position: fixed; |
||||
top: 0%; |
||||
left: 0%; |
||||
width: 100%; |
||||
height: 100%; |
||||
background-color: black; |
||||
z-index: 1001; |
||||
-moz-opacity: 0.8; |
||||
opacity: .80; |
||||
filter: alpha(opacity=88); |
||||
} |
||||
|
||||
.popup_content { |
||||
position: fixed; |
||||
top: 50%; |
||||
left: 50%; |
||||
width: 520upx; |
||||
height: 550upx; |
||||
margin-left: -270upx; |
||||
margin-top: -270upx; |
||||
border: 10px solid white; |
||||
background-color: white; |
||||
z-index: 1002; |
||||
overflow: auto; |
||||
border-radius: 20upx; |
||||
} |
||||
|
||||
.popup_title { |
||||
padding-top: 20upx; |
||||
width: 480upx; |
||||
text-align: center; |
||||
font-size: 40rpx; |
||||
} |
||||
|
||||
.popup_textarea_item { |
||||
padding-top: 20rpx; |
||||
height: 240rpx; |
||||
width: 90%; |
||||
background-color: #F1F1F1; |
||||
margin-top: 30rpx; |
||||
margin-left: 5%; |
||||
} |
||||
|
||||
.popup_textarea { |
||||
width: 410upx; |
||||
font-size: 26upx; |
||||
margin-left: 20upx; |
||||
} |
||||
|
||||
.popup_button { |
||||
color: white; |
||||
background-color: #4399FC; |
||||
border-radius: 10upx; |
||||
} |
||||
</style> |
||||
|
@ -1,226 +1,314 @@ |
||||
<template> |
||||
<view> |
||||
<view class="promotion_bg backcorf06 width100 height90 fcorfff fotct font24 fontspec10">我的推广</view> |
||||
<view class="promotion_dt width90 height100p backcorfff" @click="jumpRunWater"> |
||||
<view class="width100 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">今日数据</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
<view class="width90 mart5 height22"> |
||||
<view class="width50 flleft font18 fcor333 fontwig6 fotlt">{{agentList.orderCount}}</view> |
||||
<view class="width50 flright font18 fcor333 fontwig6 fotrt">{{agentList.turnoverPrice}}</view> |
||||
</view> |
||||
<view class="width90 mart10"> |
||||
<view class="width50 flleft font15 fcor666 fontwig6 fotlt">今日订单</view> |
||||
<view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view> |
||||
</view> |
||||
</view> |
||||
<!-- //库存管理 --> |
||||
<view class="width100 mart80"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">库存管理</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
剩余库存({{agentList.laveStockCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 {{agentList.surplusCountPrice}} |
||||
</view> |
||||
</view> |
||||
<!-- //循环:class="[index==0?'colorfe':'']" --> |
||||
<view v-if="minepros == ''">暂无数据</view> |
||||
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7" @click="jumpAgent(1,mers.couponId)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.stockCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.stockCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- //销售统计 --> |
||||
<view class="width100 mart20"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">销售统计</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
已销售({{agentList.soldCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 {{agentList.salesCountPrice}} |
||||
</view> |
||||
</view> |
||||
<view v-if="minepros == ''">暂无数据</view> |
||||
<!-- //循环 --> |
||||
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9" @click="jumpAgent(2,mers.couponId)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.salesCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.salesCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="btnw50 mart50 marb30" @click="toPage()">修改密码</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getAgentCount |
||||
} from "../../../Utils/Api.js"; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
minepros: [], |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
imgadres:'wenj.png', |
||||
agentList :[] |
||||
} |
||||
}, |
||||
|
||||
onShow(){ |
||||
this.getAgentCount(); |
||||
}, |
||||
methods: { |
||||
//查询代理商信息 |
||||
getAgentCount() { |
||||
getAgentCount().then(res => { |
||||
if (res.return_code == '000000') { |
||||
this.agentList = res.return_data; |
||||
this.minepros = res.return_data.list |
||||
} else { |
||||
|
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: "none" |
||||
}) |
||||
} |
||||
}) |
||||
}, |
||||
//跳转流水 |
||||
jumpRunWater(){ |
||||
uni.navigateTo({ |
||||
url:'../runningWater/runningWater' |
||||
}) |
||||
}, |
||||
//跳转代理商卡券 |
||||
jumpAgent(item,items) { |
||||
uni.navigateTo({ |
||||
url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items |
||||
}) |
||||
}, |
||||
toPage(page) { |
||||
uni.navigateTo({ |
||||
url: '../../login/resetpasswd' |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
.promotion_bg { |
||||
position: relative; |
||||
} |
||||
|
||||
.promotion_dt { |
||||
position: absolute; |
||||
top: 50px; |
||||
border-radius: 5px; |
||||
box-shadow: 0px 2px 6px 2px #999999; |
||||
} |
||||
|
||||
.promotion_xg { |
||||
width: 15px; |
||||
height: 2px; |
||||
margin-top: 8px; |
||||
background-color: #0083f5; |
||||
transform: rotate(100deg); |
||||
} |
||||
|
||||
.promotoin_text { |
||||
margin-left: 5px; |
||||
margin-right: 5px; |
||||
} |
||||
|
||||
.promotion_mixg { |
||||
width: 10px; |
||||
margin-top: 8px; |
||||
height: 2px; |
||||
background-color: #0083f5; |
||||
transform: rotate(100deg); |
||||
} |
||||
|
||||
.promotion_kc { |
||||
padding-bottom: 10px; |
||||
border-radius: 5px; |
||||
box-shadow: 0px 2px 4px 2px #999999; |
||||
} |
||||
|
||||
.pro_img { |
||||
width: 25px; |
||||
height: 25px; |
||||
} |
||||
|
||||
.pro_cont { |
||||
height: 35px; |
||||
margin-left: 40px; |
||||
} |
||||
|
||||
.pro_title { |
||||
width: 110px; |
||||
} |
||||
|
||||
.pro_price { |
||||
margin-right: 10px; |
||||
margin-left: 110px; |
||||
} |
||||
|
||||
.pro_mok { |
||||
height: 95px; |
||||
margin-left: 2.5%; |
||||
width: 30%; |
||||
display: inline-block; |
||||
} |
||||
|
||||
.colorfe { |
||||
background-color: #fef7e5; |
||||
} |
||||
|
||||
.colore9 { |
||||
background-color: #e9f3ff; |
||||
} |
||||
|
||||
.colore7 { |
||||
background-color: #e7fcf3; |
||||
} |
||||
<template> |
||||
<view> |
||||
<view class="promotion_bg backcorf06 width100 height90 fcorfff fotct font24 fontspec10">我的推广</view> |
||||
<view class="promotion_dt width90 height100p backcorfff" @click="jumpRunWater"> |
||||
<view class="width100 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">今日数据</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
<view class="width90 mart5 height22"> |
||||
<view class="width50 flleft font18 fcor333 fontwig6 fotlt">{{agentList.orderCount}}</view> |
||||
<view class="width50 flright font18 fcor333 fontwig6 fotrt">{{agentList.turnoverPrice}}</view> |
||||
</view> |
||||
<view class="width90 mart10"> |
||||
<view class="width50 flleft font15 fcor666 fontwig6 fotlt">今日订单</view> |
||||
<view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view> |
||||
</view> |
||||
</view> |
||||
<!-- //库存管理 --> |
||||
<view class="width100 mart80"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">库存管理</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
剩余库存({{mineproList.laveStockCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 ¥{{mineproList.surplusCountPrice}} |
||||
</view> |
||||
</view> |
||||
<!-- //循环:class="[index==0?'colorfe':'']" --> |
||||
<view v-if="minepros == ''" class="width90">暂无数据</view> |
||||
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7" |
||||
@click="jumpAgent(1,mers.couponId,1)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.stockCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.stockCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- //销售统计 --> |
||||
<view class="width100 mart20"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">销售统计</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
已销售({{mineproList.soldCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 ¥{{mineproList.salesCountPrice}} |
||||
</view> |
||||
</view> |
||||
<view v-if="minepros == ''" class="width90">暂无数据</view> |
||||
<!-- //循环 --> |
||||
<view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9" |
||||
@click="jumpAgent(2,mers.couponId,1)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.salesCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.salesCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 销核码兑换库存 --> |
||||
<view class="width100 mart20"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">销核码兑换</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
待使用({{codeList.laveStockCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 ¥{{codeList.surplusCountPrice}} |
||||
</view> |
||||
</view> |
||||
<!-- //循环:class="[index==0?'colorfe':'']" --> |
||||
<view v-if="minepros == ''" class="width90">暂无数据</view> |
||||
<view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore7" |
||||
@click="jumpAgent(1,mers.couponId,2)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.stockCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.stockCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- 销核码兑换销售 --> |
||||
<view class="width100 mart20"> |
||||
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> |
||||
<view class="promotion_xg flleft"></view> |
||||
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> |
||||
<view class="flleft promotoin_text font16" style="margin-top: -2px;">销核码统计</view> |
||||
<view class="promotion_mixg flleft"></view> |
||||
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> |
||||
</view> |
||||
</view> |
||||
<view class="promotion_kc width90 mart10"> |
||||
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> |
||||
</image> |
||||
<view class="pro_cont paddtop15"> |
||||
<view class="flleft font16 fcor333 fontwig6 pro_title"> |
||||
已使用({{codeList.soldCount}}) |
||||
</view> |
||||
<view class="pro_price fotrt fcor333 font15 fontwig6"> |
||||
总计 ¥{{codeList.salesCountPrice}} |
||||
</view> |
||||
</view> |
||||
<view v-if="minepros == ''" class="width90">暂无数据</view> |
||||
<!-- //循环 --> |
||||
<view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore9" |
||||
@click="jumpAgent(2,mers.couponId,2)"> |
||||
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> |
||||
面额{{mers.salesPrice}} |
||||
</view> |
||||
<view class="width100 font14 fcor999 fotct mart10"> |
||||
{{mers.salesCount}}张 |
||||
</view> |
||||
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> |
||||
{{mers.salesPrice*mers.salesCount}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="btnw50 mart50 marb30" @click="toPage()">修改密码</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getAgentCount |
||||
} from "../../../Utils/Api.js"; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
imgadres: 'wenj.png', |
||||
agentList: [], //总统计 |
||||
minepros: [], //分发数据 |
||||
mineproList: [], //分发统计 |
||||
checkcodeList: [], //销核码数据 |
||||
codeList: [] //兑换码统计 |
||||
} |
||||
}, |
||||
|
||||
onShow() { |
||||
this.getAgentCount(1); |
||||
this.getAgentCount(2); |
||||
}, |
||||
methods: { |
||||
//查询代理商信息 |
||||
getAgentCount(item) { |
||||
let datas = { |
||||
type: item |
||||
} |
||||
getAgentCount(datas).then(res => { |
||||
if (res.return_code == '000000') { |
||||
this.agentList = res.return_data; |
||||
if (item == 1) { |
||||
this.minepros = res.return_data.list; |
||||
this.mineproList = res.return_data; |
||||
} else { |
||||
this.checkcodeList = res.return_data.list; |
||||
this.codeList = res.return_data |
||||
} |
||||
} else { |
||||
|
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: "none" |
||||
}) |
||||
} |
||||
}) |
||||
}, |
||||
//跳转流水 |
||||
jumpRunWater() { |
||||
uni.navigateTo({ |
||||
url: '../runningWater/runningWater' |
||||
}) |
||||
}, |
||||
//跳转代理商卡券 |
||||
jumpAgent(item, items, itemtype) { |
||||
uni.navigateTo({ |
||||
url: '../agentCoupons/agentCoupons?id=' + item + '&couponsId=' + items + '&typeid=' + itemtype |
||||
}) |
||||
}, |
||||
toPage(page) { |
||||
uni.navigateTo({ |
||||
url: '../../login/resetpasswd' |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
.promotion_bg { |
||||
position: relative; |
||||
} |
||||
|
||||
.promotion_dt { |
||||
position: absolute; |
||||
top: 50px; |
||||
border-radius: 5px; |
||||
box-shadow: 0px 2px 6px 2px #999999; |
||||
} |
||||
|
||||
.promotion_xg { |
||||
width: 15px; |
||||
height: 2px; |
||||
margin-top: 8px; |
||||
background-color: #0083f5; |
||||
transform: rotate(100deg); |
||||
} |
||||
|
||||
.promotoin_text { |
||||
margin-left: 5px; |
||||
margin-right: 5px; |
||||
} |
||||
|
||||
.promotion_mixg { |
||||
width: 10px; |
||||
margin-top: 8px; |
||||
height: 2px; |
||||
background-color: #0083f5; |
||||
transform: rotate(100deg); |
||||
} |
||||
|
||||
.promotion_kc { |
||||
padding-bottom: 10px; |
||||
border-radius: 5px; |
||||
box-shadow: 0px 2px 4px 2px #999999; |
||||
} |
||||
|
||||
.pro_img { |
||||
width: 25px; |
||||
height: 25px; |
||||
} |
||||
|
||||
.pro_cont { |
||||
height: 35px; |
||||
margin-left: 40px; |
||||
} |
||||
|
||||
.pro_title { |
||||
width: 110px; |
||||
} |
||||
|
||||
.pro_price { |
||||
margin-right: 10px; |
||||
margin-left: 110px; |
||||
} |
||||
|
||||
.pro_mok { |
||||
height: 95px; |
||||
margin-left: 2.5%; |
||||
width: 30%; |
||||
display: inline-block; |
||||
} |
||||
|
||||
.colorfe { |
||||
background-color: #fef7e5; |
||||
} |
||||
|
||||
.colore9 { |
||||
background-color: #e9f3ff; |
||||
} |
||||
|
||||
.colore7 { |
||||
background-color: #e7fcf3; |
||||
} |
||||
</style> |
||||
|
Loading…
Reference in new issue