iws工单接入
This commit is contained in:
parent
576bf3b248
commit
f7a6e516c0
|
|
@ -189,7 +189,9 @@
|
|||
{
|
||||
"path": "pages/picking/review/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "领用申请详情"
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom", // 使用自定义导航栏
|
||||
"navigationBarBackImage": ""
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ onMounted(async () => {
|
|||
if (origin.indexOf('ticket') != -1) {
|
||||
try {
|
||||
uni.showLoading({ title: '登录中' })
|
||||
|
||||
const { data: result } = await iwsLoginAPI({
|
||||
ticket: origin.split('ticket=')[1].split('#/')[0],
|
||||
sysType: 1,
|
||||
|
|
|
|||
|
|
@ -154,10 +154,10 @@ import { ref, computed, onUnmounted } from 'vue'
|
|||
import { onLoad, onShow, } from '@dcloudio/uni-app'
|
||||
import { getCodeDeviceListAPI, setOutboundNumAPI, } from '@/services/picking/outbound.js'
|
||||
import { getAuditInfoAPI,receiveDetailAPI,submitAuditingApi } from '@/services/picking/review.js'
|
||||
|
||||
import { appLoginAPI, getUserInfoAPI, iwsLoginAPI } from '@/services/index.js'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
// const query = defineProps() // 获取上级页面传递的路由参数
|
||||
// const queryParams = JSON.parse(query.queryParams)
|
||||
const queryParams = ref({
|
||||
|
|
@ -201,19 +201,54 @@ const toggleForm = () => {
|
|||
const type = ref(1)
|
||||
|
||||
const userId = uni.getStorageSync('id')
|
||||
const origin = window.location.href
|
||||
// 页面加载完毕
|
||||
onLoad((options) => {
|
||||
console.log("options",options)
|
||||
// queryParams.value = JSON.parse(options.params)
|
||||
// auditingParams.value.taskId = queryParams.value.taskId
|
||||
// type.value = queryParams.value.type
|
||||
onLoad(async(options) => {
|
||||
if (origin.indexOf('params') != -1) {
|
||||
queryParams.value = JSON.parse(options.params)
|
||||
auditingParams.value.taskId = queryParams.value.taskId
|
||||
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(() => {
|
||||
console.log(queryParams.value)
|
||||
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
// getReviewInfo(queryParams.value.id)
|
||||
// fetchAuditInfo()
|
||||
getReviewInfo(queryParams.value.id)
|
||||
fetchAuditInfo()
|
||||
})
|
||||
// 获取详情列表
|
||||
const getReviewInfo = async (id) => {
|
||||
|
|
@ -362,6 +397,8 @@ const onHandleOutbound = async () => {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
.custom-steps {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
|
@ -470,7 +507,7 @@ const onHandleOutbound = async () => {
|
|||
flex-direction: column;
|
||||
background-color: #f7f8fa;
|
||||
padding: 24rpx;
|
||||
|
||||
padding-top: 44px;
|
||||
:deep(.uni-steps-item-title.accepted-title) {
|
||||
color: red !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ const changeTab = (index) => {
|
|||
}
|
||||
// 点击跳转详情
|
||||
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}` })
|
||||
}
|
||||
|
||||
// 判断数据是否加载完毕
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export const appTransferRejectApi = (data)=> {
|
|||
export const appWarehouseApi = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/bm_qrcode_box/app_warehouse',
|
||||
url: '/material/bm_qrcode_box/app_box_input',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { useMemberStore } from '@/stores'
|
|||
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://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.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' : '***'
|
||||
|
||||
// **********OCR识别为NVUE文件页面请求URL需要同步配置**********
|
||||
|
|
|
|||
Loading…
Reference in New Issue