mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 06:39:37 +08:00
描述:重新派单
This commit is contained in:
parent
fbd901a3e7
commit
31773e156f
@ -303,14 +303,18 @@ App({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 消息提示
|
// 消息提示
|
||||||
vantNotify(Notify, msg, type) {
|
vantNotify(Notify, msg, type, top) {
|
||||||
if (!type) {
|
let data = {
|
||||||
type = 'primary'
|
|
||||||
}
|
|
||||||
Notify({
|
|
||||||
type,
|
type,
|
||||||
message: msg
|
message: msg,
|
||||||
});
|
}
|
||||||
|
if (!type) {
|
||||||
|
data.type = 'primary'
|
||||||
|
}
|
||||||
|
if (top) {
|
||||||
|
data.top = top
|
||||||
|
}
|
||||||
|
Notify(data);
|
||||||
},
|
},
|
||||||
// 消息提示
|
// 消息提示
|
||||||
vantNotifySuccess(Notify, msg) {
|
vantNotifySuccess(Notify, msg) {
|
||||||
@ -320,4 +324,12 @@ App({
|
|||||||
vantNotifyErr(Notify, msg) {
|
vantNotifyErr(Notify, msg) {
|
||||||
this.vantNotify(Notify, msg, 'danger')
|
this.vantNotify(Notify, msg, 'danger')
|
||||||
},
|
},
|
||||||
|
// 消息提示
|
||||||
|
vantNotifySuccessTop(Notify, msg) {
|
||||||
|
this.vantNotify(Notify, msg, 'primary', 90)
|
||||||
|
},
|
||||||
|
// 消息提示
|
||||||
|
vantNotifyErrTop(Notify, msg) {
|
||||||
|
this.vantNotify(Notify, msg, 'danger', 90)
|
||||||
|
},
|
||||||
})
|
})
|
@ -1,8 +1,13 @@
|
|||||||
const app = getApp()
|
const app = getApp()
|
||||||
|
|
||||||
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
deviceTypeListRq,
|
||||||
|
deviceListRq,
|
||||||
getDetailRq,
|
getDetailRq,
|
||||||
getStatusName
|
getStatusName,
|
||||||
|
flowHandleRq
|
||||||
} from "../../../../api/repair/repair.js"
|
} from "../../../../api/repair/repair.js"
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
@ -14,6 +19,21 @@ Page({
|
|||||||
IMG_NAME: app.IMG_NAME,
|
IMG_NAME: app.IMG_NAME,
|
||||||
id: '',
|
id: '',
|
||||||
detail: {},
|
detail: {},
|
||||||
|
currentLog: {},
|
||||||
|
typeVisible: false,
|
||||||
|
typeColumns: [{
|
||||||
|
values: [],
|
||||||
|
className: 'column1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
values: [],
|
||||||
|
className: 'column2',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"typeId": null, //故障类型
|
||||||
|
"typeName": "", //故障名称
|
||||||
|
"deviceId": null, //设备
|
||||||
|
"deviceName": "", //设备名称
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +46,8 @@ Page({
|
|||||||
...options
|
...options
|
||||||
})
|
})
|
||||||
_this.getDetail(options.id)
|
_this.getDetail(options.id)
|
||||||
|
// 查询设备类型
|
||||||
|
_this.queryDeviceType()
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
@ -42,30 +64,146 @@ Page({
|
|||||||
let detail = res.repair
|
let detail = res.repair
|
||||||
detail.statusName = getStatusName(detail.status)
|
detail.statusName = getStatusName(detail.status)
|
||||||
|
|
||||||
|
// 日志
|
||||||
|
if (detail.logId) {
|
||||||
|
let firstLog = res.log.find(item => item.id == detail.logId)
|
||||||
|
if (firstLog) {
|
||||||
|
let preLog = res.log.find(item => item.id == firstLog.pid)
|
||||||
|
_this.setData({
|
||||||
|
currentLog: preLog
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this.setData({
|
_this.setData({
|
||||||
detail,
|
detail,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认损坏
|
showType() {
|
||||||
jumpAffirm(){
|
this.setData({
|
||||||
wx.navigateTo({
|
typeVisible: true,
|
||||||
url: '/pages/reportRepair/assign/affirm/affirm',
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideType() {
|
||||||
// 提交反馈
|
this.setData({
|
||||||
jumpFeedback(){
|
typeVisible: false,
|
||||||
wx.navigateTo({
|
|
||||||
url: '/pages/reportRepair/assign/feedback/feedback',
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 无效
|
// 查询设备类型
|
||||||
invalid(){
|
queryDeviceType() {
|
||||||
wx.navigateBack()
|
let _this = this
|
||||||
|
deviceTypeListRq().then(res => {
|
||||||
|
console.log('deviceTypeListRq', res);
|
||||||
|
let list = res.rows.map(item => {
|
||||||
|
return {
|
||||||
|
id: item.id,
|
||||||
|
text: item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let typeColumns = _this.data.typeColumns
|
||||||
|
typeColumns[0].values = list
|
||||||
|
_this.setData({
|
||||||
|
typeColumns
|
||||||
|
})
|
||||||
|
// 查询设备
|
||||||
|
_this.queryDevice(list[0].id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询设备
|
||||||
|
queryDevice(id) {
|
||||||
|
let _this = this
|
||||||
|
|
||||||
|
deviceListRq({
|
||||||
|
typeId: id
|
||||||
|
}).then(res => {
|
||||||
|
console.log('deviceListRq', res);
|
||||||
|
let list = res.rows.map(item => {
|
||||||
|
return {
|
||||||
|
id: item.id,
|
||||||
|
text: item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let typeColumns = _this.data.typeColumns
|
||||||
|
typeColumns[1].values = list
|
||||||
|
_this.setData({
|
||||||
|
typeColumns
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择设备类型
|
||||||
|
typeColumnsChange(e) {
|
||||||
|
console.log('typeColumnsChange', e.detail);
|
||||||
|
let _this = this
|
||||||
|
const {
|
||||||
|
picker,
|
||||||
|
value,
|
||||||
|
index
|
||||||
|
} = e.detail;
|
||||||
|
if (index == 0) { // 选择类型
|
||||||
|
let obj = value[index]
|
||||||
|
_this.queryDevice(obj.id)
|
||||||
|
|
||||||
|
} else if (index == 1) { // 选择设备
|
||||||
|
let obj = value[index]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确认设备
|
||||||
|
typeColumnsConfirm(e) {
|
||||||
|
console.log('typeColumnsConfirm', e.detail);
|
||||||
|
let _this = this
|
||||||
|
const {
|
||||||
|
picker,
|
||||||
|
value,
|
||||||
|
index
|
||||||
|
} = e.detail;
|
||||||
|
|
||||||
|
_this.setData({
|
||||||
|
typeId: value[0].id,
|
||||||
|
typeName: value[0].text,
|
||||||
|
deviceId: value[1].id,
|
||||||
|
deviceName: value[1].text,
|
||||||
|
typeVisible: false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
submit() {
|
||||||
|
let _this = this
|
||||||
|
// 参数校验
|
||||||
|
if (!_this.data.typeId) {
|
||||||
|
// 危险通知
|
||||||
|
app.vantNotifyErrTop(Notify, '请选择故障类型!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 提交参数
|
||||||
|
let data = {
|
||||||
|
"repair": {
|
||||||
|
id: _this.data.id,
|
||||||
|
typeId: _this.data.typeId,
|
||||||
|
typeName: _this.data.typeName,
|
||||||
|
deviceId: _this.data.deviceId,
|
||||||
|
deviceName: _this.data.deviceName,
|
||||||
|
},
|
||||||
|
"content": '重新指派设备类型',
|
||||||
|
"operate": "NEXT"
|
||||||
|
}
|
||||||
|
flowHandleRq(data).then(res => {
|
||||||
|
console.log('flowHandleRq', res);
|
||||||
|
if (res.code == 0) {
|
||||||
|
app.vantNotifySuccessTop(Notify, res.msg)
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
app.vantNotifyErrTop(Notify, res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-icon": "@vant/weapp/icon/index"
|
"van-icon": "@vant/weapp/icon/index",
|
||||||
|
"van-popup": "@vant/weapp/popup/index",
|
||||||
|
"van-notify": "@vant/weapp/notify/index",
|
||||||
|
"van-picker": "@vant/weapp/picker/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,28 +22,36 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="reportView">
|
<view class="reportView">
|
||||||
<view class="topTitle">反馈</view>
|
<view class="topTitle">派单反馈</view>
|
||||||
<view class="selfLine"></view>
|
<view class="selfLine"></view>
|
||||||
<view class="itemLineView">
|
<view class="itemLineView">
|
||||||
<view class="label">反馈人员</view>
|
<view class="label">反馈人员</view>
|
||||||
<view class="content">王军</view>
|
<view class="content">{{currentLog.recUserName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemLineView">
|
<view class="itemLineView">
|
||||||
<view class="label">反馈描述</view>
|
<view class="label">反馈描述</view>
|
||||||
<view class="content">类型不一致类型不一致类型不一致类型不一致类型不一致</view>
|
<view class="content">{{currentLog.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="reportView">
|
<view class="reportView">
|
||||||
<view class="topTitle">故障类型</view>
|
<view class="topTitle">故障类型</view>
|
||||||
<view class="selfLine"></view>
|
<view class="selfLine"></view>
|
||||||
<view class="itemLineCenterView">
|
<view class="itemLineCenterView" bind:tap="showType">
|
||||||
<view class="label">请选择重新选择故障类型</view>
|
<view class="label">{{ typeName ? typeName + '/' + deviceName : '请选择故障类型' }}</view>
|
||||||
<van-icon name="arrow" color="gray" size="34rpx" />
|
<van-icon name="arrow" color="gray" size="34rpx" />
|
||||||
</view>
|
</view>
|
||||||
<view class="tijiaoBtn">提交</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="tijiaoBtn" bind:tap="submit">提交</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 故障类型 -->
|
||||||
|
<van-popup show="{{ typeVisible }}" position="bottom" custom-style="height: 50vh;" bind:close="hideType">
|
||||||
|
<van-picker show-toolbar columns="{{ typeColumns }}" bind:change="typeColumnsChange" bind:confirm="typeColumnsConfirm" bind:cancel="hideType" />
|
||||||
|
</van-popup>
|
||||||
|
|
||||||
|
<!-- 在页面内添加对应的节点 -->
|
||||||
|
<van-notify id="van-notify" />
|
@ -17,6 +17,7 @@ Page({
|
|||||||
id: '',
|
id: '',
|
||||||
detail: {},
|
detail: {},
|
||||||
files: {},
|
files: {},
|
||||||
|
currentLog: {},
|
||||||
innerAudioContext: null, // 音频对象
|
innerAudioContext: null, // 音频对象
|
||||||
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
innerAudioContextIsPlay: false, // 音频对象-是否播放
|
||||||
},
|
},
|
||||||
@ -56,6 +57,17 @@ Page({
|
|||||||
item.url = app.IMG_NAME + item.url
|
item.url = app.IMG_NAME + item.url
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
|
// 日志
|
||||||
|
if (detail.logId) {
|
||||||
|
let firstLog = res.log.find(item => item.id == detail.logId)
|
||||||
|
if (firstLog) {
|
||||||
|
let preLog = res.log.find(item => item.id == firstLog.pid)
|
||||||
|
_this.setData({
|
||||||
|
currentLog: preLog
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this.setData({
|
_this.setData({
|
||||||
detail,
|
detail,
|
||||||
files
|
files
|
||||||
|
@ -84,11 +84,11 @@
|
|||||||
<view class="selfLine"></view>
|
<view class="selfLine"></view>
|
||||||
<view class="itemLineView">
|
<view class="itemLineView">
|
||||||
<view class="label">反馈人员</view>
|
<view class="label">反馈人员</view>
|
||||||
<view class="content">王军</view>
|
<view class="content">{{currentLog.recUserName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemLineView">
|
<view class="itemLineView">
|
||||||
<view class="label">反馈描述</view>
|
<view class="label">反馈描述</view>
|
||||||
<view class="content">类型不一致类型不一致类型不一致类型不一致类型不一致</view>
|
<view class="content">{{currentLog.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user