|
|
@ -2,6 +2,24 @@ |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="leave_cont"> |
|
|
|
<view class="leave_cont"> |
|
|
|
<view class="ul"> |
|
|
|
<view class="ul"> |
|
|
|
|
|
|
|
<view class="li"> |
|
|
|
|
|
|
|
<text class="font15 fcor333">选择卡号</text> |
|
|
|
|
|
|
|
<view class="flex1"> |
|
|
|
|
|
|
|
<picker mode="selector" :range="UserCard" range-key="cardNo" |
|
|
|
|
|
|
|
@change="bindUserCard"> |
|
|
|
|
|
|
|
<view class="date text1 margle10">{{carNo}}</view> |
|
|
|
|
|
|
|
</picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="li"> |
|
|
|
|
|
|
|
<text class="font15 fcor333">业务类型</text> |
|
|
|
|
|
|
|
<view class="flex1"> |
|
|
|
|
|
|
|
<picker mode="selector" :range="title_list" range-key="name" |
|
|
|
|
|
|
|
@change="bindtitleList"> |
|
|
|
|
|
|
|
<view class="date text1 margle10">{{titleName}}</view> |
|
|
|
|
|
|
|
</picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="li"> |
|
|
|
<view class="li"> |
|
|
|
<text class="font15 fcor333">开始时间</text> |
|
|
|
<text class="font15 fcor333">开始时间</text> |
|
|
|
<view class="flex1"> |
|
|
|
<view class="flex1"> |
|
|
@ -19,34 +37,24 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btnw94">立即查询</view> |
|
|
|
<view class="btnw94" @click="getHuiLianTongCardConsumeOpen()">立即查询</view> |
|
|
|
<view class="height30 backcorfff width100"></view> |
|
|
|
<view class="mart15 marb10 font14 fontwig6 fcor333 fontwig6 fotct" @click="goBingCard()">添加工会卡</view> |
|
|
|
|
|
|
|
<view class="height22 backcorfff width100"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
<view class="font13 fotct fcor666 paddtop15">账号余额(元)</view> |
|
|
|
<view class="font13 fotct fcor666 paddtop15">账号余额(元)</view> |
|
|
|
<view class="mart15 font16 fcor089 fotct ">¥<text class="font28">444.96</text></view> |
|
|
|
<view class="mart15 font16 fcor089 fotct paddbotm10"><text class="font28">¥{{tongCardPrice}}</text></view> |
|
|
|
<view class="font13 fotct fcor666 paddtop5 paddbotm10">31964698964646646646</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
<view class="width100 height50 bor-botm1 paddleft5 paddtright5"> |
|
|
|
<view class="width100 height70 bor-botm1 paddleft5 paddtright5" v-for="(cardInfp,i) in cardConsumeList" :key="i"> |
|
|
|
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view> |
|
|
|
<view class="width100 paddtop10 height30"> |
|
|
|
<view class="width35 flright fcoreb5 font14 fotct">+102.54元</view> |
|
|
|
<view class="width60 flleft fcor333 font15 fontwig6 text1">{{cardInfp.orderNo}}</view> |
|
|
|
</view> |
|
|
|
<view class="width35 flright fcoreb5 font15 fontwig6 fotct">-{{cardInfp.tranAmount}}元</view> |
|
|
|
<view class="width100 height50 bor-botm1 paddleft5 paddtright5"> |
|
|
|
|
|
|
|
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view> |
|
|
|
|
|
|
|
<view class="width35 flright fcoreb5 font14 fotct">+102.54元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width100 height50 bor-botm1 paddleft5 paddtright5"> |
|
|
|
<view class="width100 height30"> |
|
|
|
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view> |
|
|
|
<view class="flleft fcor333 font14 fontwig6 text1">消费时间:{{cardInfp.tranTime}}</view> |
|
|
|
<view class="width35 flright fcoreb5 font14 fotct">+102.54元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="width100 height50 bor-botm1 paddleft5 paddtright5"> |
|
|
|
|
|
|
|
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view> |
|
|
|
|
|
|
|
<view class="width35 flright fcoreb5 font14 fotct">+102.54元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width100 height50 bor-botm1 paddleft5 paddtright5"> |
|
|
|
|
|
|
|
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view> |
|
|
|
|
|
|
|
<view class="width35 flright fcoreb5 font14 fotct">+102.54元</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="height25 width100"></view> |
|
|
|
<view class="height25 width100"></view> |
|
|
@ -54,6 +62,11 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
getUserCardList, |
|
|
|
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
|
|
|
getHuiLianTongCardConsume |
|
|
|
|
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
const currentDate = this.getDate({ |
|
|
|
const currentDate = this.getDate({ |
|
|
@ -62,18 +75,48 @@ |
|
|
|
return { |
|
|
|
return { |
|
|
|
start_date: currentDate, |
|
|
|
start_date: currentDate, |
|
|
|
end_date: currentDate, |
|
|
|
end_date: currentDate, |
|
|
|
other: '请输入' |
|
|
|
other: '请输入', |
|
|
|
|
|
|
|
UserCard: '', |
|
|
|
|
|
|
|
carNo: '', |
|
|
|
|
|
|
|
title_list: [{ |
|
|
|
|
|
|
|
name: '中石化加油券', |
|
|
|
|
|
|
|
value: 'sinopec_oil_code' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '其他商品或服务', |
|
|
|
|
|
|
|
value: 'hisen_consume' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
titleValue:'sinopec_oil_code', |
|
|
|
|
|
|
|
titleName:'中石化加油券', |
|
|
|
|
|
|
|
tongCardInfo : '', |
|
|
|
|
|
|
|
tongCardPrice:0, |
|
|
|
|
|
|
|
cardConsumeList : [], |
|
|
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
|
|
isNoMoreData: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
onLoad() { |
|
|
|
|
|
|
|
this.getUserCardList(); |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 选择日期 |
|
|
|
// 选择日期 |
|
|
|
bindDateChange: function(e) { |
|
|
|
bindDateChange: function(e) { |
|
|
|
this.start_date = e.target.value |
|
|
|
this.start_date = e.target.value |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
bindDateChange2: function(e) { |
|
|
|
bindDateChange2: function(e) { |
|
|
|
this.end_date = e.target.value; |
|
|
|
this.end_date = e.target.value; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//选择卡号 |
|
|
|
|
|
|
|
bindUserCard(e) { |
|
|
|
|
|
|
|
this.carNo = this.UserCard[e.target.value].cardNo; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择类型 |
|
|
|
|
|
|
|
bindtitleList(e){ |
|
|
|
|
|
|
|
this.titleName = this.title_list[e.target.value].name; |
|
|
|
|
|
|
|
this.titleValue = this.title_list[e.target.value].value; |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取当前时间 |
|
|
|
// 获取当前时间 |
|
|
|
getDate(type) { |
|
|
|
getDate(type) { |
|
|
|
const date = new Date(); |
|
|
|
const date = new Date(); |
|
|
@ -86,10 +129,90 @@ |
|
|
|
} else if (type === 'end') { |
|
|
|
} else if (type === 'end') { |
|
|
|
year = year + 2; |
|
|
|
year = year + 2; |
|
|
|
} |
|
|
|
} |
|
|
|
month = month > 9 ? month : '0' + month;; |
|
|
|
month = month > 9 ? month : '0' + month; |
|
|
|
day = day > 9 ? day : '0' + day; |
|
|
|
day = day > 9 ? day : '0' + day; |
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//查询我的卡号列表 |
|
|
|
|
|
|
|
getUserCardList() { |
|
|
|
|
|
|
|
uni.showLoading(); |
|
|
|
|
|
|
|
getUserCardList().then(res => { |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
this.UserCard = res.return_data; |
|
|
|
|
|
|
|
this.carNo = res.return_data[0].cardNo; |
|
|
|
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
|
|
|
this.getHuiLianTongCardConsume(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.UserCard = ''; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//查询详情 |
|
|
|
|
|
|
|
getHuiLianTongCardBalance() { |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
cardNo: this.carNo |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getHuiLianTongCardBalance(params).then(res => { |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
this.tongCardInfo = res.return_data; |
|
|
|
|
|
|
|
this.tongCardPrice = res.return_data.balance; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 重新打开查询 |
|
|
|
|
|
|
|
getHuiLianTongCardConsumeOpen(){ |
|
|
|
|
|
|
|
this.isNoMoreData = false; |
|
|
|
|
|
|
|
this.cardConsumeList = []; |
|
|
|
|
|
|
|
this.getHuiLianTongCardConsume(); |
|
|
|
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//跳转绑定工会卡 |
|
|
|
|
|
|
|
goBingCard(){ |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url:'../bindingCard/bindingCard' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//查询消费记录 |
|
|
|
|
|
|
|
getHuiLianTongCardConsume() { |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: '加载中...' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (this.isNoMoreData) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
|
|
|
|
let Time1 = new Date(this.start_date); |
|
|
|
|
|
|
|
let timestemp1 = Time1.getTime(); |
|
|
|
|
|
|
|
let Time2 = new Date(this.end_date); |
|
|
|
|
|
|
|
let timestemp2 = Time2.getTime(); |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
businessType :this.titleValue, |
|
|
|
|
|
|
|
cardNo : this.carNo, |
|
|
|
|
|
|
|
sdate : timestemp1, |
|
|
|
|
|
|
|
edate: timestemp2, |
|
|
|
|
|
|
|
pageNum: pagenum, |
|
|
|
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getHuiLianTongCardConsume(params).then(res => { |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
if (res.return_code == '000000' && res.return_data.records != '') { |
|
|
|
|
|
|
|
this.isNoMoreData = res.return_data.records.length == this.pageSize ? false : true; |
|
|
|
|
|
|
|
this.cardConsumeList = this.cardConsumeList.concat(res.return_data.records); |
|
|
|
|
|
|
|
this.pageNum = res.return_data.records.length == this.pageSize ? ++pagenum : pagenum; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.cardConsumeList = []; |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title:res.return_msg, |
|
|
|
|
|
|
|
icon:'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.isNoMoreData = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -120,6 +243,7 @@ |
|
|
|
.leave_cont .ul .li .flex1 { |
|
|
|
.leave_cont .ul .li .flex1 { |
|
|
|
flex: 1; |
|
|
|
flex: 1; |
|
|
|
text-align: right; |
|
|
|
text-align: right; |
|
|
|
|
|
|
|
width: 70%; |
|
|
|
padding-right: 25rpx; |
|
|
|
padding-right: 25rpx; |
|
|
|
color: #999999; |
|
|
|
color: #999999; |
|
|
|
font-size: 32rpx; |
|
|
|
font-size: 32rpx; |
|
|
|