|
@@ -1,6 +1,38 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<!-- 弹窗 v-model双向绑定值 mode弹出位置 border-radius弹出层圆角-->
|
|
<!-- 弹窗 v-model双向绑定值 mode弹出位置 border-radius弹出层圆角-->
|
|
|
|
+ <u-popup v-model="showservice" mode="bottom" border-radius="14" :closeable="true" :mask-close-able="false"
|
|
|
|
+ :safe-area-inset-bottom="true">
|
|
|
|
+ <view class="header-Discount">
|
|
|
|
+ 选择服务包
|
|
|
|
+ </view>
|
|
|
|
+ <scroll-view scroll-y="true" style="height: 650rpx;">
|
|
|
|
+ <view v-for="(item,index) in serviceList" :key="index">
|
|
|
|
+ <view class="card flex justify-center">
|
|
|
|
+ <view class="taocan" :data-id="item.order_pack.id" @click="details(item.order_pack)">
|
|
|
|
+ <view class="tc_left">
|
|
|
|
+ <text>{{item.order_pack.pack_name}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="tc_right">
|
|
|
|
+ <view style="width: 100%;">
|
|
|
|
+ <view class="text">{{item.order_pack.pack_intro}}</view>
|
|
|
|
+ <!-- <view class="text">{{item.desc}}</view> -->
|
|
|
|
+ <view class="text">
|
|
|
|
+ <text style="text-align: left;">时长:{{item.order_pack.effective_days}}天</text>
|
|
|
|
+ <text style="float: right;color: #FF4F61;font-weight: bold;">¥{{item.order_pack.pack_price/100}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="margin-top-xs">
|
|
|
|
+ 剩余时长:
|
|
|
|
+ <u-count-down color="#EEAA3F" separator="zh" :timestamp="item.order_pack.end_time-miao"></u-count-down>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="cu-tabbar-height"></view>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </u-popup>
|
|
<u-popup v-model="discountshow" mode="bottom" border-radius="14" safe-area-inset-bottom="true">
|
|
<u-popup v-model="discountshow" mode="bottom" border-radius="14" safe-area-inset-bottom="true">
|
|
<view class="header-Discount">
|
|
<view class="header-Discount">
|
|
优惠卷
|
|
优惠卷
|
|
@@ -98,8 +130,8 @@
|
|
<view slot="header" style="font-size: 28rpx; font-weight: 500;color: #666666;">支付方式</view>
|
|
<view slot="header" style="font-size: 28rpx; font-weight: 500;color: #666666;">支付方式</view>
|
|
</uni-list-item>
|
|
</uni-list-item>
|
|
<!-- 加一个单选 -->
|
|
<!-- 加一个单选 -->
|
|
- <u-radio-group v-model="value" v-for="(item, index) in paymenMethod">
|
|
|
|
- <uni-list-item :border="false" @click="value=item.name" :clickable="true">
|
|
|
|
|
|
+ <u-radio-group v-model="value" v-for="(item, index) in paymenMethod" :key="index">
|
|
|
|
+ <uni-list-item :border="false" @click="setmode(item)" :clickable="true">
|
|
<view slot="header">
|
|
<view slot="header">
|
|
<text style="font-size: 28rpx;font-weight: 400;color: #333333;">{{item.name}}</text>
|
|
<text style="font-size: 28rpx;font-weight: 400;color: #333333;">{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
@@ -131,15 +163,27 @@
|
|
onLoad(op) {
|
|
onLoad(op) {
|
|
this.infodata = JSON.parse(op.data)
|
|
this.infodata = JSON.parse(op.data)
|
|
this.norderAmount = this.infodata.total_amount
|
|
this.norderAmount = this.infodata.total_amount
|
|
|
|
+ if (this.infodata.product_type != 6) {
|
|
|
|
+ this.paymenMethod.push({
|
|
|
|
+ name: '服务包抵扣',
|
|
|
|
+ disabled: false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
console.log(this.infodata)
|
|
console.log(this.infodata)
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.orderAmount = this.norderAmount + "元"
|
|
this.orderAmount = this.norderAmount + "元"
|
|
this.getUserInfo()
|
|
this.getUserInfo()
|
|
this.getcoupon()
|
|
this.getcoupon()
|
|
|
|
+ this.getserviceList()
|
|
|
|
+ this.miao = parseInt(new Date().getTime() / 1000)
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ //秒数
|
|
|
|
+ miao: "",
|
|
|
|
+ //服务包弹窗
|
|
|
|
+ showservice: false,
|
|
//医生名称
|
|
//医生名称
|
|
doctorName: '',
|
|
doctorName: '',
|
|
ndoctorName: '渣渣宝',
|
|
ndoctorName: '渣渣宝',
|
|
@@ -165,10 +209,41 @@
|
|
password: "",
|
|
password: "",
|
|
discountshow: false,
|
|
discountshow: false,
|
|
list: [],
|
|
list: [],
|
|
- couponid: ""
|
|
|
|
|
|
+ couponid: "",
|
|
|
|
+ pageindex: 1,
|
|
|
|
+ pageservice: 1,
|
|
|
|
+ serviceList: [],
|
|
|
|
+ paytype: 2,
|
|
|
|
+ serviceid: ""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ details(item) {
|
|
|
|
+ this.serviceid = item.id
|
|
|
|
+ this.showservice = false
|
|
|
|
+ console.log(item)
|
|
|
|
+ },
|
|
|
|
+ getserviceList: async function() {
|
|
|
|
+ let res = await this.$request.post("/api/v1/order/orderList", {
|
|
|
|
+ page: this.pageservice,
|
|
|
|
+ list_type: 1,
|
|
|
|
+ product_type: 6,
|
|
|
|
+ is_pack_expire: 2
|
|
|
|
+ })
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.status == 0) {
|
|
|
|
+ if (this.pageservice > res.data.last_page) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "没有更多了",
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.serviceList = this.serviceList.concat(res.data.data)
|
|
|
|
+ this.pageservice++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
getcoupon: async function() {
|
|
getcoupon: async function() {
|
|
let res = await this.$request.post("/api/v1/coupon/userCouponList", {
|
|
let res = await this.$request.post("/api/v1/coupon/userCouponList", {
|
|
page: this.pageindex
|
|
page: this.pageindex
|
|
@@ -208,6 +283,15 @@
|
|
click(e) {
|
|
click(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
},
|
|
},
|
|
|
|
+ setmode(item) {
|
|
|
|
+ this.value = item.name
|
|
|
|
+ if (this.value == '服务包抵扣') {
|
|
|
|
+ this.paytype = 3
|
|
|
|
+ this.showservice = true
|
|
|
|
+ } else if (this.value == '钱包余额支付') {
|
|
|
|
+ this.paytype = 2
|
|
|
|
+ }
|
|
|
|
+ },
|
|
collectCoupons(item, index) {
|
|
collectCoupons(item, index) {
|
|
if (item.type == 1) {
|
|
if (item.type == 1) {
|
|
if (item.max_reduce_amount > this.infodata.total_amount * 100) {
|
|
if (item.max_reduce_amount > this.infodata.total_amount * 100) {
|
|
@@ -260,9 +344,10 @@
|
|
organization_id: this.infodata.organization_id,
|
|
organization_id: this.infodata.organization_id,
|
|
schedule_date: this.infodata.schedule_date,
|
|
schedule_date: this.infodata.schedule_date,
|
|
time_period_id: this.infodata.time_period_id,
|
|
time_period_id: this.infodata.time_period_id,
|
|
- payment_type: this.infodata.payment_type,
|
|
|
|
|
|
+ payment_type: this.paytype,
|
|
pay_password: this.password,
|
|
pay_password: this.password,
|
|
- user_coupon_id: this.couponid
|
|
|
|
|
|
+ user_coupon_id: this.couponid,
|
|
|
|
+ order_pack_id: this.serviceid
|
|
})
|
|
})
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
this.popupShow = false
|
|
this.popupShow = false
|
|
@@ -310,6 +395,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -372,6 +471,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -383,9 +496,10 @@
|
|
total_amount: this.infodata.total_amount * 100,
|
|
total_amount: this.infodata.total_amount * 100,
|
|
phone: this.infodata.phone,
|
|
phone: this.infodata.phone,
|
|
phone_minutes: this.infodata.phone_minutes,
|
|
phone_minutes: this.infodata.phone_minutes,
|
|
- payment_type: 2,
|
|
|
|
|
|
+ payment_type: this.paytype,
|
|
pay_password: this.password,
|
|
pay_password: this.password,
|
|
- user_coupon_id: this.couponid
|
|
|
|
|
|
+ user_coupon_id: this.couponid,
|
|
|
|
+ order_pack_id: this.serviceid
|
|
})
|
|
})
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
this.popupShow = false
|
|
this.popupShow = false
|
|
@@ -433,6 +547,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -444,9 +572,10 @@
|
|
total_amount: this.infodata.total_amount * 100,
|
|
total_amount: this.infodata.total_amount * 100,
|
|
symptoms: this.infodata.symptoms,
|
|
symptoms: this.infodata.symptoms,
|
|
medical_imgs: JSON.stringify(this.infodata.medical_imgs),
|
|
medical_imgs: JSON.stringify(this.infodata.medical_imgs),
|
|
- payment_type: 2,
|
|
|
|
|
|
+ payment_type: this.paytype,
|
|
pay_password: this.password,
|
|
pay_password: this.password,
|
|
- user_coupon_id: this.couponid
|
|
|
|
|
|
+ user_coupon_id: this.couponid,
|
|
|
|
+ order_pack_id: this.serviceid
|
|
})
|
|
})
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
this.popupShow = false
|
|
this.popupShow = false
|
|
@@ -494,6 +623,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -506,9 +649,10 @@
|
|
schedule_date: this.infodata.schedule_date,
|
|
schedule_date: this.infodata.schedule_date,
|
|
time_period_id: this.infodata.time_period_id,
|
|
time_period_id: this.infodata.time_period_id,
|
|
vaccine_id: this.infodata.vaccine_id,
|
|
vaccine_id: this.infodata.vaccine_id,
|
|
- payment_type: this.infodata.payment_type,
|
|
|
|
|
|
+ payment_type: this.paytype,
|
|
pay_password: this.password,
|
|
pay_password: this.password,
|
|
- user_coupon_id: this.couponid
|
|
|
|
|
|
+ user_coupon_id: this.couponid,
|
|
|
|
+ order_pack_id: this.serviceid
|
|
})
|
|
})
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
this.popupShow = false
|
|
this.popupShow = false
|
|
@@ -556,6 +700,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -569,9 +727,10 @@
|
|
schedule_date: this.infodata.schedule_date,
|
|
schedule_date: this.infodata.schedule_date,
|
|
time_period_id: this.infodata.time_period_id,
|
|
time_period_id: this.infodata.time_period_id,
|
|
nurse_ids: JSON.stringify(this.infodata.nurse_ids),
|
|
nurse_ids: JSON.stringify(this.infodata.nurse_ids),
|
|
- payment_type: this.infodata.payment_type,
|
|
|
|
|
|
+ payment_type: this.paytype,
|
|
pay_password: this.password,
|
|
pay_password: this.password,
|
|
- user_coupon_id: this.couponid
|
|
|
|
|
|
+ user_coupon_id: this.couponid,
|
|
|
|
+ order_pack_id: this.serviceid
|
|
})
|
|
})
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
@@ -620,6 +779,20 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
+ } else {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ this.show = false
|
|
|
|
+ this.password = ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -669,7 +842,55 @@
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
|
|
|
+<style lang="scss">
|
|
|
|
+ .card {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: auto;
|
|
|
|
+ margin-top: 20rpx;
|
|
|
|
+
|
|
|
|
+ // background-image: url(../../static/服务包.png);
|
|
|
|
+ .taocan {
|
|
|
|
+ width: 710rpx;
|
|
|
|
+ height: 230rpx;
|
|
|
|
+ position: relative;
|
|
|
|
+ display: flex;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ background: radial-gradient(circle at right top, transparent 15rpx, #fff 0) top left / 152rpx 51% no-repeat,
|
|
|
|
+ radial-gradient(circle at right bottom, transparent 15rpx, #fff 0) bottom left /152rpx 51% no-repeat,
|
|
|
|
+ radial-gradient(circle at left top, transparent 15rpx, #fff 0) top right /560rpx 51% no-repeat,
|
|
|
|
+ radial-gradient(circle at left bottom, transparent 15rpx, #fff 0) bottom right /560rpx 51% no-repeat;
|
|
|
|
+ filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
|
|
|
|
+ box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tc_left {
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ width: 152rpx;
|
|
|
|
+
|
|
|
|
+ text {
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tc_right {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ width: 550rpx;
|
|
|
|
+ padding: 0 20rpx;
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+
|
|
|
|
+ .text {
|
|
|
|
+ padding: 10rpx 0rpx;
|
|
|
|
+ width: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/* 支付文字 */
|
|
/* 支付文字 */
|
|
.paymentText {
|
|
.paymentText {
|
|
height: 60rpx;
|
|
height: 60rpx;
|