diff --git a/config/status.js b/config/status.js index e945e18..53f5044 100644 --- a/config/status.js +++ b/config/status.js @@ -15,11 +15,11 @@ export const tabList = { }, { name: "待维修", - key: "1,2,3", + key: "1,2,3,100", }, { name: "已驳回", - key: "100,101,102", + key: "102", }, { @@ -28,7 +28,7 @@ export const tabList = { }, { name: "维修中", - key: "5", + key: "5,101", }, { name: "待评价", @@ -152,6 +152,9 @@ export const tabListColor = { "待评价": "#67c23a", "待付款": "#67c23a", "已驳回": "#f56c6c", + "主管驳回": "#f56c6c", + "客户驳回": "#f56c6c", + "维修驳回": "#f56c6c", "待审批": "#409eff", "已通过": "#409eff", "待确认": "#67c23a", @@ -400,5 +403,8 @@ export const tabTaskListColor={ "维修完成": "#67c23a", "待付款": "#67c23a", "已驳回": "#f56c6c", + "主管驳回": "#f56c6c", + "客户驳回": "#f56c6c", + "维修驳回": "#f56c6c", } diff --git a/pages/inspection/quest.vue b/pages/inspection/quest.vue index 1e4a35a..4e5e207 100644 --- a/pages/inspection/quest.vue +++ b/pages/inspection/quest.vue @@ -74,12 +74,12 @@ - 审批 - 提交 维修完成 @@ -113,7 +113,8 @@ - + import recordsdetails from './components/details.vue' -import { tabTaskList, tabTaskRepairList,tabTaskListColor } from '@/config/status.js' +import { tabTaskList, tabTaskRepairList, tabTaskListColor } from '@/config/status.js' export default { components: { recordsdetails @@ -140,7 +141,7 @@ export default { }, userInfo: {},//用户信息 rowInfo: {},//选中行数据 - + tabList: [], tasktabList: [], current: 0, @@ -183,7 +184,7 @@ export default { // return this.$store.state.dataType }, - tagColor(){ + tagColor() { return tabTaskListColor }, }, @@ -392,7 +393,7 @@ export default { this.$u.api.confirmPayment(query).then(res => { this.paymentShow = false - + if (res.code == 200) { uni.showToast({ title: "确认成功", icon: "none" }); this.getRecordsList() @@ -416,7 +417,8 @@ export default { let sta = i.key.split(',') return sta.includes(item + '') }) - return newArr.length<=0?'':newArr[0].name + return newArr.length <= 0 ? '' : newArr[0].name + }, // 巡检维修 taskStatusName(item) { @@ -424,7 +426,18 @@ export default { let sta = i.key.split(',') return sta.includes(item + '') }) - return newArr.length<=0?'':newArr[0].name + if (this.dataTypes != 1) { + if (item == 100) { + return '维修驳回' + } + if (item == 101) { + return '主管驳回' + } + if (item == 102) { + return '客户驳回' + } + } + return newArr.length <= 0 ? '' : newArr[0].name }, detailsShowFn() { // 调用组件实例中h2cRenderDom方法 @@ -452,6 +465,7 @@ export default { .page-css { padding: 0; padding-top: var(--status-bar-height); + .page-search-top { height: 220rpx; background-color: #fff; diff --git a/pages/inspection/questDetails.vue b/pages/inspection/questDetails.vue index 1b3d39b..5a40287 100644 --- a/pages/inspection/questDetails.vue +++ b/pages/inspection/questDetails.vue @@ -26,7 +26,18 @@ {{ detailForm.reservationTime }} - + + + 维修人员驳回 + 主管驳回 + 客户驳回 + + 驳回原因: + {{ detailForm.approveRemark }} + + + 巡检任务 @@ -142,6 +153,7 @@ export default { padding: 0; padding-top: 26rpx; height: 100vh; + .info { margin: 0 24rpx 20rpx; border-radius: 20rpx; @@ -182,7 +194,8 @@ export default { // text-align: left; text-align: justify; font-family: SourceHanSansSC-regular; - image{ + + image { width: 100rpx; height: 100rpx; } diff --git a/pages/inspection/questOrder.vue b/pages/inspection/questOrder.vue index a986853..224e067 100644 --- a/pages/inspection/questOrder.vue +++ b/pages/inspection/questOrder.vue @@ -15,12 +15,14 @@ 巡检配置 - - + + - - + + + + 维修人员驳回 + 主管驳回 + 客户驳回 + + 驳回原因: + {{ detailForm.approveRemark }} + + 巡检任务 - + 实验室楼层:{{ item.floorName }} @@ -94,7 +106,7 @@ 状态: - + 正常 异常 @@ -105,18 +117,20 @@ 现场照片: - 上传照片 + 上传照片 + - + + 使用人签字: - - + + @@ -125,22 +139,23 @@ 备注: - - + + - + 价格: - + 是否维修: - - + + @@ -161,12 +176,13 @@ - + - + 维修方案审批 @@ -178,7 +194,8 @@ - + @@ -196,45 +213,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 || detailForm.repairStatus == 101) && detailsType == 'repair'"> 取消 提交方案 + v-if="dataTypes == 3 && (detailForm.repairStatus == 2 || detailForm.repairStatus == 102) && detailsType == 'repair'"> 取消 提交 + v-if="dataTypes == 1 && detailForm.repairStatus == 3 && detailsType == 'repair'"> 取消 提交 @@ -257,6 +275,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() { @@ -331,19 +355,33 @@ 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)) + } }) } else { 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 +421,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 +444,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() }, }); }, @@ -432,13 +471,16 @@ export default { return false } let queryData = [] + console.log(111111111, newArr) 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 + remark: item.remark, + picUrl: item.picUrl, + taskId: this.detailForm.id }) }) this.$u.api.updateDetaile(queryData).then(res => { @@ -590,19 +632,21 @@ 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) {//通过 let query = { task: { @@ -627,14 +671,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) + } + }) } }, @@ -691,6 +735,12 @@ export default { }, calendarChange(e) { this.reservationTime = e.result + }, + // 更改 手风琴的高度 + itemCollapseChange() { + this.$nextTick(() => { + this.$refs.collapseTask.init() + }) } } } @@ -744,8 +794,9 @@ export default { } .item_right_img { - width: 100%; - height: 200rpx; + width: 140rpx; + height: 140rpx; + border-radius: 8rpx; } } } diff --git a/pages/submission/records.vue b/pages/submission/records.vue index 58355c8..6733daf 100644 --- a/pages/submission/records.vue +++ b/pages/submission/records.vue @@ -294,8 +294,20 @@ export default { return sta.includes(item + '') }) - - return newArr.length<=0?'':newArr[0].name + if(this.dataTypes==2||this.dataTypes==3||this.dataTypes==4){ + if(item==100){ + return '维修驳回' + } + if(item==101){ + return '主管驳回' + } + if(item==102){ + return '客户驳回' + } + } + return newArr.length<=0?'':newArr[0].name + + } }, diff --git a/pages/submission/recordsdetails.vue b/pages/submission/recordsdetails.vue index 832a889..0696f18 100644 --- a/pages/submission/recordsdetails.vue +++ b/pages/submission/recordsdetails.vue @@ -110,11 +110,13 @@ - - 驳回详情 + + 维修人员驳回 + 主管驳回 + 客户驳回 驳回原因: - {{ detailForm.repaiRejectReason }} + {{ detailForm.approveRemark }} diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue index 7f4a7b4..8e10890 100644 --- a/pages/submission/sendOrders.vue +++ b/pages/submission/sendOrders.vue @@ -81,9 +81,19 @@ + + 维修人员驳回 + 主管驳回 + 客户驳回 + + + {{ detailForm.approveRemark }} + + + + v-if="(dataTypes == 4 && (detailForm.status == 2 || detailForm.status == 101)) || (dataTypes == 3 && (detailForm.status == 3 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4)"> 维修详情 @@ -133,7 +143,7 @@ + v-if="(dataTypes == 3 && (detailForm.status == 3 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4) && repairInfo.isMaterial == 1"> {{ approveInfo.totalPrice }} @@ -151,7 +161,7 @@ - + 主管审批 @@ -198,12 +208,14 @@ 确定派单 - + 取消 提交 - + 取消 提交 @@ -283,7 +295,7 @@ export default { return this.$store.state.dataType == 2 ? false : true }, optionDisabled() { - return (this.$store.state.dataType == 3 && (this.detailForm.status == 3||this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 4) ? true : false + return (this.$store.state.dataType == 3 && (this.detailForm.status == 3 || this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 4) ? true : false }, }, diff --git a/utils/website.js b/utils/website.js index e6af07d..ae744e5 100644 --- a/utils/website.js +++ b/utils/website.js @@ -3,9 +3,9 @@ */ export default { // baseUrl: 'http://124.221.142.15:8088/lab', - baseUrl:'http://192.168.0.118:80', //李庆坤 + // baseUrl:'http://192.168.0.118:80', //李庆坤 // baseUrl:'http://192.168.0.109:80', //李涛 - // baseUrl:'http://192.168.1.12:80', //李涛 + baseUrl:'http://192.168.1.12:80', //远程地址 indexTitle: "科研医疗建筑运维平台", clientId: "saber", // 客户端id clientSecret: "saber_secret", // 客户端密钥