iws工单接入

This commit is contained in:
hongchao 2025-06-19 16:25:10 +08:00
parent 576bf3b248
commit f7a6e516c0
6 changed files with 55 additions and 17 deletions

View File

@ -189,7 +189,9 @@
{ {
"path": "pages/picking/review/details", "path": "pages/picking/review/details",
"style": { "style": {
"navigationBarTitleText": "领用申请详情" "navigationBarTitleText": "",
"navigationStyle": "custom", // 使
"navigationBarBackImage": ""
} }
}, },

View File

@ -46,7 +46,6 @@ onMounted(async () => {
if (origin.indexOf('ticket') != -1) { if (origin.indexOf('ticket') != -1) {
try { try {
uni.showLoading({ title: '登录中' }) uni.showLoading({ title: '登录中' })
const { data: result } = await iwsLoginAPI({ const { data: result } = await iwsLoginAPI({
ticket: origin.split('ticket=')[1].split('#/')[0], ticket: origin.split('ticket=')[1].split('#/')[0],
sysType: 1, sysType: 1,

View File

@ -154,10 +154,10 @@ 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 { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { useMemberStore } from '@/stores'
const memberStore = useMemberStore()
// const query = defineProps() // // const query = defineProps() //
// const queryParams = JSON.parse(query.queryParams) // const queryParams = JSON.parse(query.queryParams)
const queryParams = ref({ const queryParams = ref({
@ -201,19 +201,54 @@ const toggleForm = () => {
const type = ref(1) const type = ref(1)
const userId = uni.getStorageSync('id') const userId = uni.getStorageSync('id')
const origin = window.location.href
// //
onLoad((options) => { onLoad(async(options) => {
console.log("options",options) 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
// type.value = queryParams.value.type type.value = queryParams.value.type
}else{ //
const urlParams = new URLSearchParams(origin);
queryParams.value.taskId = urlParams.get('taskId');
queryParams.value.id = urlParams.get('id');
auditingParams.value.taskId =urlParams.get('taskId')
const ticketMatch = origin.match(/ticket=([^&]*)/);
const ticket = ticketMatch ? ticketMatch[1] : '';
// uni.showModal({
// title: '',
// content: ticket,
// showCancel: false
// })
const { data: result } = await iwsLoginAPI({
ticket: ticket,
sysType: 1,
})
// 1. token
memberStore.setToken(result.access_token)
// 2 .
const res = await getUserInfoAPI()
memberStore.setUserInfo(res.user)
// uni.showToast({ title: '', icon: 'none' })
// uni.setStorageSync('username', loginForm.username)
// uni.setStorageSync('password', loginForm.password)
uni.setStorageSync('id', res.user.userId)
uni.setStorageSync('deptName', res.user?.dept?.deptName)
uni.setStorageSync('urlPermissions',res.urlPermissions?res.urlPermissions:[])
// setTimeout(() => {
// uni.switchTab({
// url: '/pages/picking/details',
// })
// }, 500)
}
}) })
onShow(() => { onShow(() => {
console.log(queryParams.value) console.log(queryParams.value)
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)// // getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//
// getReviewInfo(queryParams.value.id) getReviewInfo(queryParams.value.id)
// fetchAuditInfo() fetchAuditInfo()
}) })
// //
const getReviewInfo = async (id) => { const getReviewInfo = async (id) => {
@ -362,6 +397,8 @@ const onHandleOutbound = async () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-steps { .custom-steps {
margin-bottom: 5px; margin-bottom: 5px;
} }
@ -470,7 +507,7 @@ const onHandleOutbound = async () => {
flex-direction: column; flex-direction: column;
background-color: #f7f8fa; background-color: #f7f8fa;
padding: 24rpx; padding: 24rpx;
padding-top: 44px;
:deep(.uni-steps-item-title.accepted-title) { :deep(.uni-steps-item-title.accepted-title) {
color: red !important; color: red !important;
} }

View File

@ -266,7 +266,7 @@ const changeTab = (index) => {
} }
// //
const handleItem = (item) => { const handleItem = (item) => {
uni.navigateTo({ url: `/pages/picking/outbound/details?id=${item.id}&publishTask=${item.publishTask}` }) uni.navigateTo({ url: `/pages/picking/outbound/details?id=${item.id}&taskId=${item.taskId}` })
} }
// //

View File

@ -95,7 +95,7 @@ export const appTransferRejectApi = (data)=> {
export const appWarehouseApi = (data) => { export const appWarehouseApi = (data) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/material/bm_qrcode_box/app_warehouse', url: '/material/bm_qrcode_box/app_box_input',
data:data, data:data,
}) })
} }

View File

@ -8,9 +8,9 @@ import { useMemberStore } from '@/stores'
const ENV = process.env.NODE_ENV const ENV = process.env.NODE_ENV
// export const baseURL = ENV === 'development' ? 'http://192.168.0.244:18580' : 'http://192.168.0.244:18580'//测试 // export const baseURL = ENV === 'development' ? 'http://192.168.0.244:18580' : 'http://192.168.0.244:18580'//测试
// export const baseURL = ENV === 'development' ? 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/' : 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/'//生产 // export const baseURL = ENV === 'development' ? 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/' : 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/'//生产
export const baseURL = ENV === 'development' ? 'http://192.168.1.117:18080' : '/iws/jiju-api'; // 宏源服务 export const baseURL = ENV === 'development' ? '/api' : '/iws/jiju-api'; // 宏源服务
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***' // export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***'
// export const baseURL = ENV === 'development' ? 'http://192.168.0.96:18080' : 'http://192.168.2.27:18080'//马 // export const baseURL = ENV === 'development' ? 'http://192.168.1.244:18080' : 'http://192.168.1.244:18080'//马
// export const baseURL = ENV === 'development' ? '/api' : '***' // export const baseURL = ENV === 'development' ? '/api' : '***'
// **********OCR识别为NVUE文件页面请求URL需要同步配置********** // **********OCR识别为NVUE文件页面请求URL需要同步配置**********