mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 00:49:37 +08:00
20240827内容修改
完成以下修改: 首页消息提醒,点击直接到维修界面 我要报修上传图片后图片不展示 我要报修->故障描述输入框点击没反应 维修员在报修查询里面看到别人的报修记录 报修人姓名和联系电话移至故障类型上面 报修记录查询里,加入搜索和切换(我的数据、全部数据) 维修入口查看数据后提示红点消失 退回工单提示的tip显示错位 报修详情页,维修中时加入维修员姓名和电话 消息提示文字 消息通知批量清除 维修入口点击上方统计圆圈也可以切换tab 分享时的标题为null
This commit is contained in:
parent
2715a8b23c
commit
3c4e6da8ae
@ -145,6 +145,15 @@ export function repairRemindReadRq(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 清空消息列表
|
||||
export function repairRemindClearRq(data) {
|
||||
return request({
|
||||
url: `/app/repairRemind/clear`,
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 返回订单状态
|
||||
export function getStatusName(status) {
|
||||
// 状态:1 待派单,3 重新派单,5 已派单,7 处理中, 9已完成 待评价, 11 已关闭 13 已评价
|
||||
|
@ -2,10 +2,11 @@ const app = getApp()
|
||||
|
||||
import {
|
||||
repairRemindListRq,
|
||||
repairRemindReadRq
|
||||
repairRemindReadRq,
|
||||
repairRemindClearRq
|
||||
} from "../../../api/repair/repair.js"
|
||||
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
Page({
|
||||
|
||||
@ -85,15 +86,46 @@ Page({
|
||||
console.log('detail', e);
|
||||
let id = e.currentTarget.dataset.obj.id
|
||||
let repairId = e.currentTarget.dataset.obj.repairId
|
||||
let title = e.currentTarget.dataset.obj.content
|
||||
let url = `/pages/reportRepair/assign/detail/detail?id=${repairId}`
|
||||
if ((title.includes('你收到工单') && title.includes('请尽快处理')) || title.includes('已经超时,黄灯告警') || title.includes('已经严重超时,红灯告警')) {
|
||||
// 此处为维修单,要跳转到case
|
||||
url = `/pages/reportRepair/repair/case/case?id=${repairId}`
|
||||
}
|
||||
repairRemindReadRq({
|
||||
id
|
||||
}).then(res => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/detail/detail?id=${repairId}`,
|
||||
url: url,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
removeAll() {
|
||||
let _this = this
|
||||
// 确认
|
||||
Dialog.confirm({
|
||||
title: '请确认',
|
||||
message: '您即将清空消息列表,是否确认?',
|
||||
})
|
||||
.then(() => {
|
||||
repairRemindClearRq({}).then(res => {
|
||||
// 清空消息后,重新加载
|
||||
_this.setData({
|
||||
info: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dataList: [],
|
||||
isDataAll: false,
|
||||
}
|
||||
})
|
||||
// 重新加载
|
||||
_this.getDataList()
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@ -2,7 +2,8 @@
|
||||
"navigationBarTitleText": "消息通知",
|
||||
"usingComponents": {
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-icon": "@vant/weapp/icon/index"
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
},
|
||||
"onReachBottomDistance": 100
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
<view class="containerView public">
|
||||
|
||||
<view class="itemTitleView">
|
||||
<view class="title"></view>
|
||||
<view class="more" bind:tap="removeAll">清空</view>
|
||||
</view>
|
||||
<view class="infoView">
|
||||
<view class="itemView {{item.read != '1' ? 'activity' : ''}} " wx:for="{{info.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpInfoDetail">
|
||||
<view class="contentView ellipsisFont">
|
||||
@ -16,3 +19,4 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<van-dialog id="van-dialog" />
|
@ -4,6 +4,26 @@
|
||||
}
|
||||
|
||||
|
||||
.itemTitleView {
|
||||
/* border-left: 8rpx solid #76aef9; */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.itemTitleView .title {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #141414;
|
||||
}
|
||||
|
||||
|
||||
.itemTitleView .more {
|
||||
font-size: 28rpx;
|
||||
color: #5482de;
|
||||
}
|
||||
|
||||
.infoView {
|
||||
/* border: 1px solid red; */
|
||||
background: white;
|
||||
|
@ -252,6 +252,15 @@ Page({
|
||||
url: `/pages/reportRepair/assign/evaluate/evaluate?id=${_this.data.id}`,
|
||||
})
|
||||
},
|
||||
// 点击拨打电话联系
|
||||
makePhoneCall(e) {
|
||||
let _phone = e.currentTarget.dataset.phone
|
||||
if (_phone) {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: _phone
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
@ -303,7 +312,7 @@ Page({
|
||||
console.log('onShareAppMessage');
|
||||
let _this = this;
|
||||
let obj = _this.data.detail
|
||||
let title = `${obj.address + '/' + obj.floor}(${obj.room})${obj.repairName}`
|
||||
let title = `${obj.address + '/' + obj.floor}(${obj.room})${obj.typeName}`
|
||||
//
|
||||
let param = {
|
||||
title,
|
||||
|
@ -107,9 +107,9 @@
|
||||
<view class="repairProgressView">
|
||||
<view class="progressBar" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/repair/index/progressBar.png'}});"></view>
|
||||
<view class="label">处理中</view>
|
||||
<view class="label" >维修人:{{detail.repairUserName}} <view wx:if="{{detail.repairUserPhone}}" bind:tap="makePhoneCall" data-phone="{{detail.repairUserPhone}}">联系电话:{{detail.repairUserPhone}}</view></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="reportView" wx:if="{{detail.status == 9 || detail.status == 13}}">
|
||||
<view class="topTitle">维修反馈</view>
|
||||
<view class="selfLine"></view>
|
||||
|
@ -44,8 +44,8 @@ Page({
|
||||
let _this = this
|
||||
// 参数校验
|
||||
if (!_this.data.content) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
// app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
Notify('请输入描述信息');
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
<view class="submitBtn" bind:tap="submit">提交</view>
|
||||
|
||||
|
||||
</view>
|
||||
<!-- 在页面内添加对应的节点 -->
|
||||
<van-notify id="van-notify" />
|
||||
</view>
|
@ -45,7 +45,8 @@ Page({
|
||||
// 参数校验
|
||||
if (!_this.data.content) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
// app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
Notify('请输入描述信息');
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
|
@ -180,13 +180,16 @@ Page({
|
||||
if (isDataAll) {
|
||||
return;
|
||||
}
|
||||
let _role = _this.data.userData.dataType
|
||||
if (_role = 9) {
|
||||
_role = 3
|
||||
}
|
||||
// 传递参数
|
||||
let param = {
|
||||
pageNum,
|
||||
pageSize,
|
||||
menu: _this.data.userData.dataType, // 角色
|
||||
type,
|
||||
role: _this.data.userData.dataType,
|
||||
role: _role,
|
||||
}
|
||||
// 查询数据
|
||||
repairListRq(param).then(res => {
|
||||
|
@ -71,7 +71,7 @@ Page({
|
||||
let dataType = userDetail.dataType
|
||||
let menuList = _this.data.menuList
|
||||
// 角色类型 1.普通用户,3派单员,5维修工,7管理员 , 9楼层
|
||||
if (dataType == 3 || dataType == 7 || dataType == 9) { // 展示-派单入口
|
||||
if (dataType == 3 || dataType == 7) { // 展示-派单入口,仅有派单员、管理员能进
|
||||
menuList = menuList.map(item => {
|
||||
if (item.type == 'assign') {
|
||||
item.visible = true
|
||||
|
@ -4,16 +4,38 @@ import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
repairListRq,
|
||||
getQueryStatusName
|
||||
getQueryStatusName,
|
||||
deviceTypeListRq,
|
||||
selectAddressListRq
|
||||
} from "../../../../api/repair/repair.js"
|
||||
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
search: {
|
||||
type: '0',
|
||||
address: '0',
|
||||
isShowAll: '1',
|
||||
opType: [{
|
||||
text: '全部类型',
|
||||
value: '0'
|
||||
}],
|
||||
opAddress: [{
|
||||
text: '全部地点',
|
||||
value: '0'
|
||||
}],
|
||||
opIsShowAll: [{
|
||||
text: '全部范围',
|
||||
value: '1'
|
||||
}, {
|
||||
text: '本人报修',
|
||||
value: '0'
|
||||
}],
|
||||
},
|
||||
|
||||
// tabBar param
|
||||
tabBarParam: {
|
||||
selected: 0,
|
||||
@ -99,6 +121,75 @@ Page({
|
||||
console.log(_this.data.userData)
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
_this.queryDeviceType()
|
||||
_this.queryAddress()
|
||||
},
|
||||
// 查询设备类型
|
||||
queryDeviceType() {
|
||||
let _this = this
|
||||
deviceTypeListRq().then(res => {
|
||||
console.log('deviceTypeListRq', res);
|
||||
let _opType = _this.data.search.opType
|
||||
let list = res.rows.map(item => {
|
||||
return {
|
||||
value: item.id,
|
||||
text: item.name
|
||||
}
|
||||
})
|
||||
_opType = _opType.concat(list)
|
||||
_this.setData({
|
||||
['search.opType']: _opType
|
||||
})
|
||||
})
|
||||
},
|
||||
// 查询地点
|
||||
queryAddress() {
|
||||
let _this = this
|
||||
selectAddressListRq().then(res => {
|
||||
let _opAddress = _this.data.search.opAddress
|
||||
let list = res.rows.map(item => {
|
||||
return {
|
||||
value: item.id,
|
||||
text: item.name
|
||||
}
|
||||
})
|
||||
_opAddress = _opAddress.concat(list)
|
||||
_this.setData({
|
||||
['search.opAddress']: _opAddress
|
||||
})
|
||||
})
|
||||
},
|
||||
// 类型搜索变更方法
|
||||
typeChange(e) {
|
||||
// console.log('typeChange', e)
|
||||
let _this = this
|
||||
let _value = e.detail
|
||||
_this.setData({
|
||||
['search.type']: _value
|
||||
})
|
||||
// 直接重新查询
|
||||
_this.getAllData()
|
||||
},
|
||||
// 地点搜索变更方法
|
||||
addressChange(e) {
|
||||
// console.log('addressChange', e)
|
||||
let _this = this
|
||||
let _value = e.detail
|
||||
_this.setData({
|
||||
['search.address']: _value
|
||||
})
|
||||
// 直接重新查询
|
||||
_this.getAllData()
|
||||
},
|
||||
// 查询范围变更方法
|
||||
isShowAllChange(e) {
|
||||
let _this = this
|
||||
let _value = e.detail
|
||||
_this.setData({
|
||||
['search.isShowAll']: _value
|
||||
})
|
||||
// 直接重新查询
|
||||
_this.getAllData()
|
||||
},
|
||||
|
||||
// 切换tabbar
|
||||
@ -147,6 +238,13 @@ Page({
|
||||
let evaledOrder = _this.data.evaledOrder
|
||||
let invalidOrder = _this.data.invalidOrder
|
||||
|
||||
let searchType = _this.data.search.type
|
||||
let searchAddress = _this.data.search.address
|
||||
let searchIsShowAll = _this.data.search.isShowAll
|
||||
// 默认为空
|
||||
searchType = searchType == '0' ? '' : searchType
|
||||
searchAddress = searchAddress == '0' ? '' : searchAddress
|
||||
|
||||
if (tabTitle == '全部') {
|
||||
pageNum = allOrder.pageNum
|
||||
pageSize = allOrder.pageSize
|
||||
@ -189,13 +287,29 @@ Page({
|
||||
if (isDataAll) {
|
||||
return;
|
||||
}
|
||||
let _role = _this.data.userData.dataType
|
||||
if (_role == 5 || _role == 3) {
|
||||
// 维修人员、派单员,非管理人员,仅可查看自己的报修记录
|
||||
_role = 1
|
||||
}
|
||||
if (_role == 9 || _role == 7) {
|
||||
// 管理人员可以切换自己上报的或所有的
|
||||
if (searchIsShowAll == 0) {
|
||||
// 为0,则只显示自己上报的
|
||||
_role = 1
|
||||
}
|
||||
}
|
||||
// 传递参数
|
||||
let param = {
|
||||
pageNum,
|
||||
pageSize,
|
||||
menu: _this.data.userData.dataType, // 角色
|
||||
menu: _role, // 角色
|
||||
type,
|
||||
role: _this.data.userData.dataType, // 角色
|
||||
role: _role, // 角色
|
||||
repair: {
|
||||
typeId: searchType, // 类型筛选
|
||||
addressId: searchAddress, // 地点筛选
|
||||
}
|
||||
}
|
||||
// 查询数据
|
||||
repairListRq(param).then(res => {
|
||||
@ -281,18 +395,8 @@ Page({
|
||||
url: `/pages/reportRepair/assign/evaluate/evaluate?id=${obj.id}&back=1`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 获取所有数据方法
|
||||
getAllData() {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
// 全部
|
||||
@ -344,6 +448,20 @@ Page({
|
||||
_this.getDataList('无效单')
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.getAllData()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
@ -384,7 +502,7 @@ Page({
|
||||
console.log('onShareAppMessage', e);
|
||||
let _this = this;
|
||||
let obj = e.target.dataset.obj
|
||||
let title = `${obj.address + '/' + obj.floor}(${obj.room})${obj.repairName}`
|
||||
let title = `${obj.address + '/' + obj.floor}(${obj.room})${obj.typeName}`
|
||||
//
|
||||
let param = {
|
||||
title,
|
||||
|
@ -5,7 +5,9 @@
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index"
|
||||
},
|
||||
"onReachBottomDistance": 100
|
||||
}
|
@ -1,4 +1,9 @@
|
||||
<view class="containerView public">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item value="{{ search.type }}" options="{{ search.opType }}" bind:change="typeChange"/>
|
||||
<van-dropdown-item value="{{ search.address }}" options="{{ search.opAddress }}" bind:change="addressChange" />
|
||||
<van-dropdown-item wx:if="{{ userData.dataType == 7 || userData.dataType == 9}}" value="{{ search.isShowAll }}" options="{{ search.opIsShowAll }}" bind:change="isShowAllChange" />
|
||||
</van-dropdown-menu>
|
||||
<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="{{allOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
||||
|
@ -1,7 +1,6 @@
|
||||
const app = getApp()
|
||||
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMDHMS,
|
||||
@ -144,7 +143,7 @@ Page({
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
app.vantNotifySuccess(Notify, '工单已接收')
|
||||
_this.getDetail(_this.data.id)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
|
@ -6,7 +6,6 @@
|
||||
"van-uploader": "@vant/weapp/uploader/index",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
}
|
||||
}
|
@ -140,6 +140,5 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 消息通知 -->
|
||||
<van-notify id="van-notify" />
|
@ -107,7 +107,7 @@ Page({
|
||||
console.log('tabClickSwitch', e);
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
tabTitle: e.target.dataset.type
|
||||
tabTitle: e.currentTarget.dataset.type
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -12,19 +12,19 @@
|
||||
<view class="menuView">
|
||||
<view class="title">工单管理</view>
|
||||
<view class="itemListView">
|
||||
<view class="itemView">
|
||||
<view class="itemView" bind:tap="tabClickSwitch" data-type="wait">
|
||||
<view class="circle1 blueColor">
|
||||
<view class="circle2 blueCenterColor">{{workerNumber.wait}}</view>
|
||||
</view>
|
||||
<view class="name">待完成</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="itemView" bind:tap="tabClickSwitch" data-type="working">
|
||||
<view class="circle1 cyanColor">
|
||||
<view class="circle2 cyanCenterColor">{{workerNumber.working}}</view>
|
||||
</view>
|
||||
<view class="name">进行中</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="itemView" bind:tap="tabClickSwitch" data-type="close">
|
||||
<view class="circle1 greenColor">
|
||||
<view class="circle2 greenCenterColor">{{workerNumber.close}}</view>
|
||||
</view>
|
||||
@ -43,7 +43,6 @@
|
||||
<view class="caseView" wx:for="{{waitOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpCase">
|
||||
<view class="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{waitOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
@ -54,7 +53,6 @@
|
||||
<view class="caseView" wx:for="{{workOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpCase">
|
||||
<view class="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{workOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
@ -65,7 +63,6 @@
|
||||
<view class="caseView" wx:for="{{closeOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpCase">
|
||||
<view class="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{closeOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
|
Loading…
x
Reference in New Issue
Block a user