领料退料增加查看详情
This commit is contained in:
parent
5a8edddb11
commit
442666ce71
|
|
@ -130,7 +130,7 @@ const onScrollTolower = () => {
|
||||||
const handleItem = async (item) => {
|
const handleItem = async (item) => {
|
||||||
console.log('🚀 ~ handleItem ~ item:', item)
|
console.log('🚀 ~ handleItem ~ item:', item)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/teamLeaseRecord/equipmentDetails?id=${item.id}&isBack=${true}`,
|
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}&isBack=${true}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,22 +71,32 @@ const back = () => {
|
||||||
// 详情
|
// 详情
|
||||||
const getDetailsById = async () => {
|
const getDetailsById = async () => {
|
||||||
try {
|
try {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
})
|
||||||
const res = await detailsLeaseTask(teamId.value)
|
const res = await detailsLeaseTask(teamId.value)
|
||||||
console.log('🚀 ~ getDetailsById ~ res:', res)
|
console.log('🚀 ~ getDetailsById ~ res:', res)
|
||||||
tableList.value = res.data.leaseOutDetailsList
|
tableList.value = res.data.leaseOutDetailsList
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ getDetailsById ~ error:', error)
|
console.log('🚀 ~ getDetailsById ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 退料详情
|
// 退料详情
|
||||||
const getBackDetailsById = async () => {
|
const getBackDetailsById = async () => {
|
||||||
try {
|
try {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
})
|
||||||
const res = await detailsBackTask(teamId.value)
|
const res = await detailsBackTask(teamId.value)
|
||||||
console.log('🚀 ~ getBackDetailsById ~ res:', res)
|
console.log('🚀 ~ getBackDetailsById ~ res:', res)
|
||||||
tableList.value = res.data.backApplyDetailsList
|
tableList.value = res.data.backApplyDetailsList
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ getBackDetailsById ~ error:', error)
|
console.log('🚀 ~ getBackDetailsById ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,8 +116,8 @@ const handleItem = (item) => {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
min-height: 120px;
|
/* min-height: 120px; */
|
||||||
margin-top: 10px;
|
/* margin-top: 10px; */
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ const onScrollTolower = () => {
|
||||||
const handleItem = async (item) => {
|
const handleItem = async (item) => {
|
||||||
console.log('🚀 ~ handleItem ~ item:', item)
|
console.log('🚀 ~ handleItem ~ item:', item)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/teamLeaseRecord/equipmentDetails?id=${item.id}`,
|
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="(e) => onClickSwipe(e, item)"
|
@click="(e) => onClickSwipe(e, item)"
|
||||||
>
|
>
|
||||||
<div class="list">
|
<div class="list" @click="handleDetails(item)">
|
||||||
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div>申请时间: {{ item.createTime }}</div>
|
<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) => {
|
const deleteItem = (item) => {
|
||||||
console.log('🚀 ~ deleteItem ~ item:', item)
|
console.log('🚀 ~ deleteItem ~ item:', item)
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="(e) => onClickSwipe(e, item)"
|
@click="(e) => onClickSwipe(e, item)"
|
||||||
>
|
>
|
||||||
<div class="list">
|
<div class="list" @click="handleDetails(item)">
|
||||||
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
<div style="margin-right: 8px">{{ index + 1 }}.</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div>申请时间: {{ item.createTime }}</div>
|
<div>申请时间: {{ item.createTime }}</div>
|
||||||
|
|
@ -230,6 +230,14 @@ const onClickSwipe = async (e, item, itemIndex) => {
|
||||||
swipeRef.value.closeAll()
|
swipeRef.value.closeAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
const handleDetails = (item) => {
|
||||||
|
console.log('🚀 ~ handleDetails ~ item:', item)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/materialsStation/teamLeaseRecord/equipmentDetails?id=${item.id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const deleteItem = (item) => {
|
const deleteItem = (item) => {
|
||||||
console.log('🚀 ~ deleteItem ~ item:', item)
|
console.log('🚀 ~ deleteItem ~ item:', item)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,9 @@ const onSignature = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.content {
|
||||||
|
height: calc(100vh - 110px);
|
||||||
|
}
|
||||||
.user-info {
|
.user-info {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin: 15rpx auto;
|
margin: 15rpx auto;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ const httpInterceptor = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 设置请求超时时间,默认为60s,设置为 10s
|
// 2. 设置请求超时时间,默认为60s,设置为 10s
|
||||||
options.timeout = 10000
|
options.timeout = 15000
|
||||||
|
|
||||||
// 3. 增加小程序端请求头标识
|
// 3. 增加小程序端请求头标识
|
||||||
options.header = {
|
options.header = {
|
||||||
|
|
@ -122,9 +122,15 @@ export const http = (options) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
|
let title = ''
|
||||||
|
if (err.errMsg?.includes('timeout')) {
|
||||||
|
title = '请求超时'
|
||||||
|
} else {
|
||||||
|
title = '请求失败'
|
||||||
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '请求失败',
|
title,
|
||||||
})
|
})
|
||||||
console.log(err, '请求失败')
|
console.log(err, '请求失败')
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue