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

yj-dev
杨杰 4 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 => { export const generateCode = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data); 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 => { export const getCodeById = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data); return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data);

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

File diff suppressed because one or more lines are too long

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

@ -10,11 +10,11 @@
<view class="form"> <view class="form">
<view class="username"> <view class="username">
<image src="../../static/img/phone.png" style="width: 40rpx;height: 40rpx;"></image> <input <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>
<view class="password"> <view class="password">
<image src="../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input <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>
<view class="btn mart50" @tap="doLogin"> </view> <view class="btn mart50" @tap="doLogin"> </view>
</view> </view>

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

@ -1,318 +1,352 @@
<template> <template>
<view> <view>
<view class="onorder width100" v-if="agentCouponList.length==0"> <view class="onorder width100" v-if="agentCouponList.length==0">
<image :src="imagewxUrl+imgadres"></image> <image :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index"> <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" <image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null"
src='../../../static/img/logo.png'></image> src='../../../static/img/logo.png'></image>
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image> <image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image>
<view class="agent_title paddtop13"> <view class="agent_title paddtop13">
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view> <view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view>
<view class="width100 mart5 font14 fcor333 height22"> <view class="width100 mart5 font14 fcor333 height22">
<!-- <view class="agent_left_num flleft text1"> <!-- <view class="agent_left_num flleft text1">
{{agent.highCouponCode.salesCode}} {{agent.highCouponCode.salesCode}}
</view> --> </view> -->
<view class="agent_right_num flright fotrt"> <view class="agent_right_num flright fotrt">
{{agent.highCoupon.salesPrice}}.00 {{agent.highCoupon.salesPrice}}.00
</view> </view>
</view> </view>
</view> </view>
<view class="width100 line1 mart5"></view> <view class="width100 line1 mart5"></view>
<view class="width90"> <view class="width90">
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)" <button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)"
v-if="typeId == 1">生成油码</button> v-if="typeId == 1 && typeid == 1">生成油码</button>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)" <button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)"
v-if="typeId == 2">查看详情</button> v-if="typeId == 2 && typeid == 1">查看详情</button>
<view class="agent_ts font15 fcor333 fotlt text1" v-if="typeId == 2 && agent.remark !=null "> <view class="agent_ts font15 fcor333 fotlt text1"
备注:{{agent.remark}}</view> v-if="typeId == 2 && agent.remark !=null && typeid == 1">
</view> 备注:{{agent.remark}}</view>
</view>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)"
<!-- / --> v-if="typeId == 1 && typeid == 2">生成兑换码</button>
<view :hidden="userFeedbackHidden" class="popup_content"> <button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)"
<view class="popup_title">填写备注</view> v-if="typeId == 2 && typeid == 2">查看详情</button>
<view class="popup_textarea_item"> <view class="agent_ts font15 fcor333 fotlt text1"
<textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent"> v-if="typeId == 2 && typeid == 2 && agent.remark !=null ">
</textarea> 备注:{{agent.remark}}</view>
<view @click="submitFeedback()"> </view>
<button class="popup_button">提交备注</button> </view>
</view>
</view> <!-- / -->
</view> <view :hidden="userFeedbackHidden" class="popup_content">
<view class="popup_overlay" :hidden="userFeedbackHidden" @click="hideDiv()"></view> <view class="popup_title">填写备注</view>
</view> <view class="popup_textarea_item">
</template> <textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent">
</textarea>
<script> <view @click="submitFeedback()">
import { <button class="popup_button">提交备注</button>
getCodeListByAgentCoupon, </view>
generateCode </view>
} from "../../../Utils/Api.js"; </view>
let app = getApp(); <view class="popup_overlay" :hidden="userFeedbackHidden" @click="hideDiv()"></view>
export default { </view>
data() { </template>
return {
pageNum: 1, <script>
pageSize: 10, import {
agentCouponList: [], getCodeListByAgentCoupon,
imagewxUrl: app.globalData.imageWxImg, generateCode
imgadres:'noorder.png', } from "../../../Utils/Api.js";
isNoMoreData: false, let app = getApp();
typeId: '', export default {
reFreshs: '', data() {
couponId: '', return {
image_url: app.globalData.imgUrl, pageNum: 1,
userFeedbackHidden: true, // pageSize: 10,
feedbackContent: '', // agentCouponList: [],
couId: '' imagewxUrl: app.globalData.imageWxImg,
} imgadres: 'noorder.png',
}, isNoMoreData: false,
filters: { typeId: '',
// reFreshs: '',
formatDate: function(value, spe = '/') { couponId: '',
let data = new Date(value); image_url: app.globalData.imgUrl,
let year = data.getFullYear(); userFeedbackHidden: true, //
let month = data.getMonth() + 1; feedbackContent: '', //
let day = data.getDate(); couId: '',
let h = data.getHours(); typeid: ''
let mm = data.getMinutes(); }
let s = data.getSeconds(); },
month = month >= 10 ? month : "0" + month; filters: {
day = day >= 10 ? day : "0" + day; //
h = h >= 10 ? h : "0" + h; formatDate: function(value, spe = '/') {
mm = mm >= 10 ? mm : "0" + mm; let data = new Date(value);
s = s >= 10 ? s : "0" + s; let year = data.getFullYear();
return `${year}${spe}${month}${spe}${day}`; let month = data.getMonth() + 1;
} let day = data.getDate();
}, let h = data.getHours();
onReachBottom() { let mm = data.getMinutes();
this.getCodeListByAgentCoupon(); let s = data.getSeconds();
}, month = month >= 10 ? month : "0" + month;
onLoad(option) { day = day >= 10 ? day : "0" + day;
this.typeId = option.id; h = h >= 10 ? h : "0" + h;
this.couponId = option.couponsId; mm = mm >= 10 ? mm : "0" + mm;
}, s = s >= 10 ? s : "0" + s;
onShow() { return `${year}${spe}${month}${spe}${day}`;
this.getCodeListByAgentCoupon(); }
}, },
watch: { onReachBottom() {
//reFresh, this.getCodeListByAgentCoupon();
reFreshs: function() { },
this.pageNum = 1; onLoad(option) {
this.agentCouponList = [] this.typeId = option.id;
this.isNoMoreData = false; this.typeid = option.typeid;
this.getCodeListByAgentCoupon(); this.couponId = option.couponsId;
} },
}, onShow() {
methods: { this.getCodeListByAgentCoupon();
// },
getCodeListByAgentCoupon() { watch: {
uni.showLoading({ //reFresh,
title: '加载中...' reFreshs: function() {
}) this.pageNum = 1;
if (this.isNoMoreData) { this.agentCouponList = []
uni.hideLoading(); this.isNoMoreData = false;
return false; this.getCodeListByAgentCoupon();
} }
let pagenum = this.pageNum; },
let params; methods: {
if (this.typeId == 1) { //
params = { getCodeListByAgentCoupon() {
pageNum: pagenum, uni.showLoading({
couponId: this.couponId, title: '加载中...'
status: 1, })
pageSize: this.pageSize if (this.isNoMoreData) {
} uni.hideLoading();
} else if (this.typeId == 2) { return false;
params = { }
pageNum: pagenum, let pagenum = this.pageNum;
couponId: this.couponId, let params;
status: '2,3', if (this.typeId == 1) {
pageSize: this.pageSize if (this.typeid == 1) {
} params = {
} pageNum: pagenum,
couponId: this.couponId,
getCodeListByAgentCoupon(params).then(res => { status: 1,
uni.hideLoading(); type: 1,
if (res.return_code == '000000') { pageSize: this.pageSize
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; }
if (res.return_data.total == (this.pageNum * this.pageSize)) { } else {
this.isNoMoreData = true; params = {
} pageNum: pagenum,
this.agentCouponList = this.agentCouponList.concat(res.return_data.list); couponId: this.couponId,
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; status: 1,
} else { type: 2,
this.agentCouponList = []; pageSize: this.pageSize
} }
}) }
}, } else if (this.typeId == 2) {
if (this.typeid == 1) {
// params = {
generateCode(item) { pageNum: pagenum,
this.userFeedbackHidden = false; couponId: this.couponId,
this.couId = item; status: '2,3',
}, type: 1,
hideDiv() { // pageSize: this.pageSize
this.userFeedbackHidden = true; }
}, } else {
// params = {
submitFeedback() { pageNum: pagenum,
if (this.feedbackContent == '') { couponId: this.couponId,
uni.showToast({ status: '2,3',
title: '请填写备注信息', type: 2,
icon: 'none', pageSize: this.pageSize
duration: 2000 }
}) }
} else { }
uni.showLoading({
title: '油码生成中...' getCodeListByAgentCoupon(params).then(res => {
}) uni.hideLoading();
let datas = { if (res.return_code == '000000') {
couponAgentCodeId: this.couId, this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
remark: this.feedbackContent if (res.return_data.total == (this.pageNum * this.pageSize)) {
} this.isNoMoreData = true;
generateCode(datas).then(res => { }
uni.hideLoading() this.agentCouponList = this.agentCouponList.concat(res.return_data.list);
if (res.return_code == '000000') { this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
this.userFeedbackHidden = true; } else {
uni.navigateTo({ this.agentCouponList = [];
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this.couId }
}) })
} else { },
uni.showToast({
title: res.return_msg, //
icon: 'none', generateCode(item) {
duration: 2000 this.userFeedbackHidden = false;
}) this.couId = item;
} },
}); hideDiv() { //
} this.userFeedbackHidden = true;
}, },
//
// submitFeedback() {
jumpCouponDes(ids) { if (this.feedbackContent == '') {
uni.navigateTo({ uni.showToast({
url: '../../goods/coupons-info-details/coupons-info-details?id=' + ids title: '请填写备注信息',
}) icon: 'none',
} duration: 2000
} })
} } else {
</script> uni.showLoading({
title: '生成中...'
<style lang="scss"> })
page { let datas = {
background-color: #f5f5f5; couponAgentCodeId: this.couId,
} remark: this.feedbackContent
}
.onorder { generateCode(datas).then(res => {
width: 100%; uni.hideLoading()
height: 50vw; if (res.return_code == '000000') {
display: flex; this.userFeedbackHidden = true;
justify-content: center; uni.navigateTo({
align-content: center; url: '../../goods/coupons-info-details/coupons-info-details?id=' + this
flex-wrap: wrap; .couId
})
image { } else {
width: 70vw; uni.showToast({
margin-top: 150px; title: res.return_msg,
} icon: 'none',
duration: 2000
.text { })
width: 100%; }
height: 60upx; });
font-size: 28upx; }
color: #444; },
display: flex;
justify-content: center; //
align-items: center; jumpCouponDes(ids) {
} uni.navigateTo({
} url: '../../goods/coupons-info-details/coupons-info-details?id=' + ids
})
.agent_img { }
width: 50px; }
height: 50px; }
} </script>
.agent_title { <style lang="scss">
margin-left: 60px; page {
} background-color: #f5f5f5;
}
.agent_left_num {
width: 55%; .onorder {
} width: 100%;
height: 50vw;
.agent_right_num { display: flex;
width: 40%; justify-content: center;
margin-right: 5%; align-content: center;
} flex-wrap: wrap;
.agent_btn { image {
width: 88px; width: 70vw;
height: 35px; margin-top: 150px;
line-height: 35px; }
}
.text {
.agent_ts { width: 100%;
margin-right: 95px; height: 60upx;
padding-top: 18px; font-size: 28upx;
} color: #444;
display: flex;
// justify-content: center;
.popup_overlay { align-items: center;
}
position: fixed; }
top: 0%;
left: 0%; .agent_img {
width: 100%; width: 50px;
height: 100%; height: 50px;
background-color: black; }
z-index: 1001;
-moz-opacity: 0.8; .agent_title {
opacity: .80; margin-left: 60px;
filter: alpha(opacity=88); }
}
.agent_left_num {
.popup_content { width: 55%;
position: fixed; }
top: 50%;
left: 50%; .agent_right_num {
width: 520upx; width: 40%;
height: 550upx; margin-right: 5%;
margin-left: -270upx; }
margin-top: -270upx;
border: 10px solid white; .agent_btn {
background-color: white; width: 88px;
z-index: 1002; height: 35px;
overflow: auto; line-height: 35px;
border-radius: 20upx; }
}
.agent_ts {
.popup_title { margin-right: 95px;
padding-top: 20upx; padding-top: 18px;
width: 480upx; }
text-align: center;
font-size: 40rpx; //
} .popup_overlay {
.popup_textarea_item { position: fixed;
padding-top: 20rpx; top: 0%;
height: 240rpx; left: 0%;
width: 90%; width: 100%;
background-color: #F1F1F1; height: 100%;
margin-top: 30rpx; background-color: black;
margin-left: 5%; z-index: 1001;
} -moz-opacity: 0.8;
opacity: .80;
.popup_textarea { filter: alpha(opacity=88);
width: 410upx; }
font-size: 26upx;
margin-left: 20upx; .popup_content {
} position: fixed;
top: 50%;
.popup_button { left: 50%;
color: white; width: 520upx;
background-color: #4399FC; height: 550upx;
border-radius: 10upx; 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> </style>

@ -1,226 +1,314 @@
<template> <template>
<view> <view>
<view class="promotion_bg backcorf06 width100 height90 fcorfff fotct font24 fontspec10">我的推广</view> <view class="promotion_bg backcorf06 width100 height90 fcorfff fotct font24 fontspec10">我的推广</view>
<view class="promotion_dt width90 height100p backcorfff" @click="jumpRunWater"> <view class="promotion_dt width90 height100p backcorfff" @click="jumpRunWater">
<view class="width100 mart10 fcor333 font14 fontwig6 height22"> <view class="width100 mart10 fcor333 font14 fontwig6 height22">
<view class="promotion_xg flleft"></view> <view class="promotion_xg flleft"></view>
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> <view class="promotion_mixg flleft" style="margin-left: -6px;"></view>
<view class="flleft promotoin_text font16" style="margin-top: -2px;">今日数据</view> <view class="flleft promotoin_text font16" style="margin-top: -2px;">今日数据</view>
<view class="promotion_mixg flleft"></view> <view class="promotion_mixg flleft"></view>
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> <view class="promotion_xg flleft" style="margin-left: -6px;"></view>
</view> </view>
<view class="width90 mart5 height22"> <view class="width90 mart5 height22">
<view class="width50 flleft font18 fcor333 fontwig6 fotlt">{{agentList.orderCount}}</view> <view class="width50 flleft font18 fcor333 fontwig6 fotlt">{{agentList.orderCount}}</view>
<view class="width50 flright font18 fcor333 fontwig6 fotrt">{{agentList.turnoverPrice}}</view> <view class="width50 flright font18 fcor333 fontwig6 fotrt">{{agentList.turnoverPrice}}</view>
</view> </view>
<view class="width90 mart10"> <view class="width90 mart10">
<view class="width50 flleft font15 fcor666 fontwig6 fotlt">今日订单</view> <view class="width50 flleft font15 fcor666 fontwig6 fotlt">今日订单</view>
<view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view> <view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view>
</view> </view>
</view> </view>
<!-- // --> <!-- // -->
<view class="width100 mart80"> <view class="width100 mart80">
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> <view class="width90 mart10 fcor333 font14 fontwig6 height22">
<view class="promotion_xg flleft"></view> <view class="promotion_xg flleft"></view>
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> <view class="promotion_mixg flleft" style="margin-left: -6px;"></view>
<view class="flleft promotoin_text font16" style="margin-top: -2px;">库存管理</view> <view class="flleft promotoin_text font16" style="margin-top: -2px;">库存管理</view>
<view class="promotion_mixg flleft"></view> <view class="promotion_mixg flleft"></view>
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> <view class="promotion_xg flleft" style="margin-left: -6px;"></view>
</view> </view>
</view> </view>
<view class="promotion_kc width90 mart10"> <view class="promotion_kc width90 mart10">
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> <image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
</image> </image>
<view class="pro_cont paddtop15"> <view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title"> <view class="flleft font16 fcor333 fontwig6 pro_title">
剩余库存({{agentList.laveStockCount}}) 剩余库存({{mineproList.laveStockCount}})
</view> </view>
<view class="pro_price fotrt fcor333 font15 fontwig6"> <view class="pro_price fotrt fcor333 font15 fontwig6">
总计 {{agentList.surplusCountPrice}} 总计 ¥{{mineproList.surplusCountPrice}}
</view> </view>
</view> </view>
<!-- //:class="[index==0?'colorfe':'']" --> <!-- //:class="[index==0?'colorfe':'']" -->
<view v-if="minepros == ''">暂无数据</view> <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)"> <view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore7"
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> @click="jumpAgent(1,mers.couponId,1)">
面额{{mers.salesPrice}} <view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
</view> 面额{{mers.salesPrice}}
<view class="width100 font14 fcor999 fotct mart10"> </view>
{{mers.stockCount}} <view class="width100 font14 fcor999 fotct mart10">
</view> {{mers.stockCount}}
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> </view>
{{mers.salesPrice*mers.stockCount}} <view class="width100 font15 fcor333 fontwig6 fotct mart10">
</view> {{mers.salesPrice*mers.stockCount}}
</view> </view>
</view> </view>
<!-- // --> </view>
<view class="width100 mart20"> <!-- // -->
<view class="width90 mart10 fcor333 font14 fontwig6 height22"> <view class="width100 mart20">
<view class="promotion_xg flleft"></view> <view class="width90 mart10 fcor333 font14 fontwig6 height22">
<view class="promotion_mixg flleft" style="margin-left: -6px;"></view> <view class="promotion_xg flleft"></view>
<view class="flleft promotoin_text font16" style="margin-top: -2px;">销售统计</view> <view class="promotion_mixg flleft" style="margin-left: -6px;"></view>
<view class="promotion_mixg flleft"></view> <view class="flleft promotoin_text font16" style="margin-top: -2px;">销售统计</view>
<view class="promotion_xg flleft" style="margin-left: -6px;"></view> <view class="promotion_mixg flleft"></view>
</view> <view class="promotion_xg flleft" style="margin-left: -6px;"></view>
</view> </view>
<view class="promotion_kc width90 mart10"> </view>
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres"> <view class="promotion_kc width90 mart10">
</image> <image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
<view class="pro_cont paddtop15"> </image>
<view class="flleft font16 fcor333 fontwig6 pro_title"> <view class="pro_cont paddtop15">
已销售({{agentList.soldCount}}) <view class="flleft font16 fcor333 fontwig6 pro_title">
</view> 已销售({{mineproList.soldCount}})
<view class="pro_price fotrt fcor333 font15 fontwig6"> </view>
总计 {{agentList.salesCountPrice}} <view class="pro_price fotrt fcor333 font15 fontwig6">
</view> 总计 ¥{{mineproList.salesCountPrice}}
</view> </view>
<view v-if="minepros == ''">暂无数据</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)"> <!-- // -->
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> <view v-for="(mers,index) in minepros" :key="mers.id" class="pro_mok marb10 colore9"
面额{{mers.salesPrice}} @click="jumpAgent(2,mers.couponId,1)">
</view> <view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
<view class="width100 font14 fcor999 fotct mart10"> 面额{{mers.salesPrice}}
{{mers.salesCount}} </view>
</view> <view class="width100 font14 fcor999 fotct mart10">
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> {{mers.salesCount}}
{{mers.salesPrice*mers.salesCount}} </view>
</view> <view class="width100 font15 fcor333 fontwig6 fotct mart10">
</view> {{mers.salesPrice*mers.salesCount}}
</view> </view>
<view class="btnw50 mart50 marb30" @click="toPage()">修改密码</view> </view>
</view> </view>
</template>
<!-- 销核码兑换库存 -->
<script> <view class="width100 mart20">
import { <view class="width90 mart10 fcor333 font14 fontwig6 height22">
getAgentCount <view class="promotion_xg flleft"></view>
} from "../../../Utils/Api.js"; <view class="promotion_mixg flleft" style="margin-left: -6px;"></view>
let app = getApp(); <view class="flleft promotoin_text font16" style="margin-top: -2px;">销核码兑换</view>
export default { <view class="promotion_mixg flleft"></view>
data() { <view class="promotion_xg flleft" style="margin-left: -6px;"></view>
return { </view>
minepros: [], </view>
imagewxUrl: app.globalData.imageWxImg, <view class="promotion_kc width90 mart10">
imgadres:'wenj.png', <image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
agentList :[] </image>
} <view class="pro_cont paddtop15">
}, <view class="flleft font16 fcor333 fontwig6 pro_title">
待使用({{codeList.laveStockCount}})
onShow(){ </view>
this.getAgentCount(); <view class="pro_price fotrt fcor333 font15 fontwig6">
}, 总计 ¥{{codeList.surplusCountPrice}}
methods: { </view>
// </view>
getAgentCount() { <!-- //:class="[index==0?'colorfe':'']" -->
getAgentCount().then(res => { <view v-if="minepros == ''" class="width90">暂无数据</view>
if (res.return_code == '000000') { <view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore7"
this.agentList = res.return_data; @click="jumpAgent(1,mers.couponId,2)">
this.minepros = res.return_data.list <view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
} else { 面额{{mers.salesPrice}}
</view>
uni.showToast({ <view class="width100 font14 fcor999 fotct mart10">
title: res.return_msg, {{mers.stockCount}}
icon: "none" </view>
}) <view class="width100 font15 fcor333 fontwig6 fotct mart10">
} {{mers.salesPrice*mers.stockCount}}
}) </view>
}, </view>
// </view>
jumpRunWater(){ <!-- 销核码兑换销售 -->
uni.navigateTo({ <view class="width100 mart20">
url:'../runningWater/runningWater' <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>
jumpAgent(item,items) { <view class="promotion_mixg flleft"></view>
uni.navigateTo({ <view class="promotion_xg flleft" style="margin-left: -6px;"></view>
url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items </view>
}) </view>
}, <view class="promotion_kc width90 mart10">
toPage(page) { <image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
uni.navigateTo({ </image>
url: '../../login/resetpasswd' <view class="pro_cont paddtop15">
}); <view class="flleft font16 fcor333 fontwig6 pro_title">
} 已使用({{codeList.soldCount}})
} </view>
} <view class="pro_price fotrt fcor333 font15 fontwig6">
</script> 总计 ¥{{codeList.salesCountPrice}}
</view>
<style lang="scss"> </view>
.promotion_bg { <view v-if="minepros == ''" class="width90">暂无数据</view>
position: relative; <!-- // -->
} <view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore9"
@click="jumpAgent(2,mers.couponId,2)">
.promotion_dt { <view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
position: absolute; 面额{{mers.salesPrice}}
top: 50px; </view>
border-radius: 5px; <view class="width100 font14 fcor999 fotct mart10">
box-shadow: 0px 2px 6px 2px #999999; {{mers.salesCount}}
} </view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
.promotion_xg { {{mers.salesPrice*mers.salesCount}}
width: 15px; </view>
height: 2px; </view>
margin-top: 8px; </view>
background-color: #0083f5; <view class="btnw50 mart50 marb30" @click="toPage()">修改密码</view>
transform: rotate(100deg); </view>
} </template>
.promotoin_text { <script>
margin-left: 5px; import {
margin-right: 5px; getAgentCount
} } from "../../../Utils/Api.js";
let app = getApp();
.promotion_mixg { export default {
width: 10px; data() {
margin-top: 8px; return {
height: 2px; imagewxUrl: app.globalData.imageWxImg,
background-color: #0083f5; imgadres: 'wenj.png',
transform: rotate(100deg); agentList: [], //
} minepros: [], //
mineproList: [], //
.promotion_kc { checkcodeList: [], //
padding-bottom: 10px; codeList: [] //
border-radius: 5px; }
box-shadow: 0px 2px 4px 2px #999999; },
}
onShow() {
.pro_img { this.getAgentCount(1);
width: 25px; this.getAgentCount(2);
height: 25px; },
} methods: {
//
.pro_cont { getAgentCount(item) {
height: 35px; let datas = {
margin-left: 40px; type: item
} }
getAgentCount(datas).then(res => {
.pro_title { if (res.return_code == '000000') {
width: 110px; this.agentList = res.return_data;
} if (item == 1) {
this.minepros = res.return_data.list;
.pro_price { this.mineproList = res.return_data;
margin-right: 10px; } else {
margin-left: 110px; this.checkcodeList = res.return_data.list;
} this.codeList = res.return_data
}
.pro_mok { } else {
height: 95px;
margin-left: 2.5%; uni.showToast({
width: 30%; title: res.return_msg,
display: inline-block; icon: "none"
} })
}
.colorfe { })
background-color: #fef7e5; },
} //
jumpRunWater() {
.colore9 { uni.navigateTo({
background-color: #e9f3ff; url: '../runningWater/runningWater'
} })
},
.colore7 { //
background-color: #e7fcf3; 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> </style>

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

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

Loading…
Cancel
Save