工单审核完毕刷新
This commit is contained in:
parent
1609e6d9e2
commit
92bef38f7f
|
|
@ -158,7 +158,7 @@ import { ref, computed, onUnmounted } from 'vue'
|
||||||
import { onLoad, onShow, } from '@dcloudio/uni-app'
|
import { onLoad, onShow, } from '@dcloudio/uni-app'
|
||||||
import { getCodeDeviceListAPI, setOutboundNumAPI, } from '@/services/picking/outbound.js'
|
import { getCodeDeviceListAPI, setOutboundNumAPI, } from '@/services/picking/outbound.js'
|
||||||
import { getAuditInfoAPI,receiveDetailAPI,submitAuditingApi } from '@/services/picking/review.js'
|
import { getAuditInfoAPI,receiveDetailAPI,submitAuditingApi } from '@/services/picking/review.js'
|
||||||
import { appLoginAPI, getUserInfoAPI, iwsLoginAPI } from '@/services/index.js'
|
import { appLoginAPI, getUserInfoAPI, iwsLoginAPI,getConfigApi } from '@/services/index.js'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { useMemberStore } from '@/stores'
|
import { useMemberStore } from '@/stores'
|
||||||
const memberStore = useMemberStore()
|
const memberStore = useMemberStore()
|
||||||
|
|
@ -212,6 +212,7 @@ const userId = ref(uni.getStorageSync('id') || '')
|
||||||
const origin = window.location.href
|
const origin = window.location.href
|
||||||
|
|
||||||
onLoad(async(options) => {
|
onLoad(async(options) => {
|
||||||
|
getConfig()
|
||||||
if (origin.indexOf('params') != -1) {
|
if (origin.indexOf('params') != -1) {
|
||||||
queryParams.value = JSON.parse(options.params)
|
queryParams.value = JSON.parse(options.params)
|
||||||
auditingParams.value.taskId = queryParams.value.taskId
|
auditingParams.value.taskId = queryParams.value.taskId
|
||||||
|
|
@ -256,6 +257,15 @@ const initPageData = () => {
|
||||||
fetchAuditInfo()
|
fetchAuditInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getConfig = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getConfigApi()
|
||||||
|
uni.setStorageSync('systemConfig', res.data)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ getConfig ~ error:', error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 移除onShow中的重复逻辑,或保留作为刷新时的处理
|
// 移除onShow中的重复逻辑,或保留作为刷新时的处理
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 可以留空或处理页面重新显示时的逻辑
|
// 可以留空或处理页面重新显示时的逻辑
|
||||||
|
|
@ -355,7 +365,8 @@ const handleReview = (action) => {
|
||||||
title: '审核成功',
|
title: '审核成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
uni.navigateBack(); // 调接口成功后返回上一层页面
|
initPageData();
|
||||||
|
// uni.navigateBack(); // 调接口成功后返回上一层页面
|
||||||
}
|
}
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
console.log('用户取消操作');
|
console.log('用户取消操作');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue