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