From 2f63a7d96c0ab2d1a00614c22be643bded6d952c Mon Sep 17 00:00:00 2001 From: FrancisHu <2756004617@qq.com> Date: Wed, 19 Jun 2024 10:09:35 +0800 Subject: [PATCH] =?UTF-8?q?6.19=E5=AE=81=E5=A4=8F=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/apis.js | 5 +- apis/http.js | 5 +- pages.json | 8 ++ pages/exitMaterial/exitMaterial.vue | 26 +++++- pages/fetchMaterial/fetchMaterial.vue | 8 +- pages/login/login.vue | 7 ++ pages/orderCart/orderCart.vue | 29 +++++-- pages/preCrashExam/preCrashExam.vue | 119 ++++++++++++++++++++++++++ pages/workSpace/workSpace.vue | 5 ++ router.js | 7 ++ static/preCrashExam.png | Bin 0 -> 1968 bytes 11 files changed, 204 insertions(+), 15 deletions(-) create mode 100644 pages/preCrashExam/preCrashExam.vue create mode 100644 static/preCrashExam.png diff --git a/apis/apis.js b/apis/apis.js index 927d161..c1f0fcd 100644 --- a/apis/apis.js +++ b/apis/apis.js @@ -791,6 +791,8 @@ const indexScan = { }, } +const url = HttpConfig.systemPath + export default{ login, index, @@ -812,5 +814,6 @@ export default{ update, rfidBinding, qrcodeBinding, - indexScan + indexScan, + url } \ No newline at end of file diff --git a/apis/http.js b/apis/http.js index 4e6ad9c..117fad0 100644 --- a/apis/http.js +++ b/apis/http.js @@ -4,12 +4,13 @@ class HttpConfig { // #endif // #ifdef APP-PLUS // baseUrl = "http://112.29.103.165:21624" - baseUrl = "http://192.168.0.14:21624" - // baseUrl = "http://112.29.103.165:21626" + // 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.60:38080" // baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "http://10.40.92.141:28080" // #endif diff --git a/pages.json b/pages.json index 07987f8..baf16d5 100644 --- a/pages.json +++ b/pages.json @@ -459,6 +459,14 @@ } } + ,{ + "path" : "pages/preCrashExam/preCrashExam", + "style" : + { + "navigationBarTitleText": "预报废审核" + } + + } ], "tabBar": { "color": "#2c2c2c", diff --git a/pages/exitMaterial/exitMaterial.vue b/pages/exitMaterial/exitMaterial.vue index 3e2018f..56ff791 100644 --- a/pages/exitMaterial/exitMaterial.vue +++ b/pages/exitMaterial/exitMaterial.vue @@ -135,7 +135,13 @@ - + @@ -225,7 +231,8 @@ import { basePath } from '../../public' }, fetchedList: [], ableRoleArr: ['admin', 'em04', 'me02', 'dm03'], - showLoading: false + showLoading: false, + btnDisabled: false } }, methods: { @@ -262,6 +269,7 @@ import { basePath } from '../../public' formSubmit () { let that = this that.showLoading = true + that.btnDisabled = true that.$refs.exitForm.validate().then(formData => { that.$refs.popup.close() // 判断单位id和工程id是否匹配 @@ -294,6 +302,7 @@ import { basePath } from '../../public' } }) } else { + that.btnDisabled = false that.showLoading = false uni.showToast({ icon: 'none', @@ -304,11 +313,22 @@ import { basePath } from '../../public' console.log(err); }) } + } else { + uni.showToast({ + icon: 'none', + title: res.data.msg, + success: () => { + that.btnDisabled = false + } + }) } }).catch(err => { uni.showToast({ icon: 'none', - title: '单位与工程不匹配!' + title: '单位与工程不匹配!', + success: () => { + that.btnDisabled = false + } }) }) }) diff --git a/pages/fetchMaterial/fetchMaterial.vue b/pages/fetchMaterial/fetchMaterial.vue index 6911d74..d7c612e 100644 --- a/pages/fetchMaterial/fetchMaterial.vue +++ b/pages/fetchMaterial/fetchMaterial.vue @@ -82,7 +82,7 @@ subList: [], itemList: [], badgeNum: '', - photoUrl: 'http://112.29.103.165:21624/dev-api/system', + photoUrl: '' } }, methods: { @@ -175,11 +175,13 @@ }, onShow() { let that = this - if (uni.getStorageSync('goodList').length == 0 || !uni.getStorageSync('goodList')) { + that.photoUrl = that.$api.url + console.log(that.photoUrl); + /* if (uni.getStorageSync('goodList').length == 0 || !uni.getStorageSync('goodList')) { uni.setStorageSync('goodList', []) } console.log(uni.getStorageSync('goodList')); - + */ this.selectType(1, 0, 0) that.switchStatus = 0 that.lowerStatus = 0 diff --git a/pages/login/login.vue b/pages/login/login.vue index 47d5b23..6fc2e40 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -231,6 +231,13 @@ export default { } }).catch(err => { console.log(err); + uni.showToast({ + icon: 'none', + title: '网络异常,请稍后再试!', + success: () => { + that.showLoading = false + } + }) }) }) } diff --git a/pages/orderCart/orderCart.vue b/pages/orderCart/orderCart.vue index c63d07f..d344361 100644 --- a/pages/orderCart/orderCart.vue +++ b/pages/orderCart/orderCart.vue @@ -72,7 +72,13 @@ filterable > - + @@ -122,6 +128,7 @@ import { basePath } from '../../public'; ] } }, + btnDisabled: false, ableUseArr: ['admin', 'em04', 'me02', 'dm03'] } }, @@ -268,6 +275,7 @@ import { basePath } from '../../public'; let that = this let nowRole = uni.getStorageSync('roles') let found = false + that.btnDisabled = true for (let role of nowRole) { console.log(role); if (that.ableUseArr.includes(role)) { @@ -280,7 +288,10 @@ import { basePath } from '../../public'; if (!found) { uni.showToast({ icon: 'none', - title: '当前角色没有操作权限!' + title: '当前角色没有操作权限!', + success: () => { + that.btnDisabled = false + } }) } else { // console.log(1); @@ -324,7 +335,7 @@ import { basePath } from '../../public'; } console.log('that.sendData =================== ',that.sendData); // 提交预约商品 - /* that.$api.fetchMaterial.subCart(that.sendData).then(res => { + that.$api.fetchMaterial.subCart(that.sendData).then(res => { console.log(res); if (res.data.code == 200) { uni.showToast({ @@ -339,17 +350,23 @@ import { basePath } from '../../public'; } else { uni.showToast({ icon: 'none', - title:res.data.msg + title: res.data.msg, + success: () => { + that.btnDisabled = false + } }) } }).catch(err => { console.log(err); - }) */ + }) that.$refs.popup.close() } else { uni.showToast({ icon: 'none', - title: '无法同时领用机具设备和调试设备!' + title: '无法同时领用机具设备和调试设备!', + success: () => { + that.btnDisabled = false + } }) } }) diff --git a/pages/preCrashExam/preCrashExam.vue b/pages/preCrashExam/preCrashExam.vue new file mode 100644 index 0000000..113aa6f --- /dev/null +++ b/pages/preCrashExam/preCrashExam.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue index c4456e7..5d6f81e 100644 --- a/pages/workSpace/workSpace.vue +++ b/pages/workSpace/workSpace.vue @@ -102,6 +102,11 @@ pic: '/static/fix.png', url: 'fix' }, + { + name: '预报废审核', + pic: '/static/preCrashExam.png', + url: 'preCrashExam' + }, { name: '报废审核', pic: '/static/crashExam.png', diff --git a/router.js b/router.js index 77800f4..12e373e 100644 --- a/router.js +++ b/router.js @@ -419,6 +419,13 @@ const router = createRouter({ "meta": { "needAuth": "true" } + }, + { + "path" : "/pages/preCrashExam/preCrashExam", + "name": 'preCrashExam', + "meta": { + "needAuth": "true" + } } ] }) diff --git a/static/preCrashExam.png b/static/preCrashExam.png new file mode 100644 index 0000000000000000000000000000000000000000..890fee7e401d2540ca17ed4c3941a724fd6ff591 GIT binary patch literal 1968 zcmV;h2T%BkP)RMp`jZ5$Ix5s0g^UrR{ci=6cTTui5SFkJ*`>cE!&_yR&oW$2s@hbI&>V zu0WHSJ165hFr+FtNQZGL5QjvJKbJL4Kp-h3{Rd{~npxGrO#cayKob#Y0wnYh6daSl z+t@6qQxc?<>5Rn1y(h#pJjOEx%w3Q%V*_J!!;^FvLvu*b{l{V8npc+LS^+)@UQUvp zH${p#>sAr26ma{zWWi6vKf%i}Euw!^TttI3qyTnoP;o&@3}Jha5C)DmVhsu$!o4mP zT;E2*GjV>W+aJp@IK+_!+@6#Z6$o#^EvTyWp6}UNnPPbfYwqEhvC{pQeqbOnF_ez%k)I zGzA*-V^%BB@*lWtr8sna-G|9scUEu1rrd}*^DubvT_Ceuy==J~!OUiyMn5f$24zqe_#_%(f%MnM@)W&kS&Fv!zj!^IAMu(0%e&l~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