mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 18:59:36 +08:00
描述:预约详细信息
This commit is contained in:
parent
c1da11dc1d
commit
058d9e7c07
@ -8,7 +8,8 @@ import {
|
||||
|
||||
import {
|
||||
visitorPersonRq,
|
||||
selectVisitorRecordByIdRq
|
||||
selectVisitorRecordByIdRq,
|
||||
updateVisitorPersonStatusRq
|
||||
} from "../../../../api/meeting/visitorIinvitation.js"
|
||||
|
||||
|
||||
@ -22,6 +23,8 @@ Page({
|
||||
id: null,
|
||||
title: null,
|
||||
type: null,
|
||||
submitShow: false,
|
||||
verifyShow: false,
|
||||
userDetail: {},
|
||||
idcardTypeShow: false,
|
||||
idcardTypeList: [{
|
||||
@ -49,7 +52,11 @@ Page({
|
||||
visitContent: null, // 来访事由
|
||||
photo: null, // 头像-相对路径
|
||||
url: null, // 人脸设备图片-全路径
|
||||
}
|
||||
},
|
||||
// 审核
|
||||
dialogShow: false,
|
||||
dialogId: null,
|
||||
dialogContent: null,
|
||||
},
|
||||
|
||||
/**
|
||||
@ -76,6 +83,16 @@ Page({
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.title
|
||||
})
|
||||
// 根据类型 判断显示
|
||||
if (options.type == 'add') {
|
||||
_this.setData({
|
||||
submitShow: true
|
||||
})
|
||||
} else if (options.type == 'verify') {
|
||||
|
||||
} else if (options.type == 'detail') {
|
||||
|
||||
}
|
||||
// 有id查询详情
|
||||
if (options.id) {
|
||||
// 获取详情
|
||||
@ -89,6 +106,12 @@ Page({
|
||||
selectVisitorRecordByIdRq(_this.data.id).then(res => {
|
||||
console.log('selectVisitorRecordByIdRq', res);
|
||||
let detail = res.data;
|
||||
// 是点击审核菜单或按钮并且是未审核的数据
|
||||
if (_this.data.type == 'verify' && detail.status == 0) {
|
||||
_this.setData({
|
||||
verifyShow: true
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
detail,
|
||||
fileList: [{
|
||||
@ -332,6 +355,13 @@ Page({
|
||||
// 添加数据
|
||||
visitorPersonRq(detail).then(res => {
|
||||
console.log('visitorPersonRq', res);
|
||||
// 刷新上个页面参数
|
||||
let pages = getCurrentPages(); //获取page
|
||||
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
changeData: true
|
||||
})
|
||||
//
|
||||
if (res.code == 0) {
|
||||
wx.navigateBack()
|
||||
} else {
|
||||
@ -340,6 +370,69 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 显示-弹出框
|
||||
showDialog(e) {
|
||||
console.log('showDialog', e);
|
||||
let _this = this
|
||||
_this.setData({
|
||||
dialogShow: true,
|
||||
dialogId: e.currentTarget.dataset.id,
|
||||
dialogContent: null
|
||||
})
|
||||
},
|
||||
|
||||
// 弹出框-审核
|
||||
dialogVerify(e) {
|
||||
console.log('dialogSuccess', e);
|
||||
let status = e.currentTarget.dataset.status;
|
||||
let _this = this
|
||||
// 驳回 需要输入描述信息
|
||||
if (status == 2 && !_this.data.dialogContent) {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: '请输入描述信息!'
|
||||
});
|
||||
return
|
||||
}
|
||||
updateVisitorPersonStatusRq({
|
||||
id: _this.data.dialogId,
|
||||
status,
|
||||
rejectContent: _this.data.dialogContent,
|
||||
}).then(res => {
|
||||
console.log('updateVisitorPersonStatusRq', res);
|
||||
// 刷新上个页面参数
|
||||
let pages = getCurrentPages(); //获取page
|
||||
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
changeData: true
|
||||
})
|
||||
//
|
||||
_this.setData({
|
||||
dialogShow: false,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
_this.setData({
|
||||
verifyShow: false
|
||||
})
|
||||
} else {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 弹出框-输入框:输入内容时触发
|
||||
dialogInput(e) {
|
||||
let _this = this
|
||||
console.log('dialogInput', e.detail);
|
||||
_this.setData({
|
||||
dialogContent: e.detail,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 显示错误消息
|
||||
showErrMsg(msg) {
|
||||
Notify({
|
||||
|
@ -6,7 +6,9 @@
|
||||
"van-uploader": "@vant/weapp/uploader/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index"
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -58,8 +58,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 提交 -->
|
||||
<view class="submitBtnView" bind:tap="submitData">提交</view>
|
||||
|
||||
<view class="submitBtnView" wx:if="{{submitShow}}" bind:tap="submitData">提交</view>
|
||||
<!-- 审核 -->
|
||||
<view class="submitBtnView" wx:if="{{verifyShow}}" bind:tap="showDialog" data-id="{{id}}">审核</view>
|
||||
|
||||
</view>
|
||||
|
||||
@ -78,3 +79,12 @@
|
||||
<van-popup show="{{ leaveTimeShow }}" position="bottom" custom-style="height: 50vh;" bind:close="closeLeaveTime">
|
||||
<van-datetime-picker type="datetime" value="{{ leaveTimeDate }}" min-date="{{ visitTimeDate }}" bind:confirm="confirmLeaveTime" bind:cancel="closeLeaveTime" />
|
||||
</van-popup>
|
||||
|
||||
<!-- 审核弹出框 -->
|
||||
<van-dialog use-slot title="审核" show="{{ dialogShow }}" show-confirm-button="{{false}}" show-cancel-button="{{false}}" close-on-click-overlay>
|
||||
<van-field input-class="textarea" bind:input="dialogInput" value="{{ dialogContent }}" type="textarea" placeholder="请输入描述信息" />
|
||||
<view class="dialogBtnView">
|
||||
<view class="rejectBtn" data-status="2" bind:tap="dialogVerify">驳回</view>
|
||||
<view class="successBtn" data-status="1" bind:tap="dialogVerify">通过</view>
|
||||
</view>
|
||||
</van-dialog>
|
@ -80,3 +80,34 @@
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.textarea {
|
||||
height: 300rpx !important;
|
||||
border: 1px solid rgb(126, 126, 126, 0.2) !important;
|
||||
padding: 20rpx !important;
|
||||
}
|
||||
|
||||
.dialogBtnView {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-top: 1px solid rgb(126, 126, 126, 0.2);
|
||||
}
|
||||
|
||||
.dialogBtnView .rejectBtn,
|
||||
.dialogBtnView .successBtn {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.dialogBtnView .rejectBtn {
|
||||
border-right: 1px solid rgb(126, 126, 126, 0.2);
|
||||
color: red;
|
||||
}
|
||||
|
||||
.dialogBtnView .successBtn {
|
||||
color: #4e96f8;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user