init
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "操作成功"
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
/* pages/vehicleMaintenance/maintainSend/maintainSend.wxss */
|
||||
.container {
|
||||
.bg {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.success {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 18px;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 85px;
|
||||
height: 69px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.info-top {
|
||||
width: 90%;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.info-bottom {
|
||||
width: 87%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
width: calc(85.7% - 16px);
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0rpx 0px 10rpx 2rpx rgba(165, 165, 165, 0.34);
|
||||
|
||||
.info-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #4381FC;
|
||||
text-align: left;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.info-button {
|
||||
width: calc(85.7% - 16px);
|
||||
padding: 8px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0px 5px 10rpx 2rpx rgba(165, 165, 165, 0.34);
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.btn {
|
||||
width: calc(50% - 8px);
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
border: 1px solid #D6D6D6;
|
||||
}
|
||||
|
||||
.apply {
|
||||
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
|
||||
color: #2E3A4F;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
border: 1px solid #4381FC;
|
||||
background-color: #FFFFFF;
|
||||
color: #4381FC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
width: calc(100% -16px);
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.label {
|
||||
width: 22%;
|
||||
color: #858CA0;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.val {
|
||||
width: 78%;
|
||||
text-align: left;
|
||||
color: #2E3A4F;
|
||||
font-size: 14px;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
// pages/vehicleMaintenance/maintainSend/maintainSend.ts
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
message: {} as any, // 展示的信息
|
||||
userInfo: {} as any // 用户信息
|
||||
},
|
||||
// 前往下一状态的维修单
|
||||
goRepair() {
|
||||
let url = '../UpkeepPlanInfo/UpkeepPlanInfo';
|
||||
wx.setStorageSync('info', {
|
||||
info: this.data.message
|
||||
});
|
||||
wx.reLaunch({
|
||||
url: url,
|
||||
fail: e => {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 返回首页
|
||||
backHome() {
|
||||
if (this.data.userInfo.type == '1') {
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else if (this.data.userInfo.type == '2') {
|
||||
wx.reLaunch({
|
||||
url: '/pages/manufacturerIndex/manufacturerIndex'
|
||||
});
|
||||
} else if (this.data.userInfo.type == '3') {
|
||||
wx.reLaunch({
|
||||
url: '/pages/projectIndex/projectIndex'
|
||||
});
|
||||
} else if (this.data.userInfo.type == '4') {
|
||||
wx.reLaunch({
|
||||
url: '/pages/maintenanceIndex/maintenanceIndex'
|
||||
});
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
},
|
||||
getInf() {
|
||||
// 获取信息
|
||||
let info = wx.getStorageSync('message');
|
||||
wx.removeStorage({ key: 'message' });
|
||||
this.setData({
|
||||
message: info
|
||||
});
|
||||
this.changeTitle(info);
|
||||
},
|
||||
// 获取用户信息
|
||||
getUserInfo() {
|
||||
let userInfo = wx.getStorageSync('userInfo');
|
||||
this.setData({
|
||||
userInfo: userInfo
|
||||
});
|
||||
},
|
||||
// 修改页眉
|
||||
changeTitle(info: any) {
|
||||
let title = '操作成功';
|
||||
switch (info.auditStatus) {
|
||||
case 1:
|
||||
title = '已提交';
|
||||
break;
|
||||
case 2:
|
||||
title = '已审批';
|
||||
break;
|
||||
}
|
||||
wx.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
this.getInf();
|
||||
this.getUserInfo();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 不放onReady 是因为有可能切出去然后状态改了得跳转到别的页面
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {}
|
||||
});
|
||||
@@ -0,0 +1,64 @@
|
||||
<!--pages/vehicleMaintenance/maintainSend/maintainSend.wxml-->
|
||||
<view class="container">
|
||||
<view class="bg">
|
||||
<image src="../../../images/bg_page_blue.png" mode="" />
|
||||
</view>
|
||||
<view class="success">
|
||||
<image src="../../../images/icon_success.png" mode="" />
|
||||
<view class="title" wx:if="{{message.auditStatus == 1}}">已提交保养申请</view>
|
||||
<view class="title" wx:if="{{message.auditStatus == 2}}">已审核</view>
|
||||
<view class="title" wx:if="{{message.auditStatus == 4}}">已作废</view>
|
||||
<view class="info">
|
||||
<image class="info-top" src="../../../images/info-top.png" mode="" />
|
||||
<view class="info-content" wx:if="{{message.auditStatus == 1}}">
|
||||
<view class="row">
|
||||
<view class="label">所属项目</view>
|
||||
<view class="val">{{message.projectName}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">车牌号码</view>
|
||||
<view class="val">{{message.plateNumber}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">申请时间</view>
|
||||
<view class="val">{{message.date}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-content" wx:if="{{message.auditStatus == 2}}">
|
||||
<view class="info-title" style="color: #4381FC;" wx:if="{{message.checkResult == 1}}">审批通过</view>
|
||||
<view class="info-title" style="color: red;" wx:if="{{message.checkResult == 2}}">审批不通过</view>
|
||||
<view class="row">
|
||||
<view class="label">审批人</view>
|
||||
<view class="val">{{message.checkPeople}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">审批时间</view>
|
||||
<view class="val">{{message.date}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">审批意见</view>
|
||||
<view class="val">{{message.checkIdea ? message.checkIdea : '/'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-content" wx:if="{{message.auditStatus == 4}}">
|
||||
<view class="row">
|
||||
<view class="label">作废人</view>
|
||||
<view class="val">{{message.checkPeople}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">作废时间</view>
|
||||
<view class="val">{{message.date}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="label">作废原因</view>
|
||||
<view class="val">{{message.cancelIdea ? message.cancelIdea : '/'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="info-bottom" src="../../../images/info-bottom.png" mode="" />
|
||||
<view class="info-button">
|
||||
<view class="btn cancel" catch:tap="goRepair">保养单详情</view>
|
||||
<view class="btn apply" catch:tap="backHome">回首页</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user