10 changed files with 365 additions and 7 deletions
@ -0,0 +1,171 @@ |
|||||
|
// pages/group/apply/index.js
|
||||
|
import commonApi from "../../../utils/https" |
||||
|
import util from "../../../utils/util" |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
info:{ |
||||
|
company:"", |
||||
|
tel:"", |
||||
|
name:"" |
||||
|
}, |
||||
|
step:0, |
||||
|
venue:null, |
||||
|
applyInfo:null |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
commonApi._post("scene/detail_for_venue",{ |
||||
|
id:this.data.id |
||||
|
}).then(res=>{ |
||||
|
this.setData({ |
||||
|
venue:res.data |
||||
|
}) |
||||
|
// 判断状态
|
||||
|
this.getStatus() |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
getStatus:function(){ |
||||
|
commonApi.user_post("team_order/apply_post",{ |
||||
|
supplier_id:this.data.venue.product_venue.supplier_id, |
||||
|
product_code:this.data.venue.product_venue.product_code, |
||||
|
},'get').then(res=>{ |
||||
|
// state 0:审核中 1:审核通过 2:审核拒绝 3:撤销申请
|
||||
|
if(res && res.data){ |
||||
|
this.setData({ |
||||
|
applyInfo:res.data |
||||
|
}) |
||||
|
if(res.data.state==0){ |
||||
|
this.setData({ |
||||
|
step:1 |
||||
|
}) |
||||
|
} |
||||
|
else if(res.data.state==2){ |
||||
|
this.setData({ |
||||
|
step:2 |
||||
|
}) |
||||
|
} |
||||
|
else if(res.data.state==1){ |
||||
|
wx.redirectTo({ |
||||
|
url: '/pages/info/museumInfo/index?isGroup=1&id='+this.data.id, |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
changeInfo:function(e){ |
||||
|
let info = this.data.info |
||||
|
info[e.currentTarget.dataset.key] = e.detail.value |
||||
|
this.setData({ |
||||
|
info:info |
||||
|
}) |
||||
|
}, |
||||
|
submit:function(e){ |
||||
|
// this.setData({
|
||||
|
// step:1
|
||||
|
// })
|
||||
|
let info = this.data.info |
||||
|
commonApi.user_post("team_order/apply_post",{ |
||||
|
supplier_id:this.data.venue.product_venue.supplier_id, |
||||
|
product_code:this.data.venue.product_venue.product_code, |
||||
|
organization_name:info.company, |
||||
|
apply_user:info.name, |
||||
|
mobile:info.tel |
||||
|
}).then(res=>{ |
||||
|
if(res && res.code==1){ |
||||
|
this.getStatus() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 再次申请
|
||||
|
reGet(){ |
||||
|
this.setData({ |
||||
|
step:0, |
||||
|
info:{ |
||||
|
company:"", |
||||
|
tel:"", |
||||
|
name:"" |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 撤销申请
|
||||
|
cancel:function(){ |
||||
|
commonApi.user_post('team_order/undo_apply',{ |
||||
|
supplier_id:this.data.venue.product_venue.supplier_id, |
||||
|
product_code:this.data.venue.product_venue.product_code, |
||||
|
}).then(res=>{ |
||||
|
if(res.code==1){ |
||||
|
wx.showToast({ |
||||
|
title: '撤销成功', |
||||
|
icon:"success", |
||||
|
mask:true |
||||
|
}) |
||||
|
setTimeout(()=>{ |
||||
|
util.back() |
||||
|
},1000) |
||||
|
// this.getStatus()
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
// 判断状态
|
||||
|
if(this.data.id && this.data.venue){ |
||||
|
this.getStatus() |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
<!--pages/group/apply/index.wxml--> |
||||
|
<title title="资质申请"></title> |
||||
|
<view class="com-flex steps"> |
||||
|
<view class="step-item com-flex {{step==0?'active':''}}"> |
||||
|
<view class="num com-flex">1</view> |
||||
|
<view>填写资料</view> |
||||
|
</view> |
||||
|
<view class="dot">·······</view> |
||||
|
<view class="step-item com-flex {{step==1?'active':''}}"> |
||||
|
<view class="num com-flex">2</view> |
||||
|
<view>审核</view> |
||||
|
</view> |
||||
|
<view class="dot">·······</view> |
||||
|
<view class="step-item com-flex {{step==2?'active':''}}"> |
||||
|
<view class="num com-flex">3</view> |
||||
|
<view>结果通知</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view wx:if="{{step==0}}"> |
||||
|
<view class="inputs"> |
||||
|
<view class="com-flex input"> |
||||
|
<text>姓名:</text> |
||||
|
<input type="text" placeholder="请输入申请人姓名" bindinput="changeInfo" data-key="name" /> |
||||
|
</view> |
||||
|
<view class="com-flex input"> |
||||
|
<text>手机号码:</text> |
||||
|
<input type="number" placeholder="请输入申请人手机号" bindinput="changeInfo" data-key="tel" /> |
||||
|
</view> |
||||
|
<view class="com-flex input"> |
||||
|
<text>机构名称:</text> |
||||
|
<input type="text" placeholder="请输入机构名称" bindinput="changeInfo" data-key="company" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="btn" bindtap="submit">提交</view> |
||||
|
</view> |
||||
|
<view wx:elif="{{step==1}}"> |
||||
|
<view class="inputs" style="height:400rpx"> |
||||
|
<view class="com-flex top-tip"><image src="http://erdos-yijiyou.oss-cn-huhehaote.aliyuncs.com/uploads/20220211/30e03ed2db0b8267299bf24cba752bb0.png" mode="widthFix"></image>信息提交成功</view> |
||||
|
<view class="info">姓名: {{applyInfo.apply_user}}</view> |
||||
|
<view class="info">手机号码:{{applyInfo.mobile}}</view> |
||||
|
<view class="info">机构名称:{{applyInfo.organization_name}}</view> |
||||
|
<view class="tip">您所提交的申请正在进行审核,请耐心等待</view> |
||||
|
</view> |
||||
|
<view class="btn" bindtap="cancel">撤销申请</view> |
||||
|
</view> |
||||
|
<view wx:elif="{{step==2}}"> |
||||
|
<view class="inputs" style="height:400rpx"> |
||||
|
<view class="com-flex top-tip" style="background:#D62828"><image src="https://static.ticket.sz-trip.com/uploads/20220214/70e2dfdbca9cfe8efb6f3b8b7beb8ff2.png" mode="widthFix"></image>申请被拒绝</view> |
||||
|
<view class="info">拒绝原因:</view> |
||||
|
<view class="info" style="line-height:50rpx;margin:20rpx">{{applyInfo.refund_msg}}</view> |
||||
|
</view> |
||||
|
<view class="btn" bindtap="reGet">再次申请</view> |
||||
|
</view> |
||||
@ -0,0 +1,105 @@ |
|||||
|
/* pages/group/apply/index.wxss */ |
||||
|
.steps { |
||||
|
margin: 20rpx 30rpx; |
||||
|
height: 120rpx; |
||||
|
font-size: 30rpx; |
||||
|
color: #333333; |
||||
|
background: white; |
||||
|
border-radius: 20rpx; |
||||
|
padding: 0 30rpx; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
.inputs { |
||||
|
margin: 20rpx 30rpx; |
||||
|
font-size: 30rpx; |
||||
|
color: #333333; |
||||
|
background: white; |
||||
|
border-radius: 20rpx; |
||||
|
padding: 0 20rpx; |
||||
|
position: relative; |
||||
|
} |
||||
|
.input { |
||||
|
height: 120rpx; |
||||
|
justify-content: space-between; |
||||
|
border-bottom: 1px solid #d8d8d8; |
||||
|
} |
||||
|
.input:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
.input text { |
||||
|
width: 180rpx; |
||||
|
flex-shrink: 0; |
||||
|
} |
||||
|
.input input { |
||||
|
flex: 1; |
||||
|
display: block; |
||||
|
text-align: right; |
||||
|
width: 400rpx; |
||||
|
} |
||||
|
page { |
||||
|
background: #f2f2f2; |
||||
|
} |
||||
|
.steps .num{ |
||||
|
width: 34rpx; |
||||
|
height: 34rpx; |
||||
|
box-sizing: border-box; |
||||
|
justify-content: center; |
||||
|
border: 2rpx solid #333333; |
||||
|
border-radius: 50%; |
||||
|
margin-right: 10rpx; |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
.steps .dot { |
||||
|
color: #999999; |
||||
|
letter-spacing: -6rpx; |
||||
|
} |
||||
|
.steps .active { |
||||
|
color: #0B898E; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.steps .active .num { |
||||
|
color: #fff; |
||||
|
border-color: #0B898E; |
||||
|
background: #0B898E; |
||||
|
font-weight: normal; |
||||
|
} |
||||
|
.btn { |
||||
|
width: 690rpx; |
||||
|
line-height: 70rpx; |
||||
|
background: #0B898E; |
||||
|
border-radius: 35rpx; |
||||
|
position: fixed; |
||||
|
left: 30rpx; |
||||
|
bottom: 30rpx; |
||||
|
text-align: center; |
||||
|
color: #fff; |
||||
|
font-size: 30rpx; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.inputs .info { |
||||
|
font-size: 34rpx; |
||||
|
font-weight: bold; |
||||
|
text-align: center; |
||||
|
color: #333333; |
||||
|
line-height: 70rpx; |
||||
|
} |
||||
|
.tip { |
||||
|
color: #999999; |
||||
|
font-size: 28rpx; |
||||
|
text-align: center; |
||||
|
margin-top: 40rpx; |
||||
|
} |
||||
|
.top-tip { |
||||
|
width: 300rpx; |
||||
|
height: 60rpx; |
||||
|
background: #0B898E; |
||||
|
border-radius: 0px 0px 30rpx 30rpx; |
||||
|
margin: 0 auto; |
||||
|
color: #fff; |
||||
|
margin-bottom: 30rpx; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
.top-tip image { |
||||
|
width: 30rpx; |
||||
|
margin-right: 10rpx; |
||||
|
} |
||||
Loading…
Reference in new issue