diff --git a/apis/apis.js b/apis/apis.js index 62df767..9d30a0c 100644 --- a/apis/apis.js +++ b/apis/apis.js @@ -842,6 +842,14 @@ const preCrashList = { header ) }, + async submitCrashTask(data = {}, header = {}) { + return await Http.post( + HttpConfig.materialPath, + HttpConfig.serviceUrl.preCrashList.submitCrashTask, + data, + header + ) + }, } const url = HttpConfig.systemPath diff --git a/apis/http.js b/apis/http.js index 7822284..7bfc1e5 100644 --- a/apis/http.js +++ b/apis/http.js @@ -3,26 +3,26 @@ class HttpConfig { baseUrl = "/api" // #endif // #ifdef APP-PLUS - baseUrl = "http://112.29.103.165:21624" + // baseUrl = "http://112.29.103.165: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://10.40.92.48:38080" + baseUrl = "http://192.168.2.122:38080" // 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: { @@ -169,6 +169,7 @@ class HttpConfig { preCrashList: { fetchPreSubList: '/scrap/getScrapTaskListApp', // 获取预报废提交列表 fetchDeptTree: '/user/deptTree', // 获取部门树状结构 + submitCrashTask: '/scrap/submitScrapTask', // 预报废列表提交报废 } } } diff --git a/pages.json b/pages.json index f5747c7..875b4d5 100644 --- a/pages.json +++ b/pages.json @@ -491,6 +491,14 @@ } } + ,{ + "path" : "pages/preCrashDeptList/preCrashDeptList", + "style" : + { + "navigationBarTitleText": "审批部门" + } + + } ], "tabBar": { "color": "#2c2c2c", diff --git a/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue b/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue index 421b742..d27464a 100644 --- a/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue +++ b/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue @@ -190,6 +190,11 @@ } } } + } else { + uni.showToast({ + icon: 'none', + title: '此机具已完成出库,无法再操作!' + }) } }, closePopup1 () { diff --git a/pages/preCrashDeptList/preCrashDeptList.vue b/pages/preCrashDeptList/preCrashDeptList.vue new file mode 100644 index 0000000..7abdc8a --- /dev/null +++ b/pages/preCrashDeptList/preCrashDeptList.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/pages/preCrashExamDetail/preCrashExamDetail.vue b/pages/preCrashExamDetail/preCrashExamDetail.vue index 74666ab..ec36ce6 100644 --- a/pages/preCrashExamDetail/preCrashExamDetail.vue +++ b/pages/preCrashExamDetail/preCrashExamDetail.vue @@ -126,6 +126,7 @@ + @@ -133,6 +134,7 @@ export default { data() { return { + showLoading: false, allChecked: false, taskId: '', preDetailList: [], @@ -166,10 +168,12 @@ }, submitExam (obj) { let that = this + that.showLoading = true // 提交审核/驳回 that.$api.preCrashExam.submitPreExam(obj).then(res => { console.log(res); if (res.data.code == 200) { + that.showLoading = false uni.showToast({ icon: 'none', title: res.data.msg, @@ -178,6 +182,7 @@ } }) } else { + that.showLoading = false uni.showToast({ icon: 'none', title: res.data.msg @@ -287,7 +292,7 @@ clickPass () { let that = this let subList = that.preDetailList.filter(item => { - return item.checked == true + return item.checked == true && item.status == 0 }).map(subItem => { return { auditBy: uni.getStorageSync('userInfo').userid, @@ -322,7 +327,7 @@ clickReject () { let that = this let subList = that.preDetailList.filter(item => { - return item.checked == true + return item.checked == true && item.status == 0 }).map(subItem => { return { auditBy: uni.getStorageSync('userInfo').userid, diff --git a/pages/preCrashList/preCrashList.vue b/pages/preCrashList/preCrashList.vue index 16c27af..c9af98a 100644 --- a/pages/preCrashList/preCrashList.vue +++ b/pages/preCrashList/preCrashList.vue @@ -9,13 +9,13 @@ :key="index" > - + {{ pre.createBy == null ? '' : pre.createBy.slice(0, 1) }} @@ -52,12 +52,23 @@ - 审核 + 编辑 + + + + 审批详情 提交 @@ -69,6 +80,7 @@ -->

待提交

@@ -91,15 +103,138 @@
+ + + + + + 全选 + + + + 提交 + + + + + + + +

选择审批部门

+ + +
+ + + + 确定 + +
+
+ + + +

审批详情

+ + +
+ + + + + 审批部门 + 审批状态 + 审批意见 + + + + {{ dept.deptName }} + + + + {{ dept.mark }} + + + + {{ dept.reasonRejection == null ? '--' : dept.reasonRejection }} + + + + + +
+
+ @@ -249,4 +537,99 @@ } } } + .btm-sticky{ + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + padding: 15rpx 30rpx; + background-color: #fff; + display: flex; + justify-content: space-between; + align-items: center; + .checked{ + display: flex; + align-items: center; + } + .exam{ + box-sizing: border-box; + padding: 10rpx 50rpx; + border-radius: 30rpx; + background-color: #3788FF; + font-size: 14px; + color: #fff; + } + } + .popup1{ + 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; + .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: 40rpx auto; + } + } + } + .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/preCrashListDetail/preCrashListDetail.vue b/pages/preCrashListDetail/preCrashListDetail.vue index 5e4308e..8433d44 100644 --- a/pages/preCrashListDetail/preCrashListDetail.vue +++ b/pages/preCrashListDetail/preCrashListDetail.vue @@ -81,6 +81,15 @@ --> + @@ -92,10 +101,16 @@ showBtn: '', taskId: '', preDetailList: [], - deptList: [] + deptList: [], + deptArr: [] } }, methods: { + treeChange () { + let that = this + // console.log(e, index); + console.log(that.deptArr); + }, fetchPreDetail (taskId) { let that = this that.$api.preCrashExam.fetchPreCrashDetail({ diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue index 3ad2f2e..9371ee9 100644 --- a/pages/workSpace/workSpace.vue +++ b/pages/workSpace/workSpace.vue @@ -102,7 +102,7 @@ pic: '/static/fix.png', url: 'fix' }, - /* { + { name: '预报废审核', pic: '/static/preCrashExam.png', url: 'preCrashExam' @@ -111,7 +111,7 @@ name: '预报废列表', pic: '/static/preCrashList.png', url: 'preCrashList' - }, */ + }, { name: '报废审核', pic: '/static/crashExam.png', diff --git a/router.js b/router.js index 1b1bc10..2ef2d51 100644 --- a/router.js +++ b/router.js @@ -447,6 +447,13 @@ const router = createRouter({ "meta": { "needAuth": "true" } + }, + { + "path" : "/pages/preCrashDeptList/preCrashDeptList", + "name": 'preCrashDeptList', + "meta": { + "needAuth": "true" + } } ] })