blob: 406018c3f6b9ea20e2dcd0e328838dca75c2b3a6 [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.xu6cdd45e2021-04-16 17:44:30 +080012 <u-empty text="暂无待缴费订单" mode="order" v-if="unpay_list.length==0" margin-top="120"></u-empty>
guangchao.xuc43cf972021-01-18 13:37:55 +080013 <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 +080014 <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.xu50e42382021-01-04 17:53:47 +080017 <text>{{v.mergingName}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080018 </view>
19 <view class="cashFlow-ul-item-left-bottom">
guangchao.xu50e42382021-01-04 17:53:47 +080020 <!-- <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.xu070005a2020-12-07 09:56:40 +080024 </view>
25 </view>
26 <view class="cashFlow-ul-item-right">
guangchao.xu50e42382021-01-04 17:53:47 +080027 <text>¥{{v.mergingSubtotal}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080028 </view>
guangchao.xu50e42382021-01-04 17:53:47 +080029 <view class="cashFlow-ul-item-status" v-if="v.status == 'wip'">订单支付中</view>
guangchao.xu070005a2020-12-07 09:56:40 +080030 </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.xu6cdd45e2021-04-16 17:44:30 +080037 <u-empty text="暂无已缴费订单" mode="order" v-if="payed_list.length==0" margin-top="120"></u-empty>
guangchao.xuc43cf972021-01-18 13:37:55 +080038 <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 +080039 <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.xu50e42382021-01-04 17:53:47 +080042 <text>{{v.mergingname}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080043 </view>
44 <view class="cashFlow-ul-item-left-bottom">
45 <text class="cashFlow-ul-item-left-bottom-normal">缴费日期:</text>
guangchao.xu50e42382021-01-04 17:53:47 +080046 <text class="cashFlow-ul-item-left-bottom-normal">{{v.paytime}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080047 </view>
48 </view>
49 <view class="cashFlow-ul-item-right">
guangchao.xu50e42382021-01-04 17:53:47 +080050 <text>¥{{v.mergingsubtotal}}</text>
guangchao.xu070005a2020-12-07 09:56:40 +080051 </view>
guangchao.xuc43cf972021-01-18 13:37:55 +080052 <view class="cashFlow-ul-item-nstatus" v-if="!v.notifyStatus">通知医院</view>
guangchao.xu070005a2020-12-07 09:56:40 +080053 </view>
54 </view>
55 </scroll-view>
56 </view>
57 </view>
58</template>
59
60<script>
61 export default {
62 data() {
63 return {
guangchao.xu50e42382021-01-04 17:53:47 +080064 leftOright: true,
guangchao.xuc43cf972021-01-18 13:37:55 +080065 unpay_list: [],
66 hospitalcode: '',
67 payed_list: []
guangchao.xu070005a2020-12-07 09:56:40 +080068 }
69 },
guangchao.xuc43cf972021-01-18 13:37:55 +080070 onLoad(options) {
guangchao.xu50e42382021-01-04 17:53:47 +080071 let hospitalcode = options.hospitalcode
guangchao.xu6cdd45e2021-04-16 17:44:30 +080072 let cardno = options.cardno
guangchao.xu50e42382021-01-04 17:53:47 +080073 this.hospitalcode = hospitalcode
guangchao.xu6cdd45e2021-04-16 17:44:30 +080074 this.cardno = cardno
75 //this.get_unpay_list(hospitalcode,cardno)
guangchao.xu50e42382021-01-04 17:53:47 +080076 },
guangchao.xu070005a2020-12-07 09:56:40 +080077 methods: {
guangchao.xu6cdd45e2021-04-16 17:44:30 +080078 get_unpay_list(code,no) {
guangchao.xu50e42382021-01-04 17:53:47 +080079 let that = this
80 let param = {
guangchao.xu6cdd45e2021-04-16 17:44:30 +080081 hospitalcode: code,
82 cardno:no?no:''
guangchao.xu50e42382021-01-04 17:53:47 +080083 }
guangchao.xuc43cf972021-01-18 13:37:55 +080084 that.$u.post('/medicalapi/unpayed/list', param).then(res => {
guangchao.xu50e42382021-01-04 17:53:47 +080085 that.unpay_list = res.data
86 })
87 },
guangchao.xuc43cf972021-01-18 13:37:55 +080088 get_payed_list(code) {
guangchao.xu50e42382021-01-04 17:53:47 +080089 let that = this
90 let param = {
guangchao.xuc43cf972021-01-18 13:37:55 +080091 hospitalcode: code,
92 pageno: 1,
93 pagesize: 100
guangchao.xu50e42382021-01-04 17:53:47 +080094 }
guangchao.xuc43cf972021-01-18 13:37:55 +080095 that.$u.post('/medicalapi/payed/list', param).then(res => {
guangchao.xu50e42382021-01-04 17:53:47 +080096 let list = res.data
guangchao.xuc43cf972021-01-18 13:37:55 +080097 list.forEach(item => {
guangchao.xu50e42382021-01-04 17:53:47 +080098 item.paytime = item.transdate.substr(0, 4) +
guangchao.xuc43cf972021-01-18 13:37:55 +080099 "-" + 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.xu50e42382021-01-04 17:53:47 +0800102 })
103 that.payed_list = list
104 })
105 },
guangchao.xu070005a2020-12-07 09:56:40 +0800106 changeTurnoverList(e) {
107 this.leftOright = e
guangchao.xuc43cf972021-01-18 13:37:55 +0800108 if (e) {
guangchao.xu6cdd45e2021-04-16 17:44:30 +0800109 this.get_unpay_list(this.hospitalcode,this.cardno)
guangchao.xuc43cf972021-01-18 13:37:55 +0800110 } else {
guangchao.xu50e42382021-01-04 17:53:47 +0800111 this.get_payed_list(this.hospitalcode)
112 }
guangchao.xu070005a2020-12-07 09:56:40 +0800113 },
guangchao.xu50e42382021-01-04 17:53:47 +0800114 },
guangchao.xuc43cf972021-01-18 13:37:55 +0800115 onShow() {
guangchao.xu6cdd45e2021-04-16 17:44:30 +0800116 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.xu070005a2020-12-07 09:56:40 +0800127 }
128 }
129</script>
130
131<style lang="scss" scoped>
guangchao.xuc43cf972021-01-18 13:37:55 +0800132 .scrollView {
guangchao.xu070005a2020-12-07 09:56:40 +0800133 height: calc(100vh - 130rpx - 100rpx);
134 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800135
guangchao.xu070005a2020-12-07 09:56:40 +0800136 .cashFlow {
137 font-family: "PingFang-SC-Medium";
guangchao.xuc43cf972021-01-18 13:37:55 +0800138
guangchao.xu070005a2020-12-07 09:56:40 +0800139 &-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.xuc43cf972021-01-18 13:37:55 +0800156
guangchao.xu070005a2020-12-07 09:56:40 +0800157 .left {
158 border-top-left-radius: 50rpx;
159 border-bottom-left-radius: 50rpx;
160 border-left: 2rpx solid #F1F1F1;
161 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800162
guangchao.xu070005a2020-12-07 09:56:40 +0800163 .right {
164 border-top-right-radius: 50rpx;
165 border-bottom-right-radius: 50rpx;
166 border-right: 2rpx solid #F1F1F1;
167 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800168
guangchao.xu070005a2020-12-07 09:56:40 +0800169 .color {
170 background-color: #3599fb;
171 color: #ffffff;
172 padding: 20rpx;
173 border: 2rpx solid transparent;
174 }
175 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800176
177 &-ul {
guangchao.xu070005a2020-12-07 09:56:40 +0800178 padding: 0 20rpx;
guangchao.xuc43cf972021-01-18 13:37:55 +0800179
180 &-item {
guangchao.xu070005a2020-12-07 09:56:40 +0800181 background-color: #FFFFFF;
182 display: flex;
183 justify-content: space-between;
184 align-items: center;
185 padding: 30rpx 20rpx;
186 border-radius: 10rpx;
guangchao.xu50e42382021-01-04 17:53:47 +0800187 margin-bottom: 30rpx;
188 position: relative;
guangchao.xuc43cf972021-01-18 13:37:55 +0800189
190 &-status {
guangchao.xu50e42382021-01-04 17:53:47 +0800191 position: absolute;
192 bottom: 20rpx;
193 right: 20rpx;
194 font-size: 26rpx;
195 color: #18B566;
196 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800197
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.xu070005a2020-12-07 09:56:40 +0800208 flex-direction: column;
209 justify-content: space-between;
guangchao.xu50e42382021-01-04 17:53:47 +0800210 width: 75%;
guangchao.xuc43cf972021-01-18 13:37:55 +0800211
212 &-top {
guangchao.xu070005a2020-12-07 09:56:40 +0800213 display: flex;
214 align-items: center;
guangchao.xuc43cf972021-01-18 13:37:55 +0800215
216 text {
guangchao.xu50e42382021-01-04 17:53:47 +0800217 overflow: hidden;
218 text-overflow: ellipsis;
219 white-space: nowrap;
guangchao.xu070005a2020-12-07 09:56:40 +0800220 font-size: 36rpx;
221 margin-left: 10rpx;
222 font-weight: bold;
223 }
224 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800225
226 &-bottom {
guangchao.xu070005a2020-12-07 09:56:40 +0800227 margin-top: 20rpx;
guangchao.xuc43cf972021-01-18 13:37:55 +0800228
229 &-bold {
guangchao.xu070005a2020-12-07 09:56:40 +0800230 font-size: 32rpx;
231 font-weight: bold;
232 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800233
234 &-normal {
guangchao.xu070005a2020-12-07 09:56:40 +0800235 color: #a1a1a1;
236 }
237 }
238 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800239
240 &-right {
guangchao.xu070005a2020-12-07 09:56:40 +0800241 font-size: 40rpx;
242 color: #FF6F6F;
243 font-weight: bold;
244 }
245 }
246 }
guangchao.xuc43cf972021-01-18 13:37:55 +0800247
guangchao.xu070005a2020-12-07 09:56:40 +0800248 }
249</style>