From 53729c9f88956853498b366dfd997660a13db491 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Wed, 11 Dec 2024 13:49:34 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e45691ea2d4f7b85beb9dd116670920e50e7a89e. --- config/status.js | 12 +-- pages/inspection/quest.vue | 32 ++---- pages/inspection/questDetails.vue | 17 +--- pages/inspection/questOrder.vue | 151 +++++++++------------------- pages/submission/records.vue | 16 +-- pages/submission/recordsdetails.vue | 8 +- pages/submission/sendOrders.vue | 24 ++--- utils/website.js | 4 +- 8 files changed, 77 insertions(+), 187 deletions(-) diff --git a/config/status.js b/config/status.js index 53f5044..e945e18 100644 --- a/config/status.js +++ b/config/status.js @@ -15,11 +15,11 @@ export const tabList = { }, { name: "待维修", - key: "1,2,3,100", + key: "1,2,3", }, { name: "已驳回", - key: "102", + key: "100,101,102", }, { @@ -28,7 +28,7 @@ export const tabList = { }, { name: "维修中", - key: "5,101", + key: "5", }, { name: "待评价", @@ -152,9 +152,6 @@ export const tabListColor = { "待评价": "#67c23a", "待付款": "#67c23a", "已驳回": "#f56c6c", - "主管驳回": "#f56c6c", - "客户驳回": "#f56c6c", - "维修驳回": "#f56c6c", "待审批": "#409eff", "已通过": "#409eff", "待确认": "#67c23a", @@ -403,8 +400,5 @@ export const tabTaskListColor={ "维修完成": "#67c23a", "待付款": "#67c23a", "已驳回": "#f56c6c", - "主管驳回": "#f56c6c", - "客户驳回": "#f56c6c", - "维修驳回": "#f56c6c", } diff --git a/pages/inspection/quest.vue b/pages/inspection/quest.vue index 080c74c..043e61d 100644 --- a/pages/inspection/quest.vue +++ b/pages/inspection/quest.vue @@ -74,12 +74,12 @@ - 审批 - 提交 维修完成 @@ -113,8 +113,7 @@ - + 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 @@ -141,7 +140,7 @@ export default { }, userInfo: {},//用户信息 rowInfo: {},//选中行数据 - + tabList: [], tasktabList: [], current: 0, @@ -184,7 +183,7 @@ export default { // return this.$store.state.dataType }, - tagColor() { + tagColor(){ return tabTaskListColor }, }, @@ -393,7 +392,7 @@ export default { this.$u.api.confirmPayment(query).then(res => { this.paymentShow = false - + if (res.code == 200) { uni.showToast({ title: "确认成功", icon: "none" }); this.getRecordsList() @@ -417,8 +416,7 @@ 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) { @@ -426,18 +424,7 @@ export default { let sta = i.key.split(',') return sta.includes(item + '') }) - if (this.dataTypes != 1) { - if (item == 100) { - return '维修驳回' - } - if (item == 101) { - return '主管驳回' - } - if (item == 102) { - return '客户驳回' - } - } - return newArr.length <= 0 ? '' : newArr[0].name + return newArr.length<=0?'':newArr[0].name }, detailsShowFn() { // 调用组件实例中h2cRenderDom方法 @@ -465,7 +452,6 @@ 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 5a40287..1b3d39b 100644 --- a/pages/inspection/questDetails.vue +++ b/pages/inspection/questDetails.vue @@ -26,18 +26,7 @@ {{ detailForm.reservationTime }} - - - 维修人员驳回 - 主管驳回 - 客户驳回 - - 驳回原因: - {{ detailForm.approveRemark }} - - - + 巡检任务 @@ -153,7 +142,6 @@ export default { padding: 0; padding-top: 26rpx; height: 100vh; - .info { margin: 0 24rpx 20rpx; border-radius: 20rpx; @@ -194,8 +182,7 @@ 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 224e067..a986853 100644 --- a/pages/inspection/questOrder.vue +++ b/pages/inspection/questOrder.vue @@ -15,14 +15,12 @@ 巡检配置 - - + + - - + + - - 维修人员驳回 - 主管驳回 - 客户驳回 - - 驳回原因: - {{ detailForm.approveRemark }} - - 巡检任务 - + 实验室楼层:{{ item.floorName }} @@ -106,7 +94,7 @@ 状态: - + 正常 异常 @@ -117,20 +105,18 @@ 现场照片: - 上传照片 - + 上传照片 - - + 使用人签字: - - + + @@ -139,23 +125,22 @@ 备注: - - + + - + 价格: - + 是否维修: - - + + @@ -176,13 +161,12 @@ - + - + 维修方案审批 @@ -194,8 +178,7 @@ - + @@ -213,46 +196,45 @@ - + + 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'"> 取消 提交 @@ -275,12 +257,6 @@ 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() { @@ -355,33 +331,19 @@ 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,表示回退一个页面 @@ -421,7 +383,7 @@ export default { sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 success: (res) => { - this.$refs.BetLoading.show() + // this.BetLoading.show() // 成功选择图片后的回调 const tempFilePaths = res.tempFilePaths; this.uploadFile(tempFilePaths[0], index, vindex, sindex); @@ -444,11 +406,10 @@ export default { let info = JSON.parse(res.data); console.log("上传成功", info); // 上传成功后的操作 this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link - this.itemCollapseChange() - this.$refs.BetLoading.hide() + // this.BetLoading.hide() }, error: (uploadFileRes) => { - this.$refs.BetLoading.hide() + // this.BetLoading.hide() }, }); }, @@ -471,16 +432,13 @@ export default { return false } let queryData = [] - console.log(111111111, newArr) newArr.forEach(item => { // item.id=this.detailForm.id queryData.push({ - id: item.id, + id: this.detailForm.id, status: item.status, signUrl: item.signUrl, - remark: item.remark, - picUrl: item.picUrl, - taskId: this.detailForm.id + remark: item.remark }) }) this.$u.api.updateDetaile(queryData).then(res => { @@ -632,21 +590,19 @@ 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 == 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 == 0 && this.customerApproveInfo.approveRemark == '') { + uni.showToast({ title: "请填写驳回原因", icon: "none" }); + return false } + if (this.customerApproveInfo.approveResult == 1) {//通过 let query = { task: { @@ -671,14 +627,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) + // } + // }) } }, @@ -735,12 +691,6 @@ export default { }, calendarChange(e) { this.reservationTime = e.result - }, - // 更改 手风琴的高度 - itemCollapseChange() { - this.$nextTick(() => { - this.$refs.collapseTask.init() - }) } } } @@ -794,9 +744,8 @@ export default { } .item_right_img { - width: 140rpx; - height: 140rpx; - border-radius: 8rpx; + width: 100%; + height: 200rpx; } } } diff --git a/pages/submission/records.vue b/pages/submission/records.vue index 48e3a64..f0046e1 100644 --- a/pages/submission/records.vue +++ b/pages/submission/records.vue @@ -293,20 +293,8 @@ export default { return sta.includes(item + '') }) - 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 - - + + return newArr.length<=0?'':newArr[0].name } }, diff --git a/pages/submission/recordsdetails.vue b/pages/submission/recordsdetails.vue index 0696f18..832a889 100644 --- a/pages/submission/recordsdetails.vue +++ b/pages/submission/recordsdetails.vue @@ -110,13 +110,11 @@ - - 维修人员驳回 - 主管驳回 - 客户驳回 + + 驳回详情 驳回原因: - {{ detailForm.approveRemark }} + {{ detailForm.repaiRejectReason }} diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue index 8e10890..7f4a7b4 100644 --- a/pages/submission/sendOrders.vue +++ b/pages/submission/sendOrders.vue @@ -81,19 +81,9 @@ - - 维修人员驳回 - 主管驳回 - 客户驳回 - - - {{ 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)"> 维修详情 @@ -143,7 +133,7 @@ + v-if="(dataTypes == 3 && (detailForm.status == 3||detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4) && repairInfo.isMaterial == 1"> {{ approveInfo.totalPrice }} @@ -161,7 +151,7 @@ - + 主管审批 @@ -208,14 +198,12 @@ 确定派单 - + 取消 提交 - + 取消 提交 @@ -295,7 +283,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 ae744e5..e6af07d 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", // 客户端密钥