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

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

@ -338,6 +338,11 @@ 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;"
<view v-if="typeId == 2">
<image 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}}
</image>{{ row.salesPrice*100}}
</view>
<view v-if="typeId == 1 || typeId == 3">{{ row.salesPrice}}</view>
</view>
</view>
</view>

@ -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>
@ -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,12 +338,11 @@
font-size: 14px;
margin-top: 10px;
color: #333333;
}
.stuimg {
width: 10px;
vertical-align: middle;
}
}
.loading-text {
width: 100%;

@ -3,7 +3,7 @@
<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">
<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>
@ -21,10 +21,19 @@
<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>
v-if="typeId == 1 && 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 ">
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>
@ -65,7 +74,8 @@
image_url: app.globalData.imgUrl,
userFeedbackHidden: true, //
feedbackContent: '', //
couId: ''
couId: '',
typeid: ''
}
},
filters: {
@ -91,6 +101,7 @@
},
onLoad(option) {
this.typeId = option.id;
this.typeid = option.typeid;
this.couponId = option.couponsId;
},
onShow() {
@ -118,20 +129,42 @@
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();
@ -166,7 +199,7 @@
})
} else {
uni.showLoading({
title: '油码生成中...'
title: '生成中...'
})
let datas = {
couponAgentCodeId: this.couId,
@ -177,7 +210,8 @@
if (res.return_code == '000000') {
this.userFeedbackHidden = true;
uni.navigateTo({
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this.couId
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this
.couId
})
} else {
uni.showToast({

@ -33,15 +33,16 @@
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
剩余库存({{agentList.laveStockCount}})
剩余库存({{mineproList.laveStockCount}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 {{agentList.surplusCountPrice}}
总计 ¥{{mineproList.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 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>
@ -68,15 +69,89 @@
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
已销售({{agentList.soldCount}})
已销售({{mineproList.soldCount}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 {{agentList.salesCountPrice}}
总计 ¥{{mineproList.salesCountPrice}}
</view>
</view>
<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 colore9" @click="jumpAgent(2,mers.couponId)">
<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>
@ -100,23 +175,36 @@
export default {
data() {
return {
minepros: [],
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'wenj.png',
agentList :[]
agentList: [], //
minepros: [], //
mineproList: [], //
checkcodeList: [], //
codeList: [] //
}
},
onShow() {
this.getAgentCount();
this.getAgentCount(1);
this.getAgentCount(2);
},
methods: {
//
getAgentCount() {
getAgentCount().then(res => {
getAgentCount(item) {
let datas = {
type: item
}
getAgentCount(datas).then(res => {
if (res.return_code == '000000') {
this.agentList = res.return_data;
this.minepros = res.return_data.list
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({
@ -133,9 +221,9 @@
})
},
//
jumpAgent(item,items) {
jumpAgent(item, items, itemtype) {
uni.navigateTo({
url: '../agentCoupons/agentCoupons?id='+item +'&couponsId='+ items
url: '../agentCoupons/agentCoupons?id=' + item + '&couponsId=' + items + '&typeid=' + itemtype
})
},
toPage(page) {

@ -49,6 +49,7 @@ page {
font-size: 16px;
color: #333333;
font-weight: blod;
padding-left: 10px;
}
}

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

Loading…
Cancel
Save