领料退料增加查看详情

This commit is contained in:
bb_pan 2025-07-18 09:54:19 +08:00
parent 5a8edddb11
commit 442666ce71
7 changed files with 43 additions and 8 deletions

View File

@ -130,7 +130,7 @@ const onScrollTolower = () => {
const handleItem = async (item) => {
console.log('🚀 ~ handleItem ~ item:', item)
uni.navigateTo({
url: `/pages/teamLeaseRecord/equipmentDetails?id=${item.id}&isBack=${true}`,
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}&isBack=${true}`,
})
}

View File

@ -71,22 +71,32 @@ const back = () => {
//
const getDetailsById = async () => {
try {
uni.showLoading({
title: '加载中...',
})
const res = await detailsLeaseTask(teamId.value)
console.log('🚀 ~ getDetailsById ~ res:', res)
tableList.value = res.data.leaseOutDetailsList
} catch (error) {
console.log('🚀 ~ getDetailsById ~ error:', error)
} finally {
uni.hideLoading()
}
}
// 退
const getBackDetailsById = async () => {
try {
uni.showLoading({
title: '加载中...',
})
const res = await detailsBackTask(teamId.value)
console.log('🚀 ~ getBackDetailsById ~ res:', res)
tableList.value = res.data.backApplyDetailsList
} catch (error) {
console.log('🚀 ~ getBackDetailsById ~ error:', error)
} finally {
uni.hideLoading()
}
}
@ -106,8 +116,8 @@ const handleItem = (item) => {
padding: 10px;
.list {
min-height: 120px;
margin-top: 10px;
/* min-height: 120px; */
/* margin-top: 10px; */
background: #fafafa;
border-radius: 6px;
padding: 8px;

View File

@ -130,7 +130,7 @@ const onScrollTolower = () => {
const handleItem = async (item) => {
console.log('🚀 ~ handleItem ~ item:', item)
uni.navigateTo({
url: `/pages/teamLeaseRecord/equipmentDetails?id=${item.id}`,
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}`,
})
}

View File

@ -52,7 +52,7 @@
:key="index"
@click="(e) => onClickSwipe(e, item)"
>
<div class="list">
<div class="list" @click="handleDetails(item)">
<div style="margin-right: 8px">{{ index + 1 }}.</div>
<div class="item">
<div>申请时间: {{ item.createTime }}</div>
@ -211,6 +211,14 @@ const onClickSwipe = async (e, item) => {
}
}
//
const handleDetails = async (item) => {
console.log('🚀 ~ handleDetails ~ item:', item)
uni.navigateTo({
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}&isBack=${true}`,
})
}
//
const deleteItem = (item) => {
console.log('🚀 ~ deleteItem ~ item:', item)

View File

@ -52,7 +52,7 @@
:key="index"
@click="(e) => onClickSwipe(e, item)"
>
<div class="list">
<div class="list" @click="handleDetails(item)">
<div style="margin-right: 8px">{{ index + 1 }}.</div>
<div class="item">
<div>申请时间: {{ item.createTime }}</div>
@ -230,6 +230,14 @@ const onClickSwipe = async (e, item, itemIndex) => {
swipeRef.value.closeAll()
}
//
const handleDetails = (item) => {
console.log('🚀 ~ handleDetails ~ item:', item)
uni.navigateTo({
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}`,
})
}
//
const deleteItem = (item) => {
console.log('🚀 ~ deleteItem ~ item:', item)

View File

@ -36,6 +36,9 @@ const onSignature = () => {
</script>
<style scoped>
.content {
height: calc(100vh - 110px);
}
.user-info {
width: 95%;
margin: 15rpx auto;

View File

@ -30,7 +30,7 @@ const httpInterceptor = {
}
// 2. 设置请求超时时间默认为60s设置为 10s
options.timeout = 10000
options.timeout = 15000
// 3. 增加小程序端请求头标识
options.header = {
@ -122,9 +122,15 @@ export const http = (options) => {
}
},
fail(err) {
let title = ''
if (err.errMsg?.includes('timeout')) {
title = '请求超时'
} else {
title = '请求失败'
}
uni.showToast({
icon: 'none',
title: '请求失败',
title,
})
console.log(err, '请求失败')
reject(err)