上传文件至 'pages/shenpiqingjiaxiangqing'
This commit is contained in:
parent
181c572cb0
commit
34a7b608a3
|
@ -0,0 +1,144 @@
|
||||||
|
// pages/qingjiashengqing/qingjiashengqing.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
id:'',
|
||||||
|
classes:'',
|
||||||
|
s_id:'',
|
||||||
|
name:'',
|
||||||
|
dormitory:'',
|
||||||
|
phone :'',
|
||||||
|
reason:'',
|
||||||
|
l_time:'',
|
||||||
|
b_time:'',
|
||||||
|
place:'',
|
||||||
|
p_phone:'',
|
||||||
|
what:'离校',
|
||||||
|
status:"正在审核"
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
this.setData({id:options.id})
|
||||||
|
console.log(options.id)
|
||||||
|
var id = options.id
|
||||||
|
wx.request({
|
||||||
|
url: 'http://127.0.0.1:80/get_leave_school_detailed/',
|
||||||
|
method:"POST",
|
||||||
|
data:{"id":id},
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json' ,
|
||||||
|
},
|
||||||
|
success: (res) =>{
|
||||||
|
var data = res.data.data
|
||||||
|
data["id"] = id
|
||||||
|
this.setData(res.data.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
succ:function(){
|
||||||
|
wx.request({
|
||||||
|
url: 'http://127.0.0.1:80/success_leave/',
|
||||||
|
method:"POST",
|
||||||
|
data:{"id":this.data.id,"status":"通过"},
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json' ,
|
||||||
|
},
|
||||||
|
success:(res) =>{
|
||||||
|
if (res.data.code = "200"){
|
||||||
|
wx.showToast({
|
||||||
|
title: '发送成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration:1000,
|
||||||
|
success :function (){
|
||||||
|
setTimeout(function(){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../shenpijiaqi/shenpijiaqi',
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refused: function(){
|
||||||
|
wx.request({
|
||||||
|
url: 'http://127.0.0.1:80/success_leave/',
|
||||||
|
method:"POST",
|
||||||
|
data:{"id":this.data.id,"status":"未通过"},
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json' ,
|
||||||
|
},
|
||||||
|
success:(res) =>{
|
||||||
|
if (res.data.code = "200"){
|
||||||
|
wx.showToast({
|
||||||
|
title: '发送成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration:1000,
|
||||||
|
success :function (){
|
||||||
|
setTimeout(function(){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../shenpijiaqi/shenpijiaqi',
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {
|
||||||
|
"van-field": "../../../components/vant/dist/field/index",
|
||||||
|
"van-button": "../../../components/vant/dist/button/index"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
<!--pages/qingjiashengqing/qingjiashengqing.wxml-->
|
||||||
|
<view class="policyList">
|
||||||
|
<view class="policy-item">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-field
|
||||||
|
value="{{ classes }}"
|
||||||
|
required
|
||||||
|
clearable
|
||||||
|
label="班级"
|
||||||
|
placeholder="请输入班级"
|
||||||
|
bind:blur="inputclasses"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<van-field
|
||||||
|
value="{{ s_id }}"
|
||||||
|
type="inputText"
|
||||||
|
label="学号"
|
||||||
|
placeholder="请输入学号"
|
||||||
|
required
|
||||||
|
bind:blur="inputs_id"
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{ name }}"
|
||||||
|
type="inputText"
|
||||||
|
label="姓名"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
bind:blur="inputname"
|
||||||
|
required
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{ dormitory }}"
|
||||||
|
type="inputText"
|
||||||
|
label="寝室号"
|
||||||
|
placeholder="请输入寝室号"
|
||||||
|
bind:blur="inputdormitory"
|
||||||
|
required
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{ reason }}"
|
||||||
|
type="inputText"
|
||||||
|
label="请假原因"
|
||||||
|
placeholder="请输入请假原因"
|
||||||
|
bind:blur="inputreason"
|
||||||
|
required
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{ l_time }}"
|
||||||
|
type="inputText"
|
||||||
|
label="请假时间"
|
||||||
|
placeholder="请输入请假时间"
|
||||||
|
bind:blur="inputl_time"
|
||||||
|
required
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<van-field
|
||||||
|
value="{{ phone }}"
|
||||||
|
type="inputText"
|
||||||
|
label="联系方式"
|
||||||
|
placeholder="请输入联系方式"
|
||||||
|
bind:blur="inputphone"
|
||||||
|
required
|
||||||
|
border="{{ false }}"
|
||||||
|
/>
|
||||||
|
</van-cell-group>
|
||||||
|
</view>
|
||||||
|
<view class="juzhong">
|
||||||
|
<button type="primary" style="width: 250rpx" class='changdu' bindtap="succ">通过</button>
|
||||||
|
<button type="primary" style="width: 250rpx"class='changdu' bindtap="refused">拒绝</button></view>
|
||||||
|
</view>
|
||||||
|
|
|
@ -0,0 +1,152 @@
|
||||||
|
/* pages/qingjiashengqing/qingjiashengqing.wxss *//* pages/mine/policy/policy.wxss */
|
||||||
|
page{
|
||||||
|
width:100vw;
|
||||||
|
/* height:100vh; */
|
||||||
|
/* overflow-y: auto; */
|
||||||
|
background:#f8f8f8;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar {display:none!important;}
|
||||||
|
::scrollbar {display:none!important;}
|
||||||
|
|
||||||
|
/* 搜索 */
|
||||||
|
.searchBox{
|
||||||
|
width:97vw;
|
||||||
|
background:#f8f8f8;
|
||||||
|
padding:4vw 3vw 0vw 2vw;
|
||||||
|
/* margin-bottom:3vw; */
|
||||||
|
}
|
||||||
|
.search{
|
||||||
|
width:96vw;
|
||||||
|
height: 9vw;
|
||||||
|
background-color: #ffffff;
|
||||||
|
box-shadow: 0vw 0vw 1.2vw 0vw
|
||||||
|
rgba(0, 0, 0, 0.3);
|
||||||
|
border-radius: 1.33vw;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.search>view{
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.search .input input{
|
||||||
|
width:79vw;
|
||||||
|
height:9vw;
|
||||||
|
font-size:3.2vw;
|
||||||
|
border-top-left-radius: 1.33vw;
|
||||||
|
border-bottom-left-radius: 1.33vw;
|
||||||
|
padding:0 4vw;
|
||||||
|
}
|
||||||
|
.search .img image{
|
||||||
|
width:9vw;
|
||||||
|
height:9vw;
|
||||||
|
}
|
||||||
|
/* 列表 */
|
||||||
|
.policyList{
|
||||||
|
margin-top: 4vw;
|
||||||
|
padding:0 2.4vw;
|
||||||
|
}
|
||||||
|
.policy-item{
|
||||||
|
background: #fff;
|
||||||
|
padding:4vw;
|
||||||
|
/* border-top:1px solid #eee; */
|
||||||
|
margin-bottom:4vw;
|
||||||
|
box-shadow: 0vw 0vw 1.2vw 0vw
|
||||||
|
rgba(0, 0, 0, 0.3);
|
||||||
|
border-radius: 1.33vw;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-content: space-between;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.policy-item:last-child{
|
||||||
|
border-bottom:1px solid #eee;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.policy-item>view{
|
||||||
|
margin-bottom:3vw;
|
||||||
|
}
|
||||||
|
.policy-item>view:last-child{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.item-title{
|
||||||
|
width:86vw;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: 4vw;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.item-time{
|
||||||
|
font-size: 3vw;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.noMore{
|
||||||
|
height: 10vw;
|
||||||
|
line-height: 10vw;
|
||||||
|
text-align: center;
|
||||||
|
color:#999;
|
||||||
|
font-size:3.2vw;
|
||||||
|
}
|
||||||
|
/* 暂无数据 */
|
||||||
|
.popupNone{
|
||||||
|
width:100vw;
|
||||||
|
height:64vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.popupNone .img image{
|
||||||
|
width: 31.2vw;
|
||||||
|
height: 31.87vw;
|
||||||
|
margin-bottom:3.2vw;
|
||||||
|
}
|
||||||
|
.popupNone .noneTxt{
|
||||||
|
font-size: 3.73vw;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.pubMessage{
|
||||||
|
width: 110rpx;
|
||||||
|
height: 110rpx;
|
||||||
|
background: #206fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #fff;
|
||||||
|
position: fixed;
|
||||||
|
right: 5vw;
|
||||||
|
bottom: 5vw;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.pubMessage>text{
|
||||||
|
flex: 1 0 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 100rpx;
|
||||||
|
line-height: 10vw;
|
||||||
|
height: 12vw;
|
||||||
|
}
|
||||||
|
.author{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
}
|
||||||
|
.author>text{
|
||||||
|
color:#206fff
|
||||||
|
}
|
||||||
|
.author>view{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.gray_msg{
|
||||||
|
width: 40rpx;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.juzhong{
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
}
|
||||||
|
.changdu{
|
||||||
|
background-color: #206fff;
|
||||||
|
}
|
Loading…
Reference in New Issue