7.1表单提交添加loading
This commit is contained in:
parent
ae33908fc4
commit
66f3e29764
12
apis/http.js
12
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:38080"
|
||||
// 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: {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
接收
|
||||
</view> -->
|
||||
</view>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -63,6 +64,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
typeId: '',
|
||||
num: '',
|
||||
parentId: '',
|
||||
|
|
@ -176,6 +178,7 @@
|
|||
itemList: ['合格', '待修', '待报废'],
|
||||
itemColor: '#333',
|
||||
success: function(res) {
|
||||
that.showLoading = true
|
||||
// console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
||||
let type = res.tapIndex + 1
|
||||
const arrList = [{
|
||||
|
|
@ -198,6 +201,7 @@
|
|||
that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -207,6 +211,7 @@
|
|||
})
|
||||
// that.searchCode()
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -123,6 +124,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
allChecked: false,
|
||||
examFormData: {
|
||||
ifPass: '',
|
||||
|
|
@ -230,10 +232,12 @@
|
|||
},
|
||||
subInStore (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 通过审核或驳回
|
||||
that.$api.crashExam.crashExamAudit(obj).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -245,6 +249,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -110,6 +111,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
fetchList: [
|
||||
|
||||
],
|
||||
|
|
@ -206,10 +208,12 @@
|
|||
},
|
||||
subInStore (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 通过审核或驳回
|
||||
that.$api.crashExam.crashExamAudit(obj).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -219,6 +223,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -157,6 +158,7 @@ import { basePath } from '../../public'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
allChecked: false,
|
||||
examFormData: {
|
||||
ifPass: '',
|
||||
|
|
@ -259,6 +261,7 @@ import { basePath } from '../../public'
|
|||
},
|
||||
seeExam (id, directAuditRemark) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 提交单个审核
|
||||
that.$api.exitExam.subExitExam({
|
||||
id,
|
||||
|
|
@ -266,6 +269,7 @@ import { basePath } from '../../public'
|
|||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
@ -278,6 +282,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
@ -291,12 +296,14 @@ import { basePath } from '../../public'
|
|||
},
|
||||
rejectExam (id) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 拒绝单个审核
|
||||
that.$api.exitExam.rejectExitExam({
|
||||
id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
@ -309,6 +316,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@
|
|||
</view>
|
||||
</uni-popup>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
|
|
@ -232,6 +233,7 @@ import { basePath } from '../../public'
|
|||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
showSubLoading: false,
|
||||
allChecked: false,
|
||||
examFormData: {
|
||||
ifPass: '',
|
||||
|
|
@ -321,12 +323,14 @@ import { basePath } from '../../public'
|
|||
this.examList = {
|
||||
taskId: that.modalList.taskId,
|
||||
taskStatus: that.modalList.taskStatus + 1,
|
||||
code: that.modalList.code,
|
||||
leaseApplyInfoList: that.modalList.leaseApplyInfoList
|
||||
}
|
||||
} else if (that.modalList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 102) {
|
||||
this.examList = {
|
||||
taskId: that.modalList.taskId,
|
||||
taskStatus: that.modalList.taskStatus + 2,
|
||||
code: that.modalList.code,
|
||||
leaseApplyInfoList: that.modalList.leaseApplyInfoList
|
||||
}
|
||||
}
|
||||
|
|
@ -334,6 +338,7 @@ import { basePath } from '../../public'
|
|||
this.examList = {
|
||||
taskId: that.modalList.taskId,
|
||||
taskStatus: that.modalList.taskStatus + 1,
|
||||
code: that.modalList.code,
|
||||
leaseApplyInfoList: that.modalList.leaseApplyInfoList,
|
||||
leaseApplyDetails: that.modalList.leaseApplyInfoList[0].leaseApplyDetails
|
||||
}
|
||||
|
|
@ -593,10 +598,12 @@ import { basePath } from '../../public'
|
|||
}, */
|
||||
toggleSubmit (list) {
|
||||
let that = this
|
||||
that.showSubLoading = true
|
||||
console.log(list);
|
||||
that.$api.fetchExam.subExam(list).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showSubLoading = false
|
||||
that.closePopup()
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
|
@ -608,6 +615,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showSubLoading = false
|
||||
that.closePopup()
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
|
@ -620,9 +628,11 @@ import { basePath } from '../../public'
|
|||
},
|
||||
rejectSubmit (list) {
|
||||
let that = this
|
||||
that.showSubLoading = true
|
||||
that.$api.fetchExam.rejectExam(list).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showSubLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
@ -635,6 +645,7 @@ import { basePath } from '../../public'
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showSubLoading = false
|
||||
that.closePopup()
|
||||
that.closePopup1()
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -335,6 +335,7 @@
|
|||
confirmText: '出库',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
that.showLoading = true
|
||||
console.log(that.infoList);
|
||||
that.$api.fetchMaterialOutStore.directOutStore({
|
||||
id: that.infoList.parentId,
|
||||
|
|
@ -342,6 +343,7 @@
|
|||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -349,6 +351,12 @@
|
|||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
|
|
|
|||
|
|
@ -97,12 +97,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
taskId: '',
|
||||
allChecked: false,
|
||||
inputs: "",
|
||||
|
|
@ -279,9 +281,11 @@
|
|||
},
|
||||
subNewBuy (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
that.$api.newInStore.subNewBuy(obj).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -291,6 +295,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -385,37 +385,44 @@
|
|||
},
|
||||
confirmDeptList () {
|
||||
let that = this
|
||||
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
|
||||
if (that.deptArr.length == 0) {
|
||||
uni.showToast({
|
||||
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() {
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -101,6 +102,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
fetchList: [
|
||||
|
||||
],
|
||||
|
|
@ -187,12 +189,14 @@
|
|||
},
|
||||
subInStore (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 通过审核或驳回
|
||||
that.$api.repairTestInStore.processOrReject({
|
||||
params: JSON.stringify(obj)
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -205,6 +209,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
</view>
|
||||
</uni-popup>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
|
|
@ -106,7 +107,8 @@
|
|||
value: '3'
|
||||
}
|
||||
],
|
||||
showLoading: false
|
||||
showLoading: false,
|
||||
showSubLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -152,6 +154,7 @@
|
|||
title: '出库数量大于待出库数量!'
|
||||
})
|
||||
} else {
|
||||
that.showSubLoading = true
|
||||
console.log(that.subList);
|
||||
that.subList = that.subList.map(item => {
|
||||
return {
|
||||
|
|
@ -173,6 +176,7 @@
|
|||
that.$api.backMaterialReceive.subRfid(param).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showSubLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -181,6 +185,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showSubLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
<view class="sub-btn" v-show="infoList.length != 0" @click="outStore">
|
||||
接收
|
||||
</view>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
typeId: '',
|
||||
num: '',
|
||||
parentId: '',
|
||||
|
|
@ -87,6 +89,7 @@
|
|||
title: '该机具状态不是在用,无法接受退料!'
|
||||
})
|
||||
} else {
|
||||
that.showLoading = true
|
||||
const arrList = [{
|
||||
"parentId": this.initData.parentId,
|
||||
"typeId": this.initData.typeId,
|
||||
|
|
@ -108,6 +111,7 @@
|
|||
that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -118,6 +122,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -119,6 +120,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
allChecked: false,
|
||||
examFormData: {
|
||||
ifPass: '',
|
||||
|
|
@ -226,10 +228,12 @@
|
|||
},
|
||||
subInStore (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 通过审核或驳回
|
||||
that.$api.testExam.testExamAudit(obj).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -241,6 +245,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -110,6 +111,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLoading: false,
|
||||
fetchList: [
|
||||
|
||||
],
|
||||
|
|
@ -206,10 +208,12 @@
|
|||
},
|
||||
subInStore (obj) {
|
||||
let that = this
|
||||
that.showLoading = true
|
||||
// 通过审核或驳回
|
||||
that.$api.testExam.testExamAudit(obj).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
|
|
@ -219,6 +223,7 @@
|
|||
}
|
||||
})
|
||||
} else {
|
||||
that.showLoading = false
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ export default {
|
|||
this.fetchList = res.data.rows
|
||||
}
|
||||
}).catch(err => {
|
||||
throw err
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@
|
|||
pic: '/static/qrcodeBinding.png',
|
||||
url: 'qrcodeBinding'
|
||||
},
|
||||
{
|
||||
/* {
|
||||
name: '新购验收',
|
||||
pic: '/static/newCheck.png',
|
||||
url: 'newCheck'
|
||||
},
|
||||
}, */
|
||||
{
|
||||
name: '新购入库',
|
||||
pic: '/static/newInStore.png',
|
||||
|
|
|
|||
Loading…
Reference in New Issue