diff --git a/api/api.js b/api/api.js
index 4933319..253d263 100644
--- a/api/api.js
+++ b/api/api.js
@@ -358,8 +358,34 @@ const install = (Vue, vm) => {
authorizations: true,
isparams: false
})
+ // 巡检 新加签名和备注字段接口
+ let updateSign = (params) => http.post('/task-serviceman-update-sign', params, {
+ authorizations: true,
+ isparams: false
+ })
+
+ // 获取消息列表
+ let getMesseageList = (params) => http.get('/messeage/list', params, {
+ authorizations: true,
+ isparams: false
+ })
+ // 一键已读
+ let getMesseageAll = (params) => http.post('/messeage/updateStatusAll', params, {
+ authorizations: true,
+ isparams: false
+ })
+ // 更改消息状态
+ let ipdateMesseageStatus = (params) => http.post('/messeage/updateStatus', params, {
+ authorizations: true,
+ isparams: false
+ })
+ // 更改消息状态
+ let getMesseageTotal = (params) => http.get('//messeage/total', params, {
+ authorizations: true,
+ isparams: false
+ })
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
- vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit,repairConfirmFinish,repairRefuseFinish ,confirmPayment,getPosition,getRepairDetail,updatePosition,resetPwd,getNoticeList};
+ vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail, taskSupervisorconfirm, taskServicemanreceive, updateCoordinate, taskServicemanUpdateTime, getPlanDetail, getRepairPage, updateDetaile, taskServicemanSubmit, taskCustomerConfirm, taskCustomerRefuse, taskSolutionSave, taskSolutionSubmit, repairSolutionSupervisor, repairSolutionRefuse, repairSolutionCustomer, repairCustomerRefuse, repairServicemanSubmit,repairConfirmFinish,repairRefuseFinish ,confirmPayment,getPosition,getRepairDetail,updatePosition,resetPwd,getNoticeList,updateSign,getMesseageList,getMesseageAll,ipdateMesseageStatus,getMesseageTotal};
}
export default {
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 2a3da99..6e8ce47 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -68,6 +68,7 @@ export default {
swiperList: [],
workList: [],
pieInfo: {},//饼图数据
+ messageCount:0,//消息通知数量
};
},
onShow() {
@@ -83,7 +84,7 @@ export default {
this.pieStat()
this.getUserInfo()
this.getoverview()
-
+ this.getMesseageTotal()
},
methods: {
// 工作台 列表 overview
@@ -160,6 +161,13 @@ export default {
}
})
},
+ // 获取消息总数
+ getMesseageTotal(){
+ this.$u.api.getMesseageTotal().then(res=>{
+ console.log(res.data)
+ this.messageCount = res.data
+ })
+ }
},
};
diff --git a/pages/inspection/quest.vue b/pages/inspection/quest.vue
index 199fde2..1cbe6a2 100644
--- a/pages/inspection/quest.vue
+++ b/pages/inspection/quest.vue
@@ -91,7 +91,7 @@
-
+
巡检配置
-
-
+
+
-
-
+
+
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
+
+ 驳回原因:
+ {{ detailForm.approveRemark }}
+
+
巡检任务
@@ -89,12 +101,13 @@
- {{ s.checkContent }}
- {{ s.craft }}
+ 设备: {{ s.deviceName }}
+ 内容: {{ s.checkContent }}
+ 工艺: {{ s.craft }}
状态:
-
+
正常
异常
@@ -105,34 +118,22 @@
现场照片:
- 上传照片
+
+ 上传照片
+ 无
-
- 使用人签字:
-
-
-
-
-
-
-
- 备注:
-
-
-
-
-
-
+
+
价格:
-
+
@@ -149,6 +150,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
巡检确认
@@ -161,12 +178,13 @@
-
+
-
+
维修方案审批
@@ -178,7 +196,8 @@
-
+
@@ -196,45 +215,46 @@
-
+
+ v-if="dataTypes == 4 && detailForm.taskStatus == 1 && detailsType == 'task'">
取消
接单
+ v-if="dataTypes == 4 && detailForm.taskStatus == 2 && detailsType == 'task'">
取消
提交
+ v-if="dataTypes == 1 && detailForm.taskStatus == 3 && detailsType == 'task'">
取消
提交
+ v-if="dataTypes == 4 && detailForm.repairStatus == 1 && detailsType == 'repair'">
取消
提交方案
+ v-if="dataTypes == 3 && detailForm.repairStatus == 2 && detailsType == 'repair'">
取消
提交
+ v-if="dataTypes == 1 && detailForm.repairStatus == 3 && detailsType == 'repair'">
取消
提交
@@ -257,7 +277,12 @@ export default {
reservationDisabled() {
return (this.dataTypes == 4 && this.detailForm.taskStatus == 1) || (this.type == 'view') ? true : false
},
-
+ taskDisabled() {
+ return (this.dataTypes == 4 && (this.detailForm.taskStatus == 2)) ? false : true
+ },
+ priceDisabled() {
+ return this.dataTypes == 4 && (this.detailForm.repairStatus == 1 || this.detailForm.repairStatus == 101) ? false : true
+ }
},
data() {
return {
@@ -270,6 +295,8 @@ export default {
maxDate: null,
calendarShow: false,//预约时间
collapseData: [],
+ signUrl: '',//签字
+ remark: '',//备注
approveInfo: {//维修负责人审批
approvePerson: '',//审批人 id
approveRemark: '',//审批备注
@@ -331,6 +358,7 @@ export default {
this.$u.api.getTaskDetail(query).then(res => {
if (res.code == 200) {
this.detailForm = res.data
+ this.updateData(res.data.details)
this.collapseData = JSON.parse(JSON.stringify(res.data.details))
}
})
@@ -338,12 +366,24 @@ export default {
this.$u.api.getRepairDetail(query).then(res => {
if (res.code == 200) {
this.detailForm = res.data
+ this.updateData(res.data.details)
this.collapseData = JSON.parse(JSON.stringify(res.data.details))
}
})
}
},
+ // 处理数据 更改数据价格为-1的数据
+ updateData(data) {
+ if (data.length > 0) {
+ for (let i = 0; i < data.length; i++) {
+ data[i].price = data[i].price < 0 ? null : data[i].price
+ if (data[i].details.length > 0) {
+ this.updateData(data[i].details)
+ }
+ }
+ }
+ },
endOrderCancel() {
uni.navigateBack({
delta: 1 // 默认值是1,表示回退一个页面
@@ -383,7 +423,7 @@ export default {
sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
success: (res) => {
- // this.BetLoading.show()
+ this.$refs.BetLoading.show()
// 成功选择图片后的回调
const tempFilePaths = res.tempFilePaths;
this.uploadFile(tempFilePaths[0], index, vindex, sindex);
@@ -406,10 +446,11 @@ export default {
let info = JSON.parse(res.data);
console.log("上传成功", info); // 上传成功后的操作
this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link
- // this.BetLoading.hide()
+ this.itemCollapseChange()
+ this.$refs.BetLoading.hide()
},
error: (uploadFileRes) => {
- // this.BetLoading.hide()
+ this.$refs.BetLoading.hide()
},
});
},
@@ -419,43 +460,51 @@ export default {
let status = newArr.every((item) => {
return item.status != null
})
- let signUrl = newArr.every((item) => {
- return item.signUrl !== ''
- })
if (!status) {
uni.showToast({ title: "请选择设备状态", icon: "none" });
return false
}
- if (!signUrl) {
+ if (this.signUrl == '') {
uni.showToast({ title: "请填写使用人", icon: "none" });
return false
}
let queryData = []
newArr.forEach(item => {
- // item.id=this.detailForm.id
queryData.push({
- id: this.detailForm.id,
+ id: item.id,
status: item.status,
- signUrl: item.signUrl,
- remark: item.remark
+ // signUrl: item.signUrl,
+ // remark: item.remark,
+ picUrl: item.picUrl,
+ taskId: this.detailForm.id
})
})
this.$u.api.updateDetaile(queryData).then(res => {
if (res.code == 200) {
- let query = {
- id: this.detailForm.id,
+ let signInfo={
+ id:this.detailForm.id,
+ signUrl:this.signUrl,
+ remark:this.remark
}
- this.$u.api.taskServicemanSubmit(query).then(res => {
+ this.$u.api.updateSign(signInfo).then(res => {
if (res.code == 200) {
- uni.showToast({ title: "提交成功", icon: "none" });
- setTimeout(() => {
- uni.navigateBack({
- delta: 1 // 默认值是1,表示回退一个页面
- })
- }, 500)
+ let query = {
+ id: this.detailForm.id,
+ }
+ // this.$u.api.taskServicemanSubmit(query).then(res => {
+ // if (res.code == 200) {
+ // uni.showToast({ title: "提交成功", icon: "none" });
+ // setTimeout(() => {
+ // uni.navigateBack({
+ // delta: 1 // 默认值是1,表示回退一个页面
+ // })
+ // }, 500)
+ // }
+ // })
}
})
+
}
})
},
@@ -590,17 +639,20 @@ export default {
let isRepair = newArr.every((item) => {
return item.isRepair == -1
})
- if (isRepair) {
- uni.showToast({ title: "请选择异常设备是否维修", icon: "none" });
- return false
- }
if (this.customerApproveInfo.approveResult == null) {
uni.showToast({ title: "请选择审核结果", icon: "none" });
return false
}
- if (this.customerApproveInfo.approveResult == 0 && this.customerApproveInfo.approveRemark == '') {
- uni.showToast({ title: "请填写驳回原因", icon: "none" });
- return false
+ if (this.customerApproveInfo.approveResult == 1) {
+ if (isRepair) {
+ uni.showToast({ title: "请选择异常设备是否维修", icon: "none" });
+ return false
+ }
+
+ if (this.customerApproveInfo.approveResult == 0 && this.customerApproveInfo.approveRemark == '') {
+ uni.showToast({ title: "请填写驳回原因", icon: "none" });
+ return false
+ }
}
if (this.customerApproveInfo.approveResult == 1) {//通过
@@ -627,14 +679,14 @@ export default {
approveTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//当前时间
approveRemark: this.customerApproveInfo.approveRemark,//审批备注
}
- // this.$u.api.repairCustomerRefuse(query_).then(res => {
- // if (res.code == 200) {
- // uni.showToast({ title: "审核成功", icon: "none" });
- // setTimeout(() => {
- // this.endOrderCancel()
- // }, 500)
- // }
- // })
+ this.$u.api.repairCustomerRefuse(query_).then(res => {
+ if (res.code == 200) {
+ uni.showToast({ title: "驳回成功", icon: "none" });
+ setTimeout(() => {
+ this.endOrderCancel()
+ }, 500)
+ }
+ })
}
},
@@ -692,6 +744,12 @@ export default {
calendarChange(e) {
this.reservationTime = e.result
}
+ },
+ // 更改 手风琴的高度
+ itemCollapseChange() {
+ this.$nextTick(() => {
+ this.$refs.collapseTask.init()
+ })
}
}
@@ -744,8 +802,9 @@ export default {
}
.item_right_img {
- width: 100%;
- height: 200rpx;
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 8rpx;
}
}
}
diff --git a/pages/notice/index.vue b/pages/notice/index.vue
index 112b0bc..529fd61 100644
--- a/pages/notice/index.vue
+++ b/pages/notice/index.vue
@@ -12,9 +12,9 @@
{{ item.title }}
-
+
- {{ item.createdAt }}
+ {{ item.type == 1 ? '维修' : '维保' }}
{{ item.content }}
@@ -25,6 +25,7 @@
+
@@ -527,6 +551,7 @@ export default {
.page-css {
padding: 0;
padding-top: var(--status-bar-height);
+
.page-box {
padding: 0;
diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue
index 7f4a7b4..8abd499 100644
--- a/pages/submission/sendOrders.vue
+++ b/pages/submission/sendOrders.vue
@@ -81,6 +81,16 @@
+
+ 维修人员驳回
+ 主管驳回
+ 客户驳回
+
+
+ {{ detailForm.approveRemark }}
+
+
+