diff --git a/miniprogram/api/repair/repair.js b/miniprogram/api/repair/repair.js
index 793febb..38be7e6 100644
--- a/miniprogram/api/repair/repair.js
+++ b/miniprogram/api/repair/repair.js
@@ -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 已评价
diff --git a/miniprogram/app.js b/miniprogram/app.js
index 8770cdd..2cc93c6 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -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')
+ },
})
\ No newline at end of file
diff --git a/miniprogram/app.json b/miniprogram/app.json
index 2e606b4..64e9992 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -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"
],
diff --git a/miniprogram/pages/reportRepair/assign/detail/detail.js b/miniprogram/pages/reportRepair/assign/detail/detail.js
index e34fca6..ee2a093 100644
--- a/miniprogram/pages/reportRepair/assign/detail/detail.js
+++ b/miniprogram/pages/reportRepair/assign/detail/detail.js
@@ -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}`,
+ })
},
/**
diff --git a/miniprogram/pages/reportRepair/assign/feedback/feedback.js b/miniprogram/pages/reportRepair/assign/feedback/feedback.js
index b869e2f..fe96f07 100644
--- a/miniprogram/pages/reportRepair/assign/feedback/feedback.js
+++ b/miniprogram/pages/reportRepair/assign/feedback/feedback.js
@@ -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() {
+
+ }
})
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/feedback/feedback.json b/miniprogram/pages/reportRepair/assign/feedback/feedback.json
index f99750a..392dae5 100644
--- a/miniprogram/pages/reportRepair/assign/feedback/feedback.json
+++ b/miniprogram/pages/reportRepair/assign/feedback/feedback.json
@@ -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"
}
}
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/feedback/feedback.wxml b/miniprogram/pages/reportRepair/assign/feedback/feedback.wxml
index f60a8d4..af61d02 100644
--- a/miniprogram/pages/reportRepair/assign/feedback/feedback.wxml
+++ b/miniprogram/pages/reportRepair/assign/feedback/feedback.wxml
@@ -1,14 +1,12 @@
-
- 提交反馈
-
-
-
-
-
-
+
+ 描述信息
+
+
- 提交
+提交
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/nullify/nullify.js b/miniprogram/pages/reportRepair/assign/nullify/nullify.js
new file mode 100644
index 0000000..5da5ced
--- /dev/null
+++ b/miniprogram/pages/reportRepair/assign/nullify/nullify.js
@@ -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() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/nullify/nullify.json b/miniprogram/pages/reportRepair/assign/nullify/nullify.json
new file mode 100644
index 0000000..d939578
--- /dev/null
+++ b/miniprogram/pages/reportRepair/assign/nullify/nullify.json
@@ -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"
+ }
+}
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/nullify/nullify.wxml b/miniprogram/pages/reportRepair/assign/nullify/nullify.wxml
new file mode 100644
index 0000000..e3bdc39
--- /dev/null
+++ b/miniprogram/pages/reportRepair/assign/nullify/nullify.wxml
@@ -0,0 +1,12 @@
+
+
+
+ 描述信息
+
+
+
+ 提交
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/assign/nullify/nullify.wxss b/miniprogram/pages/reportRepair/assign/nullify/nullify.wxss
new file mode 100644
index 0000000..792c018
--- /dev/null
+++ b/miniprogram/pages/reportRepair/assign/nullify/nullify.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/miniprogram/pages/reportRepair/report/report.js b/miniprogram/pages/reportRepair/report/report.js
index 3efccff..bf44a5e 100644
--- a/miniprogram/pages/reportRepair/report/report.js
+++ b/miniprogram/pages/reportRepair/report/report.js
@@ -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)
}
})
},