huipay-h5
游梦婷 1 year ago
commit 5674a70f50
  1. 77
      Utils/Api.js
  2. 141
      pages.json
  3. 156
      pages/index/activity_Funds/activity_Funds.vue
  4. 407
      pages/index/activity_Funds_activityList/activity_Funds_activityList.vue
  5. 139
      pages/index/activity_Funds_recharge_record/activity_Funds_recharge_record.vue
  6. 141
      pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records.vue
  7. 443
      pages/index/activity_add/activity_add.vue
  8. 137
      pages/index/activity_details/activity_details.vue
  9. 103
      pages/index/activity_recharge_details/activity_recharge_details.vue
  10. 91
      pages/index/activity_transaction_details/activity_transaction_details.vue
  11. 371
      pages/index/recharge_balance/recharge_balance.vue
  12. 2
      pages/index/salesOrderList/salesOrderList.vue
  13. 5
      pages/tabBar/home/home.vue
  14. BIN
      static/img/activity1.png
  15. BIN
      static/img/gift.png
  16. 7
      uni.scss
  17. 2
      unpackage/dist/build/h5/index.html

@ -310,6 +310,7 @@ export const getNewRateApplyDetail = params => {
export const getRateApplyDetail = params => {
return POST('GET', `${base}/merRate/getRateApplyDetail`, params).then(res => res.data);
}
// # 设备绑定门店
export const devicebindStore = params => {
return POST('POST', `${base}/device/bindStore`, params).then(res => res.data);
@ -325,8 +326,84 @@ export const switchPlatform = params => {
return POST('POST', `${base}/merPlatform/switchPlatform`, params).then(res => res.data);
}
//获取账户信息
export const queryAccount = params => {
return POST('GET', `${base}/rebateMerAccount/queryAccount`, params).then(res => res.data);
}
//获取账户交易记录
export const queryAccountRecordList = params => {
return POST('GET', `${base}/rebateMerAccount/queryAccountRecordList`, params).then(res => res.data);
}
//获取账户交易详情
export const queryAccountRecordDetail = params => {
return POST('GET', `${base}/rebateMerAccount/queryAccountRecordDetail`, params).then(res => res.data);
}
//账户充值
export const rebateCreate = params => {
return POST('POST', `${base}/rebateMerAccountOrder/create`, params).then(res => res.data);
}
//获取账户充值记录
export const queryOrderList = params => {
return POST('GET', `${base}/rebateMerAccountOrder/queryOrderList`, params).then(res => res.data);
}
//获取充值订单详情
export const queryOrderDetail = params => {
return POST('GET', `${base}/rebateMerAccountOrder/queryOrderDetail`, params).then(res => res.data);
}
////////活动/////
//添加活动
export const addActivity = params => {
return POST('POST', `${base}/rebateActivity/addActivity`, params).then(res => res.data);
}
//修改活动
export const updateActivity = params => {
return POST('POST', `${base}/rebateActivity/updateActivity`, params).then(res => res.data);
}
//开启活动
export const openActivity = params => {
return POST('POST', `${base}/rebateActivity/openActivity`, params).then(res => res.data);
}
//关闭活动
export const closeActivity = params => {
return POST('POST', `${base}/rebateActivity/closeActivity`, params).then(res => res.data);
}
//调整、修改活动结束时间
export const updateActivityEndTime = params => {
return POST('POST', `${base}/rebateActivity/updateActivityEndTime`, params).then(res => res.data);
}
//查询活动详情
export const getActivityDetail = params => {
return POST('GET', `${base}/rebateActivity/getActivityDetail`, params).then(res => res.data);
}
//活动列表
export const getActivityList = params => {
return POST('GET', `${base}/rebateActivity/getActivityList`, params).then(res => res.data);
}
//充值活动金额
export const recharge = params => {
return POST('POST', `${base}/rebateActivityAccount/recharge`, params).then(res => res.data);
}
//回收活动余额
export const recover = params => {
return POST('POST', `${base}/rebateActivityAccount/recover`, params).then(res => res.data);
}
//查询活动余额
export const getActivityAccount = params => {
return POST('GET', `${base}/rebateActivityAccount/getActivityAccount`, params).then(res => res.data);
}

@ -450,11 +450,9 @@
}
}
}
,{
}, {
"path": "pages/index/equity-activity-review/equity-activity-review",
"style" :
{
"style": {
"navigationBarTitleText": "活动审核",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
@ -465,11 +463,9 @@
}
}
}
,{
}, {
"path": "pages/index/order-list-details/order-list-details",
"style" :
{
"style": {
"navigationBarTitleText": "订单详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
@ -480,12 +476,129 @@
}
}
}, {
"path": "pages/index/normal-Merchant/normal-Merchant",
"style": {
"navigationBarTitleText": "商户",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/modifyRate/modifyRate",
"style": {
"navigationBarTitleText": "修改费率",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/rateReview/rateReview",
"style": {
"navigationBarTitleText": "审核费率",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_Funds/activity_Funds",
"style": {
"navigationBarTitleText": "活动金",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_Funds_activityList/activity_Funds_activityList",
"style": {
"navigationBarTitleText": "活动列表",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records",
"style": {
"navigationBarTitleText": "交易记录",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_Funds_recharge_record/activity_Funds_recharge_record",
"style": {
"navigationBarTitleText": "充值记录",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_transaction_details/activity_transaction_details",
"style": {
"navigationBarTitleText": "交易详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}, {
"path": "pages/index/activity_recharge_details/activity_recharge_details",
"style": {
"navigationBarTitleText": "充值详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}
,{
"path" : "pages/index/normal-Merchant/normal-Merchant",
"path" : "pages/index/recharge_balance/recharge_balance",
"style" :
{
"navigationBarTitleText": "商户",
"navigationBarTitleText": "活动金充值",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
@ -497,10 +610,10 @@
}
,{
"path" : "pages/index/modifyRate/modifyRate",
"path" : "pages/index/activity_details/activity_details",
"style" :
{
"navigationBarTitleText": "修改费率",
"navigationBarTitleText": "活动详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
@ -512,10 +625,10 @@
}
,{
"path" : "pages/index/rateReview/rateReview",
"path" : "pages/index/activity_add/activity_add",
"style" :
{
"navigationBarTitleText": "审核费率",
"navigationBarTitleText": "添加活动",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,

@ -0,0 +1,156 @@
<template>
<view>
<image src="../../../static/img/activity1.png" class="width100 height150" mode="widthFix"></image>
<view class="headtitle fcorfff font16 width90">{{accountInfo.merName}}</view>
<view class="head_piece backcorfff width94">
<view class="width90 mart10 fcor666 font14">商户简称: <text
class="fcor333 margle">{{accountInfo.merAbbreviate}}</text></view>
<view class="fotct mart10 font24 fontwig6">余额 : {{accountInfo.amount}}</view>
<view class="width100 alijus mart10">
<view class="rechargebtn backcor89 mart5 fcorfff fotct" @click="jumpRechange(accountInfo.amount)">去充值
</view>
</view>
<view class="width100 alijus fotct mart10 height60">
<view class="width50 ">
<view class="width100 fcor999 font14">状态</view>
<view class="width100 fcor089 font16 mart5" v-if="accountInfo.status == 1">可用</view>
<view class="width100 fcoreb5 font16 mart5" v-if="accountInfo.status == 2">冻结</view>
</view>
<view style="width: 1px;height: 40px;" class="backcor9"></view>
<view class="width49 fcor999 font14">
<view class="width100 fcor999 font14">账户编号</view>
<view class="width100 fcor333 font16 mart5">{{accountInfo.accountNumber}}</view>
</view>
</view>
</view>
<view class="width100 backcor9 height140" style="margin-top: -5px;"></view>
<view class="width90 mart20 fontwig6 font14">我的工具</view>
<view class="funcss" v-for="(item,index) in toolList" :key="index" @click="jumpfunc(item)">
<image :src="item.img" mode="widthFix" class="funicon"></image>
<view class=" font14 mart5">{{item.title}}</view>
</view>
</view>
</template>
<script>
import {
queryAccount
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
userInfo: app.globalData.userInfo, //
accountInfo: '', //
toolList: [{
title: '活动列表',
url: '/pages/index/activity_Funds_activityList/activity_Funds_activityList',
img: '../../../static/img/home3.png'
}, {
title: '交易记录',
url: '/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records',
img: '../../../static/img/home3.png'
}, {
title: '充值记录',
url: '/pages/index/activity_Funds_recharge_record/activity_Funds_recharge_record',
img: '../../../static/img/home3.png'
}]
}
},
onShow() {
this.queryAccount();
},
methods: {
//
queryAccount() {
uni.showLoading({
title: '加载中...'
})
let datas = {
merNo: this.userInfo.mer.merNo
}
queryAccount(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.accountInfo = res.return_data;
}
});
},
//
jumpfunc(item) {
if (item.title == '活动列表') {
uni.navigateTo({
url: '/pages/index/activity_Funds_activityList/activity_Funds_activityList?merNo=' +
this.accountInfo.accountNumber
})
return;
}
if (item.title == '交易记录') {
uni.navigateTo({
url: '/pages/index/activity_Funds_transaction_records/activity_Funds_transaction_records?merNo=' +
this.accountInfo.accountNumber
})
return;
}
if (item.title == '充值记录') {
uni.navigateTo({
url: '/pages/index/activity_Funds_recharge_record/activity_Funds_recharge_record?merNo=' +
this.accountInfo.accountNumber
})
return;
}
uni.navigateTo({
url: item.url
})
},
//
jumpRechange(item) {
uni.navigateTo({
url: '/pages/index/recharge_balance/recharge_balance?merNo=' +
this.accountInfo.accountNumber + '&price=' + item+'&type=1'
})
}
}
}
</script>
<style lang="scss">
.headtitle {
position: absolute;
top: 80px;
}
.head_piece {
height: 200px;
position: absolute;
top: 110px;
border-radius: 8px
}
//
.funcss {
width: 33%;
height: 90px;
margin-top: 10px;
text-align: center;
border-right: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
display: inline-block;
.funicon {
width: 35px;
padding-top: 8px;
}
}
.rechargebtn {
width: 90px;
height: 30px;
line-height: 30px;
border-radius: 20px;
}
</style>

@ -0,0 +1,407 @@
<template>
<view>
<view class=" mart10 marb20 alijus">
<view class="font16 fcor333 paddtop5 paddbotm5 margle20 marRight40" v-for="(item,index) in orderStatus"
@click="switchid(item)" :class="[statusid == item.id ? 'fcor089 borbtom fontwig6' : '']" :key="index">
{{item.title}}
</view>
</view>
<view class="input-box">
<view class="icon search"></view>
<input placeholder="请输入搜索的内容" v-model="searchName" placeholder-style="color:#c0c0c0;" @input="toSearch()" />
</view>
<view v-if="activityList == ''" class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
</view>
<view class="width94 backcorfff border-r mart15" v-for="(item,index) in activityList" :key="index"
@click="jumpdetails(item.activityNo,item.status,1)">
<view class="notes" style="border-bottom: 0px;">
<view class="width80p margle">
<view class="font14 fcor333">{{item.merAbbreviate}}</view>
<view class="font12 fcor999">{{item.createTime | timeFormat('yyyy-mm-dd')}}
{{item.createTime | timeFormat('hh:mm')}}
</view>
</view>
<view class="storestus" v-if="item.status == 1">
编辑中
</view>
<view class="storestus" v-if="item.status == 2">
进行中
</view>
<view class="otstatucs" v-if="item.status == 3">
已结束
</view>
</view>
<view class="conts" style="border-bottom: 0px;">
<view class="font14 fcor999">活动类型 :
<text class="font13" v-if="item.activityType == 1"> 优惠活动</text>
<text class="font13" v-if="item.activityType == 2"> 优惠券</text>
</view>
</view>
<view class="conts" style="border-bottom: 0px;">
<view class="font14 fcor999">优惠类型 :
<text class="font13" v-if="item.preferentialType == 1"> 满减</text>
<text class="font13" v-if="item.preferentialType == 2"> 立减</text>
<text class="font13" v-if="item.preferentialType == 3"> 折扣</text>
</view>
</view>
<view class="conts" style="border-bottom: 0px;">
<view class="font14 fcor999">使用规则 :
<text class="font13" v-if="item.preferentialType == 1"> {{item.condition}}{{item.price}}</text>
<text class="font13" v-if="item.preferentialType == 2"> 立减{{item.price}}</text>
<text class="font13" v-if="item.preferentialType == 3"> {{item.price}}</text>
</view>
</view>
<view class="height45 width94">
<button class="btns mart10" @click.stop="openActivity(item.activityNo)"
v-if="item.status == 1">开启活动</button>
<button class="btns mart10" @click.stop="closeActivity(item.activityNo)"
v-if="item.status == 2">关闭活动</button>
<button class="btns mart10" @click.stop="jumpRechange(item.activityNo)"
v-if="item.status != 3">充值金额</button>
<button class="btns mart10" @click.stop="jumpdetails(item.activityNo,item.status,2)"
v-if="item.status != 3">修改时间</button>
<button class="btns mart10" @click.stop="recover(item.activityNo)">回收余额</button>
</view>
<view class="width100 height10"></view>
</view>
<image src="../../../static/img/addser.png" mode="widthFix" class="xfimg" @click="jumpaddactivity"></image>
</view>
</template>
<script>
import {
getActivityList,
openActivity,
closeActivity,
recover,
getActivityAccount
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
accountNumber: '', //
orderStatus: [{
id: 1,
title: '编辑中'
},
{
id: 2,
title: '进行中'
},
{
id: 3,
title: '已结束'
}
], //
statusid: 1, //
activityList: [],
searchName: '', //
pageNum: 1,
pageSize: 10,
isNoMoreData: false, //
}
},
onLoad(options) {
this.accountNumber = options.merNo;
},
onShow() {
this.activityList = [];
this.getActivityList();
},
methods: {
//id
switchid(item) {
this.statusid = item.id;
this.pageNum = 1;
this.activityList = [];
this.getActivityList();
},
//
jumpdetails(item, item1, item2) {
if (item1 == 1 && item2 == 1) {
uni.navigateTo({
url: '/pages/index/activity_add/activity_add?merNo=' + this.accountNumber + '&type=2' +
'&activityno=' + item
})
}
if (item2 == 2) {
uni.navigateTo({
url: '/pages/index/activity_add/activity_add?merNo=' + this.accountNumber + '&type=3' +
'&activityno=' + item
})
}
if (item1 != 1 && item2 == 1) {
uni.navigateTo({
url: '/pages/index/activity_details/activity_details?activityno=' + item
})
}
},
//
getActivityList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading();
return false;
}
let pagenum = this.pageNum;
let datas = {
status: this.statusid,
pageNum: pagenum,
pageSize: this.pageSize
}
getActivityList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list != '') {
this.activityList = res.return_data.list;
} else {
this.activityList = [];
}
})
},
//
jumpaddactivity() {
uni.navigateTo({
url: '/pages/index/activity_add/activity_add?merNo=' + this.accountNumber + '&type=1'
})
},
//
openActivity(item) {
let that = this;
uni.showModal({
title: '开启活动',
content: '是否开启活动。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let data = {
activityNo: item
}
openActivity(data).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '开启成功',
icon: 'none',
duration: 2000
})
that.pageNum = 1;
that.activityList = [];
that.getActivityList();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
closeActivity(item) {
let that = this;
uni.showModal({
title: '关闭活动',
content: '是否关闭活动。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let data = {
activityNo: item
}
closeActivity(data).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '关闭成功',
icon: 'none',
duration: 2000
})
that.pageNum = 1;
that.activityList = [];
that.getActivityList();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
recover(item) {
let that = this;
uni.showModal({
title: '回收活动余额',
content: '确认是否回收活动余额。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let data = {
activityNo: item
}
recover(data).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '回收成功',
icon: 'none',
duration: 2000
})
that.pageNum = 1;
that.activityList = [];
that.getActivityList();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
jumpRechange(item) {
let data = {
activityNo: item
}
getActivityAccount(data).then(res => {
if (res.return_code == '000000') {
uni.navigateTo({
url: '/pages/index/recharge_balance/recharge_balance?merNo=' + this
.accountNumber + '&price=' +
res.return_data.amount + '&type=2' + '&activityNo=' + item
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
}
}
}
</script>
<style lang="scss">
.input-box {
width: 90%;
margin-left: 5%;
margin-top: 15px;
margin-bottom: 15px;
height: 70rpx;
background-color: #fff;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
.icon {
display: flex;
align-items: center;
position: absolute;
top: 2px;
left: 5px;
width: 60upx;
height: 60upx;
font-size: 34upx;
color: #c0c0c0;
}
input {
padding-left: 50upx;
height: 28upx;
font-size: 28upx;
width: 100%;
}
}
.borbtom {
border-bottom: 3px solid #089bf5;
}
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;
align-items: center;
padding: 30rpx 0 10rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
}
.storestus {
padding: 1px 5px;
color: #91bb88;
font-size: 14px;
background-color: #e8fbe6;
}
.otstatucs {
background-color: #fbeee4;
color: #db8c73;
font-size: 14px;
padding: 1px 5px;
}
.conts {
width: calc(100% - 60rpx);
display: flex;
align-items: center;
padding: 0 30rpx 0 30rpx;
}
.xfimg {
width: 100rpx;
bottom: 60rpx;
position: fixed;
right: 40rpx;
}
.btns {
width: 21%;
margin-left: 2%;
float: left;
height: 35px;
line-height: 35px;
background-color: #0083f5;
color: #FFFFFF;
font-weight: bold;
font-size: 12px;
padding: 0px;
}
</style>

@ -0,0 +1,139 @@
<template>
<view>
<view class="input-box">
<view class="icon search"></view>
<input placeholder="请输入搜索的内容" v-model="tradeNo" placeholder-style="color:#c0c0c0;" @input="toSearch()" />
</view>
<view v-if="orderList == ''" class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
</view>
<view class="width100 backcorfff" v-for="(item,index) in orderList" :key="index"
@click="jumpdetails(item.orderNo)">
<view class="width94 paddtop10 paddbotm10 alijusstart bor-botm1">
<view class="width15">
<image src="../../../static/img/wechat.png" mode="widthFix" class="iconw40"></image>
</view>
<view class="width85">
<view class="font13 fcor999 width100">订单编号 :
<text class="font14 fcor333 margle">{{item.orderNo}}</text>
</view>
<view class="font13 fcor999 mart5 width100">商户名称 :
<text class="font14 fcor333 margle">
{{item.merAbbreviate}}</text>
</view>
<view class="alijusstart font13 ">
<view class="width50 fcor999 ">交易金额 : ¥
<text class="fcoreb5 margle font18">{{item.tradePrice}}</text>
</view>
<view class="width50 fcor999 fotrt">交易状态 :
<text class="fcoreb5 margle font16" v-if="item.status == 1">待支付</text>
<text class="fcor41c margle font16" v-if="item.status == 2">已支付</text>
<text class="fcoreb5 margle font16" v-if="item.status == 3">已退款</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
queryOrderList
} from '../../../Utils/Api.js';
export default {
data() {
return {
orderList: [], //
accountNumber: '', //
tradeNo: '', //
pageNum: 1,
pageSize: 10,
isNoMoreData: false, //
}
},
onLoad(options) {
this.accountNumber = options.merNo;
this.queryOrderList();
},
methods: {
//
queryOrderList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let datas = {
accountNumber: this.accountNumber,
pageNum: pagenum,
pageSize: this.pageSize
}
queryOrderList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list) {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.orderList = this.orderList.concat(res.return_data
.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.orderList = [];
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
},
//
jumpdetails(item) {
uni.navigateTo({
url: '/pages/index/activity_recharge_details/activity_recharge_details?orderNo=' + item
})
}
}
}
</script>
<style lang="scss">
.input-box {
width: 90%;
margin-left: 5%;
margin-top: 15px;
margin-bottom: 15px;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
.icon {
display: flex;
align-items: center;
position: absolute;
top: 2px;
left: 5px;
width: 60upx;
height: 60upx;
font-size: 34upx;
color: #c0c0c0;
}
input {
padding-left: 50upx;
height: 28upx;
font-size: 28upx;
width: 100%;
}
}
</style>

@ -0,0 +1,141 @@
<template>
<view>
<view class="input-box">
<view class="icon search"></view>
<!-- @input="toSearch()" v-model="tradeNos" -->
<input placeholder="请输入搜索的内容" placeholder-style="color:#c0c0c0;" />
</view>
<view v-if="accountRecordList == ''" class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image>
</view>
<view class="width100 backcorfff" v-for="(item,index) in accountRecordList" :key="index" @click="jumpdetails(item.tradeNumber)">
<view class="width94 paddtop10 paddbotm10 alijusstart bor-botm1">
<!-- <view class="width15">
<image src="../../../static/img/wechat.png" mode="widthFix" class="iconw40"></image>
</view> -->
<view class="width94">
<view class="font13 fcor999 width100">交易编号: <text class="font14 fcor333 margle">{{item.tradeNumber}}
</text></view>
<view class="font13 fcor999 width100">交易对象类型:
<text class="font14 fcor333 margle" v-if="item.objectType == 1">充值</text>
<text class="font14 fcor333 margle" v-if="item.objectType == 2">活动金</text>
<text class="font14 fcor333 margle" v-if="item.objectType == 3">活动</text>
</view>
<view class="alijusstart font13 ">
<view class="width50 fcor999">交易类型 :
<text class="font14 fcor333 margle" v-if="item.tradeType == 1"> 进账</text>
<text class="font14 fcor333 margle" v-if="item.tradeType == 2"> 出账</text>
</view>
<view class="width50 fcor999 fotrt">交易金额 :¥
<text class="fcor41c margle font18">{{item.tradeAmount}}</text>
<!-- <text class="fcoreb5 margle font18">12.2</text> -->
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
queryAccountRecordList
} from '../../../Utils/Api.js';
export default {
data() {
return {
accountRecordList: [], //
accountNumber: '', //
tradeNos: '', //
pageNum: 1,
pageSize: 10,
isNoMoreData: false, //
}
},
onLoad(options) {
this.accountNumber = options.merNo;
this.queryAccountRecordList();
},
methods: {
//
queryAccountRecordList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let datas = {
accountNumber: this.accountNumber,
pageNum: pagenum,
pageSize: this.pageSize
}
queryAccountRecordList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list) {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.accountRecordList = this.accountRecordList.concat(res.return_data
.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.accountRecordList = [];
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
},
//
jumpdetails(item) {
uni.navigateTo({
url: '/pages/index/activity_transaction_details/activity_transaction_details?orderNo='+item
})
}
}
}
</script>
<style lang="scss">
.input-box {
width: 90%;
margin-left: 5%;
margin-top: 15px;
margin-bottom: 15px;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
.icon {
display: flex;
align-items: center;
position: absolute;
top: 2px;
left: 5px;
width: 60upx;
height: 60upx;
font-size: 34upx;
color: #c0c0c0;
}
input {
padding-left: 50upx;
height: 28upx;
font-size: 28upx;
width: 100%;
}
}
</style>

@ -0,0 +1,443 @@
<template>
<view>
<view class="username">
<view class="namecont">活动类型</view>
<picker v-if="type !=3" mode="selector" style="width: 70%;" :range="activityList" range-key="codeName"
@change="changefeilvalue">
<view class="text1" v-if="activityName">{{activityName}}</view>
<view class="text1 fcor999" v-else>请选择活动类型</view>
</picker>
<image v-if="type !=3" src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
<view v-if="type == 3">{{activityName}}</view>
</view>
<view class="username">
<view class="namecont">优惠类型</view>
<picker v-if="type !=3" mode="selector" style="width: 70%;" :range="preferentialList" range-key="codeName"
@change="changefeilvalue1">
<view class="text1" v-if="preferentialName">{{preferentialName}}</view>
<view class="text1 fcor999" v-else>请选择优惠类型</view>
</picker>
<image v-if="type !=3" src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
<view v-if="type ==3">{{preferentialName}}</view>
</view>
<view class="width100 backcorfff">
<view class="username">
<view class="namecont">优惠金额</view>
<input v-if="type !=3" placeholder="请输入优惠金额" v-model="price" type="text"
placeholder-style="color: #bfbfbf;" />
<view v-if="type ==3">{{price}}</view>
</view>
</view>
<view class="username">
<view class="namecont">结束时间</view>
<picker mode="date" class="width70" :value="end_date" :start="startDate" :end="endDate"
@change="bindDateChange">
<view v-if="end_date">{{end_date}}</view>
<view class="fcor999" v-else>请选择结束时间</view>
</picker>
<image src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
</view>
<view class="width100 backcorfff" v-if="preferentialType == 1">
<view class="username">
<view class="namecont">优惠条件</view>
<input v-if="type !=3" placeholder="请输入优惠条件" v-model="condition" type="number"
placeholder-style="color: #bfbfbf;" />
<view v-if="type == 3">{{condition}}</view>
</view>
</view>
<view class="username">
<view class="namecont">限制类型</view>
<picker v-if="type !=3" mode="selector" style="width: 70%;" :range="partakeList" range-key="codeName"
@change="changefeilvalue2">
<view class="text1" v-if="partakeName">{{partakeName}}</view>
<view class="text1 fcor999" v-else>请选择限制类型</view>
</picker>
<image v-if="type !=3" src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
<view v-if="type == 3">{{partakeName}}</view>
</view>
<view class="width100 backcorfff">
<view class="username">
<view class="namecont">限制数量</view>
<input v-if="type !=3" placeholder="请输入限制数量" v-model="partakeNum" type="text"
placeholder-style="color: #bfbfbf;" />
<view v-if="type == 3">{{partakeNum}}</view>
</view>
</view>
<view class="btn" @tap="addActivity()" v-if="type == 1">提交活动</view>
<view class="btn" @tap="addActivity()" v-if="type == 2">修改活动</view>
<view class="btn" @tap="addActivity()" v-if="type == 3">修改时间</view>
</view>
</template>
<script>
import {
addActivity,
updateActivity,
getActivityDetail,
updateActivityEndTime
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
type: '', //
activityNo: '', //
userInfo: app.globalData.userInfo, //
accountNumber: '', //
activityType: '', //
activityName: '', //
activityList: app.globalData.Dictionaries.REBATE_ACTIVITY_TYPE,
preferentialType: '', //
preferentialName: '', //
preferentialList: app.globalData.Dictionaries.REBATE_PREFERENTIAL_TYPE,
price: '', //
end_date: '', //
condition: '', //
partakeType: '', //
partakeName: '', //
partakeList: app.globalData.Dictionaries.REBATE_PARTAKE_TYPE, //
partakeNum: '', //
}
},
onLoad(options) {
this.type = options.type;
this.accountNumber = options.merNo;
if (this.type == 2 || this.type == 3) {
this.activityNo = options.activityno;
this.getActivityDetail();
}
},
computed: {
//
startDate() {
return this.getDate('start');
},
//
endDate() {
return this.getDate('end');
}
},
methods: {
//
getActivityDetail() {
let data = {
activityNo: this.activityNo
}
getActivityDetail(data).then(res => {
if (res.return_code == '000000') {
this.activityType = res.return_data.activityType;
for (var i = 0; i < this.activityList.length; i++) {
if (this.activityType == this.activityList[i].codeValue) {
this.activityName = this.activityList[i].codeName;
}
}
this.preferentialType = res.return_data.preferentialType;
for (var j = 0; j < this.preferentialList.length; j++) {
if (this.preferentialType == this.preferentialList[j].codeValue) {
this.preferentialName = this.preferentialList[j].codeName;
}
}
this.price = res.return_data.price;
this.end_date = res.return_data.endTimeStr;
if (res.return_data.preferentialType == 1) {
this.condition = res.return_data.condition;
}
this.partakeType = res.return_data.restrictPartakeType;
for (var k = 0; k < this.partakeList.length; k++) {
if (this.partakeType == this.partakeList[k].codeValue) {
this.partakeName = this.partakeList[k].codeName;
}
}
this.partakeNum = res.return_data.restrictPartakeNum;
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},
//
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 50;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
changefeilvalue(e) {
this.activityType = this.activityList[e.target.value].codeValue;
this.activityName = this.activityList[e.target.value].codeName;
},
//
changefeilvalue1(e) {
this.preferentialType = this.preferentialList[e.target.value].codeValue;
this.preferentialName = this.preferentialList[e.target.value].codeName;
this.condition = '';
},
//
changefeilvalue2(e) {
this.partakeType = this.partakeList[e.target.value].codeValue;
this.partakeName = this.partakeList[e.target.value].codeName;
},
//
bindDateChange: function(e) {
this.end_date = e.target.value;
},
//
addActivity() {
if (!this.activityType) {
uni.showToast({
title: '请选择活动类型',
icon: "none",
duration: 2000
});
return;
}
if (!this.preferentialType) {
uni.showToast({
title: '请选择优惠类型',
icon: "none",
duration: 2000
});
return;
}
if (!this.price) {
uni.showToast({
title: '请输入优惠金额',
icon: "none",
duration: 2000
});
return;
}
if (!this.end_date) {
uni.showToast({
title: '请选择结束时间',
icon: "none",
duration: 2000
});
return;
}
if (this.preferentialType == 1 && !this.condition) {
uni.showToast({
title: '请输入优惠条件',
icon: "none",
duration: 2000
});
return;
}
if (this.type == 1) {
uni.showModal({
title: '提交活动',
content: '确认信息是否正确。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let b = new Date(this.end_date).getTime();
let endTime = b + 57599000;
let datas = {
"merNo": this.userInfo.mer.merNo,
"activityType": this.activityType,
"preferentialType": this.preferentialType,
"price": this.price,
"endTime": endTime,
"condition": this.condition,
"partakeType": this.partakeType,
"partakeNum": this.partakeNum
}
addActivity(datas).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '提交成功',
icon: 'none',
duration: 2000
})
uni.navigateBack();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
if (this.type == 2) {
uni.showModal({
title: '修改活动',
content: '确认信息是否正确。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let b = new Date(this.end_date).getTime();
let endTime = b + 57599000;
let datas = {
"activityNo": this.activityNo,
"activityType": this.activityType,
"preferentialType": this.preferentialType,
"price": this.price,
"endTime": endTime,
"condition": this.condition,
"partakeType": this.partakeType,
"partakeNum": this.partakeNum
}
updateActivity(datas).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '提交成功',
icon: 'none',
duration: 2000
})
uni.navigateBack();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
if (this.type == 3) {
uni.showModal({
title: '修改活动时间',
content: '确认信息是否正确。',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...'
})
let b = new Date(this.end_date).getTime();
let endTime = b + 57599000;
let datas = {
"activityNo": this.activityNo,
"endTime": endTime,
}
updateActivityEndTime(datas).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '修改成功',
icon: 'none',
duration: 2000
})
uni.navigateBack();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
}
</script>
<style lang="scss">
.username {
width: calc(100% - 90upx);
height: 100upx;
display: flex;
align-items: center;
background-color: rgba($color: #ffffff, $alpha: 0.1);
border-bottom: 1px solid #f6f6f6;
padding: 8upx 45upx;
input {
width: 50%;
height: 50upx;
font-size: 16px;
color: #333333;
font-weight: blod;
}
.get-code {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
right: 7px;
z-index: 3;
border: 1px solid #bfbfbf;
width: 25%;
padding: 3px 5px;
border-radius: 22px;
&:after {
content: " ";
width: 1upx;
height: 50upx;
position: absolute;
z-index: 3;
margin-right: 100%;
left: 0;
top: 20upx;
}
}
.namecont {
color: #666666;
width: 28%;
}
}
.btn {
color: #FFFFFF;
background-color: #0083f5;
width: 90%;
margin-left: 5%;
margin-top: 100rpx;
margin-bottom: 50rpx;
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10rpx;
font-size: 40rpx;
}
</style>

@ -0,0 +1,137 @@
<template>
<view>
<view class="mart5 width100 backcorfff">
<view class="notes">
<view class="fcor666 width40">商户名称</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.merName}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">商户简称</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.merAbbreviate}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">活动编号</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.activityNo}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">活动余额</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.activityAccount.amount}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">活动类型</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityName}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">优惠类型</view>
<view class="font14 fcor333 text2 width60 fotrt">{{preferentialName}}</view>
</view>
<view class="notes" v-if="activityDetails.condition">
<view class="fcor666 width40">优惠条件</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.condition}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">优惠金额</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.price}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">限制类型</view>
<view class="font14 fcor333 text2 width60 fotrt">{{partakeName}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">限制使用次数</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.restrictPartakeNum}}</view>
</view>
<view class="notes" v-if="activityDetails.startTime">
<view class="fcor666 width40">活动开始时间</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.startTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
<view class="notes" v-if="activityDetails.endTime">
<view class="fcor666 width40">活动结束时间</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.endTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
<view class="notes" v-if="activityDetails.realityEndTime">
<view class="fcor666 width40">实际结束时间</view>
<view class="font14 fcor333 text2 width60 fotrt">{{activityDetails.realityEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
</view>
</view>
</template>
<script>
import {
getActivityDetail
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
activityNo: '', //
activityDetails: '', //
activityName: '', //
activityList: app.globalData.Dictionaries.REBATE_ACTIVITY_TYPE,
preferentialName: '', //
preferentialList: app.globalData.Dictionaries.REBATE_PREFERENTIAL_TYPE,
partakeName: '', //
partakeList: app.globalData.Dictionaries.REBATE_PARTAKE_TYPE, //
}
},
onLoad(options) {
this.activityNo = options.activityno;
this.getActivityDetail();
},
methods: {
//
getActivityDetail() {
let data = {
activityNo: this.activityNo
}
getActivityDetail(data).then(res => {
if (res.return_code == '000000') {
this.activityDetails = res.return_data;
for (var i = 0; i < this.activityList.length; i++) {
if (res.return_data.activityType == this.activityList[i].codeValue) {
this.activityName = this.activityList[i].codeName;
}
}
for (var j = 0; j < this.preferentialList.length; j++) {
if (res.return_data.preferentialType == this.preferentialList[j].codeValue) {
this.preferentialName = this.preferentialList[j].codeName;
}
}
if (res.return_data.preferentialType == 1) {
this.condition = res.return_data.condition;
}
for (var k = 0; k < this.partakeList.length; k++) {
if (res.return_data.restrictPartakeType == this.partakeList[k].codeValue) {
this.partakeName = this.partakeList[k].codeName;
}
}
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;
align-items: center;
padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
}
</style>

@ -0,0 +1,103 @@
<template>
<view>
<view class="mart5 width100 backcorfff">
<view class="notes">
<view class="fcor666 width25">商户编号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{orderDtails.merNo}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">商户名称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{orderDtails.merName}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">商户简称</view>
<view class="font14 fcor333 text2 width75 fotrt">{{orderDtails.merAbbreviate}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">订单编号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{orderDtails.orderNo}}</view>
</view>
<view class="notes" v-if="orderDtails.paySerialNo">
<view class="fcor666 width25">支付流水号</view>
<view class="font14 fcor333 text2 width75 fotrt">{{orderDtails.paySerialNo}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">交易金额</view>
<view class="font14 fcor333 text2 width75 fotrt">¥ {{orderDtails.tradePrice}}</view>
</view>
<view class="notes">
<view class="fcor666 width25">支付方式</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="orderDtails.payType == 'WECHAT'">微信</view>
</view>
<view class="notes">
<view class="fcor666 width25">支付状态</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="orderDtails.status == 1">待支付</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="orderDtails.status == 2">已支付</view>
<view class="font14 fcor333 text2 width75 fotrt" v-if="orderDtails.status == 3">已退款</view>
</view>
<view class="notes">
<view class="fcor666 width25">创建时间</view>
<view class="font14 fcor333 text2 width75 fotrt">
{{orderDtails.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
</view>
<view class="notes" v-if="orderDtails.payTime">
<view class="fcor666 width25">支付时间</view>
<view class="font14 fcor333 text2 width75 fotrt">
{{orderDtails.payTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
</view>
</view>
</view>
</template>
<script>
import {
queryOrderDetail
} from '../../../Utils/Api.js';
export default {
data() {
return {
orderNo: '' ,//
orderDtails:'' //
}
},
onLoad(options) {
this.orderNo = options.orderNo;
this.queryOrderDetail();
},
methods: {
//
queryOrderDetail() {
uni.showLoading({
title: '加载中'
})
let datas = {
orderNo: this.orderNo
}
queryOrderDetail(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderDtails = res.return_data
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;
align-items: center;
padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
}
</style>

@ -0,0 +1,91 @@
<template>
<view>
<view class="mart5 width100 backcorfff">
<view class="notes">
<view class="fcor666 width40">交易类型</view>
<view class="font14 fcor333 text2 width60 fotrt" v-if="transactionDetails.tradeType == 1">进账</view>
<view class="font14 fcor333 text2 width60 fotrt" v-else>出账</view>
</view>
<view class="notes">
<view class="fcor666 width40">交易编号</view>
<view class="font14 fcor333 text2 width60 fotrt">{{transactionDetails.tradeNumber}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">交易金额</view>
<view class="font14 fcor333 text2 width60 fotrt">¥ {{transactionDetails.tradeAmount}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">交易前金额</view>
<view class="font14 fcor333 text2 width60 fotrt">¥ {{transactionDetails.amountBeforeChange}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">交易后金额</view>
<view class="font14 fcor333 text2 width60 fotrt">¥ {{transactionDetails.amountAfterChange}}</view>
</view>
<view class="notes">
<view class="fcor666 width40">交易对象类型</view>
<view class="font14 fcor333 text2 width60 fotrt" v-if="transactionDetails.objectType == 1">充值</view>
<view class="font14 fcor333 text2 width60 fotrt" v-if="transactionDetails.objectType == 2">返利金</view>
<view class="font14 fcor333 text2 width60 fotrt" v-if="transactionDetails.objectType == 3">活动</view>
</view>
<view class="notes">
<view class="fcor666 width40">创建时间</view>
<view class="font14 fcor333 text2 width60 fotrt">{{transactionDetails.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
<view class="notes" v-if="transactionDetails.objectContent">
<view class="fcor666 width40">交易对象内容</view>
<view class="font14 fcor333 text2 width60 fotrt">{{transactionDetails.objectContent}}</view>
</view>
</view>
</view>
</template>
<script>
import {
queryAccountRecordDetail
} from '../../../Utils/Api.js';
export default {
data() {
return {
orderNo: '', //
transactionDetails: '' //
}
},
onLoad(options) {
this.orderNo = options.orderNo;
this.queryAccountRecordDetail();
},
methods: {
//
queryAccountRecordDetail() {
uni.showLoading({
title: '加载中'
})
let datas = {
tradeNumber: this.orderNo
}
queryAccountRecordDetail(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.transactionDetails = res.return_data
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;
align-items: center;
padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
}
</style>

@ -0,0 +1,371 @@
<template>
<view>
<view class="block">
<view class="content">
<view class="my" v-if="type== 1">
当前活动金余额 : <view class="font22 fcoreb5 margle">¥ {{balance}} </view>
</view>
<view class="my" v-if="type== 2">
当前活动余额 : <view class="font22 fcoreb5 margle">¥ {{balance}} </view>
</view>
</view>
</view>
<view class="block">
<view class="title">
充值金额
</view>
<view class="content">
<view class="amount">
<view class="list">
<view class="box" v-for="(amount,index) in amountList" :key="index" @tap="select(amount)"
:class="{'on':amount == inputAmount}">
<view class="heTitle">{{amount}}</view>
</view>
</view>
<view class="num">
<view class="text font15">
输入充值金额
</view>
<view class="input">
<input v-model="inputAmount" />
</view>
</view>
</view>
</view>
</view>
<view class="pay">
<button class="btn" @tap="doDeposit">立即充值</button>
<view class="tis">
点击立即充值即代表您同意<view class="terms">
条款协议
</view>
</view>
</view>
</view>
</template>
<script>
let app = getApp()
import {
rebateCreate,
recharge
} from "../../../Utils/Api.js";
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
data() {
return {
balance: '', //
inputAmount: '', //
type: '', //
activityNo: '', //
amountList: [100, 200, 300, 500, 800, 1000], //3
accountNumber: '', //
};
},
onLoad(options) {
this.accountNumber = options.merNo;
this.balance = options.price;
this.type = options.type;
this.activityNo = options.activityNo;
if (this.type == 1) {
this.amountList = [100, 200, 300, 500, 800, 1000]
}
if (this.type == 2) {
this.amountList = [10, 50, 100, 150, 200, 300]
}
},
methods: {
select(amount) {
this.inputAmount = amount;
},
doDeposit() {
if (parseFloat(this.inputAmount).toString() == "NaN") {
uni.showToast({
title: '请输入正确金额',
icon: 'none'
});
return;
}
if (this.inputAmount <= 0) {
uni.showToast({
title: '请输入大于0的金额',
icon: 'none'
});
return;
}
if (parseFloat(this.inputAmount).toFixed(2) != parseFloat(this.inputAmount)) {
uni.showToast({
title: '最多只能输入两位小数哦~',
icon: 'none'
});
return;
}
uni.showLoading({
title: '正在提交订单...'
})
if (this.type == 1) {
let goods = {
"accountNumber": this.accountNumber,
"orderType": "1", // 1:
"payType": "WECHAT", // WECHAT: ALIPAY:UQRCODEPAY
"tradePrice": this.inputAmount,
"openId": app.globalData.openId
}
rebateCreate(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.payRequest(res.return_data.payParam);
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
});
}
})
}
if (this.type == 2) {
let data = {
"activityNo": this.activityNo,
"amount": this.inputAmount,
}
recharge(data).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '充值成功',
icon: 'none',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateBack()
}, 2000);
}
})
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
});
}
})
}
},
//H5
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: true, // ,apialertpclogpc
appId: self.appId, //
timestamp: self.timeStamp, //
nonceStr: self.nonceStr, //
signature: self.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.appId,
timestamp: self
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.nonceStr, // 32
package: self.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.sign, //
success: function(res) {
//
uni.showToast({
title: '支付成功'
})
uni.navigateBack({})
},
cancel: function(r) {},
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
});
},
}
}
</script>
<style lang="scss">
.block {
width: 94%;
padding: 20upx 3%;
.title {
width: 100%;
font-size: 30upx;
}
.content {
.my {
width: 100%;
height: 120upx;
display: flex;
align-items: center;
font-size: 30upx;
border-bottom: solid 1upx #eee;
}
.amount {
width: 100%;
.list {
width: 94%;
margin-left: 3%;
display: flow-root;
justify-content: space-between;
align-items: center;
padding: 20upx 0;
.box {
width: 30%;
margin-left: 1%;
margin-right: 2%;
margin-top: 20upx;
float: left;
height: 120upx;
display: inline-grid;
justify-content: center;
align-items: center;
text-align: center;
color: #089bf5;
background-color: #f1f1f1;
&.on {
background-color: #089bf5;
color: #ffffff;
}
}
.heTitle {
width: 100%;
font-size: 18px;
}
}
.num {
margin-top: 30upx;
display: flex;
justify-content: flex-start;
align-items: center;
.text {
padding-right: 10upx;
}
.input {
width: 40.2vw;
border-bottom: solid 2upx #999;
justify-content: flex-end;
align-items: center;
input {
margin: 0 20upx;
height: 60upx;
font-size: 40upx;
color: #0083f5;
justify-content: flex-end;
align-items: center;
}
}
}
}
.pay-list {
width: 100%;
border-bottom: solid 1upx #eee;
.row {
width: 100%;
height: 120upx;
display: flex;
align-items: center;
.left {
width: 100upx;
flex-shrink: 0;
display: flex;
align-items: center;
image {
width: 80upx;
height: 80upx;
}
}
.center {
width: 100%;
font-size: 30upx;
}
.right {
width: 100upx;
flex-shrink: 0;
display: flex;
justify-content: flex-end;
}
}
}
}
}
.pay {
margin-top: 30upx;
width: 100%;
display: flex;
justify-content: center;
flex-wrap: wrap;
.btn {
width: 70%;
height: 80upx;
border-radius: 80upx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
}
.tis {
margin-top: 10upx;
width: 100%;
font-size: 24upx;
display: flex;
justify-content: center;
align-items: baseline;
color: #999;
.terms {
color: #5a9ef7;
}
}
}
</style>

@ -88,7 +88,7 @@
this.isLoadMore = true
this.pageNum += 1
this.serviceList = [];
this.getDeviceList();
this.getOrderList();
}
},
onShow() {

@ -127,6 +127,11 @@
title: '门店管理',
url: '../../index/doorManage/doorManage',
img: '../../../static/img/home3.png'
},
{
title: '活动金',
url: '../../index/activity_Funds/activity_Funds',
img: '../../../static/img/gift.png'
}
]
return;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -348,6 +348,9 @@ $uni-font-size-paragraph:30upx;
width: 85%;
}
.width49 {
width: 49%;
}
.width50 {
width: 50%;
@ -467,6 +470,10 @@ $uni-font-size-paragraph:30upx;
height: 120px;
}
.height140{
height: 140px;
}
.height150{
height: 150px;
}

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>惠支付</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/cweb/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/cweb/static/js/chunk-vendors.f7d5fa91.js></script><script src=/cweb/static/js/index.1495033b.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/cweb/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/cweb/static/js/chunk-vendors.f7d5fa91.js></script><script src=/cweb/static/js/index.a7689aa8.js></script></body></html>
Loading…
Cancel
Save