This commit is contained in:
SelfRidicule 2024-08-14 10:21:46 +08:00
parent 31e3192087
commit 760502fbb9
12 changed files with 328 additions and 71 deletions

View File

@ -70,6 +70,15 @@ export function getDetailRq(data) {
});
}
// 流程处理
export function flowHandleRq(data) {
return request({
url: `/app/repair/flow/handle`,
method: "post",
data
});
}
// 返回订单状态
// 状态:1 待派单,3 重新派单,5 已派单,7 处理中, 9已完成 待评价, 11 已关闭 13 已评价

View File

@ -302,4 +302,22 @@ App({
}
})
},
// 消息提示
vantNotify(Notify, msg, type) {
if (!type) {
type = 'primary'
}
Notify({
type,
message: msg
});
},
// 消息提示
vantNotifySuccess(Notify, msg) {
this.vantNotify(Notify , msg , 'primary')
},
// 消息提示
vantNotifyErr(Notify, msg) {
this.vantNotify(Notify , msg , 'danger')
},
})

View File

@ -84,6 +84,7 @@
"pages/reportRepair/assign/affirm/affirm",
"pages/reportRepair/assign/personList/personList",
"pages/reportRepair/assign/again/again",
"pages/reportRepair/assign/nullify/nullify",
"pages/reportRepair/repair/index/index",
"pages/reportRepair/repair/case/case"
],

View File

@ -99,25 +99,29 @@ Page({
},
// 确认损坏
jumpAffirm() {
let _this = this
wx.navigateTo({
url: '/pages/reportRepair/assign/affirm/affirm',
url: `/pages/reportRepair/assign/affirm/affirm?id=${_this.data.id}`,
})
},
// 提交反馈
jumpFeedback() {
let _this = this
wx.navigateTo({
url: '/pages/reportRepair/assign/feedback/feedback',
url: `/pages/reportRepair/assign/feedback/feedback?id=${_this.data.id}`,
})
},
// 无效
invalid() {
wx.navigateBack()
let _this = this
wx.navigateTo({
url: `/pages/reportRepair/assign/nullify/nullify?id=${_this.data.id}`,
})
},
/**

View File

@ -1,66 +1,113 @@
// pages/reportRepair/reportEvaluate/evaluate.js
let app = getApp();
import Notify from '@vant/weapp/notify/notify';
import {
flowHandleRq
} from "../../../../api/repair/repair.js"
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
id: null,
content: '',
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this;
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
_this.setData({
...options,
})
},
},
// input输入内容监听
fieldInput(e) {
console.log('fieldInput', e);
let _this = this;
let detail = _this.data;
detail[e.currentTarget.dataset.name] = e.detail
_this.setData({
...detail
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
// 提交
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)
wx.navigateBack({
delta: 2
})
} else {
app.vantNotifyErr(Notify, res.msg)
}
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
}
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -3,6 +3,7 @@
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-field": "@vant/weapp/field/index",
"van-uploader": "@vant/weapp/uploader/index"
"van-uploader": "@vant/weapp/uploader/index",
"van-notify": "@vant/weapp/notify/index"
}
}

View File

@ -1,14 +1,12 @@
<view class="containerView public">
<view class="regionView">
<view class="topTitle">提交反馈</view>
<van-field model:value="{{ value }}" type="textarea" placeholder="请输入用户名" maxlength="{{100}}" show-word-limit border="{{false}}" autosize input-class="selfTextarea" />
<!-- 上传图片 -->
<view class="uploadImgView">
<van-uploader file-list="{{ fileList }}" upload-text="点击上传照片" use-before-read bind:before-read="beforeRead" bind:after-read="afterRead" deletable="{{ true }}" bind:delete="deleteImg" max-count="1" />
</view>
</view>
<view class="regionView">
<view class="topTitle">描述信息</view>
<van-field model:value="{{ content }}" bind:input="fieldInput" data-name="content" type="textarea" placeholder="请输入" maxlength="{{100}}" show-word-limit border="{{false}}" autosize input-class="selfTextarea" clearable />
</view>
<view class="submitBtn">提交</view>
<view class="submitBtn" bind:tap="submit">提交</view>
<!-- 在页面内添加对应的节点 -->
<van-notify id="van-notify" />
</view>

View File

@ -0,0 +1,113 @@
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
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)
wx.navigateBack({
delta: 2
})
} else {
app.vantNotifyErr(Notify, res.msg)
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "无效申请",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-field": "@vant/weapp/field/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-notify": "@vant/weapp/notify/index"
}
}

View File

@ -0,0 +1,12 @@
<view class="containerView public">
<view class="regionView">
<view class="topTitle">描述信息</view>
<van-field model:value="{{ content }}" bind:input="fieldInput" data-name="content" type="textarea" placeholder="请输入" maxlength="{{100}}" show-word-limit border="{{false}}" autosize input-class="selfTextarea" clearable />
</view>
<view class="submitBtn" bind:tap="submit">提交</view>
<!-- 在页面内添加对应的节点 -->
<van-notify id="van-notify" />
</view>

View File

@ -0,0 +1,44 @@
.containerView.public {
background: none;
}
.regionView {
margin-top: 2rpx;
padding: 30rpx 40rpx 40rpx;
background: white;
}
.regionView .topTitle {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.regionView .itemView {
display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 20rpx;
}
.regionView .itemView .label {
margin: 0 60rpx 0 20rpx;
font-size: 28rpx;
color: gray;
}
.regionView .itemView .star {
margin-right: 10rpx;
}
.selfTextarea{
min-height: 200rpx !important;
max-height: 200rpx !important;
}
.uploadImgView {
border: 1rpx dashed #c9c9c9;
margin-top: 10rpx;
padding: 10rpx 40rpx;
background-color: #ffffff;
}

View File

@ -522,52 +522,52 @@ Page({
//
// 报修名称
if (!detail.repairName) {
_this.showErrMsg('输入报修名称!')
app.vantNotifyErr(Notify, '输入报修名称!')
return;
}
// 故障等级
if (!detail.repairLevel) {
_this.showErrMsg('请选择故障等级!')
app.vantNotifyErr(Notify, '请选择故障等级!')
return;
}
// 故障时间
if (!detail.repairTime) {
_this.showErrMsg('请选择故障时间!')
app.vantNotifyErr(Notify, '请选择故障时间!')
return;
}
// 故障类型
if (!detail.typeId) {
_this.showErrMsg('请选择故障类型!')
app.vantNotifyErr(Notify, '请选择故障类型!')
return;
}
// 故障地点
if (!detail.addressId) {
_this.showErrMsg('请选择故障地点!')
app.vantNotifyErr(Notify, '请选择故障地点!')
return;
}
// 门牌号
if (!detail.room) {
_this.showErrMsg('请输入门牌号!')
app.vantNotifyErr(Notify, '请输入门牌号!')
return;
}
// 联系电话
if (detail.phone) {
if (detail.phone.length != 11) {
_this.showErrMsg('请输入11位联系电话!')
app.vantNotifyErr(Notify, '请输入11位联系电话!')
return;
}
} else {
_this.showErrMsg('请输入联系电话!')
app.vantNotifyErr(Notify, '请输入联系电话!')
return;
}
// 报修人姓名
if (!detail.name) {
_this.showErrMsg('请输入报修人姓名!')
app.vantNotifyErr(Notify, '请输入报修人姓名!')
return;
}
// 故障描述
if (!detail.explain) {
_this.showErrMsg('请输入故障描述!')
app.vantNotifyErr(Notify, '请输入故障描述!')
return;
}
//
@ -592,9 +592,10 @@ Page({
console.log('visitorPersonRq', res);
//
if (res.code == 0) {
app.vantNotifySuccess(Notify, res.msg)
wx.navigateBack()
} else {
_this.showErrMsg(res.msg)
app.vantNotifyErr(Notify, res.msg)
}
})
},