blob: f56c6781801f1d35e907609fa1d41103fa9d2abb [file] [log] [blame]
guangchao.xu6cdd45e2021-04-16 17:44:30 +08001<template>
2 <view class="queryBills">
3 <view class="queryBills-con">
4 <u-field @click="showPicker" v-model="cardtype" :disabled="true" label="查询方式" input-align="right"></u-field>
5 </view>
6 <!-- <view class="queryBills-id">
7 <u-field v-model="idno" :disabled="true" label="身份证号" clear-size="40" input-align="right" placeholder="请输入需要查询订单人的身份证号"></u-field>
8 </view> -->
9 <view class="queryBills-card" v-show="index">
10 <u-field v-model="cardno" label="诊疗卡号" clear-size="40" input-align="right" placeholder="请输入需要查询订单人的诊疗卡号"></u-field>
11 </view>
12 <u-button :custom-style="btn_style" @click="to_bills">查询</u-button>
13 <u-picker mode="selector" v-model="isShowPicker" :default-selector="[0]" :range="query_bills_list" @confirm="get"></u-picker>
14 </view>
15
16</template>
17
18<script>
19 export default {
20 data() {
21 return {
22 cardtype: '请选择',
23 query_bills_list: ['本人查询', '诊疗卡查询'],
24 isShowPicker: false,
25 cardno: '',
26 btn_style: {
27 width: '600rpx',
28 backgroundColor: '#2FA8E1',
29 color: '#FFFFFF',
30 fontFamily: "PingFang-SC-Medium",
31 fontSize: '30rpx',
32 marginTop: '100rpx',
33 padding: '50rpx 0'
34 },
35 index: 0
36
37 }
38 },
39 methods: {
40 get(e) {
41 let index = e[0]
42 this.cardtype = this.query_bills_list[index]
43 this.index = index
44 },
45 showPicker() {
46 this.isShowPicker = !this.isShowPicker
47 },
48 to_bills() {
49 let {
50 index,cardno,hospitalcode
51 } = this
52 if (index == 1 && cardno == '') {
53 uni.showModal({
54 title: '提示',
55 content: '请填写诊疗卡号或更改查询方式',
56 showCancel: false,
57 })
58 return
59 }else {
60 uni.navigateTo({
61 url:`/pages/sub_medical/cashFlow?hospitalcode=${hospitalcode}&cardno=${cardno}`
62 })
63 }
64 }
65 },
66 onLoad(options) {
67 this.hospitalcode = options.code
68 }
69 }
70</script>
71
72<style lang="scss" scoped>
73 .u-field {
74 background-color: #FFFFFF;
75 }
76
77 .queryBills {
78 &-con {
79 margin-top: 30rpx;
80 }
81 }
82</style>