This commit is contained in:
renjianbo0118
2023-05-26 00:24:12 +08:00
parent d4a7e89491
commit f8b392122a
3 changed files with 93 additions and 79 deletions

View File

@@ -69,9 +69,9 @@
<image src="{{item.userbAvatar}}" style="width:94rpx;height:94rpx;border-radius:50% ;margin-right:23rpx;"> <image src="{{item.userbAvatar}}" style="width:94rpx;height:94rpx;border-radius:50% ;margin-right:23rpx;">
</image> </image>
<view> <view>
<view style="color: #333;font-size: 28rpx;font-family: PingFang SC;font-weight: bold;">{{item.usercName}}</view> <view style="color: #333;font-size: 28rpx;font-family: PingFang SC;font-weight: bold;">{{item.userbName}}</view>
<view style="color: #ABABAB;font-size: 24rpx;font-family: PingFang SC;font-weight: 400;width:532rpx;border-right:1rpx solid #e5e5e5"> <view style="color: #ABABAB;font-size: 24rpx;font-family: PingFang SC;font-weight: 400;width:532rpx;border-right:1rpx solid #e5e5e5">
地址:{{item.hospitalAddress}}</view> 地址:{{item.hospitalAddress+item.hospitalName}}</view>
</view> </view>
<image style="width:26rpx;height:26rpx;padding:35rpx 0 0 20rpx" src="/pages/image/phone.png" bindtap="callphone"></image> <image style="width:26rpx;height:26rpx;padding:35rpx 0 0 20rpx" src="/pages/image/phone.png" bindtap="callphone"></image>
</view> </view>

View File

@@ -6,26 +6,31 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
task: {
phone: '',
phonedisplay: false,
placeholder: '请输入联系方式'
},
//普通选择器:(普通数组) //普通选择器:(普通数组)
// array: ['请选择医院', '西京医院', '省人民医院', '红会医院'], // array: ['请选择医院', '西京医院', '省人民医院', '红会医院'],
objectArray: [{ objectArray: [{
text: '请选择医院', text: '请选择医院',
value: 10 value: 10
}, },
{ {
text: '第四军医大学西京医院', text: '第四军医大学西京医院',
value: 2 value: 2
}, },
{ {
text: '陕西省人民医院', text: '陕西省人民医院',
value: 3 value: 3
}, },
{ {
text: '西安市高新医院', text: '西安市高新医院',
value: 1 value: 1
}, },
], ],
objectIndex: 0, //默认显示位置 objectIndex: 0, //默认显示位置
show: true, show: true,
height: '', height: '',
seckill_start: '请输入开始日期', seckill_start: '请输入开始日期',
@@ -52,9 +57,45 @@ Page({
clock: '', clock: '',
address: '', address: '',
danjia: 0.01, //单位为元 danjia: 0.01, //单位为元
beizhu: '' beizhu: '',
name: '',
jzphone: ''
},
inputtaskphone(e) {
if (e.detail.value != '') {
if (!(/^1[3456789]\d{9}$/.test(e.detail.value))) {
this.setData({
phonedisplay: true,
placeholder: '',
'task.phone': ''
})
}
}
},
focus() {
this.setData({
phonedisplay: false,
placeholder: '请输入联系方式',
'task.phone': ''
})
}, },
bindNameInput: function (e) {
this.setData({
name: e.detail.value
})
},
bindPhoneInput: function (e) {
this.setData({
jzphone: e.detail.value
})
},
bindAdressInput: function (e) {
this.setData({
address: e.detail.value
})
},
// 确认支付 // 确认支付
confirm_payy: async function () { confirm_payy: async function () {
@@ -124,6 +165,14 @@ Page({
console.log(event.detail); console.log(event.detail);
}, },
payment() { payment() {
if (this.data.objectIndex == 0) {
wx.showToast({
title: '请输选择医院',
icon: 'none'
});
return
}
if (this.data.seckill_start == "请输入开始日期") { if (this.data.seckill_start == "请输入开始日期") {
wx.showToast({ wx.showToast({
title: '请输入开始日期', title: '请输入开始日期',
@@ -134,18 +183,18 @@ Page({
var that = this; var that = this;
wx.request({ wx.request({
url: app.globalData.url + '/system/order/insertOrderPzz', url: app.globalData.url + '/system/order/insertOrderPz',
data: { data: {
bId: "1", //陪护人员id bId: "1", //陪护人员id
cId: wx.getStorageSync('uid'), //患者id cId: wx.getStorageSync('uid'), //患者id
yuguMoney: "1", //金额 yuguMoney: this.data.item.price, //金额
yuliu9: "2", //订单大类1-陪护 2-陪诊 yuliu9: "2", //订单大类1-陪护 2-陪诊
yuliu10: this.data.item.ordertype, //订单类型1-全程陪诊,2-诊前约号3-送取报告4-待办问诊 yuliu10: this.data.item.ordertype, //订单类型1-全程陪诊,2-诊前约号3-送取报告4-待办问诊
hospitalId: this.data.objectArray[this.data.objectIndex].value, hospitalId: this.data.objectArray[this.data.objectIndex].value,
startTime: this.data.seckill_start, startTime: this.data.seckill_start,
yuliu11: "18691577328", //患者电话 yuliu11: this.data.jzphone, //患者电话
yuliu12: "无", //特殊要求 yuliu12: this.data.beizhu, //特殊要求
yuliu13: "东泰城市之光", //送达地址 yuliu13: this.data.address, //送达地址
yuliu14: "610526198701180018" //患者身份证号 yuliu14: "610526198701180018" //患者身份证号
}, },
method: 'POST', method: 'POST',
@@ -299,25 +348,4 @@ Page({
console.log('picker发送选择改变,医院的id值为', this.data.objectArray[this.data.objectIndex].value) console.log('picker发送选择改变,医院的id值为', this.data.objectArray[this.data.objectIndex].value)
}, },
}) })

View File

@@ -29,44 +29,46 @@
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;"> <view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
<view class="title-left"> <view class="title-left">
{{"陪护时间选择"}} {{"完善信息"}}
</view> </view>
<!--选择器--> <!--选择器-->
<view class="row-wrap"> <view class="row-wrap">
<view class="xing" style="color: #FF6E6E;">*</view>
<view class="label" style="margin-left: 33rpx;">就诊医院</view> <view class="label">就诊医院</view>
<view class="label-right"> <view class="label-right">
<picker bindchange="bindPickerChange2" value="{{objectIndex}}" range="{{objectArray}}" range-key="text"> <picker bindchange="bindPickerChange2" value="{{objectIndex}}" range="{{objectArray}}" range-key="text">
<view class="picker"> <view class="picker">
{{objectArray[objectIndex].text}} > {{objectArray[objectIndex].text}} >
</view> </view>
</picker> </picker>
</view> </view>
</view> </view>
<!--end--> <!--end-->
<view class="row-wrap"> <!-- <view class="row-wrap">
<view class="xing" style="color: #FF6E6E;">*</view> <view class="xing" style="color: #FF6E6E;">*</view>
<view class="label">就诊人姓名</view> <view class="label">就诊人姓名</view>
<view class="label-right"> <view class="label-right">
<input model:value="{{price}}" name="nickname" class="input" type="text" placeholder="请输入就诊人姓名" /> <input class="input" bindinput="bindNameInput" type="text" placeholder="请输入就诊人姓名" />
</view> </view>
</view> </view> -->
<view class="row-wrap"> <view class="row-wrap">
<view class="xing" style="color: #FF6E6E;">*</view> <view class="xing" style="color: #FF6E6E;">*</view>
<view class="label">就诊人电话</view> <view class="label">就诊人电话</view>
<view class="label-right"> <view class="label-right">
<input model:value="{{original_price}}" name="nickname" class="input" type="text" placeholder="请输入就诊人电话" /> <input bindinput="bindPhoneInput" class="input" type="number" placeholder="请输入就诊人电话" />
</view> </view>
</view> </view>
<view class="row-wrap"> <view class="row-wrap">
<view class="label" style="margin-left: 33rpx;">报告收件地址</view> <view class="label" style="margin-left: 16rpx;">报告收件地址</view>
<view class="label-right"> <view class="label-right">
<input model:value="{{original_price}}" name="nickname" class="input" type="text" placeholder="请输入收件地址" /> <input bindinput="bindAdressInput" class="input" type="text" placeholder="请输入收件地址" />
</view> </view>
</view> </view>
@@ -77,7 +79,7 @@
<view style="height: 1rpx;background: #ECECEC;"></view> <view style="height: 1rpx;background: #ECECEC;"></view>
<view class="row-wrap"> <view class="row-wrap">
<view class="label" style="margin-left: 33rpx;">服务时间</view> <view class="label" style="margin-left: 16rpx;">服务时间</view>
<view class="label-right"> <view class="label-right">
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChange"> <picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChange">
<view class="picker"> <view class="picker">
@@ -111,20 +113,4 @@
</view> </view>
<view class="immediately" bindtap="confirm_payy">购买服务</view> <view class="immediately" bindtap="confirm_payy">购买服务</view>
</view> </view>
</view> </view>