mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 04:19:36 +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 Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
callScanUrl
|
callScanUrl
|
||||||
} from "../../api/common/scan.js"
|
} from "../../api/common/scan.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
userProfile,
|
userProfile,
|
||||||
getUserInfoRq
|
getUserInfoRq
|
||||||
} from "../../api/user/user.js"
|
} from "../../api/user/user.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getParkRq
|
getParkRq
|
||||||
} from "../../api/index/index.js"
|
} from "../../api/index/index.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
repairRemindLatestListRq,
|
repairRemindLatestListRq,
|
||||||
repairRemindReadRq
|
repairRemindReadRq
|
||||||
} from "../../api/repair/repair.js"
|
} from "../../api/repair/repair.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getUrlParamsObj
|
getUrlParamsObj
|
||||||
} from "../../utils/util.js"
|
} from "../../utils/util.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
// tabBar param
|
// tabBar param
|
||||||
tabBarParam: {
|
tabBarParam: {
|
||||||
selected: 0,
|
selected: 0,
|
||||||
color: "#515151",
|
color: "#515151",
|
||||||
selectedColor: "#217CFF",
|
selectedColor: "#217CFF",
|
||||||
backgroundColor: "#ffffff",
|
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: [],
|
|
||||||
},
|
},
|
||||||
|
// 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);
|
// name: "远程门禁",
|
||||||
let _this = this;
|
// 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) {
|
bannerList: [],
|
||||||
const data = e.currentTarget.dataset
|
userDetail: {},
|
||||||
console.log('switchTab', data)
|
parkName: app.parkName,
|
||||||
const url = data.path
|
qrcodeParam: null,
|
||||||
if (url == '/pages/reportRepair/report/report') {
|
infoList: [],
|
||||||
wx.navigateTo({
|
},
|
||||||
url
|
|
||||||
|
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
|
repairRemindLatestListRq().then(res => {
|
||||||
})
|
console.log('repairRemindLatestListRq', res);
|
||||||
}
|
_this.setData({
|
||||||
},
|
infoList: res.data
|
||||||
|
|
||||||
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')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
app.selfShowMsg('请登录账号', '/pages/login/login')
|
app.selfShowMsg(res.msg, '/pages/login/login')
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
|
} else {
|
||||||
|
app.selfShowMsg('请登录账号', '/pages/login/login')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
navapply(e) {
|
navapply(e) {
|
||||||
if (wx.getStorageSync('token')) {
|
if (wx.getStorageSync('token')) {
|
||||||
if (e.currentTarget.dataset.path) {
|
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() {
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/my/info/info',
|
url: e.currentTarget.dataset.path + '?name=' + e.currentTarget.dataset.name,
|
||||||
})
|
})
|
||||||
},
|
} else {
|
||||||
|
wx.showModal({
|
||||||
jumpInfoDetail(e) {
|
content: `"${e.currentTarget.dataset.name}"暂未开放`,
|
||||||
console.log('detail', e);
|
showCancel: false,
|
||||||
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 {
|
||||||
|
app.getlogin()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 成功通知
|
jumpInfo() {
|
||||||
showSuccessMsg(msg) {
|
wx.navigateTo({
|
||||||
Notify({
|
url: '/pages/my/info/info',
|
||||||
type: 'success',
|
})
|
||||||
top: '160rpx',
|
},
|
||||||
message: msg
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 危险通知
|
removeNotice(id) {
|
||||||
showErrMsg(msg) {
|
let _this = this
|
||||||
Notify({
|
repairRemindReadRq({
|
||||||
type: 'danger',
|
id
|
||||||
top: '160rpx',
|
}).then(res => {
|
||||||
message: msg
|
// 查询消息列表
|
||||||
});
|
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 class="menuTitle">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 消息通知 -->
|
<!-- 消息通知 -->
|
||||||
<view class="itemTitleView">
|
<view class="itemTitleView">
|
||||||
<view class="title">消息通知</view>
|
<view class="title">消息通知</view>
|
||||||
|
@ -3,231 +3,270 @@ const app = getApp()
|
|||||||
import Notify from '@vant/weapp/notify/notify';
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
selfFormatTimeYMDHMS,
|
selfFormatTimeYMDHMS,
|
||||||
} from "../../../../utils/util.js"
|
} from "../../../../utils/util.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDetailRq,
|
getDetailRq,
|
||||||
getStatusName,
|
getStatusName,
|
||||||
flowHandleRq,
|
flowHandleRq,
|
||||||
selectWorkerIdByTypeIdRq
|
selectWorkerIdByTypeIdRq
|
||||||
} from "../../../../api/repair/repair.js"
|
} from "../../../../api/repair/repair.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
id: '',
|
id: '',
|
||||||
detail: {},
|
detail: {},
|
||||||
form: {
|
form: {
|
||||||
repairUserId: null,
|
repairUserId: null,
|
||||||
repairUserName: null,
|
repairUserName: null,
|
||||||
preDate: '',
|
preDate: '',
|
||||||
},
|
repairLevel: '',
|
||||||
preDateVisible: false,
|
|
||||||
preDateTime: new Date().getTime(),
|
|
||||||
userVisible: false,
|
|
||||||
userColumns: [{
|
|
||||||
values: [],
|
|
||||||
className: 'column1',
|
|
||||||
}],
|
|
||||||
},
|
},
|
||||||
|
levelVisible: false,
|
||||||
|
levelColumns: [{
|
||||||
|
values: ['一级', '二级', '三级'],
|
||||||
|
className: 'column1',
|
||||||
|
}],
|
||||||
|
preDateVisible: false,
|
||||||
|
preDateTime: new Date().getTime(),
|
||||||
|
userVisible: false,
|
||||||
|
userColumns: [{
|
||||||
|
values: [],
|
||||||
|
className: 'column1',
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('onLoad', options);
|
console.log('onLoad', options);
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.setData({
|
_this.setData({
|
||||||
...options
|
...options
|
||||||
})
|
})
|
||||||
_this.getDetail(options.id)
|
_this.getDetail(options.id)
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetail(id) {
|
getDetail(id) {
|
||||||
let _this = this
|
let _this = this
|
||||||
getDetailRq({
|
getDetailRq({
|
||||||
id
|
id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log("getDetailRq", res);
|
console.log("getDetailRq", res);
|
||||||
// 详情
|
// 详情
|
||||||
let detail = res.repair
|
let detail = res.repair
|
||||||
detail.statusName = getStatusName(detail.status)
|
detail.statusName = getStatusName(detail.status)
|
||||||
//
|
//
|
||||||
_this.setData({
|
_this.setData({
|
||||||
detail,
|
detail,
|
||||||
})
|
})
|
||||||
// 查询维修员
|
// 查询维修员
|
||||||
_this.queryWorkUser(detail.typeId)
|
_this.queryWorkUser(detail.typeId)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示-完成时间
|
showLevel() {
|
||||||
showPreDate() {
|
this.setData({
|
||||||
let _this = this;
|
levelVisible: true,
|
||||||
_this.setData({
|
})
|
||||||
preDateVisible: 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({
|
||||||
hidePreDate() {
|
form,
|
||||||
let _this = this;
|
levelVisible: false
|
||||||
_this.setData({
|
})
|
||||||
preDateVisible: false
|
},
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 确认-完成时间
|
// 显示-完成时间
|
||||||
confirmPreDate(e) {
|
showPreDate() {
|
||||||
console.log('confirmPreDate', e);
|
let _this = this;
|
||||||
let _this = this;
|
_this.setData({
|
||||||
let form = _this.data.form;
|
preDateVisible: true
|
||||||
form.preDate = selfFormatTimeYMDHMS(e.detail);
|
})
|
||||||
_this.setData({
|
},
|
||||||
preDateVisible: false,
|
|
||||||
preDateTime: e.detail,
|
|
||||||
form
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询维修员
|
// 关闭-完成时间
|
||||||
queryWorkUser(id) {
|
hidePreDate() {
|
||||||
let _this = this
|
let _this = this;
|
||||||
selectWorkerIdByTypeIdRq(id).then(res => {
|
_this.setData({
|
||||||
console.log('selectWorkerIdByTypeIdRq', res);
|
preDateVisible: false
|
||||||
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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
showUser() {
|
// 确认-完成时间
|
||||||
this.setData({
|
confirmPreDate(e) {
|
||||||
userVisible: true,
|
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
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
hideUser() {
|
// 查询维修员
|
||||||
this.setData({
|
queryWorkUser(id) {
|
||||||
userVisible: false,
|
let _this = this
|
||||||
})
|
selectWorkerIdByTypeIdRq(id).then(res => {
|
||||||
},
|
console.log('selectWorkerIdByTypeIdRq', res);
|
||||||
|
let list = res.rows.map(item => {
|
||||||
// 确认用户
|
return {
|
||||||
userColumnsConfirm(e) {
|
id: item.userId,
|
||||||
console.log('userColumnsConfirm', e.detail);
|
userName: item.userName,
|
||||||
let _this = this
|
text: item.userPhone + '-' + item.userName
|
||||||
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
|
|
||||||
}
|
}
|
||||||
if (!_this.data.form.preDate) {
|
})
|
||||||
// 危险通知
|
let userColumns = _this.data.userColumns
|
||||||
app.vantNotifyErrTop(Notify, '请选择预计完成时间!')
|
userColumns[0].values = list
|
||||||
return
|
_this.setData({
|
||||||
}
|
userColumns
|
||||||
// 提交参数
|
})
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
showUser() {
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
this.setData({
|
||||||
*/
|
userVisible: true,
|
||||||
onReady() {
|
})
|
||||||
|
},
|
||||||
|
|
||||||
},
|
hideUser() {
|
||||||
|
this.setData({
|
||||||
|
userVisible: false,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
// 确认用户
|
||||||
* 生命周期函数--监听页面显示
|
userColumnsConfirm(e) {
|
||||||
*/
|
console.log('userColumnsConfirm', e.detail);
|
||||||
onShow() {
|
let _this = this
|
||||||
|
const {
|
||||||
},
|
picker,
|
||||||
|
value,
|
||||||
/**
|
index
|
||||||
* 生命周期函数--监听页面隐藏
|
} = e.detail;
|
||||||
*/
|
let form = _this.data.form
|
||||||
onHide() {
|
form.repairUserId = value[0].id
|
||||||
|
form.repairUserName = value[0].text
|
||||||
},
|
_this.setData({
|
||||||
|
form,
|
||||||
/**
|
userVisible: false
|
||||||
* 生命周期函数--监听页面卸载
|
})
|
||||||
*/
|
},
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
|
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="reportView">
|
||||||
<view class="topTitle">派单</view>
|
<view class="topTitle">派单</view>
|
||||||
<view class="selfLine"></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="itemView" bind:tap="showUser">
|
||||||
<view class="label">{{form.repairUserName ? form.repairUserName : '请选择维修人员'}}</view>
|
<view class="label">{{form.repairUserName ? form.repairUserName : '请选择维修人员'}}</view>
|
||||||
<van-icon name="arrow" size="36rpx" color="gray" />
|
<van-icon name="arrow" size="36rpx" color="gray" />
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView" bind:tap="showPreDate">
|
<view style="display: none" class="itemView" bind:tap="showPreDate">
|
||||||
<view class="label">{{form.preDate ? form.preDate : '请选择预计完成时间'}}</view>
|
<view class="label">{{form.preDate ? form.preDate : '请选择预计完成时间'}}</view>
|
||||||
<van-icon name="arrow" size="36rpx" color="gray" />
|
<van-icon name="arrow" size="36rpx" color="gray" />
|
||||||
</view>
|
</view>
|
||||||
@ -39,6 +43,11 @@
|
|||||||
|
|
||||||
</view>
|
</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-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" />
|
<van-datetime-picker type="datetime" value="{{ preDateTime }}" bind:confirm="confirmPreDate" bind:cancel="hidePreDate" />
|
||||||
|
@ -91,6 +91,10 @@ Page({
|
|||||||
if (detail.status == 11) {
|
if (detail.status == 11) {
|
||||||
log.invalid = _this.findLog(res.log, detail.logId, 1)
|
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({
|
_this.setData({
|
||||||
log
|
log
|
||||||
})
|
})
|
||||||
@ -146,7 +150,7 @@ Page({
|
|||||||
//
|
//
|
||||||
if (status == 1) { // 1 待派单
|
if (status == 1) { // 1 待派单
|
||||||
if ((dataType == 3 && detail.typeId == userDetail.typeId) || dataType == 7) { // 派单员 or 管理员
|
if ((dataType == 3 && detail.typeId == userDetail.typeId) || dataType == 7) { // 派单员 or 管理员
|
||||||
operatorBtn.invalid = true //无效申请
|
operatorBtn.invalid = true // 无效申请
|
||||||
operatorBtn.affirm = true // 确认损坏
|
operatorBtn.affirm = true // 确认损坏
|
||||||
operatorBtn.feedback = true // 提交反馈
|
operatorBtn.feedback = true // 提交反馈
|
||||||
}
|
}
|
||||||
|
@ -23,19 +23,20 @@
|
|||||||
|
|
||||||
<view class="reportView">
|
<view class="reportView">
|
||||||
<view class="topTitle">报修信息</view>
|
<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="itemView">
|
||||||
<view class="label">报修名称</view>
|
<view class="label">报修名称</view>
|
||||||
<view class="content">{{detail.repairName}}</view>
|
<view class="content">{{detail.repairName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
|
||||||
<view class="label">故障等级</view>
|
|
||||||
<view class="content">{{detail.repairLevel}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="label">故障时间</view>
|
<view class="label">故障时间</view>
|
||||||
<view class="content">{{detail.repairTime}}</view>
|
<view class="content">{{detail.repairTime}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="label">故障类型</view>
|
<view class="label">故障类型</view>
|
||||||
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
||||||
@ -45,7 +46,7 @@
|
|||||||
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="label">门牌号</view>
|
<view class="label">门牌号(地点)</view>
|
||||||
<view class="content">{{detail.room}}</view>
|
<view class="content">{{detail.room}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
@ -60,15 +61,15 @@
|
|||||||
<view class="label">故障描述</view>
|
<view class="label">故障描述</view>
|
||||||
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<!-- <view class="itemView">
|
||||||
<view class="label">语音</view>
|
<view class="label">语音</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="voiceView" wx:if="{{files.voice.length > 0}}">
|
<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" />
|
<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>
|
</view> -->
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="label">图片/视频</view>
|
<view class="label">图片/视频</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -92,6 +93,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</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="reportView" wx:if="{{detail.status == 7}}">
|
||||||
<view class="topTitle">维修反馈</view>
|
<view class="topTitle">维修反馈</view>
|
||||||
@ -168,7 +176,7 @@
|
|||||||
<view class="bottomFixView">
|
<view class="bottomFixView">
|
||||||
<view class="btn red" bind:tap="jumpInvalid" wx:if="{{operatorBtn.invalid}}">无效申请</view>
|
<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="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" bind:tap="jumpAgain" wx:if="{{operatorBtn.again}}">重新派单</view>
|
||||||
<view class="btn">分享
|
<view class="btn">分享
|
||||||
<button catch class="shareBtn" open-type="share" data-obj="{{item}}">转发</button>
|
<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 Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
flowHandleRq
|
flowHandleRq
|
||||||
} from "../../../../api/repair/repair.js"
|
} from "../../../../api/repair/repair.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
id: null,
|
id: null,
|
||||||
content: '',
|
content: '',
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
||||||
_this.setData({
|
_this.setData({
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// input输入内容监听
|
// input输入内容监听
|
||||||
fieldInput(e) {
|
fieldInput(e) {
|
||||||
console.log('fieldInput', e);
|
console.log('fieldInput', e);
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let detail = _this.data;
|
let detail = _this.data;
|
||||||
detail[e.currentTarget.dataset.name] = e.detail
|
detail[e.currentTarget.dataset.name] = e.detail
|
||||||
_this.setData({
|
_this.setData({
|
||||||
...detail
|
...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() {
|
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
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 Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
flowHandleRq
|
flowHandleRq
|
||||||
} from "../../../../api/repair/repair.js"
|
} from "../../../../api/repair/repair.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
id: null,
|
id: null,
|
||||||
content: '',
|
content: '',
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
||||||
_this.setData({
|
_this.setData({
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// input输入内容监听
|
// input输入内容监听
|
||||||
fieldInput(e) {
|
fieldInput(e) {
|
||||||
console.log('fieldInput', e);
|
console.log('fieldInput', e);
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let detail = _this.data;
|
let detail = _this.data;
|
||||||
detail[e.currentTarget.dataset.name] = e.detail
|
detail[e.currentTarget.dataset.name] = e.detail
|
||||||
_this.setData({
|
_this.setData({
|
||||||
...detail
|
...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() {
|
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
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>
|
<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,
|
pageSize,
|
||||||
menu: _this.data.userData.dataType, // 角色
|
menu: _this.data.userData.dataType, // 角色
|
||||||
type,
|
type,
|
||||||
|
role: _this.data.userData.dataType,
|
||||||
}
|
}
|
||||||
// 查询数据
|
// 查询数据
|
||||||
repairListRq(param).then(res => {
|
repairListRq(param).then(res => {
|
||||||
@ -313,7 +314,7 @@ Page({
|
|||||||
closeOrder: {
|
closeOrder: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: 'close',
|
type: 'invalid',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
isDataAll: false,
|
isDataAll: false,
|
||||||
},
|
},
|
||||||
|
@ -1,137 +1,145 @@
|
|||||||
<view class="containerView public">
|
<view class="containerView public">
|
||||||
<van-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
<van-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
||||||
<van-tab title="重新派单" wx:if="{{resendOrderVisible}}">
|
<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="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="topTitle">编号: {{item.sn}}</view>
|
||||||
<view class="selfLine"></view>
|
<view class="selfLine"></view>
|
||||||
<view class="centerView">
|
<view class="centerView">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
<view class="labelName ellipsisFont">{{item.repairName}}</view>
|
<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="labelContent1 ellipsisFont">类型: {{item.typeName + '/' + item.deviceName}}</view>
|
||||||
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
<view class="labelContent2 ellipsisFont">地点: {{item.address + '/' + item.floor}}</view>
|
||||||
<view class="labelContent2 ellipsisFont">门牌号: {{item.room ? item.room : ''}}</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-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>
|
</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="待派单">
|
||||||
<van-dialog id="van-dialog" />
|
<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>
|
||||||
<van-notify id="van-notify" />
|
<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>
|
</view>
|
@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.itemView .centerView .rightView .labelContent2 {
|
.itemView .centerView .rightView .labelContent2 {
|
||||||
line-height: 1;
|
line-height: 1.5;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
|
@ -33,7 +33,7 @@ Page({
|
|||||||
name: "维修入口",
|
name: "维修入口",
|
||||||
img: "/profile/static/repair/index/repair.png",
|
img: "/profile/static/repair/index/repair.png",
|
||||||
path: "/pages/reportRepair/repair/index/index",
|
path: "/pages/reportRepair/repair/index/index",
|
||||||
visible: false
|
visible: true
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ Page({
|
|||||||
_this.setData({
|
_this.setData({
|
||||||
userData: wx.getStorageSync('user'),
|
userData: wx.getStorageSync('user'),
|
||||||
})
|
})
|
||||||
|
console.log(_this.data.userData)
|
||||||
// 获取数据
|
// 获取数据
|
||||||
let userId = _this.data.userData.id
|
let userId = _this.data.userData.id
|
||||||
},
|
},
|
||||||
@ -127,6 +128,7 @@ Page({
|
|||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
getDataList(transferTabTitle) {
|
getDataList(transferTabTitle) {
|
||||||
|
console.log(transferTabTitle)
|
||||||
// 获取参数
|
// 获取参数
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let tabTitle = _this.data.tabTitle
|
let tabTitle = _this.data.tabTitle
|
||||||
@ -193,20 +195,21 @@ Page({
|
|||||||
pageSize,
|
pageSize,
|
||||||
menu: _this.data.userData.dataType, // 角色
|
menu: _this.data.userData.dataType, // 角色
|
||||||
type,
|
type,
|
||||||
|
role: _this.data.userData.dataType, // 角色
|
||||||
}
|
}
|
||||||
// 查询数据
|
// 查询数据
|
||||||
repairListRq(param).then(res => {
|
repairListRq(param).then(res => {
|
||||||
console.log('repairListRq', res);
|
// console.log('repairListRq', res);
|
||||||
let dataList = res.rows
|
let dataList = res.rows
|
||||||
let isDataAll = false
|
let _isDataAll = false
|
||||||
if (pageNum * pageSize >= res.total) {
|
if (pageNum * pageSize >= res.total) {
|
||||||
isDataAll = true
|
_isDataAll = true
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (tabTitle == '全部') {
|
if (tabTitle == '全部') {
|
||||||
allOrder.dataList = allOrder.dataList.concat(_this.formartData(dataList))
|
allOrder.dataList = allOrder.dataList.concat(_this.formartData(dataList))
|
||||||
allOrder.pageNum = allOrder.pageNum + 1
|
allOrder.pageNum = allOrder.pageNum + 1
|
||||||
allOrder.isDataAll = isDataAll
|
allOrder.isDataAll = _isDataAll
|
||||||
_this.setData({
|
_this.setData({
|
||||||
allOrder
|
allOrder
|
||||||
})
|
})
|
||||||
@ -214,7 +217,7 @@ Page({
|
|||||||
} else if (tabTitle == '处理中') {
|
} else if (tabTitle == '处理中') {
|
||||||
processOrder.dataList = processOrder.dataList.concat(_this.formartData(dataList))
|
processOrder.dataList = processOrder.dataList.concat(_this.formartData(dataList))
|
||||||
processOrder.pageNum = processOrder.pageNum + 1
|
processOrder.pageNum = processOrder.pageNum + 1
|
||||||
processOrder.isDataAll = isDataAll
|
processOrder.isDataAll = _isDataAll
|
||||||
_this.setData({
|
_this.setData({
|
||||||
processOrder
|
processOrder
|
||||||
})
|
})
|
||||||
@ -222,7 +225,7 @@ Page({
|
|||||||
} else if (tabTitle == '待评价') {
|
} else if (tabTitle == '待评价') {
|
||||||
evalingOrder.dataList = evalingOrder.dataList.concat(_this.formartData(dataList))
|
evalingOrder.dataList = evalingOrder.dataList.concat(_this.formartData(dataList))
|
||||||
evalingOrder.pageNum = evalingOrder.pageNum + 1
|
evalingOrder.pageNum = evalingOrder.pageNum + 1
|
||||||
evalingOrder.isDataAll = isDataAll
|
evalingOrder.isDataAll = _isDataAll
|
||||||
_this.setData({
|
_this.setData({
|
||||||
evalingOrder
|
evalingOrder
|
||||||
})
|
})
|
||||||
@ -230,7 +233,7 @@ Page({
|
|||||||
} else if (tabTitle == '已评价') {
|
} else if (tabTitle == '已评价') {
|
||||||
evaledOrder.dataList = evaledOrder.dataList.concat(_this.formartData(dataList))
|
evaledOrder.dataList = evaledOrder.dataList.concat(_this.formartData(dataList))
|
||||||
evaledOrder.pageNum = evaledOrder.pageNum + 1
|
evaledOrder.pageNum = evaledOrder.pageNum + 1
|
||||||
evaledOrder.isDataAll = isDataAll
|
evaledOrder.isDataAll = _isDataAll
|
||||||
_this.setData({
|
_this.setData({
|
||||||
evaledOrder
|
evaledOrder
|
||||||
})
|
})
|
||||||
@ -238,7 +241,7 @@ Page({
|
|||||||
} else if (tabTitle == '无效单') {
|
} else if (tabTitle == '无效单') {
|
||||||
invalidOrder.dataList = invalidOrder.dataList.concat(_this.formartData(dataList))
|
invalidOrder.dataList = invalidOrder.dataList.concat(_this.formartData(dataList))
|
||||||
invalidOrder.pageNum = invalidOrder.pageNum + 1
|
invalidOrder.pageNum = invalidOrder.pageNum + 1
|
||||||
invalidOrder.isDataAll = isDataAll
|
invalidOrder.isDataAll = _isDataAll
|
||||||
_this.setData({
|
_this.setData({
|
||||||
invalidOrder
|
invalidOrder
|
||||||
})
|
})
|
||||||
@ -272,8 +275,8 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
jumpEvaluate(e) {
|
jumpEvaluate(e) {
|
||||||
console.log('jumpEvaluate', e);
|
|
||||||
let obj = e.currentTarget.dataset.obj
|
let obj = e.currentTarget.dataset.obj
|
||||||
|
console.log('jumpEvaluate', obj);
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/reportRepair/assign/evaluate/evaluate?id=${obj.id}&back=1`,
|
url: `/pages/reportRepair/assign/evaluate/evaluate?id=${obj.id}&back=1`,
|
||||||
})
|
})
|
||||||
@ -370,7 +373,8 @@ Page({
|
|||||||
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
||||||
let _this = this;
|
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-tabs bind:click="tabClickSwitch" color="#4e96f8" border animated title-active-color="black" title-inactive-color="gray">
|
||||||
<van-tab title="全部">
|
<van-tab title="全部">
|
||||||
<view class="itemView" wx:for="{{allOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
<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="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<van-tab title="处理中">
|
<van-tab title="处理中">
|
||||||
<view class="itemView" wx:for="{{processOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
<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="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="待评价">
|
<van-tab title="待评价">
|
||||||
<view class="itemView" wx:for="{{evalingOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
<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="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<view class="btn">分享
|
<view class="btn">分享
|
||||||
<button catch class="shareBtn" open-type="share" data-obj="{{item}}">转发</button>
|
<button catch class="shareBtn" open-type="share" data-obj="{{item}}">转发</button>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="已评价">
|
<van-tab title="已评价">
|
||||||
<view class="itemView" wx:for="{{evaledOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
<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="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="无效单">
|
<van-tab title="无效单">
|
||||||
<view class="itemView" wx:for="{{invalidOrder.dataList}}" wx:for-item="item" wx:key="*this">
|
<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="centerView" data-obj="{{item}}" bind:tap="jumpDetail">
|
||||||
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
<view class="showImg" style="background: no-repeat center/cover url({{IMG_NAME + item.visibleImg}});"></view>
|
||||||
<view class="rightView">
|
<view class="rightView">
|
||||||
|
@ -1,381 +1,408 @@
|
|||||||
const app = getApp()
|
const app = getApp()
|
||||||
|
|
||||||
import Notify from '@vant/weapp/notify/notify';
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
|
import Dialog from '@vant/weapp/dialog/dialog';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
selfFormatTimeYMDHMS,
|
selfFormatTimeYMDHMS,
|
||||||
repairAttachUpload,
|
repairAttachUpload,
|
||||||
} from "../../../../utils/util.js"
|
} from "../../../../utils/util.js"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDetailRq,
|
getDetailRq,
|
||||||
getStatusName,
|
getStatusName,
|
||||||
flowHandleRq,
|
flowHandleRq,
|
||||||
faultTypeListRq
|
faultTypeListRq
|
||||||
} from "../../../../api/repair/repair.js"
|
} from "../../../../api/repair/repair.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
id: '',
|
id: '',
|
||||||
detail: {},
|
detail: {},
|
||||||
files: [],
|
files: [],
|
||||||
innerAudioContext: null, // 音频对象
|
innerAudioContext: null, // 音频对象
|
||||||
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
||||||
form: {
|
form: {
|
||||||
cause: "",
|
cause: "",
|
||||||
solution: "",
|
solution: "",
|
||||||
failureTypeId: null,
|
failureTypeId: null,
|
||||||
failureTypeName: "",
|
failureTypeName: "",
|
||||||
resolve: null,
|
resolve: null,
|
||||||
fileList: [],
|
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
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
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() {
|
_this.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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 选择故障类型
|
getDetail(id) {
|
||||||
selectFaultType(e) {
|
let _this = this
|
||||||
console.log('selectFaultType', e);
|
getDetailRq({
|
||||||
let _this = this
|
id
|
||||||
let obj = e.currentTarget.dataset.obj
|
}).then(res => {
|
||||||
let failureTypeList = _this.data.failureTypeList.map(item => {
|
console.log("getDetailRq", res);
|
||||||
if (item.id == obj.id) {
|
// 详情
|
||||||
item.isSelect = !item.isSelect
|
let detail = res.repair
|
||||||
let form = _this.data.form
|
detail.statusName = getStatusName(detail.status)
|
||||||
if (item.isSelect) {
|
// 附件
|
||||||
form.failureTypeId = item.id
|
let files = res.files
|
||||||
form.failureTypeName = item.name
|
files.repair = files.repair.map(item => {
|
||||||
} else {
|
item.url = app.IMG_NAME + item.url
|
||||||
form.failureTypeId = null
|
return item
|
||||||
form.failureTypeName = ''
|
})
|
||||||
}
|
files.voice = files.voice.map(item => {
|
||||||
_this.setData(form)
|
item.url = app.IMG_NAME + item.url
|
||||||
} else {
|
return item
|
||||||
item.isSelect = false
|
})
|
||||||
}
|
_this.setData({
|
||||||
return item
|
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({
|
_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-uploader": "@vant/weapp/uploader/index",
|
||||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||||
"van-checkbox-group": "@vant/weapp/checkbox-group/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="labelView">报修单信息</view>
|
||||||
|
|
||||||
<view class="step1" wx:if="{{detail.status == '5' || detail.status == '7' }}">
|
<view class="step1" wx:if="{{detail.status == '5' || detail.status == '7' }}">
|
||||||
<view class="itemView">
|
<!-- <view class="itemView">
|
||||||
<view class="name">报修名称</view>
|
<view class="name">报修名称</view>
|
||||||
<view class="content">{{detail.repairName}}</view>
|
<view class="content">{{detail.repairName}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="name">故障等级</view>
|
<view class="name">故障等级</view>
|
||||||
<view class="content">{{detail.repairLevel}}</view>
|
<view class="content">{{detail.repairLevel}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<!-- <view class="itemView">
|
||||||
<view class="name">故障时间</view>
|
<view class="name">故障时间</view>
|
||||||
<view class="content">{{detail.repairTime}}</view>
|
<view class="content">{{detail.repairTime}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="name">故障类型</view>
|
<view class="name">故障类型</view>
|
||||||
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
<view class="content">{{detail.typeName + '/' + detail.deviceName}}</view>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
<view class="content">{{detail.address + '/' + detail.floor}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="name">门牌号</view>
|
<view class="name">门牌号(地点)</view>
|
||||||
<view class="content">{{detail.room}}</view>
|
<view class="content">{{detail.room}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
@ -62,14 +62,14 @@
|
|||||||
<view class="name">故障描述</view>
|
<view class="name">故障描述</view>
|
||||||
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
<view class="content">{{detail.explain ? detail.explain : ''}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemView">
|
<!-- <view class="itemView">
|
||||||
<view class="name">相关语音:</view>
|
<view class="name">相关语音:</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="voiceView" wx:if="{{files.voice.length > 0}}">
|
<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" />
|
<van-icon name="{{innerAudioContextIsPlay ? 'volume' : 'volume-o'}}" color="{{innerAudioContextIsPlay ? '#4e96f8' : 'black'}}" size="40rpx" bind:tap="startAudio" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="itemView">
|
<view class="itemView">
|
||||||
<view class="name">报修图片:</view>
|
<view class="name">报修图片:</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -139,6 +139,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<van-dialog id="van-dialog" />
|
||||||
<!-- 消息通知 -->
|
<!-- 消息通知 -->
|
||||||
<van-notify id="van-notify" />
|
<van-notify id="van-notify" />
|
@ -163,7 +163,8 @@ Page({
|
|||||||
let param = {
|
let param = {
|
||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
menu: '5', // 维修
|
// menu: '5', // 维修
|
||||||
|
role: '5',
|
||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
// 查询数据
|
// 查询数据
|
||||||
@ -245,7 +246,7 @@ Page({
|
|||||||
workOrder: {
|
workOrder: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: 'working',
|
type: 'process',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
isDataAll: false,
|
isDataAll: false,
|
||||||
},
|
},
|
||||||
@ -253,7 +254,7 @@ Page({
|
|||||||
closeOrder: {
|
closeOrder: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: 'close',
|
type: 'end',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
isDataAll: false,
|
isDataAll: false,
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<view class="caseListView" wx:if="{{tabTitle == 'wait'}}">
|
<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="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="time">{{item.createTime}}</view>
|
||||||
<view class="status"></view>
|
<view class="status"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<view class="caseListView" wx:if="{{tabTitle == 'working'}}">
|
<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="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="time">{{item.createTime}}</view>
|
||||||
<view class="status"></view>
|
<view class="status"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<view class="caseListView" wx:if="{{tabTitle == 'close'}}">
|
<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="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="time">{{item.createTime}}</view>
|
||||||
<view class="status"></view>
|
<view class="status"></view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -520,20 +520,20 @@ Page({
|
|||||||
//
|
//
|
||||||
// 校验数据
|
// 校验数据
|
||||||
//
|
//
|
||||||
// 报修名称
|
// 报修名称,去掉
|
||||||
if (!detail.repairName) {
|
if (!detail.repairName) {
|
||||||
app.vantNotifyErr(Notify, '输入报修名称!')
|
// app.vantNotifyErr(Notify, '输入报修名称!')
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
// 故障等级
|
// 故障等级,去掉
|
||||||
if (!detail.repairLevel) {
|
if (!detail.repairLevel) {
|
||||||
app.vantNotifyErr(Notify, '请选择故障等级!')
|
// app.vantNotifyErr(Notify, '请选择故障等级!')
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
// 故障时间
|
// 故障时间,去掉
|
||||||
if (!detail.repairTime) {
|
if (!detail.repairTime) {
|
||||||
app.vantNotifyErr(Notify, '请选择故障时间!')
|
// app.vantNotifyErr(Notify, '请选择故障时间!')
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
// 故障类型
|
// 故障类型
|
||||||
if (!detail.typeId) {
|
if (!detail.typeId) {
|
||||||
@ -547,7 +547,7 @@ Page({
|
|||||||
}
|
}
|
||||||
// 门牌号
|
// 门牌号
|
||||||
if (!detail.room) {
|
if (!detail.room) {
|
||||||
app.vantNotifyErr(Notify, '请输入门牌号!')
|
app.vantNotifyErr(Notify, '请输入门牌号(地点)!')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 联系电话
|
// 联系电话
|
||||||
@ -566,8 +566,8 @@ Page({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 故障描述
|
// 故障描述
|
||||||
if (!detail.explain && !voiceObj.tempFilePath) {
|
if (!detail.explain) {
|
||||||
app.vantNotifyErr(Notify, '请输入故障描述或录音!')
|
app.vantNotifyErr(Notify, '请输入故障描述!')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<view class="containerView public">
|
<view class="containerView public">
|
||||||
<view class="contentView">
|
<view class="contentView">
|
||||||
<view class="rowView">
|
<view class="rowView" style="display: none;">
|
||||||
<view class="label must">报修名称</view>
|
<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" />
|
<van-field value="{{ detail.repairName }}" bind:input="fieldInput" data-name="repairName" clearable input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="rowView">
|
<view class="rowView" style="display: none;">
|
||||||
<view class="label must">故障等级</view>
|
<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" />
|
<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>
|
||||||
<view class="rowView" bind:tap="showRepairTime">
|
<view class="rowView" bind:tap="showRepairTime" style="display: none;">
|
||||||
<view class="label must">故障时间</view>
|
<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" />
|
<van-field value="{{ detail.repairTime }}" input-class="input" is-link readonly placeholder="请选择" border="{{ false }}" arrow-direction="down" input-align="right" />
|
||||||
</view>
|
</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" />
|
<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>
|
||||||
<view class="rowView">
|
<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" />
|
<van-field value="{{ detail.room }}" bind:input="fieldInput" data-name="room" clearable input-class="input" placeholder="请输入" border="{{ false }}" input-align="right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="rowView">
|
<view class="rowView">
|
||||||
@ -34,22 +34,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="rowColumnView">
|
<view class="rowColumnView">
|
||||||
<view class="label must">故障描述</view>
|
<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 />
|
||||||
<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>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="rowColumnView">
|
<view class="rowColumnView">
|
||||||
<view class="label">故障图片/视频</view>
|
<view class="label">故障图片/视频</view>
|
||||||
|
@ -186,5 +186,5 @@
|
|||||||
.selfTextarea {
|
.selfTextarea {
|
||||||
min-height: 140rpx !important;
|
min-height: 140rpx !important;
|
||||||
max-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,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user