diff --git a/apis/http.js b/apis/http.js index b708bdc..16a39a5 100644 --- a/apis/http.js +++ b/apis/http.js @@ -4,25 +4,25 @@ class HttpConfig { // #endif // #ifdef APP-PLUS // baseUrl = "http://112.29.103.165:21624" - baseUrl = "http://192.168.0.14:21624" + // baseUrl = "http://192.168.0.14:21624" // baseUrl = "http://112.29.103.165:21626" // baseUrl = "http://172.20.10.3:8080" // baseUrl = "http://10.40.92.8:8080" // baseUrl = "http://10.40.92.52:28080" // baseUrl = "http://10.40.92.78:28080" - // baseUrl = "http://192.168.2.122:28080" + baseUrl = "http://192.168.2.122:28080" // baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "http://10.40.92.141:28080" // #endif // 基地址 - authPath = `${this.baseUrl}/dev-api/auth` + /* authPath = `${this.baseUrl}/dev-api/auth` systemPath = `${this.baseUrl}/dev-api/system` basePath = `${this.baseUrl}/dev-api/base` - materialPath = `${this.baseUrl}/dev-api/material` - /* authPath = `${this.baseUrl}/auth` + materialPath = `${this.baseUrl}/dev-api/material` */ + authPath = `${this.baseUrl}/auth` systemPath = `${this.baseUrl}/system` basePath = `${this.baseUrl}/base` - materialPath = `${this.baseUrl}/material` */ + materialPath = `${this.baseUrl}/material` // 短链 serviceUrl = { login: { @@ -127,7 +127,8 @@ class HttpConfig { crashExam: { crashExamList: '/scrap/getScrapTaskList', crashExamDetails: '/scrap/getScrapAuditList', - crashExamAudit: '/scrap/audit', + // crashExamAudit: '/scrap/audit', + crashExamAudit: '/scrap/scrapTaskReview', }, //试验检验接口 testExam: { diff --git a/pages.json b/pages.json index 875b4d5..bc2811f 100644 --- a/pages.json +++ b/pages.json @@ -499,6 +499,14 @@ } } + ,{ + "path" : "pages/serviceCenterExam/serviceCenterExam", + "style" : + { + "navigationBarTitleText": "综合服务中心审核" + } + + } ], "tabBar": { "color": "#2c2c2c", diff --git a/pages/crashExam/crashExam.vue b/pages/crashExam/crashExam.vue index 1caf0fd..bff55f7 100644 --- a/pages/crashExam/crashExam.vue +++ b/pages/crashExam/crashExam.vue @@ -6,13 +6,13 @@ :key="index" > - - + --> {{ fetch.createBy == null ? '' : fetch.createBy.slice(0, 1) }} @@ -51,9 +51,17 @@ 查看 + + + 审批详情 + @@ -61,12 +69,13 @@ - - - +

+ {{ fetch.taskStatusName }} +

- + + + + +

审批详情

+ + +
+ + + + + 审批部门 + 审批状态 + 审批意见 + + + + {{ dept.deptName }} + + + + {{ dept.mark }} + + + + {{ dept.reasonRejection == null ? '--' : dept.reasonRejection }} + + + + + +
+
@@ -150,7 +221,8 @@ taskIdList: [], subArr: [], subObj: {}, - auditList: [] + auditList: [], + examDetailList: [] } }, methods: { @@ -159,6 +231,28 @@ url: `/pages/crashExam/crashExamDetails?taskId=${taskId}&taskStatus=${taskStatus}&able=${able}` }) }, + seeListExamDetail (examList) { + console.log(examList); + examList.forEach(item => { + switch (item.status) { + case '0': + item.mark = '待审批' + break; + case '1': + item.mark = '通过' + break; + case '2': + item.mark = '已驳回' + break; + } + }) + this.examDetailList = examList + this.$refs.popup2.open() + /* let transList = QS.stringify(examList) + uni.navigateTo({ + url: `/pages/preCrashDeptList/preCrashDeptList?list=${transList}` + }) */ + }, checkAll() { this.allChecked = !this.allChecked if (this.allChecked) { @@ -263,6 +357,9 @@ closePopup () { this.$refs.popup.close() }, + closePopup2 () { + this.$refs.popup2.close() + }, modalConfirm () { let that = this that.subObj = { @@ -331,12 +428,20 @@ that.$api.crashExam.crashExamList().then(res => { console.log(res); if (res.data.total != 0) { - for (let i = 0; i < res.data.rows.length; i++) { - if (res.data.rows[i].taskStatus == 58) { - res.data.rows[i].checked = false - } - } + res.data.rows.forEach(item => { + item.ableExam = true + item.scrapAuditorSetList.forEach(roleList => { + if (roleList.deptId == uni.getStorageSync('userInfo').sysUser.deptId) { + if (roleList.status != '0') { + item.already = '0' + } + } else { + item.ableExam = false + } + }) + }) that.fetchMaterialList = res.data.rows + console.log(that.fetchMaterialList); } else { uni.showToast({ icon: 'none', @@ -441,13 +546,23 @@ } .sticky-area{ position: absolute; - top: 0; - right: 0; - width: 11vh; + top: 20rpx; + right: 20rpx; + /* width: 11vh; height: 10vh; image{ width: 100%; height: 100%; + } */ + h4{ + box-sizing: border-box; + padding: 8rpx 20rpx; + border-radius: 15rpx; + font-size: 14px; + font-weight: normal; + background-color: #fff; + border: 1px solid #3788FF; + color: #3788FF; } } } @@ -507,4 +622,41 @@ } } } + .popup2{ + width: 80vw; + height: 80vh; + background-color: #fff; + border-radius: 15rpx; + overflow-y: auto; + background: linear-gradient(#D9E7FE, #fff, #fff, #fff); + .pop-top{ + width: 100%; + height: 5vh; + box-sizing: border-box; + padding: 0 25rpx; + display: flex; + justify-content: space-between; + align-items: center; + } + .select-area{ + width: 85%; + margin: 40rpx auto; + font-size: 14px; + .red, .orange, .green{ + width: 50%; + margin-left: 25%; + color: #fff; + border-radius: 10rpx; + } + .red{ + background-color: #FF4141; + } + .orange{ + background-color: #FCA20D; + } + .green{ + background-color: #1BD30B; + } + } + } diff --git a/pages/crashExam/crashExamDetails.vue b/pages/crashExam/crashExamDetails.vue index c2ab688..5e8a3e0 100644 --- a/pages/crashExam/crashExamDetails.vue +++ b/pages/crashExam/crashExamDetails.vue @@ -5,12 +5,12 @@ v-for="(fetch, index) in fetchList" :key="index" > - - + --> 类型名称 @@ -55,12 +55,12 @@ style="background-color: #fff;" v-show="taskStatus == 58 && ableNum == 1" > - + 审核 @@ -103,6 +103,27 @@ + + + +

驳回原因

+ + +
+ + + 驳回 + +
+
@@ -122,7 +143,8 @@ taskStatus: '', status: '', ableNum: '', - subObj: {} + subObj: {}, + rejectReason: '' } }, methods: { @@ -169,15 +191,9 @@ finishCart () { let that = this that.taskIdList = [] - that.auditDetailList = that.fetchList.filter((item) => { + that.auditDetailList = that.fetchList/* .filter((item) => { return item.checked == true - }) - if (that.auditDetailList.length == 0) { - uni.showToast({ - icon: 'none', - title: '未选中审核项!' - }) - } else { + }) */ that.openPopup() /* uni.showModal({ title: '确认审核', @@ -204,11 +220,12 @@ } } }) */ - } + }, subInStore (obj) { let that = this that.showLoading = true + that.closePopup() // 通过审核或驳回 that.$api.crashExam.crashExamAudit(obj).then(res => { console.log(res); @@ -218,7 +235,6 @@ icon: 'none', title: res.data.msg, success: () => { - that.closePopup() uni.navigateBack() } }) @@ -237,27 +253,52 @@ closePopup () { this.$refs.popup.close() }, + closePopup1 () { + this.$refs.popup1.close() + }, modalConfirm () { let that = this - that.taskIdList.push(that.taskId) + console.log(that.auditDetailList); + // that.taskIdList.push(that.taskId) that.subObj = { - checkResult: '通过', - taskIdList: that.taskIdList, - scrapDetailList: that.auditDetailList + deptId: uni.getStorageSync('userInfo').sysUser.deptId, + status: '1', + taskId: that.taskId, + userId: uni.getStorageSync('userInfo').userid } console.log(that.subObj); that.subInStore(that.subObj) }, modalReject () { let that = this - that.taskIdList.push(that.taskId) - that.subObj = { + // that.taskIdList.push(that.taskId) + /* that.subObj = { checkResult: '驳回', taskIdList: that.taskIdList, auditDetailList: that.auditDetailList } - console.log(that.subObj); - that.subInStore(that.subObj) + console.log(that.subObj); */ + // that.subInStore(that.subObj) + that.$refs.popup1.open() + }, + confirmReject () { + let that = this + if (that.rejectReason == '') { + uni.showToast({ + icon: 'none', + title: '请填写驳回原因!' + }) + } else { + that.subObj = { + deptId: uni.getStorageSync('userInfo').sysUser.deptId, + status: '2', + reasonRejection: that.rejectReason, + taskId: that.taskId, + userId: uni.getStorageSync('userInfo').userid + } + console.log(that.subObj); + that.subInStore(that.subObj) + } } }, onLoad(params) { @@ -288,9 +329,9 @@ res.data.rows[i].status = '驳回' break; } - if (res.data.rows[i].status == '未审核') { + /* if (res.data.rows[i].status == '未审核') { res.data.rows[i].checked = false - } + } */ } that.fetchList = res.data.rows console.log(that.fetchList); @@ -359,7 +400,7 @@ .buy { display: flex; align-items: center; - justify-content: space-between; + justify-content: right; position: fixed; left: 50%; bottom: 0; @@ -446,4 +487,39 @@ border-radius: 20rpx; } + .popup1{ + width: 80vw; + height: 20vh; + background-color: #fff; + border-radius: 15rpx; + overflow: hidden; + background: linear-gradient(#D9E7FE, #fff, #fff, #fff); + .pop-top{ + width: 100%; + height: 5vh; + box-sizing: border-box; + padding: 0 25rpx; + display: flex; + justify-content: space-between; + align-items: center; + } + .select-area{ + width: 85%; + margin: 40rpx auto; + .btn{ + width: 30%; + box-sizing: border-box; + padding: 10rpx 0; + display: flex; + justify-content: center; + align-items: center; + background-color: #3788FF; + color: #fff; + font-size: 14px; + border-radius: 15rpx; + margin: 20rpx auto; + } + } + } + diff --git a/pages/preCrashList/preCrashList.vue b/pages/preCrashList/preCrashList.vue index b87b9ae..aeab0d6 100644 --- a/pages/preCrashList/preCrashList.vue +++ b/pages/preCrashList/preCrashList.vue @@ -53,6 +53,7 @@ 编辑 @@ -297,6 +298,11 @@ url: `/pages/preCrashListDetail/preCrashListDetail?taskId=${taskId}` }) }, + editListDetail (taskId) { + uni.navigateTo({ + url: `/pages/preCrashListDetail/preCrashListDetail?taskId=${taskId}&showBtn=0` + }) + }, seeListExamDetail (examList) { console.log(examList); examList.forEach(item => { diff --git a/pages/preCrashListDetail/preCrashListDetail.vue b/pages/preCrashListDetail/preCrashListDetail.vue index 8433d44..81fcc70 100644 --- a/pages/preCrashListDetail/preCrashListDetail.vue +++ b/pages/preCrashListDetail/preCrashListDetail.vue @@ -5,7 +5,7 @@ v-for="(list, index) in preDetailList" :key="list.id" > - +

设备类型

@@ -46,6 +46,19 @@ >
+ + + + + + + + + + + 提交 + + + +
@@ -102,7 +139,12 @@ taskId: '', preDetailList: [], deptList: [], - deptArr: [] + deptArr: [], + range: [ + { value: '0', text: '报废' }, + { value: '1', text: '合格' }, + { value: '2', text: '维修' } + ] } }, methods: { @@ -122,7 +164,7 @@ if (item.fileUrl != null) { item.fileUrl = item.fileUrl.split(',') } - item.checked = false + item.chooseStatus = '' }) that.preDetailList = res.data.data console.log(that.preDetailList); @@ -159,6 +201,33 @@ return model; }); + }, + clickSub () { + let that = this + let ok = true + for (let item of that.preDetailList) { + if (item.chooseStatus == '') { + ok = false; + break; + } + } + if (!ok) { + uni.showToast({ + icon: 'none', + title: '您有未选择状态的机具!' + }) + } else { + uni.showModal({ + title: '提交列表', + content: '确认提交机具列表吗?', + confirmText: '提交', + success: (res) => { + if (res.confirm) { + console.log(that.preDetailList); + } + } + }) + } } }, onLoad(params) { @@ -188,6 +257,7 @@ position: relative; display: flex; align-items: center; + border-bottom: 1px solid #D7D7D7; .info-cont{ width: 100%; display: flex; @@ -253,4 +323,24 @@ } } */ } + .btm-sticky{ + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + padding: 15rpx 30rpx; + background-color: #fff; + display: flex; + justify-content: right; + align-items: center; + .exam{ + box-sizing: border-box; + padding: 10rpx 50rpx; + border-radius: 30rpx; + background-color: #3788FF; + font-size: 14px; + color: #fff; + } + } diff --git a/pages/serviceCenterExam/serviceCenterExam.vue b/pages/serviceCenterExam/serviceCenterExam.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/serviceCenterExam/serviceCenterExam.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue index bd43e18..1cb9450 100644 --- a/pages/workSpace/workSpace.vue +++ b/pages/workSpace/workSpace.vue @@ -72,6 +72,11 @@ pic: '/static/newCheck.png', url: 'newCheck' }, */ + { + name: '综合服务中心审核', + pic: '/static/serviceCenterExam.png', + url: 'serviceCenterExam' + }, { name: '新购入库', pic: '/static/newInStore.png', diff --git a/router.js b/router.js index 2ef2d51..add8ca3 100644 --- a/router.js +++ b/router.js @@ -454,6 +454,13 @@ const router = createRouter({ "meta": { "needAuth": "true" } + }, + { + "path" : "/pages/serviceCenterExam/serviceCenterExam", + "name": 'serviceCenterExam', + "meta": { + "needAuth": "true" + } } ] }) diff --git a/static/serviceCenterExam.png b/static/serviceCenterExam.png new file mode 100644 index 0000000..7fe2790 Binary files /dev/null and b/static/serviceCenterExam.png differ