blob: c1030ded2ad4c8d68a25245f1a2378f09795c223 [file] [log] [blame]
guangchao.xu070005a2020-12-07 09:56:40 +08001<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.xuc43cf972021-01-18 13:37:55 +080012 <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.xu070005a2020-12-07 09:56:40 +080013 <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.xu50e42382021-01-04 17:53:47 +080016 <text>{{v.mergingName}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080017 </view>
18 <view class="cashFlow-ul-item-left-bottom">
guangchao.xu50e42382021-01-04 17:53:47 +080019 <!-- <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.xu070005a2020-12-07 09:56:40 +080023 </view>
24 </view>
25 <view class="cashFlow-ul-item-right">
guangchao.xu50e42382021-01-04 17:53:47 +080026 <text>¥{{v.mergingSubtotal}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080027 </view>
guangchao.xu50e42382021-01-04 17:53:47 +080028 <view class="cashFlow-ul-item-status" v-if="v.status == 'wip'">订单支付中</view>
guangchao.xu070005a2020-12-07 09:56:40 +080029 </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.xuc43cf972021-01-18 13:37:55 +080036 <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.xu070005a2020-12-07 09:56:40 +080037 <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.xu50e42382021-01-04 17:53:47 +080040 <text>{{v.mergingname}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080041 </view>
42 <view class="cashFlow-ul-item-left-bottom">
43 <text class="cashFlow-ul-item-left-bottom-normal">缴费日期:</text>
guangchao.xu50e42382021-01-04 17:53:47 +080044 <text class="cashFlow-ul-item-left-bottom-normal">{{v.paytime}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080045 </view>
46 </view>
47 <view class="cashFlow-ul-item-right">
guangchao.xu50e42382021-01-04 17:53:47 +080048 <text>¥{{v.mergingsubtotal}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080049 </view>
guangchao.xuc43cf972021-01-18 13:37:55 +080050 <view class="cashFlow-ul-item-nstatus" v-if="!v.notifyStatus">通知医院</view>
guangchao.xu070005a2020-12-07 09:56:40 +080051 </view>
52 </view>
53 </scroll-view>
54 </view>
55 </view>
56</template>
57
58<script>
59 export default {
60 data() {
61 return {
guangchao.xu50e42382021-01-04 17:53:47 +080062 leftOright: true,
guangchao.xuc43cf972021-01-18 13:37:55 +080063 unpay_list: [],
64 hospitalcode: '',
65 payed_list: []
guangchao.xu070005a2020-12-07 09:56:40 +080066 }
67 },
guangchao.xuc43cf972021-01-18 13:37:55 +080068 onLoad(options) {
guangchao.xu50e42382021-01-04 17:53:47 +080069 let hospitalcode = options.hospitalcode
70 this.hospitalcode = hospitalcode
71 // this.get_unpay_list(hospitalcode)
72 },
guangchao.xu070005a2020-12-07 09:56:40 +080073 methods: {
guangchao.xuc43cf972021-01-18 13:37:55 +080074 get_unpay_list(code) {
guangchao.xu50e42382021-01-04 17:53:47 +080075 let that = this
76 let param = {
guangchao.xuc43cf972021-01-18 13:37:55 +080077 hospitalcode: code
guangchao.xu50e42382021-01-04 17:53:47 +080078 }
guangchao.xuc43cf972021-01-18 13:37:55 +080079 that.$u.post('/medicalapi/unpayed/list', param).then(res => {
guangchao.xu50e42382021-01-04 17:53:47 +080080 that.unpay_list = res.data
81 })
82 },
guangchao.xuc43cf972021-01-18 13:37:55 +080083 get_payed_list(code) {
guangchao.xu50e42382021-01-04 17:53:47 +080084 let that = this
85 let param = {
guangchao.xuc43cf972021-01-18 13:37:55 +080086 hospitalcode: code,
87 pageno: 1,
88 pagesize: 100
guangchao.xu50e42382021-01-04 17:53:47 +080089 }
guangchao.xuc43cf972021-01-18 13:37:55 +080090 that.$u.post('/medicalapi/payed/list', param).then(res => {
guangchao.xu50e42382021-01-04 17:53:47 +080091 let list = res.data
guangchao.xuc43cf972021-01-18 13:37:55 +080092 list.forEach(item => {
guangchao.xu50e42382021-01-04 17:53:47 +080093 item.paytime = item.transdate.substr(0, 4) +
guangchao.xuc43cf972021-01-18 13:37:55 +080094 "-" + item.transdate.substr(4, 2) + "-" + item.transdate.substr(6, 2) + " " + item.transtime.substr(0, 2) +
95 ":" +
96 item.transtime.substr(2, 2) + ":" + item.transtime.substr(4, 2)
guangchao.xu50e42382021-01-04 17:53:47 +080097 })
98 that.payed_list = list
99 })
100 },
guangchao.xu070005a2020-12-07 09:56:40 +0800101 changeTurnoverList(e) {
102 this.leftOright = e
guangchao.xuc43cf972021-01-18 13:37:55 +0800103 if (e) {
guangchao.xu50e42382021-01-04 17:53:47 +0800104 this.get_unpay_list(this.hospitalcode)
guangchao.xuc43cf972021-01-18 13:37:55 +0800105 } else {
guangchao.xu50e42382021-01-04 17:53:47 +0800106 this.get_payed_list(this.hospitalcode)
107 }
guangchao.xu070005a2020-12-07 09:56:40 +0800108 },
guangchao.xu50e42382021-01-04 17:53:47 +0800109 },
guangchao.xuc43cf972021-01-18 13:37:55 +0800110 onShow() {
111 let e = this.leftOright
112 if (e) {
113 this.get_unpay_list(this.hospitalcode)
114 } else {
115 this.get_payed_list(this.hospitalcode)
116 }
guangchao.xu070005a2020-12-07 09:56:40 +0800117 }
118 }
119</script>
120
121<style lang="scss" scoped>
guangchao.xuc43cf972021-01-18 13:37:55 +0800122 .scrollView {
guangchao.xu070005a2020-12-07 09:56:40 +0800123 height: calc(100vh - 130rpx - 100rpx);
124 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800125
guangchao.xu070005a2020-12-07 09:56:40 +0800126 .cashFlow {
127 font-family: "PingFang-SC-Medium";
guangchao.xuc43cf972021-01-18 13:37:55 +0800128
guangchao.xu070005a2020-12-07 09:56:40 +0800129 &-header {
130 width: 80%;
131 display: flex;
132 justify-content: center;
133 align-items: center;
134 border-radius: 50rpx;
135 margin: 0rpx auto;
136
137 &-items {
138 width: 50%;
139 text-align: center;
140 background-color: #ffffff;
141 padding: 20rpx;
142 color: #999999;
143 border-top: 2rpx solid #F1F1F1;
144 border-bottom: 2rpx solid #F1F1F1;
145 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800146
guangchao.xu070005a2020-12-07 09:56:40 +0800147 .left {
148 border-top-left-radius: 50rpx;
149 border-bottom-left-radius: 50rpx;
150 border-left: 2rpx solid #F1F1F1;
151 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800152
guangchao.xu070005a2020-12-07 09:56:40 +0800153 .right {
154 border-top-right-radius: 50rpx;
155 border-bottom-right-radius: 50rpx;
156 border-right: 2rpx solid #F1F1F1;
157 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800158
guangchao.xu070005a2020-12-07 09:56:40 +0800159 .color {
160 background-color: #3599fb;
161 color: #ffffff;
162 padding: 20rpx;
163 border: 2rpx solid transparent;
164 }
165 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800166
167 &-ul {
guangchao.xu070005a2020-12-07 09:56:40 +0800168 padding: 0 20rpx;
guangchao.xuc43cf972021-01-18 13:37:55 +0800169
170 &-item {
guangchao.xu070005a2020-12-07 09:56:40 +0800171 background-color: #FFFFFF;
172 display: flex;
173 justify-content: space-between;
174 align-items: center;
175 padding: 30rpx 20rpx;
176 border-radius: 10rpx;
guangchao.xu50e42382021-01-04 17:53:47 +0800177 margin-bottom: 30rpx;
178 position: relative;
guangchao.xuc43cf972021-01-18 13:37:55 +0800179
180 &-status {
guangchao.xu50e42382021-01-04 17:53:47 +0800181 position: absolute;
182 bottom: 20rpx;
183 right: 20rpx;
184 font-size: 26rpx;
185 color: #18B566;
186 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800187
188 &-nstatus{
189 position: absolute;
190 bottom: 20rpx;
191 right: 20rpx;
192 font-size: 26rpx;
193 color: #FF6F6F;
194 }
195
196 &-left {
197 display: flex;
guangchao.xu070005a2020-12-07 09:56:40 +0800198 flex-direction: column;
199 justify-content: space-between;
guangchao.xu50e42382021-01-04 17:53:47 +0800200 width: 75%;
guangchao.xuc43cf972021-01-18 13:37:55 +0800201
202 &-top {
guangchao.xu070005a2020-12-07 09:56:40 +0800203 display: flex;
204 align-items: center;
guangchao.xuc43cf972021-01-18 13:37:55 +0800205
206 text {
guangchao.xu50e42382021-01-04 17:53:47 +0800207 overflow: hidden;
208 text-overflow: ellipsis;
209 white-space: nowrap;
guangchao.xu070005a2020-12-07 09:56:40 +0800210 font-size: 36rpx;
211 margin-left: 10rpx;
212 font-weight: bold;
213 }
214 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800215
216 &-bottom {
guangchao.xu070005a2020-12-07 09:56:40 +0800217 margin-top: 20rpx;
guangchao.xuc43cf972021-01-18 13:37:55 +0800218
219 &-bold {
guangchao.xu070005a2020-12-07 09:56:40 +0800220 font-size: 32rpx;
221 font-weight: bold;
222 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800223
224 &-normal {
guangchao.xu070005a2020-12-07 09:56:40 +0800225 color: #a1a1a1;
226 }
227 }
228 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800229
230 &-right {
guangchao.xu070005a2020-12-07 09:56:40 +0800231 font-size: 40rpx;
232 color: #FF6F6F;
233 font-weight: bold;
234 }
235 }
236 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800237
guangchao.xu070005a2020-12-07 09:56:40 +0800238 }
239</style>