1.修改贵州代理商填写手机分发

yj-dev
杨杰 3 years ago
parent 04f3b699a6
commit b35df858f3
  1. 16
      App.vue
  2. 5
      Utils/Api.js
  3. 47
      pages/goods/coupons-info-details/coupons-info-details.vue
  4. 79
      pages/user/agentCoupons/agentCoupons.vue

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
url: 'https://hsgcs.dctpay.com/crest',
brestUrl : 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',

@ -359,6 +359,11 @@ export const useCouponCode = params => {
export const getAgentCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentCount`, params).then(res => res.data);
}
//推送贵州中石化
export const pushGzSinopec = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/pushGzSinopec`, params).then(res => res.data);
}
// 查询销售码
export const getCodeListByAgentCoupon = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeListByAgentCoupon`, params).then(res => res.data);

@ -21,24 +21,26 @@
消费时间:{{threeTime | formatDate('-')}}</view>
</view>
</view>
<view class="width90 mart5 font13 fcor666" v-if="couponDesInfo.couponCode.storeName != null">
加油站点:{{couponDesInfo.couponCode.storeName}}</view>
<view class="width90 mart5 font13 fcor666" v-if="couponDesInfo.couponAgentCode.remark != null ">
备注:{{couponDesInfo.couponAgentCode.remark}}</view>
<view class="line1 mart15"></view>
<view class="width100" v-if="couponDesInfo.couponAgentCode.type == 1">
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
<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 class="width100" v-if="couponDesInfo.couponInfo.couponSource != 4 && couponDesInfo.couponCode">
<view class="width90 mart5 font13 fcor666" v-if="couponDesInfo.couponCode.storeName != null">
加油站点:{{couponDesInfo.couponCode.storeName}}</view>
<view class="line1 mart15"></view>
<view class="width100" v-if="couponDesInfo.couponAgentCode.type == 1">
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
<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>
<view class="width90"
v-if="couponDesInfo.couponAgentCode.status !=3 && couponDesInfo.couponAgentCode.type != 1">
<view class="width90 mart10 fcor666">点击下方复制按钮,复制兑换码发送用户</view>
<view class="mart30 fotct font18 marb20 fcor666">{{couponDesInfo.couponAgentCode.convertCode}}</view>
<view class="btn90w mart40" @click="copycont(couponDesInfo.couponAgentCode.convertCode)">复制兑换码</view>
</view>
</view>
<view class="width90" v-if="couponDesInfo.couponAgentCode.status !=3 && couponDesInfo.couponAgentCode.type != 1">
<view class="width90 mart10 fcor666" >点击下方复制按钮,复制兑换码发送用户</view>
<view class="mart30 fotct font18 marb20 fcor666">{{couponDesInfo.couponAgentCode.convertCode}}</view>
<view class="btn90w mart40" @click="copycont(couponDesInfo.couponAgentCode.convertCode)">复制兑换码</view>
</view>
<!-- <view class="width90" v-if="couponDesInfo.couponCode.status ==3 && couponDesInfo.couponAgentCode.type != 1">
<view class="mart20 fotct fcorred font15 marb20">
@ -111,9 +113,14 @@
uni.hideLoading()
if (res.return_code == '000000') {
this.couponDesInfo = res.return_data;
this.oneTime = res.return_data.couponCode.receiveTime;
this.twoTime = res.return_data.couponCode.useEndTime;
this.threeTime = res.return_data.couponCode.consumeTime;
if (res.return_data.couponInfo.couponSource != 4 && res.return_data.couponCode) {
this.oneTime = res.return_data.couponCode.receiveTime;
this.twoTime = res.return_data.couponCode.useEndTime;
this.threeTime = res.return_data.couponCode.consumeTime;
return;
}
this.oneTime = res.return_data.couponCodeOther.activeTime;
this.twoTime = res.return_data.couponCodeOther.validEndDate;
}
})
},
@ -151,10 +158,10 @@
// })
// },
//
copycont(item){
copycont(item) {
uni.setClipboardData({
data: item,
success:function(){
success: function() {
}
})

@ -20,7 +20,8 @@
</view>
<view class="width100 line1 mart5"></view>
<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,agent.highCoupon.couponSource)"
v-if="typeId == 1 && typeid == 1">生成油码</button>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)"
v-if="typeId == 2 && typeid == 1">查看详情</button>
@ -28,7 +29,8 @@
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)"
<button class="flright backcorf06 fcorfff font15 agent_btn mart10"
@click="generateCode(agent.id,agent.highCoupon.couponSource)"
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 || typeid == 3) ">查看详情</button>
@ -40,12 +42,14 @@
<!-- / -->
<view :hidden="userFeedbackHidden" class="popup_content">
<view class="popup_title">填写备注</view>
<view class="popup_title">填写信息</view>
<input class="width90 pop_input font14 mart20 marb10" maxlength="11" v-model="feedPhone" placeholder="输入手机号"
type="number" v-if="couponSource == 4" />
<view class="popup_textarea_item">
<textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent">
</textarea>
<view @click="submitFeedback()">
<button class="popup_button">提交备注</button>
<button class="popup_button mart20 fontlet">提交</button>
</view>
</view>
</view>
@ -56,7 +60,8 @@
<script>
import {
getCodeListByAgentCoupon,
generateCode
generateCode,
pushGzSinopec
} from "../../../Utils/Api.js";
let app = getApp();
export default {
@ -74,6 +79,8 @@
image_url: app.globalData.imgUrl,
userFeedbackHidden: true, //
feedbackContent: '', //
feedPhone: '', //
couponSource: '', //
couId: '',
typeid: ''
}
@ -155,7 +162,7 @@
type: 1,
pageSize: this.pageSize
}
} else if(this.typeid == 2){
} else if (this.typeid == 2) {
params = {
pageNum: pagenum,
couponId: this.couponId,
@ -163,7 +170,7 @@
type: 2,
pageSize: this.pageSize
}
}else if(this.typeid == 3){
} else if (this.typeid == 3) {
params = {
pageNum: pagenum,
couponId: this.couponId,
@ -190,25 +197,59 @@
},
//
generateCode(item) {
generateCode(item, item1) {
this.userFeedbackHidden = false;
this.couId = item;
this.couponSource = item1;
},
hideDiv() { //
this.userFeedbackHidden = true;
},
//
submitFeedback() {
if (this.feedPhone == '' && this.couponSource == 4) {
uni.showToast({
title: '请填写推送手机号',
icon: 'none',
duration: 2000
})
return;
}
if (this.feedbackContent == '') {
uni.showToast({
title: '请填写备注信息',
icon: 'none',
duration: 2000
})
return;
}
uni.showLoading({
title: '生成中...'
})
if (this.couponSource == 4) {
let datas = {
couponAgentCodeId: this.couId,
remark: this.feedbackContent,
phone: this.feedPhone
}
pushGzSinopec(datas).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.userFeedbackHidden = true;
uni.navigateTo({
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this
.couId
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else {
uni.showLoading({
title: '生成中...'
})
let datas = {
couponAgentCodeId: this.couId,
remark: this.feedbackContent
@ -230,6 +271,8 @@
}
});
}
},
//
@ -317,10 +360,10 @@
.popup_content {
position: fixed;
top: 50%;
top: 40%;
left: 50%;
width: 520upx;
height: 550upx;
height: 600upx;
margin-left: -270upx;
margin-top: -270upx;
border: 10px solid white;
@ -337,9 +380,16 @@
font-size: 40rpx;
}
.pop_input {
// border-bottom: 1px solid #F1F1F1;
height: 50rpx;
line-height: 50rpx;
padding-left: 20rpx;
}
.popup_textarea_item {
padding-top: 20rpx;
height: 240rpx;
height: 200rpx;
width: 90%;
background-color: #F1F1F1;
margin-top: 30rpx;
@ -348,6 +398,7 @@
.popup_textarea {
width: 410upx;
height: 200rpx;
font-size: 26upx;
margin-left: 20upx;
}

Loading…
Cancel
Save