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 0000000..890fee7 Binary files /dev/null and b/static/preCrashExam.png differ