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 => { 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">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png"> 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> </view>
</view> </view>

@ -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>
@ -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,12 +338,11 @@
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 {
width: 100%; width: 100%;

@ -3,7 +3,7 @@
<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>
@ -21,10 +21,19 @@
<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"
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> 备注:{{agent.remark}}</view>
</view> </view>
</view> </view>
@ -65,7 +74,8 @@
image_url: app.globalData.imgUrl, image_url: app.globalData.imgUrl,
userFeedbackHidden: true, // userFeedbackHidden: true, //
feedbackContent: '', // feedbackContent: '', //
couId: '' couId: '',
typeid: ''
} }
}, },
filters: { filters: {
@ -91,6 +101,7 @@
}, },
onLoad(option) { onLoad(option) {
this.typeId = option.id; this.typeId = option.id;
this.typeid = option.typeid;
this.couponId = option.couponsId; this.couponId = option.couponsId;
}, },
onShow() { onShow() {
@ -118,20 +129,42 @@
let pagenum = this.pageNum; let pagenum = this.pageNum;
let params; let params;
if (this.typeId == 1) { if (this.typeId == 1) {
if (this.typeid == 1) {
params = {
pageNum: pagenum,
couponId: this.couponId,
status: 1,
type: 1,
pageSize: this.pageSize
}
} else {
params = { params = {
pageNum: pagenum, pageNum: pagenum,
couponId: this.couponId, couponId: this.couponId,
status: 1, status: 1,
type: 2,
pageSize: this.pageSize pageSize: this.pageSize
} }
}
} else if (this.typeId == 2) { } 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 = { params = {
pageNum: pagenum, pageNum: pagenum,
couponId: this.couponId, couponId: this.couponId,
status: '2,3', status: '2,3',
type: 2,
pageSize: this.pageSize pageSize: this.pageSize
} }
} }
}
getCodeListByAgentCoupon(params).then(res => { getCodeListByAgentCoupon(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -166,7 +199,7 @@
}) })
} else { } else {
uni.showLoading({ uni.showLoading({
title: '油码生成中...' title: '生成中...'
}) })
let datas = { let datas = {
couponAgentCodeId: this.couId, couponAgentCodeId: this.couId,
@ -177,7 +210,8 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.userFeedbackHidden = true; this.userFeedbackHidden = true;
uni.navigateTo({ 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 { } else {
uni.showToast({ uni.showToast({

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

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

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

Loading…
Cancel
Save