mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 00:49:37 +08:00
20240825代码提交
windows下部分内容与mac不一致,全量提交; 功能改动: - 去掉“我的报修”页面的“报修名称”、“故障等级”、“故障时间”三个字段 - 派单员页面添加“故障等级”字段,故障等级由派单员选择设置 - “我的报修”页面,“门牌号”修改为“门牌号(地点)” - 维修人员不允许评价 - 首页加入请求“我的报修”,可以直接点击进入 - 去掉语音输入,必填描述 - 派单列表页调整 - 维修人员退回工单需要必填理由
This commit is contained in:
parent
bc141d776c
commit
b4417bee7b
@ -3,289 +3,305 @@ const app = getApp()
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
callScanUrl
|
||||
callScanUrl
|
||||
} from "../../api/common/scan.js"
|
||||
|
||||
import {
|
||||
userProfile,
|
||||
getUserInfoRq
|
||||
userProfile,
|
||||
getUserInfoRq
|
||||
} from "../../api/user/user.js"
|
||||
|
||||
import {
|
||||
getParkRq
|
||||
getParkRq
|
||||
} from "../../api/index/index.js"
|
||||
|
||||
import {
|
||||
repairRemindLatestListRq,
|
||||
repairRemindReadRq
|
||||
repairRemindLatestListRq,
|
||||
repairRemindReadRq
|
||||
} from "../../api/repair/repair.js"
|
||||
|
||||
import {
|
||||
getUrlParamsObj
|
||||
getUrlParamsObj
|
||||
} from "../../utils/util.js"
|
||||
|
||||
Page({
|
||||
data: {
|
||||
// tabBar param
|
||||
tabBarParam: {
|
||||
selected: 0,
|
||||
color: "#515151",
|
||||
selectedColor: "#217CFF",
|
||||
backgroundColor: "#ffffff",
|
||||
},
|
||||
// tabBar menu
|
||||
tabBarList: [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"iconPath": "/images/tabbar/home.png",
|
||||
"selectedIconPath": "/images/tabbar/home-select.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/reportRepair/report/report",
|
||||
"iconPath": "/images/tabbar/center.png",
|
||||
"selectedIconPath": "/images/tabbar/center.png",
|
||||
"text": "报修",
|
||||
"bulge": true,
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/my",
|
||||
"iconPath": "/images/tabbar/my.png",
|
||||
"selectedIconPath": "/images/tabbar/my-select.png",
|
||||
"text": "我的"
|
||||
},
|
||||
],
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
menuList: [
|
||||
// {
|
||||
// name: "创业活动",
|
||||
// img: "/images/hicon/chuangyehuodong.png",
|
||||
// path: "/pages/community/community"
|
||||
// },
|
||||
// {
|
||||
// name: "政策信息",
|
||||
// img: "/images/hicon/zhengcexinxi.png",
|
||||
// path: "/pages/notice/notice"
|
||||
// },
|
||||
// {
|
||||
// name: "党建园地",
|
||||
// img: "/images/hicon/zhaozhengce.png",
|
||||
// path: "/pages/party/party"
|
||||
// },
|
||||
// {
|
||||
// name: "租办公室",
|
||||
// img: "/images/hicon/zubangongshi.png",
|
||||
// path: "/pages/office/office"
|
||||
// },
|
||||
// {
|
||||
// name: "项目入孵",
|
||||
// img: "/images/hicon/xiangmurufu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "企业入驻",
|
||||
// img: "/images/hicon/qiyeruzhu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "厂房申请",
|
||||
// img: "/images/hicon/qianrushenqing.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "园区建议",
|
||||
// img: "/images/hicon/yuanqujianyi.png",
|
||||
// path: "/pages/complaint/complaint"
|
||||
// },
|
||||
// {
|
||||
// name: "商业计划书",
|
||||
// img: "/images/hicon/wenjuandiaocha.png",
|
||||
// path: "/pages/outer/outer"
|
||||
// },
|
||||
/*
|
||||
{
|
||||
name: "园区报修",
|
||||
img: "/images/hicon/zhaozhuanli.png",
|
||||
path: "/pages/parkRepair/parkRepair"
|
||||
},
|
||||
*/
|
||||
{
|
||||
name: "随手拍",
|
||||
img: "/profile/static/index/menu-bxfw.png",
|
||||
path: "/pages/reportRepair/index/index"
|
||||
},
|
||||
{
|
||||
name: "会议预约",
|
||||
img: "/profile/static/index/menu-hyyy.png",
|
||||
// path: "/pages/meeting/meetingReservation/meetingReservation"
|
||||
},
|
||||
// {
|
||||
// name: "展厅预约",
|
||||
// img: "/profile/static/index/menu-ztyy.png",
|
||||
// path: "/pages/meeting/exhibition/list/list"
|
||||
// },
|
||||
// {
|
||||
// name: "访客预约",
|
||||
// img: "/profile/static/index/menu-fkyy.png",
|
||||
// path: "/pages/meeting/visitorIinvitation/list/list"
|
||||
// },
|
||||
// {
|
||||
// name: "预约记录",
|
||||
// img: "/profile/static/index/menu-yyjl.png",
|
||||
// path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord"
|
||||
// },
|
||||
|
||||
// {
|
||||
// name: "远程门禁",
|
||||
// img: "/profile/static/index/menu-ycmj.png",
|
||||
// path: "/pages/meeting/accessControl/accessControl"
|
||||
// },
|
||||
// {
|
||||
// name: "报修服务",
|
||||
// img: "/profile/static/index/menu-bxfw.png",
|
||||
// path: "/pages/parkRepair/parkRepair"
|
||||
// },
|
||||
// {
|
||||
// name: "投诉建议",
|
||||
// img: "/profile/static/index/menu-tsjy.png",
|
||||
// path: "/pages/complaint/complaint"
|
||||
// },
|
||||
// {
|
||||
// name: "社群活动",
|
||||
// img: "/profile/static/index/menu-sqhd.png",
|
||||
// path: "/pages/community/community"
|
||||
// },
|
||||
// {
|
||||
// name: "政策中心",
|
||||
// img: "/profile/static/index/menu-zczx.png",
|
||||
// path: "/pages/notice/notice"
|
||||
// },
|
||||
// {
|
||||
// name: "入住申请",
|
||||
// img: "/profile/static/index/menu-rzsq.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
|
||||
],
|
||||
bannerList: [],
|
||||
userDetail: {},
|
||||
parkName: app.parkName,
|
||||
qrcodeParam: null,
|
||||
infoList: [],
|
||||
data: {
|
||||
// tabBar param
|
||||
tabBarParam: {
|
||||
selected: 0,
|
||||
color: "#515151",
|
||||
selectedColor: "#217CFF",
|
||||
backgroundColor: "#ffffff",
|
||||
},
|
||||
// tabBar menu
|
||||
tabBarList: [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"iconPath": "/images/tabbar/home.png",
|
||||
"selectedIconPath": "/images/tabbar/home-select.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/reportRepair/report/report",
|
||||
"iconPath": "/images/tabbar/center.png",
|
||||
"selectedIconPath": "/images/tabbar/center.png",
|
||||
"text": "报修",
|
||||
"bulge": true,
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/my",
|
||||
"iconPath": "/images/tabbar/my.png",
|
||||
"selectedIconPath": "/images/tabbar/my-select.png",
|
||||
"text": "我的"
|
||||
},
|
||||
],
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
menuList: [
|
||||
// {
|
||||
// name: "创业活动",
|
||||
// img: "/images/hicon/chuangyehuodong.png",
|
||||
// path: "/pages/community/community"
|
||||
// },
|
||||
// {
|
||||
// name: "政策信息",
|
||||
// img: "/images/hicon/zhengcexinxi.png",
|
||||
// path: "/pages/notice/notice"
|
||||
// },
|
||||
// {
|
||||
// name: "党建园地",
|
||||
// img: "/images/hicon/zhaozhengce.png",
|
||||
// path: "/pages/party/party"
|
||||
// },
|
||||
// {
|
||||
// name: "租办公室",
|
||||
// img: "/images/hicon/zubangongshi.png",
|
||||
// path: "/pages/office/office"
|
||||
// },
|
||||
// {
|
||||
// name: "项目入孵",
|
||||
// img: "/images/hicon/xiangmurufu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "企业入驻",
|
||||
// img: "/images/hicon/qiyeruzhu.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "厂房申请",
|
||||
// img: "/images/hicon/qianrushenqing.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
// {
|
||||
// name: "园区建议",
|
||||
// img: "/images/hicon/yuanqujianyi.png",
|
||||
// path: "/pages/complaint/complaint"
|
||||
// },
|
||||
// {
|
||||
// name: "商业计划书",
|
||||
// img: "/images/hicon/wenjuandiaocha.png",
|
||||
// path: "/pages/outer/outer"
|
||||
// },
|
||||
/*
|
||||
{
|
||||
name: "园区报修",
|
||||
img: "/images/hicon/zhaozhuanli.png",
|
||||
path: "/pages/parkRepair/parkRepair"
|
||||
},
|
||||
*/
|
||||
{
|
||||
name: "随手拍",
|
||||
img: "/profile/static/index/menu-bxfw.png",
|
||||
path: "/pages/reportRepair/index/index"
|
||||
},
|
||||
{
|
||||
name: "会议预约",
|
||||
img: "/profile/static/index/menu-hyyy.png",
|
||||
// path: "/pages/meeting/meetingReservation/meetingReservation"
|
||||
},
|
||||
// {
|
||||
// name: "展厅预约",
|
||||
// img: "/profile/static/index/menu-ztyy.png",
|
||||
// path: "/pages/meeting/exhibition/list/list"
|
||||
// },
|
||||
// {
|
||||
// name: "访客预约",
|
||||
// img: "/profile/static/index/menu-fkyy.png",
|
||||
// path: "/pages/meeting/visitorIinvitation/list/list"
|
||||
// },
|
||||
// {
|
||||
// name: "预约记录",
|
||||
// img: "/profile/static/index/menu-yyjl.png",
|
||||
// path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord"
|
||||
// },
|
||||
|
||||
onLoad(options) {
|
||||
console.log('onLoad options', options);
|
||||
let _this = this;
|
||||
},
|
||||
// {
|
||||
// name: "远程门禁",
|
||||
// img: "/profile/static/index/menu-ycmj.png",
|
||||
// path: "/pages/meeting/accessControl/accessControl"
|
||||
// },
|
||||
// {
|
||||
// name: "报修服务",
|
||||
// img: "/profile/static/index/menu-bxfw.png",
|
||||
// path: "/pages/parkRepair/parkRepair"
|
||||
// },
|
||||
// {
|
||||
// name: "投诉建议",
|
||||
// img: "/profile/static/index/menu-tsjy.png",
|
||||
// path: "/pages/complaint/complaint"
|
||||
// },
|
||||
// {
|
||||
// name: "社群活动",
|
||||
// img: "/profile/static/index/menu-sqhd.png",
|
||||
// path: "/pages/community/community"
|
||||
// },
|
||||
// {
|
||||
// name: "政策中心",
|
||||
// img: "/profile/static/index/menu-zczx.png",
|
||||
// path: "/pages/notice/notice"
|
||||
// },
|
||||
// {
|
||||
// name: "入住申请",
|
||||
// img: "/profile/static/index/menu-rzsq.png",
|
||||
// path: "/pages/applyType/applyType"
|
||||
// },
|
||||
|
||||
// 切换tabbar
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
console.log('switchTab', data)
|
||||
const url = data.path
|
||||
if (url == '/pages/reportRepair/report/report') {
|
||||
wx.navigateTo({
|
||||
url
|
||||
],
|
||||
bannerList: [],
|
||||
userDetail: {},
|
||||
parkName: app.parkName,
|
||||
qrcodeParam: null,
|
||||
infoList: [],
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
console.log('onLoad options', options);
|
||||
let _this = this;
|
||||
},
|
||||
|
||||
// 切换tabbar
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
console.log('switchTab', data)
|
||||
const url = data.path
|
||||
if (url == '/pages/reportRepair/report/report') {
|
||||
wx.navigateTo({
|
||||
url
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
let _this = this
|
||||
let userId = wx.getStorageSync('userId');
|
||||
if (userId) {
|
||||
getUserInfoRq(userId).then(res => {
|
||||
console.log('getUserInfoRq', res);
|
||||
if (res.code == 0) {
|
||||
let userDetail = res.data;
|
||||
// 存储用户信息
|
||||
wx.setStorageSync('openid', userDetail.openid)
|
||||
wx.setStorageSync('user', userDetail)
|
||||
wx.setStorageSync('userId', userDetail.id)
|
||||
_this.setData({
|
||||
userDetail
|
||||
})
|
||||
// 查询轮播图
|
||||
getParkRq(userDetail.parkId).then(res => {
|
||||
console.log('getParkRq', res);
|
||||
let bannerList = res.bannerImages.map(item => item.url)
|
||||
_this.setData({
|
||||
bannerList
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
let _this = this
|
||||
let userId = wx.getStorageSync('userId');
|
||||
if (userId) {
|
||||
getUserInfoRq(userId).then(res => {
|
||||
console.log('getUserInfoRq', res);
|
||||
if (res.code == 0) {
|
||||
let userDetail = res.data;
|
||||
// 存储用户信息
|
||||
wx.setStorageSync('openid', userDetail.openid)
|
||||
wx.setStorageSync('user', userDetail)
|
||||
wx.setStorageSync('userId', userDetail.id)
|
||||
_this.setData({
|
||||
userDetail
|
||||
})
|
||||
// 查询轮播图
|
||||
getParkRq(userDetail.parkId).then(res => {
|
||||
console.log('getParkRq', res);
|
||||
let bannerList = res.bannerImages.map(item => item.url)
|
||||
_this.setData({
|
||||
bannerList
|
||||
})
|
||||
})
|
||||
// 查询消息列表
|
||||
repairRemindLatestListRq().then(res => {
|
||||
console.log('repairRemindLatestListRq', res);
|
||||
_this.setData({
|
||||
infoList: res.data
|
||||
})
|
||||
})
|
||||
} else {
|
||||
app.selfShowMsg(res.msg, '/pages/login/login')
|
||||
}
|
||||
})
|
||||
// 查询消息列表
|
||||
repairRemindLatestListRq().then(res => {
|
||||
console.log('repairRemindLatestListRq', res);
|
||||
_this.setData({
|
||||
infoList: res.data
|
||||
})
|
||||
})
|
||||
} else {
|
||||
app.selfShowMsg('请登录账号', '/pages/login/login')
|
||||
app.selfShowMsg(res.msg, '/pages/login/login')
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
app.selfShowMsg('请登录账号', '/pages/login/login')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
navapply(e) {
|
||||
if (wx.getStorageSync('token')) {
|
||||
if (e.currentTarget.dataset.path) {
|
||||
wx.navigateTo({
|
||||
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
content: `"${e.currentTarget.dataset.name}"暂未开放`,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
jumpInfo() {
|
||||
navapply(e) {
|
||||
if (wx.getStorageSync('token')) {
|
||||
if (e.currentTarget.dataset.path) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/info/info',
|
||||
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
|
||||
})
|
||||
},
|
||||
|
||||
jumpInfoDetail(e) {
|
||||
console.log('detail', e);
|
||||
let id = e.currentTarget.dataset.obj.id
|
||||
let repairId = e.currentTarget.dataset.obj.repairId
|
||||
repairRemindReadRq({
|
||||
id
|
||||
}).then(res => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/detail/detail?id=${repairId}`,
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
content: `"${e.currentTarget.dataset.name}"暂未开放`,
|
||||
showCancel: false,
|
||||
})
|
||||
},
|
||||
}
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
// 成功通知
|
||||
showSuccessMsg(msg) {
|
||||
Notify({
|
||||
type: 'success',
|
||||
top: '160rpx',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
jumpInfo() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/info/info',
|
||||
})
|
||||
},
|
||||
|
||||
// 危险通知
|
||||
showErrMsg(msg) {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
top: '160rpx',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
removeNotice(id) {
|
||||
let _this = this
|
||||
repairRemindReadRq({
|
||||
id
|
||||
}).then(res => {
|
||||
// 查询消息列表
|
||||
repairRemindLatestListRq().then(res => {
|
||||
console.log('repairRemindLatestListRq', res);
|
||||
_this.setData({
|
||||
infoList: res.data
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
jumpInfoDetail(e) {
|
||||
console.log('detail', e);
|
||||
let id = e.currentTarget.dataset.obj.id
|
||||
let repairId = e.currentTarget.dataset.obj.repairId
|
||||
repairRemindReadRq({
|
||||
id
|
||||
}).then(res => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/detail/detail?id=${repairId}`,
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 成功通知
|
||||
showSuccessMsg(msg) {
|
||||
Notify({
|
||||
type: 'success',
|
||||
top: '160rpx',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
|
||||
// 危险通知
|
||||
showErrMsg(msg) {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
top: '160rpx',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
|
||||
})
|
@ -24,7 +24,6 @@
|
||||
<view class="menuTitle">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 消息通知 -->
|
||||
<view class="itemTitleView">
|
||||
<view class="title">消息通知</view>
|
||||
|
@ -3,231 +3,270 @@ const app = getApp()
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMDHMS,
|
||||
selfFormatTimeYMDHMS,
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
getDetailRq,
|
||||
getStatusName,
|
||||
flowHandleRq,
|
||||
selectWorkerIdByTypeIdRq
|
||||
getDetailRq,
|
||||
getStatusName,
|
||||
flowHandleRq,
|
||||
selectWorkerIdByTypeIdRq
|
||||
} from "../../../../api/repair/repair.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: '',
|
||||
detail: {},
|
||||
form: {
|
||||
repairUserId: null,
|
||||
repairUserName: null,
|
||||
preDate: '',
|
||||
},
|
||||
preDateVisible: false,
|
||||
preDateTime: new Date().getTime(),
|
||||
userVisible: false,
|
||||
userColumns: [{
|
||||
values: [],
|
||||
className: 'column1',
|
||||
}],
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: '',
|
||||
detail: {},
|
||||
form: {
|
||||
repairUserId: null,
|
||||
repairUserName: null,
|
||||
preDate: '',
|
||||
repairLevel: '',
|
||||
},
|
||||
levelVisible: false,
|
||||
levelColumns: [{
|
||||
values: ['一级', '二级', '三级'],
|
||||
className: 'column1',
|
||||
}],
|
||||
preDateVisible: false,
|
||||
preDateTime: new Date().getTime(),
|
||||
userVisible: false,
|
||||
userColumns: [{
|
||||
values: [],
|
||||
className: 'column1',
|
||||
}],
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let _this = this
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
_this.getDetail(options.id)
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let _this = this
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
_this.getDetail(options.id)
|
||||
},
|
||||
|
||||
back() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
back() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
|
||||
getDetail(id) {
|
||||
let _this = this
|
||||
getDetailRq({
|
||||
id
|
||||
}).then(res => {
|
||||
console.log("getDetailRq", res);
|
||||
// 详情
|
||||
let detail = res.repair
|
||||
detail.statusName = getStatusName(detail.status)
|
||||
//
|
||||
_this.setData({
|
||||
detail,
|
||||
})
|
||||
// 查询维修员
|
||||
_this.queryWorkUser(detail.typeId)
|
||||
})
|
||||
},
|
||||
getDetail(id) {
|
||||
let _this = this
|
||||
getDetailRq({
|
||||
id
|
||||
}).then(res => {
|
||||
console.log("getDetailRq", res);
|
||||
// 详情
|
||||
let detail = res.repair
|
||||
detail.statusName = getStatusName(detail.status)
|
||||
//
|
||||
_this.setData({
|
||||
detail,
|
||||
})
|
||||
// 查询维修员
|
||||
_this.queryWorkUser(detail.typeId)
|
||||
})
|
||||
},
|
||||
|
||||
// 显示-完成时间
|
||||
showPreDate() {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
preDateVisible: true
|
||||
})
|
||||
},
|
||||
showLevel() {
|
||||
this.setData({
|
||||
levelVisible: true,
|
||||
})
|
||||
},
|
||||
hideLevel() {
|
||||
this.setData({
|
||||
levelVisible: false,
|
||||
})
|
||||
},
|
||||
// 确认-故障等级
|
||||
levelConfirm(e) {
|
||||
console.log('levelConfirm', e);
|
||||
let _this = this;
|
||||
const {
|
||||
picker,
|
||||
value,
|
||||
index
|
||||
} = e.detail;
|
||||
let form = _this.data.form
|
||||
form.repairLevel = value[0]
|
||||
|
||||
_this.setData({
|
||||
form,
|
||||
levelVisible: false
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭-完成时间
|
||||
hidePreDate() {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
preDateVisible: false
|
||||
})
|
||||
},
|
||||
// 显示-完成时间
|
||||
showPreDate() {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
preDateVisible: true
|
||||
})
|
||||
},
|
||||
|
||||
// 确认-完成时间
|
||||
confirmPreDate(e) {
|
||||
console.log('confirmPreDate', e);
|
||||
let _this = this;
|
||||
let form = _this.data.form;
|
||||
form.preDate = selfFormatTimeYMDHMS(e.detail);
|
||||
_this.setData({
|
||||
preDateVisible: false,
|
||||
preDateTime: e.detail,
|
||||
form
|
||||
})
|
||||
},
|
||||
// 关闭-完成时间
|
||||
hidePreDate() {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
preDateVisible: false
|
||||
})
|
||||
},
|
||||
|
||||
// 查询维修员
|
||||
queryWorkUser(id) {
|
||||
let _this = this
|
||||
selectWorkerIdByTypeIdRq(id).then(res => {
|
||||
console.log('selectWorkerIdByTypeIdRq', res);
|
||||
let list = res.rows.map(item => {
|
||||
return {
|
||||
id: item.userId,
|
||||
userName: item.userName,
|
||||
text: item.userPhone + '-' + item.userName
|
||||
}
|
||||
})
|
||||
let userColumns = _this.data.userColumns
|
||||
userColumns[0].values = list
|
||||
_this.setData({
|
||||
userColumns
|
||||
})
|
||||
})
|
||||
},
|
||||
// 确认-完成时间
|
||||
confirmPreDate(e) {
|
||||
console.log('confirmPreDate', e);
|
||||
let _this = this;
|
||||
let form = _this.data.form;
|
||||
form.preDate = selfFormatTimeYMDHMS(e.detail);
|
||||
_this.setData({
|
||||
preDateVisible: false,
|
||||
preDateTime: e.detail,
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
showUser() {
|
||||
this.setData({
|
||||
userVisible: true,
|
||||
})
|
||||
},
|
||||
|
||||
hideUser() {
|
||||
this.setData({
|
||||
userVisible: false,
|
||||
})
|
||||
},
|
||||
|
||||
// 确认用户
|
||||
userColumnsConfirm(e) {
|
||||
console.log('userColumnsConfirm', e.detail);
|
||||
let _this = this
|
||||
const {
|
||||
picker,
|
||||
value,
|
||||
index
|
||||
} = e.detail;
|
||||
let form = _this.data.form
|
||||
form.repairUserId = value[0].id
|
||||
form.repairUserName = value[0].text
|
||||
_this.setData({
|
||||
form,
|
||||
userVisible: false
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
let _this = this
|
||||
// 参数校验
|
||||
if (!_this.data.form.repairUserId) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请选择维修人员!')
|
||||
return
|
||||
// 查询维修员
|
||||
queryWorkUser(id) {
|
||||
let _this = this
|
||||
selectWorkerIdByTypeIdRq(id).then(res => {
|
||||
console.log('selectWorkerIdByTypeIdRq', res);
|
||||
let list = res.rows.map(item => {
|
||||
return {
|
||||
id: item.userId,
|
||||
userName: item.userName,
|
||||
text: item.userPhone + '-' + item.userName
|
||||
}
|
||||
if (!_this.data.form.preDate) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请选择预计完成时间!')
|
||||
return
|
||||
}
|
||||
// 提交参数
|
||||
let data = {
|
||||
"repair": {
|
||||
id: _this.data.id,
|
||||
..._this.data.form
|
||||
},
|
||||
"content": '指派维修员',
|
||||
"operate": "NEXT"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccessTop(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErrTop(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
let userColumns = _this.data.userColumns
|
||||
userColumns[0].values = list
|
||||
_this.setData({
|
||||
userColumns
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
showUser() {
|
||||
this.setData({
|
||||
userVisible: true,
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
hideUser() {
|
||||
this.setData({
|
||||
userVisible: false,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
// 确认用户
|
||||
userColumnsConfirm(e) {
|
||||
console.log('userColumnsConfirm', e.detail);
|
||||
let _this = this
|
||||
const {
|
||||
picker,
|
||||
value,
|
||||
index
|
||||
} = e.detail;
|
||||
let form = _this.data.form
|
||||
form.repairUserId = value[0].id
|
||||
form.repairUserName = value[0].text
|
||||
_this.setData({
|
||||
form,
|
||||
userVisible: false
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
let _this = this
|
||||
// 参数校验
|
||||
if (!_this.data.form.repairLevel) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请选择故障等级!')
|
||||
return
|
||||
}
|
||||
if (!_this.data.form.repairUserId) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请选择维修人员!')
|
||||
return
|
||||
}
|
||||
// if (!_this.data.form.preDate) {
|
||||
// // 危险通知
|
||||
// app.vantNotifyErrTop(Notify, '请选择预计完成时间!')
|
||||
// return
|
||||
// }
|
||||
// 提交参数
|
||||
let data = {
|
||||
"repair": {
|
||||
id: _this.data.id,
|
||||
..._this.data.form
|
||||
},
|
||||
"content": '指派维修员',
|
||||
"operate": "NEXT"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccessTop(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErrTop(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -24,11 +24,15 @@
|
||||
<view class="reportView">
|
||||
<view class="topTitle">派单</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="itemView" bind:tap="showLevel">
|
||||
<view class="label">{{form.repairLevel ? form.repairLevel : '请选择故障等级'}}</view>
|
||||
<van-icon name="arrow" size="36rpx" color="gray" />
|
||||
</view>
|
||||
<view class="itemView" bind:tap="showUser">
|
||||
<view class="label">{{form.repairUserName ? form.repairUserName : '请选择维修人员'}}</view>
|
||||
<van-icon name="arrow" size="36rpx" color="gray" />
|
||||
</view>
|
||||
<view class="itemView" bind:tap="showPreDate">
|
||||
<view style="display: none" class="itemView" bind:tap="showPreDate">
|
||||
<view class="label">{{form.preDate ? form.preDate : '请选择预计完成时间'}}</view>
|
||||
<van-icon name="arrow" size="36rpx" color="gray" />
|
||||
</view>
|
||||
@ -39,6 +43,11 @@
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 选择-故障等级 -->
|
||||
<van-popup show="{{ levelVisible }}" position="bottom" custom-style="height: 50vh;" bind:close="hideLevel">
|
||||
<van-picker show-toolbar columns="{{ levelColumns }}" bind:confirm="levelConfirm" bind:cancel="hideLevel"/>
|
||||
</van-popup>
|
||||
|
||||
<!-- 完成时间 -->
|
||||
<van-popup show="{{ preDateVisible }}" position="bottom" custom-style="height: 50vh;" bind:close="hidePreDate">
|
||||
<van-datetime-picker type="datetime" value="{{ preDateTime }}" bind:confirm="confirmPreDate" bind:cancel="hidePreDate" />
|
||||
|
@ -91,6 +91,10 @@ Page({
|
||||
if (detail.status == 11) {
|
||||
log.invalid = _this.findLog(res.log, detail.logId, 1)
|
||||
}
|
||||
if (detail.status == 1) {
|
||||
log.back = _this.findLog(res.log, detail.logId, 1)
|
||||
}
|
||||
console.log(log)
|
||||
_this.setData({
|
||||
log
|
||||
})
|
||||
@ -146,7 +150,7 @@ Page({
|
||||
//
|
||||
if (status == 1) { // 1 待派单
|
||||
if ((dataType == 3 && detail.typeId == userDetail.typeId) || dataType == 7) { // 派单员 or 管理员
|
||||
operatorBtn.invalid = true //无效申请
|
||||
operatorBtn.invalid = true // 无效申请
|
||||
operatorBtn.affirm = true // 确认损坏
|
||||
operatorBtn.feedback = true // 提交反馈
|
||||
}
|
||||
|
@ -23,19 +23,20 @@
|
||||
|
||||
<view class="reportView">
|
||||
<view class="topTitle">报修信息</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="itemView" wx:if="{{detail.repairLevel}}">
|
||||
<view class="label">故障等级</view>
|
||||
<view class="content">{{detail.repairLevel}}</view>
|
||||
</view>
|
||||
<!-- <view class="selfLine"></view>
|
||||
<view class="itemView">
|
||||
<view class="label">报修名称</view>
|
||||
<view class="content">{{detail.repairName}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="label">故障等级</view>
|
||||
<view class="content">{{detail.repairLevel}}</view>
|
||||
</view>
|
||||
|
||||
<view class="itemView">
|
||||
<view class="label">故障时间</view>
|
||||
<view class="content">{{detail.repairTime}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemView">
|
||||
<view class="label">故障类型</view>
|
||||
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
||||
@ -45,7 +46,7 @@
|
||||
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="label">门牌号</view>
|
||||
<view class="label">门牌号(地点)</view>
|
||||
<view class="content">{{detail.room}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
@ -60,15 +61,15 @@
|
||||
<view class="label">故障描述</view>
|
||||
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<!-- <view class="itemView">
|
||||
<view class="label">语音</view>
|
||||
<view class="content">
|
||||
<view class="voiceView" wx:if="{{files.voice.length > 0}}">
|
||||
<van-icon name="{{innerAudioContextIsPlay ? 'volume' : 'volume-o'}}" color="{{innerAudioContextIsPlay ? '#4e96f8' : 'black'}}" size="40rpx" bind:tap="startAudio" />
|
||||
<!-- <view class="voiceTimeView" bind:tap="startAudio">{{detail.voiceObj.time}} s</view> -->
|
||||
<view class="voiceTimeView" bind:tap="startAudio">{{detail.voiceObj.time}} s</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemView">
|
||||
<view class="label">图片/视频</view>
|
||||
<view class="content">
|
||||
@ -92,6 +93,13 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="reportView" wx:if="{{detail.status == 1 && log.back.to == 5}}">
|
||||
<view class="topTitle">维修员反馈</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="itemView">
|
||||
<view class="content">{{log.back.content ? log.back.content :''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="reportView" wx:if="{{detail.status == 7}}">
|
||||
<view class="topTitle">维修反馈</view>
|
||||
@ -168,7 +176,7 @@
|
||||
<view class="bottomFixView">
|
||||
<view class="btn red" bind:tap="jumpInvalid" wx:if="{{operatorBtn.invalid}}">无效申请</view>
|
||||
<view class="btn" bind:tap="jumpAffirm" wx:if="{{operatorBtn.affirm}}">确认损坏</view>
|
||||
<view class="btn" bind:tap="jumpFeedback" wx:if="{{operatorBtn.feedback}}">提交反馈</view>
|
||||
<view class="btn" style="background-color: red" bind:tap="jumpFeedback" wx:if="{{operatorBtn.feedback}}">故障有误</view>
|
||||
<view class="btn" bind:tap="jumpAgain" wx:if="{{operatorBtn.again}}">重新派单</view>
|
||||
<view class="btn">分享
|
||||
<button catch class="shareBtn" open-type="share" data-obj="{{item}}">转发</button>
|
||||
|
@ -3,109 +3,115 @@ let app = getApp();
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
flowHandleRq
|
||||
flowHandleRq
|
||||
} from "../../../../api/repair/repair.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
content: '',
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
content: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
|
||||
_this.setData({
|
||||
...options,
|
||||
})
|
||||
},
|
||||
_this.setData({
|
||||
...options,
|
||||
})
|
||||
},
|
||||
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let detail = _this.data;
|
||||
detail[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
...detail
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit() {
|
||||
let _this = this
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": _this.data.content,
|
||||
"operate": "BACK"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let detail = _this.data;
|
||||
detail[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
...detail
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit() {
|
||||
let _this = this
|
||||
// 参数校验
|
||||
if (!_this.data.content) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": _this.data.content,
|
||||
"operate": "BACK"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -3,109 +3,115 @@ let app = getApp();
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
flowHandleRq
|
||||
flowHandleRq
|
||||
} from "../../../../api/repair/repair.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
content: '',
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
content: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
|
||||
_this.setData({
|
||||
...options,
|
||||
})
|
||||
},
|
||||
_this.setData({
|
||||
...options,
|
||||
})
|
||||
},
|
||||
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let detail = _this.data;
|
||||
detail[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
...detail
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit() {
|
||||
let _this = this
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": _this.data.content,
|
||||
"operate": "END"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let detail = _this.data;
|
||||
detail[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
...detail
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit() {
|
||||
let _this = this
|
||||
// 参数校验
|
||||
if (!_this.data.content) {
|
||||
// 危险通知
|
||||
app.vantNotifyErrTop(Notify, '请输入描述信息!')
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": _this.data.content,
|
||||
"operate": "END"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
app.selfBackPage(2)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -7,6 +7,8 @@
|
||||
|
||||
<view class="submitBtn" bind:tap="submit">提交</view>
|
||||
|
||||
<!-- 在页面内添加对应的节点 -->
|
||||
<van-notify id="van-notify" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 在页面内添加对应的节点 -->
|
||||
<van-notify id="van-notify" />
|
@ -186,6 +186,7 @@ Page({
|
||||
pageSize,
|
||||
menu: _this.data.userData.dataType, // 角色
|
||||
type,
|
||||
role: _this.data.userData.dataType,
|
||||
}
|
||||
// 查询数据
|
||||
repairListRq(param).then(res => {
|
||||
@ -313,7 +314,7 @@ Page({
|
||||
closeOrder: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
type: 'close',
|
||||
type: 'invalid',
|
||||
dataList: [],
|
||||
isDataAll: false,
|
||||
},
|
||||
|
@ -1,137 +1,145 @@
|
||||
<view class="containerView public">
|
||||
<van-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
||||
<van-tab title="重新派单" wx:if="{{resendOrderVisible}}">
|
||||
<view class="itemView" wx:for="{{resendOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.repairName}}</view>
|
||||
<van-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
||||
<van-tab title="重新派单" wx:if="{{resendOrderVisible}}">
|
||||
<view class="itemView" wx:for="{{resendOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.address + '/' + item.floor}} {{item.room ? item.room : ''}}</view>
|
||||
<view class="labelContent2">{{item.explain}}</view>
|
||||
<!--<view class="labelName ellipsisFont">{{item.explain}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8"/>
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8"/>
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{resendOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="待派单">
|
||||
<view class="itemView" wx:for="{{pendingOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.repairName}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8"/>
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8"/>
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{pendingOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="已派单">
|
||||
<view class="itemView" wx:for="{{assignOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.repairName}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8"/>
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8"/>
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{assignOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="已关闭">
|
||||
<view class="itemView" wx:for="{{closeOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.repairName}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8"/>
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8"/>
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{closeOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<!-- tabBar -->
|
||||
<view class="tab-bar">
|
||||
<view wx:for="{{tabBarList}}" wx:key="index" class="tab-bar-item {{item.bulge?'bulge':''}}" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
|
||||
<view wx:if="item.bulge" class="tab-bar-bulge"></view>
|
||||
<image class="image" src="{{tabBarParam.selected === index ? item.selectedIconPath : item.iconPath}}"></image>
|
||||
<view class="tab-bar-view" style="color: {{tabBarParam.selected === index ? tabBarParam.selectedColor : tabBarParam.color}}">{{item.text}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8" />
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8" />
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{resendOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
<van-tab title="待派单">
|
||||
<view class="itemView" wx:for="{{pendingOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.address + '/' + item.floor}} {{item.room ? item.room : ''}}</view>
|
||||
<view class="labelContent2">{{item.explain}}</view>
|
||||
<!--<view class="labelName ellipsisFont">{{item.explain}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8" />
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8" />
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{pendingOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="已派单">
|
||||
<view class="itemView" wx:for="{{assignOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.address + '/' + item.floor}} {{item.room ? item.room : ''}}</view>
|
||||
<view class="labelContent2">{{item.explain}}</view>
|
||||
<!--<view class="labelName ellipsisFont">{{item.explain}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8" />
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8" />
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{assignOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="已关闭">
|
||||
<view class="itemView" wx:for="{{closeOrder.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="topTitle">编号: {{item.sn}}</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="centerView">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
<view class="labelName ellipsisFont">{{item.address + '/' + item.floor}} {{item.room ? item.room : ''}}</view>
|
||||
<view class="labelContent2">{{item.explain}}</view>
|
||||
<!--<view class="labelName ellipsisFont">{{item.explain}}</view>
|
||||
<view class="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="selfLine"></view>
|
||||
<view class="bottomView">
|
||||
<view class="name">
|
||||
<van-icon name="manager-o" size="28rpx" color="#4e96f8" />
|
||||
{{item.name}}({{item.phone}})
|
||||
</view>
|
||||
<view class="time">
|
||||
<van-icon name="calendar-o" size="30rpx" color="#4e96f8" />
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{closeOrder.isDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<!-- tabBar -->
|
||||
<view class="tab-bar">
|
||||
<view wx:for="{{tabBarList}}" wx:key="index" class="tab-bar-item {{item.bulge?'bulge':''}}" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
|
||||
<view wx:if="item.bulge" class="tab-bar-bulge"></view>
|
||||
<image class="image" src="{{tabBarParam.selected === index ? item.selectedIconPath : item.iconPath}}"></image>
|
||||
<view class="tab-bar-view" style="color: {{tabBarParam.selected === index ? tabBarParam.selectedColor : tabBarParam.color}}">{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
|
||||
</view>
|
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
.itemView .centerView .rightView .labelContent2 {
|
||||
line-height: 1;
|
||||
line-height: 1.5;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: gray;
|
||||
|
@ -33,7 +33,7 @@ Page({
|
||||
name: "维修入口",
|
||||
img: "/profile/static/repair/index/repair.png",
|
||||
path: "/pages/reportRepair/repair/index/index",
|
||||
visible: false
|
||||
visible: true
|
||||
}]
|
||||
},
|
||||
|
||||
|
@ -96,6 +96,7 @@ Page({
|
||||
_this.setData({
|
||||
userData: wx.getStorageSync('user'),
|
||||
})
|
||||
console.log(_this.data.userData)
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
},
|
||||
@ -127,6 +128,7 @@ Page({
|
||||
|
||||
// 获取数据
|
||||
getDataList(transferTabTitle) {
|
||||
console.log(transferTabTitle)
|
||||
// 获取参数
|
||||
let _this = this;
|
||||
let tabTitle = _this.data.tabTitle
|
||||
@ -193,20 +195,21 @@ Page({
|
||||
pageSize,
|
||||
menu: _this.data.userData.dataType, // 角色
|
||||
type,
|
||||
role: _this.data.userData.dataType, // 角色
|
||||
}
|
||||
// 查询数据
|
||||
repairListRq(param).then(res => {
|
||||
console.log('repairListRq', res);
|
||||
// console.log('repairListRq', res);
|
||||
let dataList = res.rows
|
||||
let isDataAll = false
|
||||
let _isDataAll = false
|
||||
if (pageNum * pageSize >= res.total) {
|
||||
isDataAll = true
|
||||
_isDataAll = true
|
||||
}
|
||||
//
|
||||
if (tabTitle == '全部') {
|
||||
allOrder.dataList = allOrder.dataList.concat(_this.formartData(dataList))
|
||||
allOrder.pageNum = allOrder.pageNum + 1
|
||||
allOrder.isDataAll = isDataAll
|
||||
allOrder.isDataAll = _isDataAll
|
||||
_this.setData({
|
||||
allOrder
|
||||
})
|
||||
@ -214,7 +217,7 @@ Page({
|
||||
} else if (tabTitle == '处理中') {
|
||||
processOrder.dataList = processOrder.dataList.concat(_this.formartData(dataList))
|
||||
processOrder.pageNum = processOrder.pageNum + 1
|
||||
processOrder.isDataAll = isDataAll
|
||||
processOrder.isDataAll = _isDataAll
|
||||
_this.setData({
|
||||
processOrder
|
||||
})
|
||||
@ -222,7 +225,7 @@ Page({
|
||||
} else if (tabTitle == '待评价') {
|
||||
evalingOrder.dataList = evalingOrder.dataList.concat(_this.formartData(dataList))
|
||||
evalingOrder.pageNum = evalingOrder.pageNum + 1
|
||||
evalingOrder.isDataAll = isDataAll
|
||||
evalingOrder.isDataAll = _isDataAll
|
||||
_this.setData({
|
||||
evalingOrder
|
||||
})
|
||||
@ -230,7 +233,7 @@ Page({
|
||||
} else if (tabTitle == '已评价') {
|
||||
evaledOrder.dataList = evaledOrder.dataList.concat(_this.formartData(dataList))
|
||||
evaledOrder.pageNum = evaledOrder.pageNum + 1
|
||||
evaledOrder.isDataAll = isDataAll
|
||||
evaledOrder.isDataAll = _isDataAll
|
||||
_this.setData({
|
||||
evaledOrder
|
||||
})
|
||||
@ -238,7 +241,7 @@ Page({
|
||||
} else if (tabTitle == '无效单') {
|
||||
invalidOrder.dataList = invalidOrder.dataList.concat(_this.formartData(dataList))
|
||||
invalidOrder.pageNum = invalidOrder.pageNum + 1
|
||||
invalidOrder.isDataAll = isDataAll
|
||||
invalidOrder.isDataAll = _isDataAll
|
||||
_this.setData({
|
||||
invalidOrder
|
||||
})
|
||||
@ -272,8 +275,8 @@ Page({
|
||||
},
|
||||
|
||||
jumpEvaluate(e) {
|
||||
console.log('jumpEvaluate', e);
|
||||
let obj = e.currentTarget.dataset.obj
|
||||
console.log('jumpEvaluate', obj);
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/evaluate/evaluate?id=${obj.id}&back=1`,
|
||||
})
|
||||
@ -370,7 +373,8 @@ Page({
|
||||
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
||||
let _this = this;
|
||||
// 获取数据
|
||||
_this.getDataList()
|
||||
let tabTitle = _this.data.tabTitle
|
||||
_this.getDataList(tabTitle)
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
<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">
|
||||
<view class="topTitle">{{item.repairName}}</view>
|
||||
<!-- <view class="topTitle">{{item.repairName}}</view> -->
|
||||
<view class="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<van-tab title="处理中">
|
||||
<view class="itemView" wx:for="{{processOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="topTitle">{{item.repairName}}</view>
|
||||
<!-- <view class="topTitle">{{item.repairName}}</view> -->
|
||||
<view class="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
@ -53,7 +53,7 @@
|
||||
</van-tab>
|
||||
<van-tab title="待评价">
|
||||
<view class="itemView" wx:for="{{evalingOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="topTitle">{{item.repairName}}</view>
|
||||
<!-- <view class="topTitle">{{item.repairName}}</view> -->
|
||||
<view class="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
@ -69,7 +69,7 @@
|
||||
<view class="btn">分享
|
||||
<button catch class="shareBtn" open-type="share" data-obj="{{item}}">转发</button>
|
||||
</view>
|
||||
<view class="btn evaluate" data-obj="{{item}}" bind:tap="jumpEvaluate">评价</view>
|
||||
<view wx:if="{{item.createBy == userData.id}}" class="btn evaluate" data-obj="{{item}}" bind:tap="jumpEvaluate">评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -79,7 +79,7 @@
|
||||
</van-tab>
|
||||
<van-tab title="已评价">
|
||||
<view class="itemView" wx:for="{{evaledOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="topTitle">{{item.repairName}}</view>
|
||||
<!-- <view class="topTitle">{{item.repairName}}</view> -->
|
||||
<view class="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
@ -104,7 +104,7 @@
|
||||
</van-tab>
|
||||
<van-tab title="无效单">
|
||||
<view class="itemView" wx:for="{{invalidOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="topTitle">{{item.repairName}}</view>
|
||||
<!-- <view class="topTitle">{{item.repairName}}</view> -->
|
||||
<view class="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||
<view class="rightView">
|
||||
|
@ -1,381 +1,408 @@
|
||||
const app = getApp()
|
||||
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMDHMS,
|
||||
repairAttachUpload,
|
||||
selfFormatTimeYMDHMS,
|
||||
repairAttachUpload,
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
getDetailRq,
|
||||
getStatusName,
|
||||
flowHandleRq,
|
||||
faultTypeListRq
|
||||
getDetailRq,
|
||||
getStatusName,
|
||||
flowHandleRq,
|
||||
faultTypeListRq
|
||||
} from "../../../../api/repair/repair.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: '',
|
||||
detail: {},
|
||||
files: [],
|
||||
innerAudioContext: null, // 音频对象
|
||||
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
||||
form: {
|
||||
cause: "",
|
||||
solution: "",
|
||||
failureTypeId: null,
|
||||
failureTypeName: "",
|
||||
resolve: null,
|
||||
fileList: [],
|
||||
},
|
||||
solveList: [{
|
||||
name: '已解决',
|
||||
status: 1,
|
||||
isSelect: false,
|
||||
},
|
||||
{
|
||||
name: '未解决',
|
||||
status: 0,
|
||||
isSelect: false,
|
||||
}
|
||||
],
|
||||
failureTypeList: []
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let _this = this
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
// 详情
|
||||
_this.getDetail(options.id)
|
||||
// 查询故障原因-字典
|
||||
_this.getFaultTypeList()
|
||||
},
|
||||
|
||||
getDetail(id) {
|
||||
let _this = this
|
||||
getDetailRq({
|
||||
id
|
||||
}).then(res => {
|
||||
console.log("getDetailRq", res);
|
||||
// 详情
|
||||
let detail = res.repair
|
||||
detail.statusName = getStatusName(detail.status)
|
||||
// 附件
|
||||
let files = res.files
|
||||
files.repair = files.repair.map(item => {
|
||||
item.url = app.IMG_NAME + item.url
|
||||
return item
|
||||
})
|
||||
files.voice = files.voice.map(item => {
|
||||
item.url = app.IMG_NAME + item.url
|
||||
return item
|
||||
})
|
||||
_this.setData({
|
||||
detail,
|
||||
files
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 播放语音
|
||||
startAudio() {
|
||||
console.log('startAudio');
|
||||
let _this = this
|
||||
// 获取innerAudioContext实例
|
||||
let innerAudioContext = _this.data.innerAudioContext
|
||||
let innerAudioContextIsPlay = _this.data.innerAudioContextIsPlay
|
||||
if (!innerAudioContext) {
|
||||
// 全局设置播放声音
|
||||
wx.setInnerAudioOption({
|
||||
obeyMuteSwitch: false
|
||||
});
|
||||
innerAudioContext = wx.createInnerAudioContext()
|
||||
// 设置音频文件的路径
|
||||
innerAudioContext.src = _this.data.files.voice[0].url
|
||||
innerAudioContextIsPlay = false
|
||||
innerAudioContext.onEnded(() => {
|
||||
_this.setData({
|
||||
innerAudioContextIsPlay: false
|
||||
})
|
||||
})
|
||||
}
|
||||
if (innerAudioContextIsPlay) { // 播放中
|
||||
innerAudioContext.stop()
|
||||
innerAudioContextIsPlay = false
|
||||
} else { // 未播放
|
||||
innerAudioContext.play()
|
||||
innerAudioContextIsPlay = true
|
||||
}
|
||||
//
|
||||
_this.setData({
|
||||
innerAudioContext,
|
||||
innerAudioContextIsPlay
|
||||
})
|
||||
},
|
||||
|
||||
// 接收/退回-提交
|
||||
receiveSubmit(e) {
|
||||
console.log('receiveSubmit', e);
|
||||
let _this = this
|
||||
let status = e.currentTarget.dataset.status
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": "",
|
||||
"operate": ""
|
||||
}
|
||||
if (status == 'yes') {
|
||||
data.content = "接收工单"
|
||||
data.operate = "NEXT"
|
||||
} else {
|
||||
data.content = "退回工单"
|
||||
data.operate = "BACK"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
_this.getDetail(_this.data.id)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let form = _this.data.form;
|
||||
form[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: '',
|
||||
detail: {},
|
||||
files: [],
|
||||
innerAudioContext: null, // 音频对象
|
||||
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
||||
form: {
|
||||
cause: "",
|
||||
solution: "",
|
||||
failureTypeId: null,
|
||||
failureTypeName: "",
|
||||
resolve: null,
|
||||
fileList: [],
|
||||
},
|
||||
solveList: [{
|
||||
name: '已解决',
|
||||
status: 1,
|
||||
isSelect: false,
|
||||
},
|
||||
{
|
||||
name: '未解决',
|
||||
status: 0,
|
||||
isSelect: false,
|
||||
}
|
||||
],
|
||||
failureTypeList: []
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let _this = this
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
// 详情
|
||||
_this.getDetail(options.id)
|
||||
// 查询故障原因-字典
|
||||
getFaultTypeList() {
|
||||
let _this = this
|
||||
faultTypeListRq().then(res => {
|
||||
console.log('getFaultTypeList', res);
|
||||
let failureTypeList = res.rows.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
isSelect: false,
|
||||
}
|
||||
})
|
||||
_this.setData({
|
||||
failureTypeList
|
||||
})
|
||||
})
|
||||
},
|
||||
_this.getFaultTypeList()
|
||||
},
|
||||
|
||||
// 选择故障类型
|
||||
selectFaultType(e) {
|
||||
console.log('selectFaultType', e);
|
||||
let _this = this
|
||||
let obj = e.currentTarget.dataset.obj
|
||||
let failureTypeList = _this.data.failureTypeList.map(item => {
|
||||
if (item.id == obj.id) {
|
||||
item.isSelect = !item.isSelect
|
||||
let form = _this.data.form
|
||||
if (item.isSelect) {
|
||||
form.failureTypeId = item.id
|
||||
form.failureTypeName = item.name
|
||||
} else {
|
||||
form.failureTypeId = null
|
||||
form.failureTypeName = ''
|
||||
}
|
||||
_this.setData(form)
|
||||
} else {
|
||||
item.isSelect = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
getDetail(id) {
|
||||
let _this = this
|
||||
getDetailRq({
|
||||
id
|
||||
}).then(res => {
|
||||
console.log("getDetailRq", res);
|
||||
// 详情
|
||||
let detail = res.repair
|
||||
detail.statusName = getStatusName(detail.status)
|
||||
// 附件
|
||||
let files = res.files
|
||||
files.repair = files.repair.map(item => {
|
||||
item.url = app.IMG_NAME + item.url
|
||||
return item
|
||||
})
|
||||
files.voice = files.voice.map(item => {
|
||||
item.url = app.IMG_NAME + item.url
|
||||
return item
|
||||
})
|
||||
_this.setData({
|
||||
detail,
|
||||
files
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 播放语音
|
||||
startAudio() {
|
||||
console.log('startAudio');
|
||||
let _this = this
|
||||
// 获取innerAudioContext实例
|
||||
let innerAudioContext = _this.data.innerAudioContext
|
||||
let innerAudioContextIsPlay = _this.data.innerAudioContextIsPlay
|
||||
if (!innerAudioContext) {
|
||||
// 全局设置播放声音
|
||||
wx.setInnerAudioOption({
|
||||
obeyMuteSwitch: false
|
||||
});
|
||||
innerAudioContext = wx.createInnerAudioContext()
|
||||
// 设置音频文件的路径
|
||||
innerAudioContext.src = _this.data.files.voice[0].url
|
||||
innerAudioContextIsPlay = false
|
||||
innerAudioContext.onEnded(() => {
|
||||
_this.setData({
|
||||
failureTypeList
|
||||
innerAudioContextIsPlay: false
|
||||
})
|
||||
},
|
||||
|
||||
// 选择-是否解决
|
||||
selectSolve(e) {
|
||||
console.log('selectSolve', e);
|
||||
let _this = this
|
||||
let obj = e.currentTarget.dataset.obj
|
||||
let solveList = _this.data.solveList.map(item => {
|
||||
if (item.status == obj.status) {
|
||||
item.isSelect = !item.isSelect
|
||||
let form = _this.data.form
|
||||
if (item.isSelect) {
|
||||
form.resolve = item.status
|
||||
} else {
|
||||
form.resolve = null
|
||||
}
|
||||
_this.setData(form)
|
||||
} else {
|
||||
item.isSelect = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
_this.setData({
|
||||
solveList
|
||||
})
|
||||
},
|
||||
|
||||
// 文件-上传后
|
||||
async fileAfterRead(event) {
|
||||
let _this = this;
|
||||
console.log('fileAfterRead', event);
|
||||
// 上传完成需要更新 fileList
|
||||
let fileList = _this.data.form.fileList;
|
||||
//
|
||||
const {
|
||||
file
|
||||
} = event.detail;
|
||||
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
for (let i = 0; i < file.length; i++) {
|
||||
let url = file[i].url;
|
||||
await repairAttachUpload({
|
||||
url,
|
||||
repairId: _this.data.id,
|
||||
operate: 'feedback',
|
||||
}).then(res => {
|
||||
console.log('upload file ', res);
|
||||
fileList.push({
|
||||
id: res.id,
|
||||
relativeUrl: res.url,
|
||||
url: app.IMG_NAME + res.url,
|
||||
deletable: true,
|
||||
})
|
||||
})
|
||||
}
|
||||
let form = _this.data.form
|
||||
form.fileList = fileList
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 删除图片
|
||||
deleteImg(event) {
|
||||
console.log('deleteImg', event);
|
||||
let _this = this;
|
||||
let fileList = _this.data.form.fileList;
|
||||
fileList.splice(event.detail.index, 1);
|
||||
//
|
||||
let form = _this.data.form
|
||||
form.fileList = fileList
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
// 反馈-提交
|
||||
feedbackSubmit() {
|
||||
console.log('feedbackSubmit');
|
||||
let _this = this
|
||||
let form = _this.data.form
|
||||
// 校验数据
|
||||
//
|
||||
// 报修名称
|
||||
if (form.resolve == null) {
|
||||
app.vantNotifyErr(Notify, '请选择是否解决!')
|
||||
return;
|
||||
}
|
||||
//
|
||||
let files = form.fileList.map(item => item.id)
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id,
|
||||
...form,
|
||||
},
|
||||
files,
|
||||
"content": "维修-提交反馈",
|
||||
"operate": "NEXT"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
_this.getDetail(_this.data.id)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back(){
|
||||
wx.navigateBack()
|
||||
},
|
||||
|
||||
jumpDetail(){
|
||||
let _this = this
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/detail/detail?id=${_this.data.id}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
})
|
||||
}
|
||||
if (innerAudioContextIsPlay) { // 播放中
|
||||
innerAudioContext.stop()
|
||||
innerAudioContextIsPlay = false
|
||||
} else { // 未播放
|
||||
innerAudioContext.play()
|
||||
innerAudioContextIsPlay = true
|
||||
}
|
||||
//
|
||||
_this.setData({
|
||||
innerAudioContext,
|
||||
innerAudioContextIsPlay
|
||||
})
|
||||
},
|
||||
|
||||
// 接收/退回-提交
|
||||
receiveSubmit(e) {
|
||||
console.log('receiveSubmit', e);
|
||||
let _this = this
|
||||
let status = e.currentTarget.dataset.status
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id
|
||||
},
|
||||
"content": "",
|
||||
"operate": ""
|
||||
}
|
||||
if (status == 'yes') {
|
||||
data.content = "接收工单"
|
||||
data.operate = "NEXT"
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
_this.getDetail(_this.data.id)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
data.content = "退回工单"
|
||||
data.operate = "BACK"
|
||||
let _this = this
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/feedback/feedback?id=${_this.data.id}`,
|
||||
})
|
||||
|
||||
// 退回工单
|
||||
// Dialog.confirm({
|
||||
// title: '请确认',
|
||||
// message: '退回工单后将由派单员重新派单,请确认是否退回?',
|
||||
// })
|
||||
// .then(() => {
|
||||
// // 确认退回
|
||||
// flowHandleRq(data).then(res => {
|
||||
// console.log('flowHandleRq', res);
|
||||
// if (res.code == 0) {
|
||||
// // 跳回维修入口页面
|
||||
// wx.navigateBack()
|
||||
// } else {
|
||||
// app.vantNotifyErr(Notify, res.msg)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// .catch(() => {
|
||||
// // on cancel
|
||||
// })
|
||||
}
|
||||
},
|
||||
|
||||
// input输入内容监听
|
||||
fieldInput(e) {
|
||||
console.log('fieldInput', e);
|
||||
let _this = this;
|
||||
let form = _this.data.form;
|
||||
form[e.currentTarget.dataset.name] = e.detail
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
// 查询故障原因-字典
|
||||
getFaultTypeList() {
|
||||
let _this = this
|
||||
faultTypeListRq().then(res => {
|
||||
console.log('getFaultTypeList', res);
|
||||
let failureTypeList = res.rows.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
isSelect: false,
|
||||
}
|
||||
})
|
||||
_this.setData({
|
||||
failureTypeList
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 选择故障类型
|
||||
selectFaultType(e) {
|
||||
console.log('selectFaultType', e);
|
||||
let _this = this
|
||||
let obj = e.currentTarget.dataset.obj
|
||||
let failureTypeList = _this.data.failureTypeList.map(item => {
|
||||
if (item.id == obj.id) {
|
||||
item.isSelect = !item.isSelect
|
||||
let form = _this.data.form
|
||||
if (item.isSelect) {
|
||||
form.failureTypeId = item.id
|
||||
form.failureTypeName = item.name
|
||||
} else {
|
||||
form.failureTypeId = null
|
||||
form.failureTypeName = ''
|
||||
}
|
||||
_this.setData(form)
|
||||
} else {
|
||||
item.isSelect = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
_this.setData({
|
||||
failureTypeList
|
||||
})
|
||||
},
|
||||
|
||||
// 选择-是否解决
|
||||
selectSolve(e) {
|
||||
console.log('selectSolve', e);
|
||||
let _this = this
|
||||
let obj = e.currentTarget.dataset.obj
|
||||
let solveList = _this.data.solveList.map(item => {
|
||||
if (item.status == obj.status) {
|
||||
item.isSelect = !item.isSelect
|
||||
let form = _this.data.form
|
||||
if (item.isSelect) {
|
||||
form.resolve = item.status
|
||||
} else {
|
||||
form.resolve = null
|
||||
}
|
||||
_this.setData(form)
|
||||
} else {
|
||||
item.isSelect = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
_this.setData({
|
||||
solveList
|
||||
})
|
||||
},
|
||||
|
||||
// 文件-上传后
|
||||
async fileAfterRead(event) {
|
||||
let _this = this;
|
||||
console.log('fileAfterRead', event);
|
||||
// 上传完成需要更新 fileList
|
||||
let fileList = _this.data.form.fileList;
|
||||
//
|
||||
const {
|
||||
file
|
||||
} = event.detail;
|
||||
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||
for (let i = 0; i < file.length; i++) {
|
||||
let url = file[i].url;
|
||||
await repairAttachUpload({
|
||||
url,
|
||||
repairId: _this.data.id,
|
||||
operate: 'feedback',
|
||||
}).then(res => {
|
||||
console.log('upload file ', res);
|
||||
fileList.push({
|
||||
id: res.id,
|
||||
relativeUrl: res.url,
|
||||
url: app.IMG_NAME + res.url,
|
||||
deletable: true,
|
||||
})
|
||||
})
|
||||
}
|
||||
let form = _this.data.form
|
||||
form.fileList = fileList
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 删除图片
|
||||
deleteImg(event) {
|
||||
console.log('deleteImg', event);
|
||||
let _this = this;
|
||||
let fileList = _this.data.form.fileList;
|
||||
fileList.splice(event.detail.index, 1);
|
||||
//
|
||||
let form = _this.data.form
|
||||
form.fileList = fileList
|
||||
_this.setData({
|
||||
form
|
||||
})
|
||||
},
|
||||
|
||||
// 反馈-提交
|
||||
feedbackSubmit() {
|
||||
console.log('feedbackSubmit');
|
||||
let _this = this
|
||||
let form = _this.data.form
|
||||
// 校验数据
|
||||
//
|
||||
// 报修名称
|
||||
if (form.resolve == null) {
|
||||
app.vantNotifyErr(Notify, '请选择是否解决!')
|
||||
return;
|
||||
}
|
||||
//
|
||||
let files = form.fileList.map(item => item.id)
|
||||
let data = {
|
||||
"repair": {
|
||||
"id": _this.data.id,
|
||||
...form,
|
||||
},
|
||||
files,
|
||||
"content": "维修-提交反馈",
|
||||
"operate": "NEXT"
|
||||
}
|
||||
flowHandleRq(data).then(res => {
|
||||
console.log('flowHandleRq', res);
|
||||
if (res.code == 0) {
|
||||
app.vantNotifySuccess(Notify, res.msg)
|
||||
_this.getDetail(_this.data.id)
|
||||
} else {
|
||||
app.vantNotifyErr(Notify, res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
|
||||
jumpDetail() {
|
||||
let _this = this
|
||||
wx.navigateTo({
|
||||
url: `/pages/reportRepair/assign/detail/detail?id=${_this.data.id}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -6,6 +6,7 @@
|
||||
"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-notify": "@vant/weapp/notify/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
}
|
||||
}
|
@ -26,18 +26,18 @@
|
||||
<view class="labelView">报修单信息</view>
|
||||
|
||||
<view class="step1" wx:if="{{detail.status == '5' || detail.status == '7' }}">
|
||||
<view class="itemView">
|
||||
<!-- <view class="itemView">
|
||||
<view class="name">报修名称</view>
|
||||
<view class="content">{{detail.repairName}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemView">
|
||||
<view class="name">故障等级</view>
|
||||
<view class="content">{{detail.repairLevel}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<!-- <view class="itemView">
|
||||
<view class="name">故障时间</view>
|
||||
<view class="content">{{detail.repairTime}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemView">
|
||||
<view class="name">故障类型</view>
|
||||
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
||||
@ -47,7 +47,7 @@
|
||||
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="name">门牌号</view>
|
||||
<view class="name">门牌号(地点)</view>
|
||||
<view class="content">{{detail.room}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
@ -62,14 +62,14 @@
|
||||
<view class="name">故障描述</view>
|
||||
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<!-- <view class="itemView">
|
||||
<view class="name">相关语音:</view>
|
||||
<view class="content">
|
||||
<view class="voiceView" wx:if="{{files.voice.length > 0}}">
|
||||
<van-icon name="{{innerAudioContextIsPlay ? 'volume' : 'volume-o'}}" color="{{innerAudioContextIsPlay ? '#4e96f8' : 'black'}}" size="40rpx" bind:tap="startAudio" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemView">
|
||||
<view class="name">报修图片:</view>
|
||||
<view class="content">
|
||||
@ -139,6 +139,6 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 消息通知 -->
|
||||
<van-notify id="van-notify" />
|
@ -163,7 +163,8 @@ Page({
|
||||
let param = {
|
||||
pageNum,
|
||||
pageSize,
|
||||
menu: '5', // 维修
|
||||
// menu: '5', // 维修
|
||||
role: '5',
|
||||
type,
|
||||
}
|
||||
// 查询数据
|
||||
@ -245,7 +246,7 @@ Page({
|
||||
workOrder: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
type: 'working',
|
||||
type: 'process',
|
||||
dataList: [],
|
||||
isDataAll: false,
|
||||
},
|
||||
@ -253,7 +254,7 @@ Page({
|
||||
closeOrder: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
type: 'close',
|
||||
type: 'end',
|
||||
dataList: [],
|
||||
isDataAll: false,
|
||||
},
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
<view class="caseListView" wx:if="{{tabTitle == 'wait'}}">
|
||||
<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="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
<view class="caseListView" wx:if="{{tabTitle == 'working'}}">
|
||||
<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="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
<view class="caseListView" wx:if="{{tabTitle == 'close'}}">
|
||||
<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="content ellipsisFont">{{item.name}}发起一个工单</view>
|
||||
<view class="time">{{item.createTime}}</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
|
@ -520,20 +520,20 @@ Page({
|
||||
//
|
||||
// 校验数据
|
||||
//
|
||||
// 报修名称
|
||||
// 报修名称,去掉
|
||||
if (!detail.repairName) {
|
||||
app.vantNotifyErr(Notify, '输入报修名称!')
|
||||
return;
|
||||
// app.vantNotifyErr(Notify, '输入报修名称!')
|
||||
// return;
|
||||
}
|
||||
// 故障等级
|
||||
// 故障等级,去掉
|
||||
if (!detail.repairLevel) {
|
||||
app.vantNotifyErr(Notify, '请选择故障等级!')
|
||||
return;
|
||||
// app.vantNotifyErr(Notify, '请选择故障等级!')
|
||||
// return;
|
||||
}
|
||||
// 故障时间
|
||||
// 故障时间,去掉
|
||||
if (!detail.repairTime) {
|
||||
app.vantNotifyErr(Notify, '请选择故障时间!')
|
||||
return;
|
||||
// app.vantNotifyErr(Notify, '请选择故障时间!')
|
||||
// return;
|
||||
}
|
||||
// 故障类型
|
||||
if (!detail.typeId) {
|
||||
@ -547,7 +547,7 @@ Page({
|
||||
}
|
||||
// 门牌号
|
||||
if (!detail.room) {
|
||||
app.vantNotifyErr(Notify, '请输入门牌号!')
|
||||
app.vantNotifyErr(Notify, '请输入门牌号(地点)!')
|
||||
return;
|
||||
}
|
||||
// 联系电话
|
||||
@ -566,8 +566,8 @@ Page({
|
||||
return;
|
||||
}
|
||||
// 故障描述
|
||||
if (!detail.explain && !voiceObj.tempFilePath) {
|
||||
app.vantNotifyErr(Notify, '请输入故障描述或录音!')
|
||||
if (!detail.explain) {
|
||||
app.vantNotifyErr(Notify, '请输入故障描述!')
|
||||
return;
|
||||
}
|
||||
//
|
||||
|
@ -1,14 +1,14 @@
|
||||
<view class="containerView public">
|
||||
<view class="contentView">
|
||||
<view class="rowView">
|
||||
<view class="rowView" style="display: none;">
|
||||
<view class="label must">报修名称</view>
|
||||
<van-field value="{{ detail.repairName }}" bind:input="fieldInput" data-name="repairName" clearable input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
|
||||
</view>
|
||||
<view class="rowView">
|
||||
<view class="rowView" style="display: none;">
|
||||
<view class="label must">故障等级</view>
|
||||
<van-field value="{{ detail.repairLevel }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" border="{{ false }}" input-align="right" bind:tap="showFaultLevel" />
|
||||
</view>
|
||||
<view class="rowView" bind:tap="showRepairTime">
|
||||
<view class="rowView" bind:tap="showRepairTime" style="display: none;">
|
||||
<view class="label must">故障时间</view>
|
||||
<van-field value="{{ detail.repairTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
|
||||
</view>
|
||||
@ -21,7 +21,7 @@
|
||||
<van-field value="{{ detail.address ? detail.address + '/' + detail.floor : '' }}" input-class="input" is-link readonly placeholder="请选择" arrow-direction="down" border="{{ false }}" input-align="right" bind:tap="showAddress" />
|
||||
</view>
|
||||
<view class="rowView">
|
||||
<view class="label must">门牌号</view>
|
||||
<view class="label must">门牌号(地点)</view>
|
||||
<van-field value="{{ detail.room }}" bind:input="fieldInput" data-name="room" clearable input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
|
||||
</view>
|
||||
<view class="rowView">
|
||||
@ -34,22 +34,7 @@
|
||||
</view>
|
||||
<view class="rowColumnView">
|
||||
<view class="label must">故障描述</view>
|
||||
<view class="contentView">
|
||||
<van-field model:value="{{ detail.explain }}" bind:input="fieldInput" data-name="explain" type="textarea" clearable placeholder="请输入" maxlength="{{100}}" show-word-limit border="{{false}}" autosize input-class="selfTextarea" />
|
||||
<view class="voiceView1" bind:touchstart="startRecording" bind:touchend="stopRecording">
|
||||
<view class="voiceView2">
|
||||
<view class="voiceImg" style="background: no-repeat center/cover url({{IMG_NAME + '/profile/static/repair/index/voice.png'}});"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rowView self">
|
||||
<view class="label">语音</view>
|
||||
<view class="voiceBtnView" wx:if="{{voiceObj.tempFilePath}}">
|
||||
<van-icon name="{{innerAudioContextIsPlay ? 'volume' : 'volume-o'}}" color="{{innerAudioContextIsPlay ? '#4e96f8' : 'black'}}" size="40rpx" bind:tap="startAudio"/>
|
||||
<view class="voiceTimeView" bind:tap="startAudio">{{voiceObj.duration}} s</view>
|
||||
<van-icon name="close" size="34rpx" bind:tap="clearAudio"/>
|
||||
</view>
|
||||
<van-field model:value="{{ detail.explain }}" bind:input="fieldInput" data-name="explain" type="textarea" clearable placeholder="请输入" maxlength="{{100}}" show-word-limit border="{{false}}" autosize />
|
||||
</view>
|
||||
<view class="rowColumnView">
|
||||
<view class="label">故障图片/视频</view>
|
||||
|
@ -186,5 +186,5 @@
|
||||
.selfTextarea {
|
||||
min-height: 140rpx !important;
|
||||
max-height: 140rpx !important;
|
||||
width: 450rpx !important;
|
||||
width: 650rpx !important;
|
||||
}
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "dbd-meeting-wx-small",
|
||||
"name": "haLogistics",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user