作者 sgj
... ... @@ -480,10 +480,21 @@ Page({
})
},
uploadImages(e) {
let that = this;
let tem = e.currentTarget.dataset.tem;
if (that.data.status == 2) {
wx.showModal({
title: '提示',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
showCancel: false, //是否显示取消按钮
})
} else {
that.uploadImage(tem);
}
},
... ... @@ -664,8 +675,7 @@ Page({
reverse_card: that.data.reverse_card,
photo: that.data.photo
}
// 获取订阅号权限
{
wx.requestSubscribeMessage({
tmplIds: ['i32dB8tFiNFYRgRGM6bv79aEe4X2_BZ8HunwaoPw58o'],
... ... @@ -676,8 +686,6 @@ Page({
})
}
wx.showModal({
title: '请仔细核对信息,确认无误!',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
... ... @@ -725,9 +733,6 @@ Page({
},
getpop() {
wx.showModal({
title: '提示',
... ... @@ -828,9 +833,15 @@ Page({
that.getarea();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
... ...
... ... @@ -11,23 +11,18 @@
<view>姓名</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>昵称</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setnickname' value='{{nickname}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<picker bindchange="bindsex" range="{{arraysex}}" disabled="{{page_type}}">
<picker bindchange="bindsex" range="{{arraysex}}" disabled="{{status==2}}">
<view class='apply_item'>
<view>性别</view>
<view class='apply_item_input'>
... ... @@ -36,7 +31,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindbirthdayChange" value="{{2000-01-01}}" end='{{enddata}}' disabled="{{page_type}}">
<picker mode='date' bindchange="bindbirthdayChange" value="{{2000-01-01}}" end='{{enddata}}' disabled="{{status==2}}">
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
... ... @@ -46,7 +41,7 @@
</view>
</picker>
<picker range='{{nationarr}}' bindchange="bindnationChange" disabled="{{page_type}}">
<picker range='{{nationarr}}' bindchange="bindnationChange" disabled="{{status==2}}">
<view class='apply_item'>
<view>民族</view>
<view class='apply_item_input'>
... ... @@ -56,7 +51,7 @@
</view>
</picker>
<picker range='{{educationarr}}' bindchange="bindeducationChange" disabled="{{page_type}}">
<picker range='{{educationarr}}' bindchange="bindeducationChange" disabled="{{status==2}}">
<view class='apply_item'>
<view>学历</view>
<view class='apply_item_input'>
... ... @@ -65,7 +60,7 @@
</view>
</view>
</picker>
<picker range='{{politicsarr}}' bindchange="bindpoliticsChange" disabled="{{page_type}}">
<picker range='{{politicsarr}}' bindchange="bindpoliticsChange" disabled="{{status==2}}">
<view class='apply_item'>
<view>政治面貌</view>
<view class='apply_item_input'>
... ... @@ -78,42 +73,42 @@
<view>工作单位</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setduty' value='{{duty}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>通讯地址</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setaddr' value='{{addr}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>邮编</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setpostcode' value='{{postcode}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>就读/毕业院校</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setschool' value='{{school}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>身份证号</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}'
disabled="{{page_type}}" maxlength="20"></input>
disabled="{{status==2}}" maxlength="20"></input>
</view>
</view>
<view class='apply_item'>
... ... @@ -127,28 +122,28 @@
<view>移动电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}'
disabled="{{page_type}}" maxlength="11"></input>
disabled="{{status==2}}" maxlength="11"></input>
</view>
</view>
<view class='apply_item'>
<view>电子邮箱</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item big_item'>
<view>紧急联系人及电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='seturgency_phone'
value='{{urgency_phone}}' disabled="{{page_type}}"></input>
value='{{urgency_phone}}' disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>QQ号码</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}'
disabled="{{page_type}}"></input>
disabled="{{status==2}}"></input>
</view>
</view>
... ... @@ -167,7 +162,7 @@
<view class='apply_cell {{apply_nav==2?"apply_active":""}}' data-apply_nav='2' bindtap='setapply_nav'>个人履历3</view>
</view>
<view class='navbox'>
<picker mode='date' bindchange="bindstartChange" disabled="{{page_type}}">
<picker mode='date' bindchange="bindstartChange" disabled="{{status==2}}">
<view class='apply_item'>
<view>开始时间</view>
<view class='apply_item_input'>
... ... @@ -177,7 +172,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindendChange" disabled="{{page_type}}">
<picker mode='date' bindchange="bindendChange" disabled="{{status==2}}">
<view class='apply_item'>
<view>结束时间</view>
<view class='apply_item_input'>
... ... @@ -191,28 +186,28 @@
<view>单位名称</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_unit}}'
bindinput='setrecordunit' disabled="{{page_type}}"></input>
bindinput='setrecordunit' disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_duty}}'
bindinput='setrecordduty' disabled="{{page_type}}"></input>
bindinput='setrecordduty' disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>证明人</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_name}}'
bindinput='setrecordname' disabled="{{page_type}}"></input>
bindinput='setrecordname' disabled="{{status==2}}"></input>
</view>
</view>
<view class='apply_item'>
<view>证明人电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}'
bindinput='setrecordphone' disabled="{{page_type}}"></input>
bindinput='setrecordphone' disabled="{{status==2}}"></input>
</view>
</view>
</view>
... ...
... ... @@ -15,14 +15,12 @@ Page({
"线上答疑",
"门诊服务"
],
time_arr: [
"上午", "下午","全天"
],
time_arr: [ "上午", "下午", "全天"],
t_arr: [{ //选择日期数组
t_arr: { //选择日期数组
data: '',
time: ''
}],
},
z_arr: [ //申请入住数组
{
date: ''
... ... @@ -44,7 +42,7 @@ Page({
shows: false,
shownight: false,
showdate: false,
selectdata:[],
selectdata: [],
arr: [],
lunch: [],
dinner: [],
... ... @@ -364,15 +362,15 @@ Page({
}).catch((err) => {})
},
// 选择参加日期,入住日期,用餐日期
change_date(e) {
let that = this
let index = e.currentTarget.dataset.index
// let id = e.currentTarget.dataset.id
let zindex = Number(e.detail.value)
// change_date(e) {
// let that = this
// let index = e.currentTarget.dataset.index
// // let id = e.currentTarget.dataset.id
// let zindex = Number(e.detail.value)
that.setData({
[`t_arr[${index}].date`]: that.data.date_arr[zindex]
})
// that.setData({
// [`t_arr[${index}].date`]: that.data.date_arr[zindex]
// })
// else if (id == 2) {
... ... @@ -385,7 +383,7 @@ Page({
// })
// }
// that.judge_status(id, index)
},
// },
... ... @@ -422,13 +420,16 @@ Page({
},
// 选择参加时间
change_time(e) {
let index = Number(e.currentTarget.dataset.index)
let zindex = Number(e.detail.value)
console.log(e)
// let index = Number(e.currentTarget.dataset.index)
let zindex = e.detail.value
console.log(e.detail.value)
this.setData({
select_time:this.data.time_arr[zindex],
[`t_arr[${index}].time`]: this.data.time_arr[zindex]
})
this.judge_status(1, index)
// this.judge_status(1, index)
},
// 选择用餐时间
eat_time(e) {
... ... @@ -440,28 +441,28 @@ Page({
this.judge_status(3, index)
},
//删除日期,入住,用餐
del(e) {
let status = Number(e.currentTarget.dataset.status)
let index = e.currentTarget.dataset.index
let arr = status > 1 ? (status > 2 ? this.data.e_arr : this.data.z_arr) : this.data.t_arr
arr.splice(index, 1)
if (status == 1) {
this.setData({
t_arr: arr,
t_type: true
})
} else if (status == 2) {
this.setData({
z_arr: arr,
z_type: true
})
} else if (status == 3) {
this.setData({
e_arr: arr,
e_type: true
})
}
},
// del(e) {
// let status = Number(e.currentTarget.dataset.status)
// let index = e.currentTarget.dataset.index
// let arr = status > 1 ? (status > 2 ? this.data.e_arr : this.data.z_arr) : this.data.t_arr
// arr.splice(index, 1)
// if (status == 1) {
// this.setData({
// t_arr: arr,
// t_type: true
// })
// } else if (status == 2) {
// this.setData({
// z_arr: arr,
// z_type: true
// })
// } else if (status == 3) {
// this.setData({
// e_arr: arr,
// e_type: true
// })
// }
// },
// 添加日期,入住,用餐
add_item(e) {
let id = e.currentTarget.dataset.id
... ... @@ -518,6 +519,8 @@ Page({
})
}
},
// 获取工作类型
change_enroll(e) {
let index = Number(e.detail.value)
... ... @@ -615,7 +618,7 @@ Page({
})
return
}
if (that.data.lunch =='' ) {
if (that.data.lunch == '') {
wx.showToast({
title: '请先完善申请用餐信息',
icon: 'none'
... ... @@ -687,6 +690,7 @@ Page({
form_id: form_id,
type: that.data.type_id,
work_content: that.data.check_id,
// time_arr: that.data.time_arr,
// select_time: JSON.stringify(that.data.t_arr),
select_time: JSON.stringify(that.data.selectdata),
// apply_stay: JSON.stringify(that.data.z_arr),
... ...
... ... @@ -60,8 +60,6 @@
<image src="/imgs/right.png" />
</view>
<van-calendar show="{{ showdate }}" type="multiple" bind:close="onClosedate" bind:confirm="onConfirmdate" />
</view>
<view class="item">
... ...
... ... @@ -99,6 +99,7 @@ Page({
},
// 选择地址
getchoose(e) {
console.log(e)
let index = e.currentTarget.dataset.index;
wx.setStorageSync('tempAdress', this.data.list[index])
... ...