7.1表单提交添加loading

This commit is contained in:
FrancisHu 2024-07-01 10:50:02 +08:00
parent ae33908fc4
commit 66f3e29764
16 changed files with 117 additions and 38 deletions

View File

@ -4,25 +4,25 @@ class HttpConfig {
// #endif // #endif
// #ifdef APP-PLUS // #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://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21626" // baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080" // baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.8:8080" // baseUrl = "http://10.40.92.8:8080"
// baseUrl = "http://10.40.92.52:28080" // baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.78:28080" // baseUrl = "http://10.40.92.78:28080"
baseUrl = "http://192.168.2.122:38080" // baseUrl = "http://192.168.2.122:28080"
// baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://10.40.92.141:28080" // baseUrl = "http://10.40.92.141:28080"
// #endif // #endif
// 基地址 // 基地址
/* authPath = `${this.baseUrl}/dev-api/auth` authPath = `${this.baseUrl}/dev-api/auth`
systemPath = `${this.baseUrl}/dev-api/system` systemPath = `${this.baseUrl}/dev-api/system`
basePath = `${this.baseUrl}/dev-api/base` basePath = `${this.baseUrl}/dev-api/base`
materialPath = `${this.baseUrl}/dev-api/material` */ materialPath = `${this.baseUrl}/dev-api/material`
authPath = `${this.baseUrl}/auth` /* authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system` systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base` basePath = `${this.baseUrl}/base`
materialPath = `${this.baseUrl}/material` materialPath = `${this.baseUrl}/material` */
// 短链 // 短链
serviceUrl = { serviceUrl = {
login: { login: {

View File

@ -56,6 +56,7 @@
接收 接收
</view> --> </view> -->
</view> </view>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -63,6 +64,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
typeId: '', typeId: '',
num: '', num: '',
parentId: '', parentId: '',
@ -176,6 +178,7 @@
itemList: ['合格', '待修', '待报废'], itemList: ['合格', '待修', '待报废'],
itemColor: '#333', itemColor: '#333',
success: function(res) { success: function(res) {
that.showLoading = true
// console.log('' + (res.tapIndex + 1) + ''); // console.log('' + (res.tapIndex + 1) + '');
let type = res.tapIndex + 1 let type = res.tapIndex + 1
const arrList = [{ const arrList = [{
@ -198,6 +201,7 @@
that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => { that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -207,6 +211,7 @@
}) })
// that.searchCode() // that.searchCode()
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -116,6 +116,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -123,6 +124,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
allChecked: false, allChecked: false,
examFormData: { examFormData: {
ifPass: '', ifPass: '',
@ -230,10 +232,12 @@
}, },
subInStore (obj) { subInStore (obj) {
let that = this let that = this
that.showLoading = true
// //
that.$api.crashExam.crashExamAudit(obj).then(res => { that.$api.crashExam.crashExamAudit(obj).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -245,6 +249,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -103,6 +103,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -110,6 +111,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
fetchList: [ fetchList: [
], ],
@ -206,10 +208,12 @@
}, },
subInStore (obj) { subInStore (obj) {
let that = this let that = this
that.showLoading = true
// //
that.$api.crashExam.crashExamAudit(obj).then(res => { that.$api.crashExam.crashExamAudit(obj).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -219,6 +223,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -149,6 +149,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -157,6 +158,7 @@ import { basePath } from '../../public'
export default { export default {
data() { data() {
return { return {
showLoading: false,
allChecked: false, allChecked: false,
examFormData: { examFormData: {
ifPass: '', ifPass: '',
@ -259,6 +261,7 @@ import { basePath } from '../../public'
}, },
seeExam (id, directAuditRemark) { seeExam (id, directAuditRemark) {
let that = this let that = this
that.showLoading = true
// //
that.$api.exitExam.subExitExam({ that.$api.exitExam.subExitExam({
id, id,
@ -266,6 +269,7 @@ import { basePath } from '../../public'
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({
@ -278,6 +282,7 @@ import { basePath } from '../../public'
} }
}) })
} else { } else {
that.showLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({
@ -291,12 +296,14 @@ import { basePath } from '../../public'
}, },
rejectExam (id) { rejectExam (id) {
let that = this let that = this
that.showLoading = true
// //
that.$api.exitExam.rejectExitExam({ that.$api.exitExam.rejectExitExam({
id id
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({
@ -309,6 +316,7 @@ import { basePath } from '../../public'
} }
}) })
} else { } else {
that.showLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({

View File

@ -223,6 +223,7 @@
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="加载中,请稍后..."></u-loading-page> <u-loading-page :loading="showLoading" color="#000" loading-text="加载中,请稍后..."></u-loading-page>
<u-loading-page :loading="showSubLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -232,6 +233,7 @@ import { basePath } from '../../public'
data() { data() {
return { return {
showLoading: false, showLoading: false,
showSubLoading: false,
allChecked: false, allChecked: false,
examFormData: { examFormData: {
ifPass: '', ifPass: '',
@ -321,12 +323,14 @@ import { basePath } from '../../public'
this.examList = { this.examList = {
taskId: that.modalList.taskId, taskId: that.modalList.taskId,
taskStatus: that.modalList.taskStatus + 1, taskStatus: that.modalList.taskStatus + 1,
code: that.modalList.code,
leaseApplyInfoList: that.modalList.leaseApplyInfoList leaseApplyInfoList: that.modalList.leaseApplyInfoList
} }
} else if (that.modalList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 102) { } else if (that.modalList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 102) {
this.examList = { this.examList = {
taskId: that.modalList.taskId, taskId: that.modalList.taskId,
taskStatus: that.modalList.taskStatus + 2, taskStatus: that.modalList.taskStatus + 2,
code: that.modalList.code,
leaseApplyInfoList: that.modalList.leaseApplyInfoList leaseApplyInfoList: that.modalList.leaseApplyInfoList
} }
} }
@ -334,6 +338,7 @@ import { basePath } from '../../public'
this.examList = { this.examList = {
taskId: that.modalList.taskId, taskId: that.modalList.taskId,
taskStatus: that.modalList.taskStatus + 1, taskStatus: that.modalList.taskStatus + 1,
code: that.modalList.code,
leaseApplyInfoList: that.modalList.leaseApplyInfoList, leaseApplyInfoList: that.modalList.leaseApplyInfoList,
leaseApplyDetails: that.modalList.leaseApplyInfoList[0].leaseApplyDetails leaseApplyDetails: that.modalList.leaseApplyInfoList[0].leaseApplyDetails
} }
@ -593,10 +598,12 @@ import { basePath } from '../../public'
}, */ }, */
toggleSubmit (list) { toggleSubmit (list) {
let that = this let that = this
that.showSubLoading = true
console.log(list); console.log(list);
that.$api.fetchExam.subExam(list).then(res => { that.$api.fetchExam.subExam(list).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showSubLoading = false
that.closePopup() that.closePopup()
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -608,6 +615,7 @@ import { basePath } from '../../public'
} }
}) })
} else { } else {
that.showSubLoading = false
that.closePopup() that.closePopup()
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -620,9 +628,11 @@ import { basePath } from '../../public'
}, },
rejectSubmit (list) { rejectSubmit (list) {
let that = this let that = this
that.showSubLoading = true
that.$api.fetchExam.rejectExam(list).then(res => { that.$api.fetchExam.rejectExam(list).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showSubLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({
@ -635,6 +645,7 @@ import { basePath } from '../../public'
} }
}) })
} else { } else {
that.showSubLoading = false
that.closePopup() that.closePopup()
that.closePopup1() that.closePopup1()
uni.showToast({ uni.showToast({

View File

@ -335,6 +335,7 @@
confirmText: '出库', confirmText: '出库',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
that.showLoading = true
console.log(that.infoList); console.log(that.infoList);
that.$api.fetchMaterialOutStore.directOutStore({ that.$api.fetchMaterialOutStore.directOutStore({
id: that.infoList.parentId, id: that.infoList.parentId,
@ -342,6 +343,7 @@
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -349,6 +351,12 @@
uni.navigateBack() uni.navigateBack()
} }
}) })
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);

View File

@ -97,12 +97,14 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
showLoading: false,
taskId: '', taskId: '',
allChecked: false, allChecked: false,
inputs: "", inputs: "",
@ -279,9 +281,11 @@
}, },
subNewBuy (obj) { subNewBuy (obj) {
let that = this let that = this
that.showLoading = true
that.$api.newInStore.subNewBuy(obj).then(res => { that.$api.newInStore.subNewBuy(obj).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -291,6 +295,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -385,37 +385,44 @@
}, },
confirmDeptList () { confirmDeptList () {
let that = this let that = this
that.showLoading = true if (that.deptArr.length == 0) {
console.log(that.deptArr, that.taskIdList);
that.$api.preCrashList.submitCrashTask({
taskIdList: that.taskIdList,
deptIds: that.deptArr
}).then(res => {
if (res.data.code == 200) {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.redirectTo({
url: '/pages/preCrashList/preCrashList'
})
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '网络异常,请稍后再试' title: '未选中审批部门!'
}) })
}) } else {
that.showLoading = true
console.log(that.deptArr, that.taskIdList);
that.$api.preCrashList.submitCrashTask({
taskIdList: that.taskIdList,
deptIds: that.deptArr
}).then(res => {
if (res.data.code == 200) {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.redirectTo({
url: '/pages/preCrashList/preCrashList'
})
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
that.showLoading = false
uni.showToast({
icon: 'none',
title: '网络异常,请稍后再试!'
})
})
}
} }
}, },
onShow() { onShow() {

View File

@ -94,6 +94,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -101,6 +102,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
fetchList: [ fetchList: [
], ],
@ -187,12 +189,14 @@
}, },
subInStore (obj) { subInStore (obj) {
let that = this let that = this
that.showLoading = true
// //
that.$api.repairTestInStore.processOrReject({ that.$api.repairTestInStore.processOrReject({
params: JSON.stringify(obj) params: JSON.stringify(obj)
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -205,6 +209,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -53,6 +53,7 @@
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="获取设备中,请稍后..."></u-loading-page> <u-loading-page :loading="showLoading" color="#000" loading-text="获取设备中,请稍后..."></u-loading-page>
<u-loading-page :loading="showSubLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -106,7 +107,8 @@
value: '3' value: '3'
} }
], ],
showLoading: false showLoading: false,
showSubLoading: false
} }
}, },
methods: { methods: {
@ -152,6 +154,7 @@
title: '出库数量大于待出库数量!' title: '出库数量大于待出库数量!'
}) })
} else { } else {
that.showSubLoading = true
console.log(that.subList); console.log(that.subList);
that.subList = that.subList.map(item => { that.subList = that.subList.map(item => {
return { return {
@ -173,6 +176,7 @@
that.$api.backMaterialReceive.subRfid(param).then(res => { that.$api.backMaterialReceive.subRfid(param).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showSubLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -181,6 +185,7 @@
} }
}) })
} else { } else {
that.showSubLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -36,6 +36,7 @@
<view class="sub-btn" v-show="infoList.length != 0" @click="outStore"> <view class="sub-btn" v-show="infoList.length != 0" @click="outStore">
接收 接收
</view> </view>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -43,6 +44,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
typeId: '', typeId: '',
num: '', num: '',
parentId: '', parentId: '',
@ -87,6 +89,7 @@
title: '该机具状态不是在用,无法接受退料!' title: '该机具状态不是在用,无法接受退料!'
}) })
} else { } else {
that.showLoading = true
const arrList = [{ const arrList = [{
"parentId": this.initData.parentId, "parentId": this.initData.parentId,
"typeId": this.initData.typeId, "typeId": this.initData.typeId,
@ -108,6 +111,7 @@
that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => { that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -118,6 +122,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -112,6 +112,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -119,6 +120,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
allChecked: false, allChecked: false,
examFormData: { examFormData: {
ifPass: '', ifPass: '',
@ -226,10 +228,12 @@
}, },
subInStore (obj) { subInStore (obj) {
let that = this let that = this
that.showLoading = true
// //
that.$api.testExam.testExamAudit(obj).then(res => { that.$api.testExam.testExamAudit(obj).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -241,6 +245,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -103,6 +103,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -110,6 +111,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
fetchList: [ fetchList: [
], ],
@ -206,10 +208,12 @@
}, },
subInStore (obj) { subInStore (obj) {
let that = this let that = this
that.showLoading = true
// //
that.$api.testExam.testExamAudit(obj).then(res => { that.$api.testExam.testExamAudit(obj).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -219,6 +223,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -161,7 +161,7 @@ export default {
this.fetchList = res.data.rows this.fetchList = res.data.rows
} }
}).catch(err => { }).catch(err => {
throw err console.log(err);
}) })
}, },
onShow() { onShow() {

View File

@ -67,11 +67,11 @@
pic: '/static/qrcodeBinding.png', pic: '/static/qrcodeBinding.png',
url: 'qrcodeBinding' url: 'qrcodeBinding'
}, },
{ /* {
name: '新购验收', name: '新购验收',
pic: '/static/newCheck.png', pic: '/static/newCheck.png',
url: 'newCheck' url: 'newCheck'
}, }, */
{ {
name: '新购入库', name: '新购入库',
pic: '/static/newInStore.png', pic: '/static/newInStore.png',