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

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

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

@ -359,6 +359,11 @@ export const useCouponCode = params => {
export const getAgentCount = params => { export const getAgentCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentCount`, params).then(res => res.data); 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 => { export const getCodeListByAgentCoupon = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeListByAgentCoupon`, params).then(res => res.data); return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeListByAgentCoupon`, params).then(res => res.data);

@ -21,11 +21,11 @@
消费时间:{{threeTime | formatDate('-')}}</view> 消费时间:{{threeTime | formatDate('-')}}</view>
</view> </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 "> <view class="width90 mart5 font13 fcor666" v-if="couponDesInfo.couponAgentCode.remark != null ">
备注:{{couponDesInfo.couponAgentCode.remark}}</view> 备注:{{couponDesInfo.couponAgentCode.remark}}</view>
<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="line1 mart15"></view>
<view class="width100" v-if="couponDesInfo.couponAgentCode.type == 1"> <view class="width100" v-if="couponDesInfo.couponAgentCode.type == 1">
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view> <view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
@ -35,11 +35,13 @@
<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-if="couponDesInfo.couponAgentCode.status !=3 && couponDesInfo.couponAgentCode.type != 1"> <view class="width90"
<view class="width90 mart10 fcor666" >点击下方复制按钮,复制兑换码发送用户</view> 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="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>
<!-- <view class="width90" v-if="couponDesInfo.couponCode.status ==3 && couponDesInfo.couponAgentCode.type != 1"> <!-- <view class="width90" v-if="couponDesInfo.couponCode.status ==3 && couponDesInfo.couponAgentCode.type != 1">
<view class="mart20 fotct fcorred font15 marb20"> <view class="mart20 fotct fcorred font15 marb20">
请告知加油员用码商支付</view> 请告知加油员用码商支付</view>
@ -111,9 +113,14 @@
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponDesInfo = res.return_data; this.couponDesInfo = res.return_data;
if (res.return_data.couponInfo.couponSource != 4 && res.return_data.couponCode) {
this.oneTime = res.return_data.couponCode.receiveTime; this.oneTime = res.return_data.couponCode.receiveTime;
this.twoTime = res.return_data.couponCode.useEndTime; this.twoTime = res.return_data.couponCode.useEndTime;
this.threeTime = res.return_data.couponCode.consumeTime; 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({ uni.setClipboardData({
data: item, data: item,
success:function(){ success: function() {
} }
}) })

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

Loading…
Cancel
Save