1.新增代理商添加兑换码

yj-dev
杨杰 3 years ago
parent 60efa27c21
commit 125da454eb
  1. 7
      Utils/Api.js
  2. 1
      pages.json
  3. 457
      pages/goods/coupons-info-details/coupons-info-details.vue
  4. 105
      pages/goods/goods-list/goods-list.vue
  5. 4
      pages/login/login.vue
  6. 39
      pages/tabBar/category/category.vue
  7. 668
      pages/user/agentCoupons/agentCoupons.vue
  8. 538
      pages/user/minePromotion/minePromotion.vue
  9. 3
      static/css/login.scss
  10. 4
      uni.scss

@ -337,7 +337,12 @@ export const getCodeListByAgentCoupon = params => {
// 生成二维码
export const generateCode = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
}
}
// 兑换码填写备注
export const highremark = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data);
}
// 查看二维码
export const getCodeById = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data);

@ -130,7 +130,6 @@
"navigationBarTitleText": "分类",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false, //
"bounce": "none"

File diff suppressed because one or more lines are too long

@ -34,13 +34,16 @@
</image> {{ row.discountPrice*100}}
</view>
<view class="price" v-if="typeId == 1 || typeId == 3">
{{ row.discountPrice*100}}
{{ row.discountPrice}}
</view>
<!-- v-if="product.discountPrice !== product.salesPrice" -->
<view class="slogan" v-if="row.discountPrice !== row.salesPrice">
<image v-if="typeId == 2" style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image> <text v-if="typeId == 1 || typeId == 3"></text>{{ row.salesPrice*100}}
<view v-if="typeId == 2">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}}
</view>
<view v-if="typeId == 1 || typeId == 3">{{ row.salesPrice}}</view>
</view>
</view>
</view>
@ -80,15 +83,15 @@
pageSize: 10,
isNoMoreData: false,
typeId: '',
couponName: '',
brandid : '',
couponName: '',
brandid: '',
goodtyid: ''
};
},
onLoad: function(option) { //optionobject
this.typeId = option.id;
this.brandid = option.brandId;
this.typeId = option.id;
this.brandid = option.brandId;
this.goodtyid = option.goodsId;
if (option.id == 1) {
uni.setNavigationBarTitle({
@ -108,19 +111,19 @@
uni.setNavigationBarTitle({
title: '优选商品'
});
this.getCmsContent('CMS_PRE_LIST');
this.getBrandCouponList();
this.getCmsContent('CMS_PRE_LIST');
this.getBrandCouponList();
}
},
onPageScroll(e) {
},
//page.json"onReachBottomDistance"
onReachBottom() {
if(this.typeId == 3){
this.getBrandCouponList();
}else{
this.getCouponListArea();
onReachBottom() {
if (this.typeId == 3) {
this.getBrandCouponList();
} else {
this.getCouponListArea();
}
},
methods: {
@ -170,48 +173,48 @@
this.goodsList = [];
}
})
},
//
getBrandCouponList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
regionId: app.globalData.cityId,
pageNum: pagenum,
pageSize: this.pageSize,
brandId: this.brandid,
goodsTypeId: this.goodtyid,
couponName: this.couponName
}
getBrandCouponList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.goodsList = this.goodsList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.goodsList = [];
}
})
},
//
getBrandCouponList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
regionId: app.globalData.cityId,
pageNum: pagenum,
pageSize: this.pageSize,
brandId: this.brandid,
goodsTypeId: this.goodtyid,
couponName: this.couponName
}
getBrandCouponList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.goodsList = this.goodsList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.goodsList = [];
}
})
},
toSearch() {
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
this.goodsList = [];
if(this.typeId == 3){
this.getBrandCouponList();
}else{
this.getCouponListArea();
if (this.typeId == 3) {
this.getBrandCouponList();
} else {
this.getCouponListArea();
}
},
//

@ -10,11 +10,11 @@
<view class="form">
<view class="username">
<image src="../../static/img/phone.png" style="width: 40rpx;height: 40rpx;"></image> <input
placeholder="请输入账号" v-model="phoneNumber" placeholder-style="color: #333333;margin-left: 10px;" />
placeholder="请输入账号" v-model="phoneNumber" placeholder-style="color: #333333;" />
</view>
<view class="password">
<image src="../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入密码" v-model="passwd" password=true placeholder-style="color: #333333;margin-left: 10px;" />
placeholder="请输入密码" v-model="passwd" password=true placeholder-style="color: #333333;" />
</view>
<view class="btn mart50" @tap="doLogin"> </view>
</view>

@ -18,15 +18,14 @@
<!-- <view class="category-list"> -->
<view class="width100 height45l backcorfff" v-if="MerchantList != ''">
<view class="width90">
<view class="stuMenu flleft fotct" @click="showPopup() ">{{showCategoryIndex}}
<!-- <view class="stuMenu flleft fotct" @click="showPopup() ">{{showCategoryIndex}}
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view>
<!-- <view class="stuMenu flleft fotct" @click="showPopup(2)">{{showCategoryIndex}}
</view> -->
<picker mode="selector" :range="MerchantList" range-key="merchantName" @change="showCategory">
<view>{{showCategoryIndex}}
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view>
<view class="stuMenu flleft fotct" @click="showPopup(3)">{{showCategoryIndex}}
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view> -->
</picker>
</view>
</view>
@ -53,7 +52,7 @@
</view>
</view>
</view>
<wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false">
<!-- <wybPopup ref="popup" type="top" height="800" width="500" radius="6" :showCloseIcon="false">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">筛选门店</view>
<view class="mart15">
<view :class="item.merchantName == showCategoryIndex?'activeRefuel':'refuel'"
@ -61,7 +60,7 @@
{{item.merchantName}}
</view>
</view>
</wybPopup>
</wybPopup> -->
<button open-type="contact">
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
</button>
@ -82,14 +81,14 @@
data() {
return {
showCategoryIndex: '',
showCategoryIndexId: '',
showCategoryIndexId: '',
headerPosition: "fixed",
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'jt.png',
imgadres2: 'xiala.png',
imgadres1: 'noorder.png',
imgadres4: 'dh.png',
imgadres3: 'noorder.png',
imgadres3: 'noorder.png',
imgadres5: 'cusservice.png',
city: "",
imageUrl: app.globalData.imgUrl,
@ -99,7 +98,7 @@
pageNum: 1,
pageSize: 10,
isNoMoreData: false
// loadingText: ''
// loadingText: ''
}
},
onPageScroll(e) {
@ -186,7 +185,7 @@
}
getMerchantList(params).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
this.MerchantList = res.return_data;
this.MerchantList = res.return_data;
this.showCategoryIndex = res.return_data[0].merchantName;
this.showCategoryIndexId = res.return_data[0].id;
this.getStoreListByMerchant();
@ -242,10 +241,9 @@
},
//
showCategory(index, item) {
this.showCategoryIndex = index;
this.$refs.popup.hide();
this.showCategoryIndexId = item;
showCategory(e) {
this.showCategoryIndex = this.MerchantList[e.target.value].merchantName;
this.showCategoryIndexId = this.MerchantList[e.target.value].id;
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
@ -340,11 +338,10 @@
font-size: 14px;
margin-top: 10px;
color: #333333;
.stuimg {
width: 10px;
vertical-align: middle;
}
}
.stuimg {
width: 10px;
vertical-align: middle;
}
.loading-text {

@ -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>

@ -48,7 +48,8 @@ page {
height: 50upx;
font-size: 16px;
color: #333333;
font-weight: blod;
font-weight: blod;
padding-left: 10px;
}
}

@ -422,6 +422,10 @@ $uni-font-size-paragraph:30upx;
.height120{
height: 120px;
}
.height130{
height: 130px;
}
.height150{
height: 150px;

Loading…
Cancel
Save