123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523 |
- <template>
- <view style="background-color: #f7f4f8; width: auto;">
- <view style="height: 100%;">
- <!-- 列选择器 -->
- <!-- <u-select v-model="choiceName" :list="babyList" value-name="id" label-name="name" @confirm="confirm1"></u-select> -->
- <u-select v-model="relationship" :list="guanxilist" @confirm="confirm2"></u-select>
- <!-- model控制开关 mode控制显示方向-->
- <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
- <view class="popup_title">
- <view class="popup_title_text">选择就诊人</view>
- </view>
- <scroll-view style="height: 70%;" scroll-y="true">
- <view class="popup_list" v-for="(item, index) in babyList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
- <view class="popup_list_title">
- <view class="title">{{item.name}}</view>
- <view class="body">
- {{item.sex==1?'男':'女'}}
- </view>
- </view>
- <view class="popup_list_button flex align-center">
- <u-radio-group v-model="value">
- <u-radio @change="peopleRadioChange" :key="index" :name="item.name">
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- </scroll-view>
- <u-gap height="10" bg-color="#f9f9f9"></u-gap>
- <view class="popup_button">
- <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
- mode=""></image>
- <view class="" @click="addPeople">
- 添加就诊人档案
- </view>
- </view>
- </u-popup>
- <!-- 步骤条 -->
- <!-- <view class="steps">
- <u-steps :list="numList" :current="current"></u-steps>
- </view> -->
- <!-- 分隔 -->
- <u-gap height="30" bg-color="#f9f9f9"></u-gap>
- <!-- 宝贝信息 -->
- <view>
- <view>
- <!-- 标题 -->
- <view class="information-title">患者计划</view>
- <u-line color="#ededed" />
- <!-- 姓名 -->
- <uni-list :border="false">
- <uni-list-item :border="false" :clickable="true" @click="showpeople = true">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">用户姓名</text>
- </view>
- <view slot="footer">
- <text style="font-size: 30rpx;">{{value}}</text>
- </view>
- </uni-list-item>
- <!-- 身份证 -->
- <!-- <uni-list-item :border="false">
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">宝贝身份证</text>
- </view>
- <view slot="footer">
- <u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
- height="50" />
- </view>
- </uni-list-item> -->
- <!-- 社保 -->
- <uni-list-item :border="false">
- <!-- 自定义左(header)右(footer)的内容 -->
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">是否有社保</text>
- </view>
- <view slot="footer">
- <u-radio-group v-model="guarantee" @change="radioGroupChange">
- <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- </view>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- <!-- 分隔 -->
- <u-gap height="30" bg-color="#f9f9f9"></u-gap>
- <!-- 监护人信息 -->
- <view>
- <view>
- <!-- 标题 -->
- <!-- <view class="information-title">监护人信息</view> -->
- <!-- 线条 -->
- <u-line color="#ededed" />
- <!-- <uni-list :border="false">
-
- <uni-list-item :border="false">
-
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">监护人姓名</text>
- </view>
- <view slot="footer">
- <u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
- input-align="right" height="50" />
- </view>
- </uni-list-item>
-
- <uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
-
- <view slot="header">
- <text class="xinghao">*</text>
- <text style="font-size: 28rpx;">与患者的关系</text>
- </view>
- <view slot="footer">
- <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
- <view style="color: #AAAAAA;">{{nRelationship.label}}</view>
- </view>
- </uni-list-item>
- </uni-list> -->
- </view>
- </view>
- <view class="flex align-center padding bg-white" v-if="packs.is_need_insure==1">
- <u-switch v-model="checked" size="40"></u-switch>
- <view class="margin-left-sm">
- 本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue" @click.stop="gotoxieyi(packs.service_pack_protocol)">《保单协议》</text>
- </view>
- </view>
- </view>
- <!-- 按钮 -->
- <view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
- <view class="submit text-white" @click="next" style="background-color: rgb(11,115,186); font-size: 32rpx;">下一步</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- onLoad(op) {
- // console.log(JSON.parse(op.data))
- this.packs = JSON.parse(op.data)
- },
- onShow() {
- this.getarchives()
- },
- mounted() {
- },
- data() {
- return {
- //当前处于第几步
- current: 0,
- numList: [{
- name: '基本信息'
- }, {
- name: '确认订单'
- }, {
- name: '支付结果'
- }],
- list: [{
- name: '是',
- disabled: false
- },
- {
- name: '否',
- disabled: false
- }
- ],
- //控制列选择器
- choiceName: false,
- relationship: false,
- choicelist: [{
- value: '1',
- label: '测试1'
- },
- {
- value: '2',
- label: '测试2'
- }
- ],
- guanxilist: [{
- value: '1',
- label: '父子'
- },
- {
- value: '2',
- label: '母子'
- },
- {
- value: '3',
- label: '祖孙'
- },
- {
- value: '4',
- label: '亲属'
- },
- {
- value: '5',
- label: '本人'
- },
- {
- value: '6',
- label: '其他'
- }
- ],
- /**
- * 需要传的数据
- * 名字
- * 身份证
- * 社保 值为 是 否
- * 监护人姓名
- * */
- babyNmae: {
- label: "请选择",
- value: ""
- },
- babyID: '',
- guarantee: '',
- guardianName: '',
- nRelationship: {
- value: "",
- label: "请选择"
- },
- babyList: [],
- isindex: -1,
- packs: "",
- showpeople: false,
- value: "",
- huanzheID: "",
- checked: false,
- isagreement: false,
- currentbaby: {}
- }
- },
- methods: {
- gotoxieyi(item) {
- uni.navigateTo({
- url: "../index/agreement?data=" + item
- })
- },
- getarchives: async function() {
- let res = await this.$request.post("/api/v1/patient/patientList")
- if (res.status == 0) {
- this.babyList = res.data.data
- this.value = this.babyList[0].name
- this.huanzheID = this.babyList[0].id
- this.currentbaby = this.babyList[0]
- // if (this.babyList[0].card_back_img_url == '' && this.babyList[0].card_img_url == '') {
- // let imglist = [{
- // url: this.babyList[0].card_img_url
- // }, {
- // url: this.babyList[0].card_back_img_url
- // }]
- // uni.showModal({
- // title: "提示",
- // content: "该档案人未上传证件照无法购买本服务包",
- // confirmText: "前往设置",
- // success: (res) => {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: "../archives/upcard?id=" + this.babyList[0].id + "&data=" + JSON.stringify(imglist)
- // })
- // // this.showpeople = false
- // } else if (res.cancel) {
- // // this.showpeople = false
- // }
- // }
- // })
- // }
- }
- },
- peopleRadioChange(e) {
- console.log(e);
- },
- xuanzehuanzhe(item) {
- // if (item.card_back_img_url == '' && item.card_img_url == '') {
- // let imglist = [{
- // url: item.card_img_url
- // }, {
- // url: item.card_back_img_url
- // }]
- // uni.showModal({
- // title: "提示",
- // content: "该档案人未上传证件照无法购买本服务包",
- // confirmText: "前往设置",
- // success: (res) => {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: "../archives/upcard?id=" + item.id + "&data=" + JSON.stringify(imglist)
- // })
- // this.showpeople = false
- // } else if (res.cancel) {
- // this.showpeople = false
- // }
- // }
- // })
- // return false
- // }
- this.currentbaby = item
- this.huanzheID = item.id
- this.value = item.name
- this.showpeople = false
- },
- addPeople(e) {
- uni.navigateTo({
- url: "../archives/add_archives"
- })
- },
- // 选中任一radio时,由radio-group触发
- radioGroupChange(e) {
- if (e == "是") {
- this.isindex = 1
- } else {
- this.isindex = 0
- }
- console.log(this.isindex)
- },
- confirm1(e) {
- console.log(e)
- this.babyNmae = e[0]
- },
- confirm2(e) {
- this.nRelationship = e[0]
- },
- //下一步
- next(e) {
- if (this.currentbaby.card_number == '' && this.checked) {
- uni.showModal({
- title: "提示",
- content: "该宝贝尚未填写身份证,请前往填写",
- confirmText: "去填写",
- showCancel: false,
- success: (res) => {
- if (res.confirm) {
- uni.navigateTo({
- url: "../archives/add_archives?info=" + JSON.stringify(this.currentbaby)
- })
- }
- }
- })
- return false
- }
- if (this.value == "请选择") {
- uni.showToast({
- title: "请选择宝贝",
- icon: "none"
- })
- return false
- }
- if (this.isindex == -1) {
- uni.showToast({
- title: "请选择是否有社保",
- icon: "none"
- })
- return false
- }
- // if (this.guardianName == "") {
- // uni.showToast({
- // title: "请填写监护人姓名",
- // icon: "none"
- // })
- // return false
- // }
- // if (this.nRelationship.label == "请选择") {
- // uni.showToast({
- // title: "请选择关系",
- // icon: "none"
- // })
- // return false
- // }
- // if (!this.isagreement) {
- // uni.showToast({
- // title: "请先同意保单协议",
- // icon: "none"
- // })
- // return false
- // }
- // if (this.babyID == '') {
- // uni.showToast({
- // title: "请填写宝贝身份证号",
- // icon: "none"
- // })
- // return false
- // }
- let obj = {
- product_type: 6,
- patient_id: this.huanzheID,
- total_amount: this.packs.price / 100,
- service_pack_id: this.packs.id,
- is_security: this.isindex,
- guardian_name: this.guardianName,
- relationship_type: this.nRelationship.value,
- is_need_insurance: this.checked,
- payment_type: 2,
- team_id: this.packs.team_id
- }
- console.log(obj)
- uni.navigateTo({
- url: "../order/payment?data=" + JSON.stringify(obj)
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .steps {
- padding-top: 50rpx;
- padding-bottom: 30rpx;
- height: auto;
- background-color: #FFFFFF;
- }
- /* 信息标题 */
- .information-title {
- height: auto;
- width: auto;
- font-size: 30rpx;
- font-weight: 600;
- padding: 30rpx 0 20rpx 30rpx;
- background-color: #FFFFFF;
- }
- /* 星号 */
- .xinghao {
- width: 20px;
- height: 20px;
- display: inline-block;
- vertical-align: middle;
- text-align: center;
- line-height: 26px;
- font-size: 15px;
- color: #f00;
- }
- .information-button {
- height: 10vh;
- padding: 0 20rpx;
- }
- .popup_title {
- height: 15%;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- border-bottom: 1rpx solid #f9f9f9;
- }
- .textareasty {
- background-color: white;
- border: 1px solid #efefef;
- border-radius: 16rpx;
- padding: 15rpx;
- margin: 15rpx auto;
- }
- .popup_title_text {
- width: auto;
- height: auto;
- font-size: 34rpx;
- font-weight: 540;
- }
- .popup_list {
- display: flex;
- height: 10vh;
- width: auto;
- border-bottom: 1rpx solid #f9f9f9;
- }
- .popup_list_title {
- height: 100%;
- width: 90%;
- display: inline-block;
- padding: 0 0 0 30rpx;
- .title {
- height: 50%;
- width: auto;
- font-size: 32rpx;
- font-weight: 500;
- padding: 20rpx 0 0 0;
- }
- .body {
- height: 50%;
- color: #a1a1a1;
- height: auto;
- width: auto;
- font-size: 30rpx;
- padding: 10rpx 0 0 0;
- }
- }
- .popup_button {
- height: 80rpx;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- view {
- color: #0b73ba;
- font-weight: 500;
- }
- }
- </style>
|