This commit is contained in:
SelfRidicule 2024-07-30 16:33:21 +08:00
parent 57c4e421d2
commit 524f9e6e70
24 changed files with 1556 additions and 5 deletions

View File

@ -1,6 +1,6 @@
App({ App({
// 上海长阳-配置信息 // 配置信息
APPID: 'wx08bf0d440e446e7c', APPID: 'wx5582a07c1fbbcf06',
APPSECRET: 'e0ef2bac28df376d8855d04ee8828d73', APPSECRET: 'e0ef2bac28df376d8855d04ee8828d73',
tenantId : '12', // 地区 tenantId : '12', // 地区
parkId : '26', // 园区id parkId : '26', // 园区id

View File

@ -77,7 +77,12 @@
"pages/reportRepair/report/report", "pages/reportRepair/report/report",
"pages/reportRepair/query/record/record", "pages/reportRepair/query/record/record",
"pages/reportRepair/query/detail/detail", "pages/reportRepair/query/detail/detail",
"pages/reportRepair/query/evaluate/evaluate" "pages/reportRepair/query/evaluate/evaluate",
"pages/reportRepair/assign/record/record",
"pages/reportRepair/assign/detail/detail",
"pages/reportRepair/assign/feedback/feedback",
"pages/reportRepair/assign/affirm/affirm",
"pages/reportRepair/assign/personList/personList"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

View File

@ -0,0 +1,105 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
timeShow : true,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
back(){
wx.navigateBack()
},
// 提交反馈
jumpFeedback(){
wx.navigateTo({
url: '/pages/reportRepair/assign/feedback/feedback',
})
},
// 无效
invalid(){
wx.navigateBack()
},
// 跳转人员列表
jumpPersonList(){
wx.navigateTo({
url: '/pages/reportRepair/assign/personList/personList',
})
},
// 显示时间
showTime(){
this.setData({
timeShow : true,
})
},
// 关闭时间
closeTime(){
this.setData({
timeShow : false,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,8 @@
{
"navigationStyle": "custom",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-action-sheet": "@vant/weapp/action-sheet/index"
}
}

View File

@ -0,0 +1,44 @@
<view class="containerView public">
<view class="topHead">
<view class="navigatorView">
<view class="backView" bind:tap="back">
<van-icon name="arrow-left" color="#ffffff" size="30rpx" />
<view class="label">返回</view>
</view>
<view class="title">确认损坏</view>
</view>
<view class="contentView">
<view class="label1">派单处理</view>
</view>
</view>
<view class="mainView">
<view class="statusView">
<view class="label">YG123081273812</view>
<view class="time">空调</view>
<view class="tag">待派单</view>
</view>
<view class="reportView">
<view class="topTitle">派单</view>
<view class="selfLine"></view>
<view class="itemView" bind:tap="jumpPersonList">
<view class="label">请选择维修人员</view>
<van-icon name="arrow" size="36rpx" color="gray" />
</view>
<view class="itemView" bind:tap="showTime">
<view class="label">请选择预计完成时间</view>
<van-icon name="arrow" size="36rpx" color="gray" />
</view>
</view>
</view>
<van-action-sheet show="{{ timeShow }}" bind:close="closeTime" close-on-click-overlay>
<van-datetime-picker type="datetime" value="{{ currentDate }}" min-date="{{ minDate }}" bind:input="onInput" />
</van-action-sheet>
<view class="submitBtn">提交</view>
</view>

View File

@ -0,0 +1,151 @@
.containerView.public {
background: none;
padding-bottom: 0;
}
.elHidden {
visibility: hidden;
}
.selfLine {
height: 2rpx;
background: rgb(126, 126, 126, 0.2);
}
.topHead {
position: relative;
height: 400rpx;
background: #2b2d3d;
}
.topHead .navigatorView {
position: absolute;
left: 0;
top: 120rpx;
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
}
.topHead .navigatorView .backView {
display: flex;
justify-content: flex-start;
align-items: center;
}
.topHead .navigatorView .backView .label {
color: white;
font-size: 28rpx;
line-height: 1;
margin-left: 8rpx;
}
.topHead .navigatorView .title {
position: absolute;
top: 14rpx;
left: 50%;
transform: translateX(-50%);
font-size: 32rpx;
color: #FFFFFF;
line-height: 1rpx;
}
.topHead .contentView {
position: absolute;
left: 30rpx;
bottom: 100rpx;
}
.topHead .contentView .label1 {
font-size: 28rpx;
color: white;
line-height: 1;
}
.topHead .contentView .label2 {
font-size: 24rpx;
color: white;
line-height: 1;
margin-top: 20rpx;
}
.mainView {
position: relative;
box-sizing: border-box;
margin: -20rpx 20rpx 20rpx;
z-index: 9;
}
.mainView .statusView {
box-sizing: border-box;
position: relative;
padding: 40rpx 30rpx;
background: white;
border-radius: 8rpx;
line-height: 1;
}
.mainView .statusView .label {
font-size: 28rpx;
font-weight: bold;
}
.mainView .statusView .tag {
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
background: #ee6f21;
color: white;
padding: 10rpx 20rpx;
border-radius: 6rpx;
font-size: 22rpx;
}
.mainView .statusView .time {
margin-top: 20rpx;
}
.mainView .statusView .leftImg {
position: absolute;
top: 26rpx;
left: 20rpx;
width: 60rpx;
height: 60rpx;
border-radius: 8rpx;
}
.mainView .reportView {
margin-top: 20rpx;
padding-bottom: 60rpx;
border-radius: 8rpx;
background: white;
min-height: 1000rpx;
}
.mainView .reportView .topTitle {
padding: 30rpx;
font-size: 28rpx;
font-weight: bold;
}
.mainView .reportView .itemView {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 30rpx;
padding: 30rpx 0;
border-bottom: 2rpx solid rgb(126, 126, 126, 0.2);
}
.mainView .reportView .itemView .label {
flex-shrink: 0;
font-size: 30rpx;
color: gray;
}

View File

@ -0,0 +1,92 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
back(){
wx.navigateBack()
},
// 确认损坏
jumpAffirm(){
wx.navigateTo({
url: '/pages/reportRepair/assign/affirm/affirm',
})
},
// 提交反馈
jumpFeedback(){
wx.navigateTo({
url: '/pages/reportRepair/assign/feedback/feedback',
})
},
// 无效
invalid(){
wx.navigateBack()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"navigationStyle": "custom",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}

View File

@ -0,0 +1,63 @@
<view class="containerView public">
<view class="topHead">
<view class="navigatorView">
<view class="backView" bind:tap="back">
<van-icon name="arrow-left" color="#ffffff" size="30rpx"/>
<view class="label">返回</view>
</view>
<view class="title">详情</view>
</view>
<view class="contentView">
<view class="label1">派单处理</view>
</view>
</view>
<view class="mainView">
<view class="statusView">
<view class="label">YG123081273812</view>
<view class="time">空调</view>
<view class="tag">待审核</view>
</view>
<view class="reportView">
<view class="topTitle">报修信息</view>
<view class="selfLine"></view>
<view class="itemView">
<view class="label">设备名称</view>
<view class="content">320828282828320828282828320828282828320828282828v</view>
</view>
<view class="itemView">
<view class="label">设备地址</view>
<view class="content">302会议室</view>
</view>
<view class="itemView">
<view class="label">维修描述</view>
<view class="content">电脑蓝屏</view>
</view>
<view class="itemView">
<view class="label">损坏凭证</view>
<view class="content">
<view wx:for="{{10}}" class="imgView" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/index/banner/1.jpg'}});"></view>
</view>
</view>
<view class="itemView">
<view class="label">报修人</view>
<view class="content">13652025563</view>
</view>
<view class="itemView">
<view class="label">报修时间</view>
<view class="content">2024-06-10 23:59:59</view>
</view>
</view>
</view>
<view class="bottomFixView">
<view class="btn red" bind:tap="invalid">无效申请</view>
<view class="btn" bind:tap="jumpAffirm">确认损坏</view>
<view class="btn" bind:tap="jumpFeedback">提交反馈</view>
</view>
</view>

View File

@ -0,0 +1,194 @@
.containerView.public {
background: none;
}
.elHidden {
visibility: hidden;
}
.selfLine {
height: 2rpx;
background: rgb(126, 126, 126, 0.2);
}
.topHead {
position: relative;
height: 400rpx;
background: #2b2d3d;
}
.topHead .navigatorView {
position: absolute;
left: 0;
top: 120rpx;
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
}
.topHead .navigatorView .backView {
display: flex;
justify-content: flex-start;
align-items: center;
}
.topHead .navigatorView .backView .label {
color: white;
font-size: 28rpx;
line-height: 1;
margin-left: 8rpx;
}
.topHead .navigatorView .title {
position: absolute;
top: 14rpx;
left: 50%;
transform: translateX(-50%);
font-size: 32rpx;
color: #FFFFFF;
line-height: 1rpx;
}
.topHead .contentView {
position: absolute;
left: 30rpx;
bottom: 100rpx;
}
.topHead .contentView .label1 {
font-size: 28rpx;
color: white;
line-height: 1;
}
.topHead .contentView .label2 {
font-size: 24rpx;
color: white;
line-height: 1;
margin-top: 20rpx;
}
.mainView {
position: relative;
box-sizing: border-box;
margin: -20rpx 20rpx 20rpx;
z-index: 999;
}
.mainView .statusView {
box-sizing: border-box;
position: relative;
padding: 40rpx 30rpx;
background: white;
border-radius: 8rpx;
line-height: 1;
}
.mainView .statusView .label {
font-size: 28rpx;
font-weight: bold;
}
.mainView .statusView .tag {
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
background: #ee6f21;
color: white;
padding: 10rpx 20rpx;
border-radius: 6rpx;
font-size: 22rpx;
}
.mainView .statusView .time {
margin-top: 20rpx;
}
.mainView .statusView .leftImg {
position: absolute;
top: 26rpx;
left: 20rpx;
width: 60rpx;
height: 60rpx;
border-radius: 8rpx;
}
.mainView .reportView {
margin-top: 20rpx;
padding-bottom: 60rpx;
border-radius: 8rpx;
background: white;
}
.mainView .reportView .topTitle {
padding: 30rpx;
font-size: 28rpx;
font-weight: bold;
}
.mainView .reportView .itemView {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-top: 30rpx;
padding: 0 30rpx;
}
.mainView .reportView .itemView .label {
flex-shrink: 0;
width: 200rpx;
font-size: 30rpx;
color: gray;
}
.mainView .reportView .itemView .content {
font-size: 30rpx;
word-break: break-all;
}
.mainView .reportView .itemView .content .imgView {
width: 100rpx;
height: 100rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
display: inline-block;
vertical-align: middle;
}
.bottomFixView {
position: fixed;
z-index: 999;
left: 0;
bottom: 0;
height: 140rpx;
width: 100vw;
border-top: 1rpx solid rgb(126, 126, 126, 0.2);
background: white;
display: flex;
justify-content: flex-end;
align-items: center;
}
.bottomFixView .btn {
box-sizing: border-box;
border-radius: 6rpx;
margin-right: 30rpx;
padding: 12rpx 24rpx;
background: #579ff8;
font-size: 26rpx;
color: white;
}
.bottomFixView .btn.red {
background: #ee6f21;
}

View File

@ -0,0 +1,66 @@
// pages/reportRepair/reportEvaluate/evaluate.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,8 @@
{
"navigationBarTitleText": "提交反馈",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-field": "@vant/weapp/field/index",
"van-uploader": "@vant/weapp/uploader/index"
}
}

View File

@ -0,0 +1,14 @@
<view class="containerView public">
<view class="regionView">
<view class="topTitle">提交反馈</view>
<van-field model:value="{{ value }}" type="textarea" placeholder="请输入用户名" maxlength="{{100}}" show-word-limit border="{{false}}" autosize input-class="selfTextarea" />
<!-- 上传图片 -->
<view class="uploadImgView">
<van-uploader file-list="{{ fileList }}" upload-text="点击上传照片" use-before-read bind:before-read="beforeRead" bind:after-read="afterRead" deletable="{{ true }}" bind:delete="deleteImg" max-count="1" />
</view>
</view>
<view class="submitBtn">提交</view>
</view>

View File

@ -0,0 +1,44 @@
.containerView.public {
background: none;
}
.regionView {
margin-top: 2rpx;
padding: 30rpx 40rpx 40rpx;
background: white;
}
.regionView .topTitle {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.regionView .itemView {
display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 20rpx;
}
.regionView .itemView .label {
margin: 0 60rpx 0 20rpx;
font-size: 28rpx;
color: gray;
}
.regionView .itemView .star {
margin-right: 10rpx;
}
.selfTextarea{
min-height: 200rpx !important;
max-height: 200rpx !important;
}
.uploadImgView {
border: 1rpx dashed #c9c9c9;
margin-top: 10rpx;
padding: 10rpx 40rpx;
background-color: #ffffff;
}

View File

@ -0,0 +1,181 @@
import {
visitorListRq,
visitorSelectUserByCustomerRq,
} from "../../../../api/meeting/visitorIinvitation.js"
Page({
data: {
title: '',
id: null,
/** 索引栏*/
indexList: [],
/** 数据*/
dataList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this;
_this.setData({
...options
})
// 获取所有的企业
_this.getVisitorList()
},
// 获取所有的企业
getVisitorList() {
let _this = this;
visitorListRq().then(res => {
console.log('getVisitorList', res);
let filterDataList = res.rows.map(item => {
return {
label: item.name,
otherData: JSON.stringify({
id: item.id,
name: item.name,
})
}
})
// 赋值并且格式化数据
_this.setAndFormatData(filterDataList)
})
},
// 格式化数据
setAndFormatData(transferList) {
let _this = this;
// 索引列
let indexList = _this.getFirstCharacterList(transferList)
// 对应每个索引的数据列表
let dataList = indexList.map(item => {
let title = item;
let collectList = [];
for (let i = 0; i < transferList.length; i++) {
let transferData = transferList[i];
if (title == transferData.label.substring(0, 1)) {
collectList.push(transferData)
}
}
return {
title,
list: collectList
}
})
_this.setData({
indexList,
dataList
})
},
// 获取第一个字符数组,不重复
getFirstCharacterList(list) {
let firstNameList = list.map(item => {
return {
name: item.label.substring(0, 1),
exist: false
}
});
for (let i = 0; i < firstNameList.length; i++) {
for (let j = i + 1; j < firstNameList.length; j++) {
// 已重复的数据直接跳过
if (firstNameList[j].exist) {
continue;
}
// 数据重复
if (firstNameList[i].name == firstNameList[j].name) {
firstNameList[j].exist = true;
}
}
}
return firstNameList.filter(item => !item.exist).map(item => item.name)
},
// 选择
selectClick(e) {
console.log('selectClick', e);
let _this = this;
// 获取点击行数据
let label = e.currentTarget.dataset.label
let otherdata = JSON.parse(e.currentTarget.dataset.otherdata)
//
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
// 上个页面数据
let detail = prevPage.data.detail;
// 更新上个页面对应的数据
if (_this.data.title == '单位') {
detail.customerId = otherdata.id //企业id
detail.customerName = otherdata.name //企业名称
detail.userId = null //被访人id
detail.username = null //被访人姓名
detail.mobile = null //被访人手机号
}
if (_this.data.title == '人员') {
detail.userId = otherdata.id //被访人id
detail.username = otherdata.username //被访人姓名
detail.mobile = otherdata.mobile //被访人手机号
}
// 赋值上个页面的数据
prevPage.setData({
detail
})
// 后退页面
wx.navigateBack();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "人员列表",
"usingComponents": {
"van-cell": "@vant/weapp/cell/index",
"van-index-bar": "@vant/weapp/index-bar/index",
"van-index-anchor": "@vant/weapp/index-anchor/index",
"van-divider": "@vant/weapp/divider/index"
}
}

View File

@ -0,0 +1,8 @@
<van-index-bar index-list="{{ indexList }}" highlight-color="#4e96f8">
<view wx:for="{{dataList}}" wx:key="*this" wx:for-item="indexData">
<van-index-anchor index="{{indexData.title}}"></van-index-anchor>
<van-cell title="{{data.label}}" wx:for="{{indexData.list}}" wx:key="*this" wx:for-item="data" data-label="{{data.label}}" data-otherData="{{data.otherData}}" bind:tap="selectClick" clickable />
</view>
</van-index-bar>
<van-divider wx:if="{{indexList.length == 0}}" contentPosition="center" customStyle="font-size: 28rpx; margin-top:120rpx;">暂无数据</van-divider>

View File

@ -0,0 +1,425 @@
const app = getApp()
import Dialog from '@vant/weapp/dialog/dialog';
import Notify from '@vant/weapp/notify/notify';
import {
selfFormatTimeYMD,
selfFormatTimeHM
} from "../../../../utils/util.js"
import {
selectReservationListByUserIdRq,
selectVisitorInvitationRecordRq,
cancelOrderRq
} from "../../../../api/meeting/meetingRoom.js"
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
userData: null,
dataChange: false,
tabTitle: '预约记录',
// 预约记录参数
reservationPageNum: 1,
reservationPageSize: 10,
reservationDataList: [],
reservationIsDataAll: false,
// 参与记录参数
participatePageNum: 1,
participatePageSize: 10,
participateDataList: [],
participateIsDataAll: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this;
_this.setData({
userData: wx.getStorageSync('user'),
})
// 获取数据
let userId = _this.data.userData.id
// 获取预约数据
_this.getReservationData({
userId,
pageNum: _this.data.reservationPageNum,
pageSize: _this.data.reservationPageSize,
})
// 获取参与数据
_this.getParticipateData({
userId,
pageNum: _this.data.participatePageNum,
pageSize: _this.data.participatePageSize
})
},
// 获取数据
getDataList() {
// 获取参数
let _this = this;
let tabTitle = _this.data.tabTitle
let userId = _this.data.userData.id
let isDataAll = null
let pageNum = null
let pageSize = null
if (tabTitle == '预约记录') {
// 预约记录参数
isDataAll = _this.data.reservationIsDataAll
pageNum = _this.data.reservationPageNum
pageSize = _this.data.reservationPageSize
} else if (tabTitle == '预约记录') {
// 参与记录参数
isDataAll = _this.data.participateIsDataAll
pageNum = _this.data.participatePageNum
pageSize = _this.data.participatePageSize
} else {
wx.showToast({
title: `tab 切换错误(${tabTitle})`,
icon: 'none',
});
return;
}
// 判断数据是否已全部加载
if (isDataAll) {
return;
}
// 传递参数
let param = {
userId,
pageNum,
pageSize
}
if (tabTitle == '预约记录') {
// 获取预约数据
_this.getReservationData(param)
} else if (tabTitle == '预约记录') {
// 获取参与数据
_this.getParticipateData(param)
}
},
// 获取预约数据
getReservationData(param) {
let _this = this;
let {
pageNum,
pageSize,
userId
} = param
// 查询数据
selectReservationListByUserIdRq({
pageNum,
pageSize,
userId
}).then(res => {
console.log('selectReservationListByUserIdRq', res);
// 判断数据是否全部查询
let queryDataList = res.page.records;
if (queryDataList && queryDataList.length > 0) {
// 更新参数
let reservationDataList = _this.data.reservationDataList.concat(_this.formartData(queryDataList));
let reservationPageNum = _this.data.reservationPageNum + 1;
_this.setData({
reservationPageNum,
reservationDataList,
})
} else {
_this.setData({
reservationIsDataAll: true
})
}
})
},
// 获取参与数据
getParticipateData(param) {
let _this = this;
let {
pageNum,
pageSize,
userId
} = param
// 查询数据
selectVisitorInvitationRecordRq({
pageNum,
pageSize,
userId
}).then(res => {
console.log('selectVisitorInvitationRecordRq', res);
// 判断数据是否全部查询
let queryDataList = res.page.records;
if (queryDataList && queryDataList.length > 0) {
// 更新参数
let participateDataList = _this.data.participateDataList.concat(_this.formartData(queryDataList));
let participatePageNum = _this.data.participatePageNum + 1;
_this.setData({
participatePageNum,
participateDataList,
})
} else {
_this.setData({
participateIsDataAll: true
})
}
})
},
// 格式化数据
formartData(queryDataList) {
// 格式化数据
return queryDataList.map(item => {
item.timeSlot = selfFormatTimeYMD(item.startTime) + ' ' + selfFormatTimeHM(item.startTime) + '~' + selfFormatTimeHM(item.endDate);
// 状态字体颜色
let statusColor = "#FFB119";
// 按钮是否显示
let statusValue = item.statusValue;
let showPay = false;
let showInvite = false;
let showCancel = false;
let showDetail = false;
// 待支付 0 :去支付、取消订单、查看详情
if (statusValue == 0) {
showPay = true;
showCancel = true;
showDetail = true;
// 状态字体颜色
statusColor = "#FFB119";
}
// 待使用 1去邀请、取消订单、查看详情
if (statusValue == 1) {
showInvite = true;
showCancel = true;
showDetail = true;
// 状态字体颜色
statusColor = "#3794FF";
// 待使用 修改为 预约成功
item.statusName = '预约成功'
}
// 进行中 2去邀请、查看详情
if (statusValue == 2) {
showInvite = true;
showDetail = true;
// 状态字体颜色
statusColor = "#FF4040";
}
// 已结束 3查看详情
if (statusValue == 3) {
showDetail = true;
// 状态字体颜色
statusColor = "#333333";
}
// 已取消 4查看详情
if (statusValue == 4) {
showDetail = true;
// 状态字体颜色
statusColor = "#7F7F7F";
}
//
// 赋值
item.showPay = showPay;
item.showInvite = showInvite;
item.showCancel = showCancel;
item.showDetail = showDetail;
// 状态字体颜色
item.statusColor = statusColor;
// 图片
if (item.roomContent.indoorPicUrl) {
try {
item.roomContent.indoorPicUrlFirst = JSON.parse(item.roomContent.indoorPicUrl)[0].url
} catch (error) {
console.log(`JSON error : ${error}`);
}
}
return item;
})
},
// 跳转-支付
jumpPay(e) {
console.log('jumpPay', e);
wx.navigateTo({
url: "/pages/meeting/pay/waitPay/waitPay?id=" + e.currentTarget.dataset.id + "&type=meetingRoom"
})
},
// 跳转-预约详情
jumpMeetingDetail(e) {
console.log('jumpMeetingDetail', e);
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: "/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail?id=" + id,
})
},
// 跳转-参与详情
jumpParticipateDetail(e) {
console.log('jumpParticipateDetail', e);
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: "/pages/meeting/invite/invite?id=" + id,
})
},
// tab 点击切换
tabClickSwitch(event) {
console.log('tabClickSwitch', event);
let _this = this;
_this.setData({
tabTitle: event.detail.title
})
},
// 取消订单
cancelOrder(e) {
console.log('cancelOrder', e);
let _this = this;
let id = e.currentTarget.dataset.id
const beforeClose = (action) => {
console.log('action', action);
return new Promise((resolve) => {
if (action === 'confirm') {
cancelOrderRq({
id,
cancelResaon: ""
}).then(res => {
console.log('cancelOrderRq', res);
if (res.code == 0) {
// 刷新预约数据
_this.setData({
reservationPageNum: 1,
reservationDataList: [],
reservationIsDataAll: false,
})
_this.getDataList()
} else {
// 危险通知
Notify({
type: 'danger',
message: res.msg
});
}
resolve(true);
})
} else {
// 拦截取消操作
resolve(true);
}
});
}
Dialog.confirm({
title: '提示',
message: '是否取消预约!',
beforeClose,
});
},
jumpDetail(){
wx.navigateTo({
url: '/pages/reportRepair/assign/detail/detail',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let _this = this;
// 数据是否变化
if (_this.data.dataChange) {
// 刷新数据
_this.setData({
dataChange: false,
// 预约记录参数
reservationPageNum: 1,
reservationDataList: [],
reservationIsDataAll: false,
// 参与记录参数
participatePageNum: 1,
participateDataList: [],
participateIsDataAll: false,
})
// 获取数据
let userId = _this.data.userData.id
// 获取预约数据
_this.getReservationData({
userId,
pageNum: _this.data.reservationPageNum,
pageSize: _this.data.reservationPageSize,
})
// 获取参与数据
_this.getParticipateData({
userId,
pageNum: _this.data.participatePageNum,
pageSize: _this.data.participatePageSize
})
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
console.log('onPullDownRefresh', '页面相关事件处理函数--监听用户下拉动作');
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
console.log('onReachBottom', '页面上拉触底事件的处理函数');
let _this = this;
// 获取数据
_this.getDataList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage(e) {
console.log('onShareAppMessage', e);
let _this = this;
let id = e.target.dataset.id;
let detail = _this.data.reservationDataList.find(item => item.id == id)
//
let param = {
title: detail.title,
path: "/pages/meeting/invite/invite?id=" + id,
imageUrl: app.IMG_NAME + detail.roomContent.indoorPicUrlFirst,
}
console.log('onShareAppMessage', param);
return param;
}
})

View File

@ -0,0 +1,11 @@
{
"navigationBarTitleText": "派单中心",
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-divider": "@vant/weapp/divider/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-notify": "@vant/weapp/notify/index"
},
"onReachBottomDistance": 100
}

View File

@ -0,0 +1,42 @@
<view class="containerView public">
<van-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
<van-tab title="全部">
<view class="itemView" wx:for="{{3}}" wx:for-item="item" wx:key="*this" bind:tap="jumpDetail">
<view class="topTitle">编号: T123123123</view>
<view class="selfLine"></view>
<view class="centerView">
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/index/banner/1.jpg'}});"></view>
<view class="rightView">
<view class="labelName ellipsisFont">空调损坏</view>
<view class="labelContent1 ellipsisFont">设备名称: 空调</view>
<view class="labelContent2 ellipsisFont">设备地址: 301南楼</view>
</view>
</view>
<view class="selfLine"></view>
<view class="bottomView">
<view class="name">王军18300011120</view>
<view class="time">2024-01-01 12:12:00</view>
</view>
</view>
<view class="loadAllLine" wx:if="{{reservationIsDataAll}}">
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
</view>
</van-tab>
<van-tab title="处理中">
</van-tab>
<van-tab title="待评价">
</van-tab>
<van-tab title="已评价">
</van-tab>
</van-tabs>
<!-- 提示框 -->
<van-dialog id="van-dialog" />
<!-- 提示框 -->
<van-notify id="van-notify" />
</view>

View File

@ -0,0 +1,75 @@
.containerView.public {
background: none;
height: auto;
}
.itemView {
background: white;
margin: 20rpx 20rpx;
border-radius: 8rpx;
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px 0.5px inset;
box-sizing: border-box;
}
.itemView .topTitle {
padding: 20rpx 20rpx;
font-size: 26rpx;
color: gray;
}
.itemView .centerView {
display: flex;
justify-content: flex-start;
align-items: center;
padding: 20rpx;
}
.itemView .centerView .showImg {
width: 140rpx;
height: 140rpx;
border-radius: 8rpx;
flex-shrink: 0;
}
.itemView .centerView .rightView {
margin-left: 40rpx;
flex: 1;
overflow: hidden;
}
.itemView .centerView .rightView .labelName {
line-height: 1;
font-size: 28rpx;
font-weight: bold;
}
.itemView .centerView .rightView .labelContent1 {
line-height: 1;
margin-top: 30rpx;
font-size: 24rpx;
color: gray;
}
.itemView .centerView .rightView .labelContent2 {
line-height: 1;
margin-top: 10rpx;
font-size: 24rpx;
color: gray;
}
.itemView .bottomLine {
height: 2rpx;
background: rgb(126, 126, 126, 0.2);
margin: 30rpx 0;
}
.bottomView {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 60rpx 20rpx 40rpx;
}
.loadAllLine {
margin-top: 80rpx;
}

View File

@ -22,7 +22,7 @@ Page({
}, { }, {
name: "派单入口", name: "派单入口",
img: "/profile/static/index/menu-bxfw.png", img: "/profile/static/index/menu-bxfw.png",
// path: "/pages/reportRepair/reportRepair" path: "/pages/reportRepair/assign/record/record"
}] }]
}, },

View File

@ -52,7 +52,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "3.4.0", "libVersion": "3.4.0",
"appid": "wx08bf0d440e446e7c", "appid": "wx5582a07c1fbbcf06",
"projectname": "SmartPark", "projectname": "SmartPark",
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},