定损驳回
This commit is contained in:
parent
220bb5a3c6
commit
ae9cb79421
|
|
@ -35,6 +35,8 @@
|
|||
class="table-list-item"
|
||||
@tap="onRepairItem(item)"
|
||||
>
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item @click="onClick($event, item)" :right-options="active==1 ? options : []">
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">定损任务</span>
|
||||
<!-- <span :style="{ color: active == 1 ? '#3784fb' : '#ff4d4f' }">{{active == 1 ? '已完成' : '未完成'}}</span> -->
|
||||
|
|
@ -122,6 +124,8 @@
|
|||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
@ -132,10 +136,41 @@ import { ref, onUnmounted, computed } from 'vue'
|
|||
import { getRepairDetailsAPI, auditRepairPass } from '@/services/repair/repair.js'
|
||||
import { getLossAssessmentDetailsAPI, } from '@/services/repair/equipAssessment.js'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import {repairRejectAPI} from "../../../services/repair/equipAssessment";
|
||||
const detailsList = ref([])
|
||||
// const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const taskId = ref('')
|
||||
const keyWord = ref('')
|
||||
const active = ref(1) // tap索引
|
||||
// 右滑按钮组
|
||||
const options = ref([
|
||||
{
|
||||
text: '驳回',
|
||||
style: {
|
||||
backgroundColor: '#ed6042',
|
||||
color: '#fff',
|
||||
fontSize: '30rpx',
|
||||
},
|
||||
},
|
||||
])
|
||||
// 右滑按钮点击事件
|
||||
const onClick = async (e, item) => {
|
||||
// 驳回逻辑
|
||||
console.log('驳回')
|
||||
console.log(item)
|
||||
const parm ={
|
||||
ids:item.ids
|
||||
}
|
||||
console.log(parm)
|
||||
const res = await repairRejectAPI(parm)
|
||||
if (res.code === 200) {
|
||||
await uni.showToast({
|
||||
title: '驳回成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
await getRepairDetailsData()
|
||||
}
|
||||
}
|
||||
const search = () => {
|
||||
console.log('🚀 ~ search ~ keyWord:', keyWord.value)
|
||||
getRepairDetailsData()
|
||||
|
|
|
|||
|
|
@ -156,7 +156,13 @@ const onClick = async (e, item) => {
|
|||
} else {
|
||||
// 驳回逻辑
|
||||
console.log('驳回')
|
||||
const res = await repairRejectAPI(item.taskId)
|
||||
const parm ={
|
||||
taskIds:[
|
||||
item.taskId,
|
||||
]
|
||||
}
|
||||
console.log(parm)
|
||||
const res = await repairRejectAPI(parm)
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '驳回成功!',
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ export const repairSubmitAPI = (data) => {
|
|||
/**
|
||||
* 定损 ---- 驳回
|
||||
*/
|
||||
export const repairRejectAPI = (id) => {
|
||||
export const repairRejectAPI = (data) => {
|
||||
return http({
|
||||
method: 'delete',
|
||||
url: '/material/lossAssessment/' + id,
|
||||
data: [id],
|
||||
method: 'POST',
|
||||
url: '/material/lossAssessment/reject',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue