guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 1 | <template> |
| 2 | <view class="cashFlow"> |
| 3 | <view style="padding: 30rpx 0;"> |
| 4 | <view class="cashFlow-header"> |
| 5 | <view :class="'cashFlow-header-items left ' + (leftOright?'color':'')" @click="changeTurnoverList(true)">待缴费</view> |
| 6 | <view :class="'cashFlow-header-items right ' + (leftOright?'':'color')" @click="changeTurnoverList(false)">已缴费</view> |
| 7 | </view> |
| 8 | </view> |
| 9 | <view v-if="leftOright"> |
| 10 | <scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView"> |
| 11 | <view class="cashFlow-ul"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 12 | <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')"> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 13 | <view class="cashFlow-ul-item-left"> |
| 14 | <view class="cashFlow-ul-item-left-top"> |
| 15 | <u-image src="./images/pay.png" width="80" height="80"></u-image> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 16 | <text>{{v.mergingName}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 17 | </view> |
| 18 | <view class="cashFlow-ul-item-left-bottom"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 19 | <!-- <text class="cashFlow-ul-item-left-bottom-bold">科类:</text> --> |
| 20 | <text class="cashFlow-ul-item-left-bottom-normal" style="margin-right: 50rpx;">科类:{{v.subjectName}}</text> |
| 21 | <!-- <text class="cashFlow-ul-item-left-bottom-bold"></text> --> |
| 22 | <text class="cashFlow-ul-item-left-bottom-normal">医生:{{v.doctorName}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 23 | </view> |
| 24 | </view> |
| 25 | <view class="cashFlow-ul-item-right"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 26 | <text>¥{{v.mergingSubtotal}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 27 | </view> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 28 | <view class="cashFlow-ul-item-status" v-if="v.status == 'wip'">订单支付中</view> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 29 | </view> |
| 30 | </view> |
| 31 | </scroll-view> |
| 32 | </view> |
| 33 | <view v-if="!leftOright"> |
| 34 | <scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView"> |
| 35 | <view class="cashFlow-ul"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 36 | <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')"> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 37 | <view class="cashFlow-ul-item-left"> |
| 38 | <view class="cashFlow-ul-item-left-top"> |
| 39 | <u-image src="./images/pay.png" width="80" height="80"></u-image> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 40 | <text>{{v.mergingname}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 41 | </view> |
| 42 | <view class="cashFlow-ul-item-left-bottom"> |
| 43 | <text class="cashFlow-ul-item-left-bottom-normal">缴费日期:</text> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 44 | <text class="cashFlow-ul-item-left-bottom-normal">{{v.paytime}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 45 | </view> |
| 46 | </view> |
| 47 | <view class="cashFlow-ul-item-right"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 48 | <text>¥{{v.mergingsubtotal}}</text> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 49 | </view> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 50 | <view class="cashFlow-ul-item-status" v-if="!v.notifyStatus">通知医院</view> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 51 | </view> |
| 52 | </view> |
| 53 | </scroll-view> |
| 54 | </view> |
| 55 | </view> |
| 56 | </template> |
| 57 | |
| 58 | <script> |
| 59 | export default { |
| 60 | data() { |
| 61 | return { |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 62 | leftOright: true, |
| 63 | unpay_list:[], |
| 64 | hospitalcode:'', |
| 65 | payed_list:[] |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 66 | } |
| 67 | }, |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 68 | onLoad(options){ |
| 69 | let hospitalcode = options.hospitalcode |
| 70 | this.hospitalcode = hospitalcode |
| 71 | // this.get_unpay_list(hospitalcode) |
| 72 | }, |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 73 | methods: { |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 74 | get_unpay_list(code){ |
| 75 | let that = this |
| 76 | let param = { |
| 77 | hospitalcode : code |
| 78 | } |
| 79 | that.$u.post('/medicalapi/unpayed/list',param).then(res=>{ |
| 80 | that.unpay_list = res.data |
| 81 | }) |
| 82 | }, |
| 83 | get_payed_list(code){ |
| 84 | let that = this |
| 85 | let param = { |
| 86 | hospitalcode : code, |
| 87 | pageno:1, |
| 88 | pagesize:100 |
| 89 | } |
| 90 | that.$u.post('/medicalapi/payed/list',param).then(res=>{ |
| 91 | let list = res.data |
| 92 | list.forEach(item=>{ |
| 93 | item.paytime = item.transdate.substr(0, 4) + |
| 94 | "-" + item.transdate.substr(4, 2) + "-" + item.transdate.substr(6, 2) + " " + item.transtime.substr(0, 2) + ":" + |
| 95 | item.transtime.substr(2, 2) + ":" + item.transtime.substr(4, 2) |
| 96 | }) |
| 97 | that.payed_list = list |
| 98 | }) |
| 99 | }, |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 100 | changeTurnoverList(e) { |
| 101 | this.leftOright = e |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 102 | if(e){ |
| 103 | this.get_unpay_list(this.hospitalcode) |
| 104 | }else{ |
| 105 | this.get_payed_list(this.hospitalcode) |
| 106 | } |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 107 | }, |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 108 | }, |
| 109 | onShow(){ |
| 110 | this.get_unpay_list(this.hospitalcode) |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 111 | } |
| 112 | } |
| 113 | </script> |
| 114 | |
| 115 | <style lang="scss" scoped> |
| 116 | .scrollView{ |
| 117 | height: calc(100vh - 130rpx - 100rpx); |
| 118 | } |
| 119 | .cashFlow { |
| 120 | font-family: "PingFang-SC-Medium"; |
| 121 | &-header { |
| 122 | width: 80%; |
| 123 | display: flex; |
| 124 | justify-content: center; |
| 125 | align-items: center; |
| 126 | border-radius: 50rpx; |
| 127 | margin: 0rpx auto; |
| 128 | |
| 129 | &-items { |
| 130 | width: 50%; |
| 131 | text-align: center; |
| 132 | background-color: #ffffff; |
| 133 | padding: 20rpx; |
| 134 | color: #999999; |
| 135 | border-top: 2rpx solid #F1F1F1; |
| 136 | border-bottom: 2rpx solid #F1F1F1; |
| 137 | } |
| 138 | .left { |
| 139 | border-top-left-radius: 50rpx; |
| 140 | border-bottom-left-radius: 50rpx; |
| 141 | border-left: 2rpx solid #F1F1F1; |
| 142 | } |
| 143 | |
| 144 | .right { |
| 145 | border-top-right-radius: 50rpx; |
| 146 | border-bottom-right-radius: 50rpx; |
| 147 | border-right: 2rpx solid #F1F1F1; |
| 148 | } |
| 149 | |
| 150 | .color { |
| 151 | background-color: #3599fb; |
| 152 | color: #ffffff; |
| 153 | padding: 20rpx; |
| 154 | border: 2rpx solid transparent; |
| 155 | } |
| 156 | } |
| 157 | &-ul{ |
| 158 | padding: 0 20rpx; |
| 159 | &-item{ |
| 160 | background-color: #FFFFFF; |
| 161 | display: flex; |
| 162 | justify-content: space-between; |
| 163 | align-items: center; |
| 164 | padding: 30rpx 20rpx; |
| 165 | border-radius: 10rpx; |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 166 | margin-bottom: 30rpx; |
| 167 | position: relative; |
| 168 | &-status{ |
| 169 | position: absolute; |
| 170 | bottom: 20rpx; |
| 171 | right: 20rpx; |
| 172 | font-size: 26rpx; |
| 173 | color: #18B566; |
| 174 | } |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 175 | &-left{ |
| 176 | display: flex; |
| 177 | flex-direction: column; |
| 178 | justify-content: space-between; |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 179 | width: 75%; |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 180 | &-top{ |
| 181 | display: flex; |
| 182 | align-items: center; |
| 183 | text{ |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 184 | overflow: hidden; |
| 185 | text-overflow: ellipsis; |
| 186 | white-space: nowrap; |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 187 | font-size: 36rpx; |
| 188 | margin-left: 10rpx; |
| 189 | font-weight: bold; |
| 190 | } |
| 191 | } |
| 192 | &-bottom{ |
| 193 | margin-top: 20rpx; |
| 194 | &-bold{ |
| 195 | font-size: 32rpx; |
| 196 | font-weight: bold; |
| 197 | } |
| 198 | &-normal{ |
| 199 | color: #a1a1a1; |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | &-right{ |
| 204 | font-size: 40rpx; |
| 205 | color: #FF6F6F; |
| 206 | font-weight: bold; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | } |
| 212 | </style> |