This commit is contained in:
bb_pan 2025-08-26 19:00:32 +08:00
parent 9fa6a16cd8
commit 0896a51ff8
1 changed files with 59 additions and 21 deletions

View File

@ -79,7 +79,7 @@
<view class="cont">{{ item.unitName }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-row :gutter="24">
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
<uni-col :span="6">退料数量</uni-col>
<uni-col :span="16">
@ -92,7 +92,7 @@
<uni-col :span="16">
<view class="cont">{{ item.repairedNum }}</view>
</uni-col>
</uni-row>
</uni-row> -->
<uni-row :gutter="24">
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
<uni-col :span="6">报废数量</uni-col>
@ -121,6 +121,13 @@
<view class="cont">{{ item.scrapReason }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
<uni-col :span="6">损坏原因</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.scrapType == 0 ? '自然损坏' : '人为损坏' }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
<uni-col :span="6">附件</uni-col>
@ -235,15 +242,31 @@ const handleAllPass = async () => {
}
})
console.log(ids)
const res = await batchPassApi({"scrapApplyDetailsList":ids})
console.log(res)
if (res.code === 200) {
uni.showToast({
title: '操作成功!',
icon: 'none',
})
getDetailsData()
}
//
uni.showModal({
title: '提示',
content: '确定要通过选中的数据吗?',
success: async (res) => {
if (res.confirm) {
try {
uni.showModal({ title: '操作中...', mask: true })
const res = await batchPassApi({"scrapApplyDetailsList":ids})
console.log(res)
if (res.code === 200) {
uni.showToast({
title: '操作成功!',
icon: 'none',
})
getDetailsData()
}
} catch (error) {
console.log('🚀 ~ handleAllPass ~ error:', error)
} finally {
uni.hideLoading()
}
}
}
})
}
//
@ -264,18 +287,33 @@ const handleAllFail = async () => {
let obj = item;
obj.agreementId=agreementId.value
ids.push(obj)
ids.push(obj)
}
})
console.log(ids)
const res = await batchRejectApi({"scrapApplyDetailsList":ids})
if (res.code === 200) {
uni.showToast({
title: '操作成功!',
icon: 'none',
})
getDetailsData()
}
uni.showModal({
title: '提示',
content: '确定要驳回选中的数据吗?',
success: async (res) => {
if (res.confirm) {
try {
uni.showLoading({ title: '操作中...', mask: true })
const res = await batchRejectApi({"scrapApplyDetailsList":ids})
if (res.code === 200) {
uni.showToast({
title: '操作成功!',
icon: 'none',
})
getDetailsData()
}
} catch (error) {
console.log('🚀 ~ handleAllFail ~ error:', error)
} finally {
uni.hideLoading()
}
}
}
})
}
@ -443,7 +481,7 @@ onUnmounted(() => {
//
.uni-row {
padding: 16rpx 0;
padding: 6rpx 0;
font-size: 28rpx;
border-bottom: 2rpx solid #f5f5f5;
display: flex;