单条驳回

This commit is contained in:
bb_pan 2025-07-29 18:08:40 +08:00
parent f5f772cba2
commit 8d73fc449e
3 changed files with 134 additions and 119 deletions

View File

@ -204,6 +204,7 @@ const uploadSignUrl = async (base64Data) => {
console.log('🚀 ~ success: ~ params:', params)
const res = await updateLeaseApplyInfoSign(params)
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
uni.showToast({ title: '签名成功'})
uni.navigateBack()
} else if (opts.isToolsLease) {
const params = {
@ -214,6 +215,7 @@ const uploadSignUrl = async (base64Data) => {
publishTask: opts.publishTask || '',
}
console.log('🚀 ~ success: ~ params:', params)
uni.showToast({ title: '签名成功'})
const res = await toolsLeaseApplyInfoSign(params)
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
uni.navigateBack()
@ -224,6 +226,7 @@ const uploadSignUrl = async (base64Data) => {
signType: signType.value,
}
const res = await updateLeaseApplyInfoSignApi(params)
uni.showToast({ title: '签名成功'})
console.log('🚀 ~ uploadSignUrl ~ 项目部授权:', res)
uni.navigateBack()
} else if (opts.isBack) {
@ -234,6 +237,7 @@ const uploadSignUrl = async (base64Data) => {
}
console.log('🚀 ~ success: ~ params:', params)
const res = await updateSignById(params)
uni.showToast({ title: '签名成功'})
console.log('🚀 ~ uploadImg-退料 ~ res:', res)
uni.navigateBack()
} else {
@ -242,6 +246,7 @@ const uploadSignUrl = async (base64Data) => {
signType: signType.value,
}
const res = await updateSign(params)
uni.showToast({ title: '签名成功'})
console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
getSignData()
}

View File

@ -59,6 +59,8 @@
class="table-list-item"
@tap="onRepairItem(item)"
>
<uni-swipe-action ref="swipeRef">
<uni-swipe-action-item @click="onClick($event, item, index)" :right-options="item.options">
<div class="title">
<span style="font-size: 15px; font-weight: 800">修试审核</span>
<span style="color:#e6a23c;" v-if="item.status==0">未审核</span>
@ -146,6 +148,8 @@
/>
</uni-col>
</uni-row>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</scroll-view>
</view>
@ -158,11 +162,22 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
const detailsList = ref([])
const keyword = ref('')
const taskId = ref('')
const swipeRef = ref()
//
const getDetailsData = async () => {
const res = await getAuditInfo({ taskId: taskId.value,keyword:keyword.value })
detailsList.value = res.data
detailsList.value = detailsList.value.map((e) => {
if (e.status == 0) {
e.options = [{
text: '驳回',
style: {
backgroundColor: '#ed6042',
color: '#fff',
fontSize: '30rpx',
},
},]
}
return { ...e, isChecked: false }
})
}
@ -236,20 +251,9 @@ const handleAllPass = async () => {
}
//
const handleAllFail = async () => {
const isSelect = detailsList.value.some((e) => e.isChecked == true)
if (!isSelect) {
uni.showToast({
title: '请勾选需要需要驳回的数据!',
icon: 'none',
})
return
}
const handleAllFail = async (item) => {
//
const ids = []
detailsList.value.forEach((item) => {
if (item.isChecked) {
console.log(item)
let obj = {
id: item.id,
status: '2',
@ -266,9 +270,7 @@ const handleAllFail = async () => {
maCode:item.maCode
}
ids.push(obj)
}
})
console.log(ids)
console.log('🚀 ~ handleAllFail ~ ids:', ids)
const res = await innerAudit(ids)
if (res.code === 200) {
uni.showToast({
@ -279,6 +281,14 @@ const handleAllFail = async () => {
}
}
//
const onClick = async (e, item, itemIndex) => {
// console.log('🚀 ~ onClick ~ e, item:', e, item)
if (e.content.text == '驳回') {
handleAllFail(item)
swipeRef.value[itemIndex].closeAll()
}
}
//
const onRepairItem = (item) => {
console.log(item)

View File

@ -16,7 +16,7 @@
<span class="form-view">{{ formData.purchaseNum }}</span>
</uni-forms-item> -->
<uni-forms-item>
<button class="scan-btn" @click="scanStart">开始扫码</button>
<button class="scan-btn" type="primary" @click="scanStart">开始扫码</button>
</uni-forms-item>
</uni-forms>
</div>