1.新增代理商兑换码功能

2.新增工会卡充值
yj-dev
杨杰 3 years ago
parent 3ab836e5e6
commit 087440ba61
  1. 5
      Utils/Api.js
  2. 484
      components/QS-tabs/QS-tabs.vue
  3. 18
      pages/goods/coupons-info-details/coupons-info-details.vue
  4. 2
      pages/pay/payment/payment.vue
  5. 16
      pages/user/agentCoupons/agentCoupons.vue
  6. 10
      pages/user/cardDes/cardDes.vue
  7. 188
      pages/user/minePromotion/minePromotion.vue
  8. 23
      pages/user/order_list/order_list.vue
  9. 48
      pages/userLogin/userLogin.vue
  10. 95
      subPages/trade-union-recharge/trade-union-recharge.vue
  11. 4
      uni.scss

@ -342,7 +342,10 @@ export const generateCode = params => {
export const highremark = params => { export const highremark = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data); return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data);
} }
//查询兑换码
export const getAgentConvertCodeCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentConvertCodeCount`, 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);

@ -0,0 +1,484 @@
<template>
<view class="QS-tabs" :style="{
'z-index': zIndex,
'font-size': getFontSize + 'rpx',
'background-color': getBgColor,
'transition-duration': getDuration + 's'
}">
<scroll-view scroll-x class="QS-tabs-scroll" :scroll-left="left" scroll-with-animation :style="{
'z-index': (Number(zIndex) + 1)
}">
<view class="QS-tabs-scroll-box">
<!-- 循环tabs -->
<view class="QS-tabs-scroll-item" :style="{
'height':'100rpx',
'line-height': getHeight + 'rpx',
'min-width': getWidth + 'rpx',
'padding': '0 ' + space + 'rpx',
'color': index===getCurrent?getActiveColor:getDefaultColor,
'font-weight': activeBold&&index===getCurrent?'bold':'',
'transition-duration': getDuration + 's',
'z-index': (Number(zIndex) + 2)
}"
v-for="(item, index) in getTabs" :key="index" @tap="emit(index)" :id="preId + index">
<!-- line1 -->
<view v-if="animationMode==='line1'" class="boxStyle" :style="getDurationStyle +( index===getCurrent?getActiveStyle:getDefaultStyle)"></view>
{{item.name || item}}
</view>
<!-- itemBackground -->
<view v-if="hasItemBackground" class="itemBackgroundBox" :style="{
'height': getHeight + 'rpx',
'width': (isLine3&&tabsInfo[animationFinishCurrent]?tabsInfo[animationFinishCurrent].width:tabsInfo[getCurrent].width) + 'px',
'z-index': Number(zIndex) + 1,
'transition-duration': getDuration + 's',
'left': (tabsInfo[getCurrent]?tabsInfo[getCurrent].left:0) + 'px'
}">
<view class="itemBackground" :style="'transition-duration:' + getDuration + 's;' +
'background-color:' + getItemBackgroundColor + ';' +
'box-shadow: 0 0 5rpx 5rpx ' + getItemBackgroundColor + ';' +
itemBackgroundStyle + ';'" />
</view>
<!-- line2 -->
<view v-if="animationMode==='line2'" class="boxStyle2" :style="getLinezIndex + getDurationStyle +
'width:' + lW + 'px;' +
'background-color:' + (lineColor||getActiveColor) + ';' +
line2Style + ';' +
'left:' + line2Dx + 'px;'" />
<view v-if="animationMode==='line3'" class="boxStyle2" :style="getLinezIndex +
'width:' + lW + 'px;' +
'background-color:' + (lineColor||getActiveColor) + ';' +
line2Style + ';' +
'left:' + getLine3Dx + 'px'" />
</view>
</scroll-view>
</view>
</template>
<script>
const {
windowWidth
} = uni.getSystemInfoSync();
const preId = 'QSTabsID_';
export default {
props: {
tabs: { //
type: Array,
default () {
return [];
}
},
current: { // index
type: Number,
default: 0
},
height: { //QS-tabs
type: [String, Number],
default: 80
},
minWidth: { //tab //v1.4
type: [String, Number],
default: 250
},
fontSize: { //
type: [String, Number],
default: 30
},
duration: { //, s
type: [String, Number],
default: .5
},
activeColor: { //
type: String,
default: '#33cc33'
},
defaultColor: { //
type: String,
default: '#888'
},
animationLineWidth: { //线
type: [String, Number],
default: 20
},
line2Style: { //line2线
type: String,
default: 'height: 8rpx;border-radius: 4rpx;'
},
animationMode: { //
type: String,
default: 'line1'
},
autoCenter: { //
type: Boolean,
default: true
},
autoCenterMode: { //
type: String,
default: 'component'
},
activeStyle: { //line1
type: String,
default: 'bottom:0;left:50%;transform: translate(-50%,-100%);height: 8rpx;border-radius:4rpx;'
},
defaultStyle: { //line1
type: String,
default: 'bottom:0;left:50%;transform: translate(-50%,-100%);height: 8rpx;border-radius:4rpx;'
},
backgroundColor: { //
type: String,
default: 'rgba(255,255,255,0)'
},
hasItemBackground: { //
type: Boolean,
default: false
},
itemBackgroundColor: { //
type: String,
default: 'rgba(255,255,255,0)'
},
itemBackgroundStyle: { //
type: String,
default: ''
},
zIndex: { //cssz-index
type: [String, Number],
default: 99
},
swiperWidth: { //line3, swiper, rpx
type: [String, Number],
default: 750
},
space: { //tab
type: [String, Number],
default: '0'
},
activeBold: { //tab
type: Boolean,
default: true
},
lineColor: { //line
type: String,
default: ''
}
},
computed: {
isLine3() {
return this.animationMode === 'line3';
},
getCurrent() {
const current = Number(this.current);
if (current > (this.getTabs.length - 1)) {
return (this.getTabs.length - 1)
}
return current;
},
getTabs() {
return this.tabs;
},
getHeight() {
return Number(this.height);
},
getWidth() {
return Number(this.minWidth);
},
getFontSize() {
return this.fontSize;
},
getDuration() {
return Number(this.duration);
},
getBgColor() {
const defaultColor = this.backgroundColor || 'rgba(255,255,255,0)';
if (this.getTabs[this.getCurrent] instanceof Object) {
return this.getTabs[this.getCurrent].backgroundColor || defaultColor;
} else {
return defaultColor;
}
},
getItemBackgroundColor() {
const defaultColor = this.itemBackgroundColor || 'rgba(255,255,255,0)';
if (this.getTabs[this.getCurrent] instanceof Object) {
return this.getTabs[this.getCurrent].itemBackgroundColor || defaultColor;
} else {
return defaultColor;
}
},
getDurationStyle() {
return `transition-duration: ${this.getDuration}s;`
},
getActiveColor() {
let activeColor;
if (this.getTabs[this.getCurrent] instanceof Object) {
if (this.getTabs[this.getCurrent].activeColor) {
activeColor = this.getTabs[this.getCurrent].activeColor;
} else {
activeColor = this.activeColor;
}
} else {
activeColor = this.activeColor;
}
return activeColor;
},
getDefaultColor() {
let defaultColor;
if (this.getTabs[this.getCurrent] instanceof Object) {
if (this.getTabs[this.getCurrent].defaultColor) {
defaultColor = this.getTabs[this.getCurrent].defaultColor;
} else {
defaultColor = this.defaultColor;
}
} else {
defaultColor = this.defaultColor;
}
return defaultColor;
},
getActiveStyle() {
return `width:${this.animationLineWidth}%;background-color:${this.getActiveColor};${this.activeStyle};`;
},
getDefaultStyle() {
return `width:0;background-color:${this.getActiveColor};${this.defaultStyle};`;
},
getLinezIndexNum() {
return Number(this.zIndex) + 2;
},
getLinezIndex() {
return `z-index: ${this.getLinezIndexNum};`;
},
getLine3Dx() {
return Number(this.line3Dx) + Number(this.line3AddDx);
}
},
watch: {
current(n, o) {
this.change(n);
},
tabs() {
this.init();
}
},
data() {
return {
left: 0,
tabsInfo: [],
line2Width: Number(this.animationLineWidth),
setTimeoutFc: null,
componentsWidth: 0,
animationFinishCurrent: this.current,
pxWidth: 0,
lW: 0,
sW: 0,
preId,
line3Dx: 0,
line3AddDx: 0,
line2Dx: 0
}
},
// #ifndef H5
onReady() {
this.init();
},
// #endif
// #ifdef H5
mounted() {
this.init();
},
// #endif
methods: {
init() {
this.countPx();
let view = uni.createSelectorQuery().in(this);
for (let i = 0; i < this.tabs.length; i++) {
view.select('#' + preId + i).boundingClientRect();
}
view.exec((res) => {
const arr = [];
for (let i = 0; i < res.length; i++) {
arr.push(res[i]);
}
this.tabsInfo = arr;
this.countLine2Dx();
this.countLine3Dx();
let _this = this;
_this.getQuery(() => {
_this.countScrollX();
});
})
},
countLine2Dx() {
if (this.animationMode === 'line2') {
const tab = this.tabsInfo[this.getCurrent];
if(tab) this.line2Dx = tab.left + tab.width / 2 - this.lW / 2;
}
},
countLine3Dx() {
if (this.animationMode === 'line3') {
const tab = this.tabsInfo[this.animationFinishCurrent];
if(tab) this.line3Dx = tab.left + tab.width / 2 - this.lW / 2;
}
},
countPx() {
const w = uni.upx2px(this.getWidth);
this.pxWidth = w;
this.lW = (w * (Number(this.animationLineWidth) / 100))+72.5;
this.sW = uni.upx2px(Number(this.swiperWidth));
},
emit(index) {
this.$emit('change', index);
},
change() {
this.countScrollX();
if (this.animationMode === 'line2') {
this.line2Width = 2;
if (this.setTimeoutFc) clearTimeout(this.setTimeoutFc);
this.setTimeoutFc = setTimeout(() => {
this.line2Width = this.animationLineWidth;
}, this.getDuration * 1000 * 3 / 5);
this.countLine2Dx();
}
},
getQuery(cb) {
try {
let view = uni.createSelectorQuery().in(this).select('.QS-tabs');
view.fields({
size: true
}, data => {
if (data) {
this.componentsWidth = data.width;
if (cb && typeof cb === 'function') cb(data);
} else {
this.retryGetQuery(cb);
}
}).exec();
} catch (e) {
//TODO handle the exception
this.componentsWidth = windowWidth;
}
},
retryGetQuery(cb) {
try {
let view = uni.createSelectorQuery().select('.QS-tabs');
view.fields({
size: true
}, data => {
if (data) {
this.componentsWidth = data.width;
} else {
this.componentsWidth = windowWidth;
}
if (cb && typeof cb === 'function') cb(data);
}).exec();
} catch (e) {
//TODO handle the exception
this.componentsWidth = windowWidth;
}
},
countScrollX() {
if (this.autoCenter) {
let tab;
if(this.isLine3) {
tab = this.tabsInfo[this.animationFinishCurrent];
}else{
tab = this.tabsInfo[this.getCurrent];
}
if(tab) {
let tabCenter = tab.left + tab.width/2;
let fatherWidth;
if (this.autoCenterMode === 'window') {
fatherWidth = windowWidth;
} else {
fatherWidth = this.componentsWidth;
}
this.left = tabCenter - fatherWidth / 2;
}
}
},
setDx(dx) {
const tab = this.tabsInfo[dx>0?(this.animationFinishCurrent + 1):(this.animationFinishCurrent - 1)];
this.line3AddDx = dx / this.sW * (tab?tab.width:this.pxWidth);
},
setFinishCurrent(current) {
this.line3AddDx = 0;
this.animationFinishCurrent = current;
this.countLine3Dx();
}
}
}
</script>
<style scoped>
view,
scroll-view {
box-sizing: border-box;
}
.QS-tabs {
width: 100%;
transition-property: background-color, color;
}
.QS-tabs::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
.QS-tabs-scroll {
width: 100%;
white-space: nowrap;
position: relative;
}
.QS-tabs-scroll-box {
position: relative;
display: flex;
white-space: nowrap !important;
display: block !important;
}
.QS-tabs-scroll-item {
position: relative;
display: inline-block;
text-align: center;
transition-property: background-color, color, font-weight;
}
.content {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.boxStyle {
pointer-events: none;
position: absolute;
transition-property: all;
}
.boxStyle2 {
pointer-events: none;
position: absolute;
bottom: 0;
transition-property: all;
transform: translateY(-100%);
}
.itemBackgroundBox {
pointer-events: none;
position: absolute;
top: 0;
transition-property: left, background-color;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.itemBackground {
height: 100%;
width: 100%;
transition-property: all;
}
</style>

@ -27,19 +27,27 @@
备注:{{couponDesInfo.couponAgentCode.remark}}</view> 备注:{{couponDesInfo.couponAgentCode.remark}}</view>
<view class="line1 mart15"></view> <view class="line1 mart15"></view>
<view class="width100" v-if="couponDesInfo.highUserCoupon"> <view class="width100" v-if="couponDesInfo.couponAgentCode.type == 1">
<view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view> <view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
<view class="mart20 fotct fcorred font15 marb20" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="mart20 fotct fcorred font15 marb20">
请告知加油员用码商支付</view> 请告知加油员用码商支付</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="width90 mart20 fotct">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image>
</view> </view>
</view> </view>
<view class="width90" v-else> <view class="width90" v-if="couponDesInfo.couponAgentCode.status !=3 && couponDesInfo.couponAgentCode.type != 1">
<view class="width90 mart10 fcor666" >点击下方复制按钮,复制兑换码发送用户</view> <view class="width90 mart10 fcor666" >点击下方复制按钮,复制兑换码发送用户</view>
<view class="mart30 fotct font18 marb20 fcor666">{{couponDesInfo.couponAgentCode.convertCode}}</view> <view class="mart30 fotct font18 marb20 fcor666">{{couponDesInfo.couponAgentCode.convertCode}}</view>
<view class="btn90w mart40" @click="copycont(couponDesInfo.couponAgentCode.convertCode)">复制兑换码</view> <view class="btn90w mart40" @click="copycont(couponDesInfo.couponAgentCode.convertCode)">复制兑换码</view>
</view> </view>
<view class="width90" v-if="couponDesInfo.couponCode.status ==3 && couponDesInfo.couponAgentCode.type != 1">
<view class="mart20 fotct fcorred font15 marb20">
请告知加油员用码商支付</view>
<view class="width90 mart20 fotct">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCode.ext1"></image>
</view>
<view class="mart30 fotct font18 marb20 fcor666">{{couponDesInfo.couponAgentCode.convertCode}}</view>
</view>
<view class="height60"></view> <view class="height60"></view>
</view> </view>
</template> </template>

@ -29,7 +29,7 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="row" @tap="paytype='gonghuika'" v-if="goodsType != 2"> <view class="row" @tap="paytype='gonghuika'" v-if="goodsType != 2 && goodsType != 8">
<view class="left"> <view class="left">
<image style="border-radius: 50%;" src="../../../static/img/ghkpay.png"></image> <image style="border-radius: 50%;" src="../../../static/img/ghkpay.png"></image>
</view> </view>

@ -31,9 +31,9 @@
<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 && typeid == 2">生成兑换码</button> v-if="typeId == 1 && typeid == 2">生成兑换码</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 && typeid == 2">查看详情</button> v-if="typeId == 2 && (typeid == 2 || typeid == 3) ">查看详情</button>
<view class="agent_ts font15 fcor333 fotlt text1" <view class="agent_ts font15 fcor333 fotlt text1"
v-if="typeId == 2 && typeid == 2 && agent.remark !=null "> v-if="typeId == 2 && (typeid == 2 || typeid == 3) && agent.remark !=null ">
备注:{{agent.remark}}</view> 备注:{{agent.remark}}</view>
</view> </view>
</view> </view>
@ -155,11 +155,19 @@
type: 1, type: 1,
pageSize: this.pageSize pageSize: this.pageSize
} }
} else { } else if(this.typeid == 2){
params = { params = {
pageNum: pagenum, pageNum: pagenum,
couponId: this.couponId, couponId: this.couponId,
status: '2,3', status: 2,
type: 2,
pageSize: this.pageSize
}
}else if(this.typeid == 3){
params = {
pageNum: pagenum,
couponId: this.couponId,
status: 3,
type: 2, type: 2,
pageSize: this.pageSize pageSize: this.pageSize
} }

@ -6,6 +6,7 @@
<view class="cardlabel font18 fcorfff fontwig6" style="top: 80px;">余额 : {{tongCardPrice}}</view> <view class="cardlabel font18 fcorfff fontwig6" style="top: 80px;">余额 : {{tongCardPrice}}</view>
</view> </view>
<view class="btnw50 font20 fontlet" @click="selectCards()">查询明细</view> <view class="btnw50 font20 fontlet" @click="selectCards()">查询明细</view>
<view class="btnw50 font20 fontlet" @click="unionCardPay()">充值余额</view>
<view class="btnw50 font20 fontlet" @click="delUserCard()" v-if="user.hltCardNo">解绑</view> <view class="btnw50 font20 fontlet" @click="delUserCard()" v-if="user.hltCardNo">解绑</view>
</view> </view>
</template> </template>
@ -20,7 +21,7 @@
data() { data() {
return { return {
user: '', user: '',
tongCardPrice:0, tongCardPrice: 0,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'cards.jpg', imgadres: 'cards.jpg',
} }
@ -99,6 +100,13 @@
}); });
}, },
//
unionCardPay() {
uni.navigateTo({
url: '../../../subPages/trade-union-recharge/trade-union-recharge?cardId=' + this.user
.hltCardNo.cardNo
})
}
} }
} }
</script> </script>

@ -18,8 +18,16 @@
<view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view> <view class="width50 flright font15 fcor666 fontwig6 fotrt">今日流水</view>
</view> </view>
</view> </view>
<view class="mart70">
<QSTabs ref="tabs" :tabs="tabs" animationMode="line2" :current="current" @change="change"
activeColor="#089bf5" lineColor="#089bf5" minWidth="374">
</QSTabs>
<view class="line1"></view>
</view>
<!-- // --> <!-- // -->
<view class="width100 mart80"> <view class="width100" v-if="current == 0">
<view class="width100 mart20">
<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>
@ -33,10 +41,10 @@
</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">
剩余库存({{mineproList.laveStockCount}}) 剩余库存({{agentList.laveStockCount}})
</view> </view>
<view class="pro_price fotrt fcor333 font15 fontwig6"> <view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{mineproList.surplusCountPrice}} 总计 ¥{{agentList.surplusCountPrice}}
</view> </view>
</view> </view>
<!-- //:class="[index==0?'colorfe':'']" --> <!-- //:class="[index==0?'colorfe':'']" -->
@ -69,10 +77,10 @@
</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">
已销售({{mineproList.soldCount}}) 已销售({{agentList.soldCount}})
</view> </view>
<view class="pro_price fotrt fcor333 font15 fontwig6"> <view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{mineproList.salesCountPrice}} 总计 ¥{{agentList.salesCountPrice}}
</view> </view>
</view> </view>
<view v-if="minepros == ''" class="width90">暂无数据</view> <view v-if="minepros == ''" class="width90">暂无数据</view>
@ -90,13 +98,14 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 兑换码库存 --> <!-- 兑换码库存 -->
<view class="width100" v-if="current == 1">
<view class="width100 mart20"> <view class="width100 mart20">
<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>
@ -106,15 +115,14 @@
</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">
待使用({{codeList.laveStockCount}}) 待销售({{couponList.noSalesNum}})
</view> </view>
<view class="pro_price fotrt fcor333 font15 fontwig6"> <view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{codeList.surplusCountPrice}} 总计 ¥{{couponList.noSalesPrice}}
</view> </view>
</view> </view>
<!-- //:class="[index==0?'colorfe':'']" --> <view v-if="couponCont == ''" class="width90">暂无数据</view>
<view v-if="checkcodeList == ''" class="width90">暂无数据</view> <view v-for="(mers,index) in couponCont" :key="mers.id" class="pro_mok marb10 colore7"
<view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore7"
@click="jumpAgent(1,mers.couponId,2)"> @click="jumpAgent(1,mers.couponId,2)">
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10"> <view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额{{mers.salesPrice}} 面额{{mers.salesPrice}}
@ -128,38 +136,110 @@
</view> </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 mart20">
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
已销售({{couponList.salesNum}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{couponList.salesPrice}}
</view>
</view>
<view v-if="couponCont == ''" class="width90">暂无数据</view>
<!-- // -->
<view v-for="(mers,index) in couponCont" :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.noUsedNum}}
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
{{mers.noUsedPrice}}
</view>
</view>
</view>
<view class="width100 mart20"> <view class="width100 mart20">
<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 mart20">
<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">
已使用({{codeList.soldCount}}) 使用({{couponList.noUsedNum}})
</view> </view>
<view class="pro_price fotrt fcor333 font15 fontwig6"> <view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{codeList.salesCountPrice}} 总计 ¥{{couponList.noUsedPrice}}
</view> </view>
</view> </view>
<view v-if="checkcodeList == ''" class="width90">暂无数据</view> <view v-if="couponCont == ''" class="width90">暂无数据</view>
<!-- // --> <view v-for="(mers,index) in couponCont" :key="mers.id" class="pro_mok marb10 colore7"
<view v-for="(mers,index) in checkcodeList" :key="mers.id" class="pro_mok marb10 colore9"
@click="jumpAgent(2,mers.couponId,2)"> @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>
<view class="width100 font14 fcor999 fotct mart10"> <view class="width100 font14 fcor999 fotct mart10">
{{mers.salesCount}} {{mers.noUsedNum}}
</view> </view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10"> <view class="width100 font15 fcor333 fontwig6 fotct mart10">
{{mers.salesPrice*mers.salesCount}} {{mers.noUsedPrice}}
</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 mart20">
<image class="flleft pro_img mart15 margle" :src="imagewxUrl+imgadres">
</image>
<view class="pro_cont paddtop15">
<view class="flleft font16 fcor333 fontwig6 pro_title">
已使用({{couponList.usedNum}})
</view>
<view class="pro_price fotrt fcor333 font15 fontwig6">
总计 ¥{{couponList.usedPrice}}
</view>
</view>
<view v-if="couponCont == ''" class="width90">暂无数据</view>
<!-- // -->
<view v-for="(mers,index) in couponCont" :key="mers.id" class="pro_mok marb10 colore9"
@click="jumpAgent(2,mers.couponId,3)">
<view class="width100 font14 fcor333 fontwig6 fotct paddtop10">
面额{{mers.salesPrice}}
</view>
<view class="width100 font14 fcor999 fotct mart10">
{{mers.usedNum}}
</view>
<view class="width100 font15 fcor333 fontwig6 fotct mart10">
{{mers.usedPrice}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -169,50 +249,87 @@
<script> <script>
import { import {
getAgentCount getAgentCount,
getAgentConvertCodeCount
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
import QSTabs from '../../../components/QS-tabs/QS-tabs.vue';
let app = getApp(); let app = getApp();
export default { export default {
components: {
QSTabs
},
data() { data() {
return { return {
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'wenj.png', imgadres: 'wenj.png',
agentList: [], // agentList: [], //
minepros: [], // minepros: [], //
mineproList: [], // couponList:[], //
checkcodeList: [], // couponCont:[], //
codeList: [] // tabs: ["销售码", "兑换码"], //
current: 0, //
} }
}, },
onLoad() {
onShow() {
this.getAgentCount(1); this.getAgentCount(1);
this.getAgentCount(2); this.getAgentConvertCodeCount();
}, },
methods: { methods: {
// //
getAgentCount(item) { getAgentCount(item) {
uni.showLoading({
title: '加载中'
})
let datas = { let datas = {
type: item type: item
} }
getAgentCount(datas).then(res => { getAgentCount(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.agentList = res.return_data; this.agentList = res.return_data;
if (item == 1) {
this.minepros = res.return_data.list; this.minepros = res.return_data.list;
this.mineproList = res.return_data;
} else { } else {
this.checkcodeList = res.return_data.list; this.agentList = [];
this.codeList = res.return_data this.minepros = [];
uni.showToast({
title: res.return_msg,
icon: "none",
duration: 2000
})
} }
})
},
//
getAgentConvertCodeCount() {
uni.showLoading({
title: '加载中'
})
getAgentConvertCodeCount().then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data) {
this.couponList = res.return_data;
this.couponCont = res.return_data.list;
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: "none" icon: "none",
duration: 2000
}) })
this.couponList = [];
this.couponCont = [];
}
});
},
//
change(index) {
this.$refs.tabs.setFinishCurrent(index);
this.swiperCurrent = index;
this.current = index;
if (index == 0) {
this.getAgentCount(1);
} else {
this.getAgentConvertCodeCount();
} }
})
}, },
// //
jumpRunWater() { jumpRunWater() {
@ -226,6 +343,7 @@
url: '../agentCoupons/agentCoupons?id=' + item + '&couponsId=' + items + '&typeid=' + itemtype url: '../agentCoupons/agentCoupons?id=' + item + '&couponsId=' + items + '&typeid=' + itemtype
}) })
}, },
//
toPage(page) { toPage(page) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/resetpasswd' url: '../../login/resetpasswd'

@ -15,34 +15,39 @@
<view class="row" v-for="(row,index) in orderList" :key="index"> <view class="row" v-for="(row,index) in orderList" :key="index">
<view class="width96 height40" @click="jumpDetails(row.id)"> <view class="width96 height40" @click="jumpDetails(row.id)">
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 1 || row.highChildOrderList[0].goodsType == 2"> v-if="row.highChildOrderList[0].goodsType == 1">
<image src="../../../static/img/order2.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order2.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
卡券订单 卡券订单
</view> </view>
<view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 2">
<image src="../../../static/img/order2.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
积分充值
</view>
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 7"> v-if="row.highChildOrderList[0].goodsType == 7">
<image src="../../../static/img/order9.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order9.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
优惠券包 优惠券包
</view> </view>
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 3"> v-if="row.highChildOrderList[0].goodsType == 3">
<image src="../../../static/img/order4.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order4.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
团油订单 团油订单
</view> </view>
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 5"> v-if="row.highChildOrderList[0].goodsType == 5">
<image src="../../../static/img/order5.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order5.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
电影票 电影票
</view> </view>
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 4"> v-if="row.highChildOrderList[0].goodsType == 4">
<image src="../../../static/img/order3.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order3.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
KFC KFC
</view> </view>
<view class="width50 flleft aliitem fotlt font16" <view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 6"> v-if="row.highChildOrderList[0].goodsType == 8">
<image src="../../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/ghkpay.png" class="marglerig" style="width: 50rpx;height: 50rpx;"></image>
话费充值 工会卡充值
</view> </view>
<view class="width50 flright fotrt fcor666 font15"> <view class="width50 flright fotrt fcor666 font15">
{{row.createTime | formatDate('-')}} {{row.createTime | formatDate('-')}}

@ -1,9 +1,11 @@
<template> <template>
<view> <view>
<image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1"
:src="imagewxUrl+imgadres"></image>
<image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image> <image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image>
<!-- #ifdef MP --> <!-- #ifdef MP -->
<view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo"> <view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet"
v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo">
授权并登录</view> 授权并登录</view>
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user" <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user"
open-type="getPhoneNumber" @getphonenumber="loginByPhone">授权手机号</button> open-type="getPhoneNumber" @getphonenumber="loginByPhone">授权手机号</button>
@ -21,7 +23,8 @@
const app = getApp(); const app = getApp();
import { import {
getUserInfo, getUserInfo,
loginByPhone loginByPhone,
HandleCode
} from "../../Utils/Api.js" } from "../../Utils/Api.js"
export default { export default {
data() { data() {
@ -33,6 +36,25 @@
} }
}, },
onLoad() { onLoad() {
// #ifdef MP
if (!app.globalData.openId) {
uni.login({
provider: 'weixin',
success: function(loginRes) {
app.globalData.code = loginRes.code;
//
let params = {
code: app.globalData.code
}
HandleCode(params).then(res => {
if (res.return_code == '000000') {
app.globalData.openId = res.return_data.openId;
}
})
},
})
}
// #endif
this.user = app.globalData.userInfo; this.user = app.globalData.userInfo;
}, },
methods: { methods: {
@ -65,12 +87,13 @@
data: res.return_data.uniqueCode data: res.return_data.uniqueCode
}) })
if (res.return_data.object.highUser.infoCompleteStatus == 0) { if (res.return_data.object.highUser.infoCompleteStatus == 0) {
uni.navigateBack({ uni.navigateBack({})
})
} }
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg title: res.return_msg,
duration: 2000,
icon: 'none'
}) })
} }
}); });
@ -86,7 +109,7 @@
}, },
// //
loginByPhone(PhoneNumber) { loginByPhone(PhoneNumber) {
if(PhoneNumber.detail.iv == undefined){ if (PhoneNumber.detail.iv == undefined) {
uni.showToast({ uni.showToast({
title: "用户取消授权", title: "用户取消授权",
icon: "none" icon: "none"
@ -120,10 +143,15 @@
key: "token", key: "token",
data: res.return_data.uniqueCode data: res.return_data.uniqueCode
}) })
if(res.return_data.object.highUser.infoCompleteStatus == 0){ if (res.return_data.object.highUser.infoCompleteStatus == 0) {
uni.navigateBack({ uni.navigateBack({})
})
} }
} else {
uni.showToast({
title: res.return_msg,
icon: "none",
duration: 2000
});
} }
}); });
}, },

@ -3,8 +3,10 @@
<view class="block"> <view class="block">
<view class="content"> <view class="content">
<view class="my"> <view class="my">
我的账户余额 {{tongCardPrice}} ( 1:100) 充值账号
</view> </view>
<input class="my" disabled="true" style="border-bottom: solid 1upx #eee;" placeholder="请输入充值账号"
v-model="cardId" />
</view> </view>
</view> </view>
<view class="block"> <view class="block">
@ -24,7 +26,7 @@
自定义充值金额 自定义充值金额
</view> </view>
<view class="input"> <view class="input">
<input type="number" v-model="inputAmount" /> <input type="number" maxlength="4" v-model="inputAmount" />
</view> </view>
</view> </view>
</view> </view>
@ -36,17 +38,6 @@
</view> </view>
<view class="content"> <view class="content">
<view class="pay-list"> <view class="pay-list">
<!-- <view class="row" @tap="paytype='alipay'">
<view class="left">
<image src="/static/img/alipay.png"></image>
</view>
<view class="center">
支付宝支付
</view>
<view class="right">
<radio :checked="paytype=='alipay'" color="#0083f5" />
</view>
</view> -->
<view class="row" @tap="paytype='wxpay'"> <view class="row" @tap="paytype='wxpay'">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres"></image> <image :src="imagewxUrl+imgadres"></image>
@ -86,88 +77,80 @@
data() { data() {
return { return {
inputAmount: '', // inputAmount: '', //
amountList: [10, 50, 100], //3 amountList: [50, 100, 200], //3
paytype: 'wxpay', // paytype: 'wxpay', //
user: "", user: "",
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'wxpay.png', imgadres: 'wxpay.png',
tongCardPrice: 0 tongCardPrice: 0,
cardId: '' //
}; };
}, },
onLoad() { onLoad(options) {
this.user = app.globalData.userInfo; this.cardId = options.cardId;
}, },
onShow() { onShow() {
if (this.user.isSetHltCard) { this.user = app.globalData.userInfo;
this.getHuiLianTongCardBalance();
}
}, },
methods: { methods: {
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
select(amount) { select(amount) {
this.inputAmount = amount; this.inputAmount = amount;
}, },
doDeposit() { doDeposit() {
if (!this.user.isSetHltCard) { if (!this.cardId) {
uni.showToast({ uni.showToast({
title: '请输入充值工会卡',
icon: 'none', icon: 'none',
title: '当前账号还未绑定,前往绑定', duration: 2000
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../pages/user/bindingCard/bindingCard'
})
}, 1000)
}
}); });
return; return;
} }
if (parseFloat(this.inputAmount).toString() == "NaN") { if (parseFloat(this.inputAmount).toString() == "NaN") {
uni.showToast({ uni.showToast({
title: '请输入正确金额', title: '请输入正确金额',
icon: 'none' icon: 'none',
duration: 2000
}); });
return; return;
} }
if (this.inputAmount <= 0) { if (this.inputAmount <= 0) {
uni.showToast({ uni.showToast({
title: '请输入大于0的金额', title: '请输入大于0的金额',
icon: 'none' icon: 'none',
duration: 2000
});
return;
}
if (this.inputAmount > 2000) {
uni.showToast({
title: '充值金额不能超过大于2000',
icon: 'none',
duration: 2000
}); });
return; return;
} }
if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) { if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) {
uni.showToast({ uni.showToast({
title: '最多只能输入两位小数哦~', title: '最多只能输入两位小数哦~',
icon: 'none' icon: 'none',
duration: 2000
}); });
return; return;
} }
uni.showLoading({ uni.showLoading({
title: '正在提交订单...' title: '正在提交订单...'
}) })
let goods = { let datas = {
"identificationCode": app.globalData.identificationCode, "identificationCode": app.globalData.identificationCode,
"memCardNo": this.cardId,
"highChildOrderList": [{ "highChildOrderList": [{
"goodsType": 2, "goodsType": 8,
"goodsId": app.globalData.userInfo.id, "goodsId": app.globalData.userInfo.id,
"saleCount": 1, "saleCount": 1,
"goodsPrice": this.inputAmount "goodsPrice": this.inputAmount
}] }]
} }
addOrder(goods).then(res => { addOrder(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
/// ///
@ -197,8 +180,7 @@
duration: 2000, duration: 2000,
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.navigateBack({ uni.navigateBack({})
})
}, 1000) }, 1000)
} }
}); });
@ -217,7 +199,9 @@
// #endif // #endif
} else { } else {
uni.showToast({ uni.showToast({
title: '支付失败' title: '支付失败',
duration: 2000,
icon: 'none'
}) })
} }
}) })
@ -225,7 +209,9 @@
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg title: res.return_msg,
icon: 'none',
duration: 2000
}); });
} }
}) })
@ -304,11 +290,10 @@
.content { .content {
.my { .my {
width: 100%; width: 100%;
height: 120upx; height: 100upx;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 30upx; font-size: 34upx;
border-bottom: solid 1upx #eee;
} }
.amount { .amount {

@ -487,6 +487,10 @@ $uni-font-size-paragraph:30upx;
.mart80{ .mart80{
margin-top: 80px; margin-top: 80px;
} }
.mart70{
margin-top: 70px;
}
.mart60{ .mart60{
margin-top: 60px; margin-top: 60px;
} }

Loading…
Cancel
Save