471615499@qq.com b4417bee7b 20240825代码提交
windows下部分内容与mac不一致,全量提交;
功能改动:
- 去掉“我的报修”页面的“报修名称”、“故障等级”、“故障时间”三个字段
- 派单员页面添加“故障等级”字段,故障等级由派单员选择设置
- “我的报修”页面,“门牌号”修改为“门牌号(地点)”
- 维修人员不允许评价
- 首页加入请求“我的报修”,可以直接点击进入
- 去掉语音输入,必填描述
- 派单列表页调整
- 维修人员退回工单需要必填理由
2024-08-25 18:17:00 +08:00

117 lines
1.8 KiB
JavaScript

let app = getApp();
import Notify from '@vant/weapp/notify/notify';
import {
flowHandleRq
} from "../../../../api/repair/repair.js"
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
id: null,
content: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this;
_this.setData({
...options,
})
},
// input输入内容监听
fieldInput(e) {
console.log('fieldInput', e);
let _this = this;
let detail = _this.data;
detail[e.currentTarget.dataset.name] = e.detail
_this.setData({
...detail
})
},
// 提交
submit() {
let _this = this
// 参数校验
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() {
}
})