| <template> |
| <view class="cashFlow"> |
| <view style="padding: 30rpx 0;"> |
| <view class="cashFlow-header"> |
| <view :class="'cashFlow-header-items left ' + (leftOright?'color':'')" @click="changeTurnoverList(true)">待缴费</view> |
| <view :class="'cashFlow-header-items right ' + (leftOright?'':'color')" @click="changeTurnoverList(false)">已缴费</view> |
| </view> |
| </view> |
| <view v-if="leftOright"> |
| <scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView"> |
| <view class="cashFlow-ul"> |
| <view class="cashFlow-ul-item" v-for = '(v,i) in unpay_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v)+'&id=unpay')"> |
| <view class="cashFlow-ul-item-left"> |
| <view class="cashFlow-ul-item-left-top"> |
| <u-image src="./images/pay.png" width="80" height="80"></u-image> |
| <text>{{v.mergingName}}</text> |
| </view> |
| <view class="cashFlow-ul-item-left-bottom"> |
| <!-- <text class="cashFlow-ul-item-left-bottom-bold">科类:</text> --> |
| <text class="cashFlow-ul-item-left-bottom-normal" style="margin-right: 50rpx;">科类:{{v.subjectName}}</text> |
| <!-- <text class="cashFlow-ul-item-left-bottom-bold"></text> --> |
| <text class="cashFlow-ul-item-left-bottom-normal">医生:{{v.doctorName}}</text> |
| </view> |
| </view> |
| <view class="cashFlow-ul-item-right"> |
| <text>¥{{v.mergingSubtotal}}</text> |
| </view> |
| <view class="cashFlow-ul-item-status" v-if="v.status == 'wip'">订单支付中</view> |
| </view> |
| </view> |
| </scroll-view> |
| </view> |
| <view v-if="!leftOright"> |
| <scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView"> |
| <view class="cashFlow-ul"> |
| <view class="cashFlow-ul-item" v-for = '(v,i) in payed_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v) +'&id=payed')"> |
| <view class="cashFlow-ul-item-left"> |
| <view class="cashFlow-ul-item-left-top"> |
| <u-image src="./images/pay.png" width="80" height="80"></u-image> |
| <text>{{v.mergingname}}</text> |
| </view> |
| <view class="cashFlow-ul-item-left-bottom"> |
| <text class="cashFlow-ul-item-left-bottom-normal">缴费日期:</text> |
| <text class="cashFlow-ul-item-left-bottom-normal">{{v.paytime}}</text> |
| </view> |
| </view> |
| <view class="cashFlow-ul-item-right"> |
| <text>¥{{v.mergingsubtotal}}</text> |
| </view> |
| <view class="cashFlow-ul-item-status" v-if="!v.notifyStatus">通知医院</view> |
| </view> |
| </view> |
| </scroll-view> |
| </view> |
| </view> |
| </template> |
| |
| <script> |
| export default { |
| data() { |
| return { |
| leftOright: true, |
| unpay_list:[], |
| hospitalcode:'', |
| payed_list:[] |
| } |
| }, |
| onLoad(options){ |
| let hospitalcode = options.hospitalcode |
| this.hospitalcode = hospitalcode |
| // this.get_unpay_list(hospitalcode) |
| }, |
| methods: { |
| get_unpay_list(code){ |
| let that = this |
| let param = { |
| hospitalcode : code |
| } |
| that.$u.post('/medicalapi/unpayed/list',param).then(res=>{ |
| that.unpay_list = res.data |
| }) |
| }, |
| get_payed_list(code){ |
| let that = this |
| let param = { |
| hospitalcode : code, |
| pageno:1, |
| pagesize:100 |
| } |
| that.$u.post('/medicalapi/payed/list',param).then(res=>{ |
| let list = res.data |
| list.forEach(item=>{ |
| item.paytime = item.transdate.substr(0, 4) + |
| "-" + item.transdate.substr(4, 2) + "-" + item.transdate.substr(6, 2) + " " + item.transtime.substr(0, 2) + ":" + |
| item.transtime.substr(2, 2) + ":" + item.transtime.substr(4, 2) |
| }) |
| that.payed_list = list |
| }) |
| }, |
| changeTurnoverList(e) { |
| this.leftOright = e |
| if(e){ |
| this.get_unpay_list(this.hospitalcode) |
| }else{ |
| this.get_payed_list(this.hospitalcode) |
| } |
| }, |
| }, |
| onShow(){ |
| this.get_unpay_list(this.hospitalcode) |
| } |
| } |
| </script> |
| |
| <style lang="scss" scoped> |
| .scrollView{ |
| height: calc(100vh - 130rpx - 100rpx); |
| } |
| .cashFlow { |
| font-family: "PingFang-SC-Medium"; |
| &-header { |
| width: 80%; |
| display: flex; |
| justify-content: center; |
| align-items: center; |
| border-radius: 50rpx; |
| margin: 0rpx auto; |
| |
| &-items { |
| width: 50%; |
| text-align: center; |
| background-color: #ffffff; |
| padding: 20rpx; |
| color: #999999; |
| border-top: 2rpx solid #F1F1F1; |
| border-bottom: 2rpx solid #F1F1F1; |
| } |
| .left { |
| border-top-left-radius: 50rpx; |
| border-bottom-left-radius: 50rpx; |
| border-left: 2rpx solid #F1F1F1; |
| } |
| |
| .right { |
| border-top-right-radius: 50rpx; |
| border-bottom-right-radius: 50rpx; |
| border-right: 2rpx solid #F1F1F1; |
| } |
| |
| .color { |
| background-color: #3599fb; |
| color: #ffffff; |
| padding: 20rpx; |
| border: 2rpx solid transparent; |
| } |
| } |
| &-ul{ |
| padding: 0 20rpx; |
| &-item{ |
| background-color: #FFFFFF; |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| padding: 30rpx 20rpx; |
| border-radius: 10rpx; |
| margin-bottom: 30rpx; |
| position: relative; |
| &-status{ |
| position: absolute; |
| bottom: 20rpx; |
| right: 20rpx; |
| font-size: 26rpx; |
| color: #18B566; |
| } |
| &-left{ |
| display: flex; |
| flex-direction: column; |
| justify-content: space-between; |
| width: 75%; |
| &-top{ |
| display: flex; |
| align-items: center; |
| text{ |
| overflow: hidden; |
| text-overflow: ellipsis; |
| white-space: nowrap; |
| font-size: 36rpx; |
| margin-left: 10rpx; |
| font-weight: bold; |
| } |
| } |
| &-bottom{ |
| margin-top: 20rpx; |
| &-bold{ |
| font-size: 32rpx; |
| font-weight: bold; |
| } |
| &-normal{ |
| color: #a1a1a1; |
| } |
| } |
| } |
| &-right{ |
| font-size: 40rpx; |
| color: #FF6F6F; |
| font-weight: bold; |
| } |
| } |
| } |
| |
| } |
| </style> |