diff --git a/src/pages/repair/scrapExamine/details.vue b/src/pages/repair/scrapExamine/details.vue
index e81e3c2..bdf2fe2 100644
--- a/src/pages/repair/scrapExamine/details.vue
+++ b/src/pages/repair/scrapExamine/details.vue
@@ -79,7 +79,7 @@
{{ item.unitName }}
-
+
{{ index + 1 }}
报废数量:
@@ -121,6 +121,13 @@
{{ item.scrapReason }}
+
+ {{ index + 1 }}
+ 损坏原因:
+
+ {{ item.scrapType == 0 ? '自然损坏' : '人为损坏' }}
+
+
{{ index + 1 }}
附件:
@@ -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;