blob: 6f5091b4052dc6027bd8a5410e3e5a617fba8cfb [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.xu50e42382021-01-04 17:53:47 +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.xu50e42382021-01-04 17:53:47 +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.xu50e42382021-01-04 17:53:47 +080050 <view class="cashFlow-ul-item-status" 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,
63 unpay_list:[],
64 hospitalcode:'',
65 payed_list:[]
guangchao.xu070005a2020-12-07 09:56:40 +080066 }
67 },
guangchao.xu50e42382021-01-04 17:53:47 +080068 onLoad(options){
69 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.xu50e42382021-01-04 17:53:47 +080074 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.xu070005a2020-12-07 09:56:40 +0800100 changeTurnoverList(e) {
101 this.leftOright = e
guangchao.xu50e42382021-01-04 17:53:47 +0800102 if(e){
103 this.get_unpay_list(this.hospitalcode)
104 }else{
105 this.get_payed_list(this.hospitalcode)
106 }
guangchao.xu070005a2020-12-07 09:56:40 +0800107 },
guangchao.xu50e42382021-01-04 17:53:47 +0800108 },
109 onShow(){
110 this.get_unpay_list(this.hospitalcode)
guangchao.xu070005a2020-12-07 09:56:40 +0800111 }
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.xu50e42382021-01-04 17:53:47 +0800166 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.xu070005a2020-12-07 09:56:40 +0800175 &-left{
176 display: flex;
177 flex-direction: column;
178 justify-content: space-between;
guangchao.xu50e42382021-01-04 17:53:47 +0800179 width: 75%;
guangchao.xu070005a2020-12-07 09:56:40 +0800180 &-top{
181 display: flex;
182 align-items: center;
183 text{
guangchao.xu50e42382021-01-04 17:53:47 +0800184 overflow: hidden;
185 text-overflow: ellipsis;
186 white-space: nowrap;
guangchao.xu070005a2020-12-07 09:56:40 +0800187 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>