单条驳回
This commit is contained in:
parent
f5f772cba2
commit
8d73fc449e
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,93 +59,97 @@
|
|||
class="table-list-item"
|
||||
@tap="onRepairItem(item)"
|
||||
>
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">修试审核</span>
|
||||
<span style="color:#e6a23c;" v-if="item.status==0">未审核</span>
|
||||
<span style="color:#3784fb;" v-if="item.status==1">已审核</span>
|
||||
<span style="color:#ff4d4f;" v-if="item.status==2">驳回</span>
|
||||
</div>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-col :span="2">
|
||||
<checkbox-group @change="onChangeChecked(item)">
|
||||
<label>
|
||||
<checkbox
|
||||
color="#409eff"
|
||||
borderColor="#409eff"
|
||||
activeBorderColor="#409eff"
|
||||
:checked="item.isChecked"
|
||||
:disabled="item.status!=0"
|
||||
style="transform: scale(0.7)"
|
||||
/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</uni-col> -->
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.machineTypeName }}</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.specificationType }}</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.unitName }}</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.repairNum }}</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.repairedNum }}</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.scrapNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" v-if="item.manageType == 0">
|
||||
<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.maCode }}</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">
|
||||
<uni-tag
|
||||
text="编码"
|
||||
type="warning"
|
||||
v-if="item.manageType == 0"
|
||||
size="small"
|
||||
/>
|
||||
<uni-tag
|
||||
text="数量"
|
||||
type="success"
|
||||
v-if="item.manageType == 1"
|
||||
size="small"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<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>
|
||||
<span style="color:#3784fb;" v-if="item.status==1">已审核</span>
|
||||
<span style="color:#ff4d4f;" v-if="item.status==2">驳回</span>
|
||||
</div>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-col :span="2">
|
||||
<checkbox-group @change="onChangeChecked(item)">
|
||||
<label>
|
||||
<checkbox
|
||||
color="#409eff"
|
||||
borderColor="#409eff"
|
||||
activeBorderColor="#409eff"
|
||||
:checked="item.isChecked"
|
||||
:disabled="item.status!=0"
|
||||
style="transform: scale(0.7)"
|
||||
/>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
</uni-col> -->
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.machineTypeName }}</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.specificationType }}</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.unitName }}</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.repairNum }}</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.repairedNum }}</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.scrapNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" v-if="item.manageType == 0">
|
||||
<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.maCode }}</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">
|
||||
<uni-tag
|
||||
text="编码"
|
||||
type="warning"
|
||||
v-if="item.manageType == 0"
|
||||
size="small"
|
||||
/>
|
||||
<uni-tag
|
||||
text="数量"
|
||||
type="success"
|
||||
v-if="item.manageType == 1"
|
||||
size="small"
|
||||
/>
|
||||
</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,39 +251,26 @@ 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',
|
||||
specificationType: item.specificationType,
|
||||
machineTypeName: item.machineTypeName,
|
||||
repairNum: item.repairNum,
|
||||
repairedNum: item.repairedNum,
|
||||
scrapNum:item.scrapNum,
|
||||
typeId: item.typeId,
|
||||
taskId: item.taskId,
|
||||
auditId: item.id,
|
||||
repairId: item.repairId,
|
||||
maId: item.maId,
|
||||
maCode:item.maCode
|
||||
}
|
||||
ids.push(obj)
|
||||
}
|
||||
})
|
||||
console.log(ids)
|
||||
let obj = {
|
||||
id: item.id,
|
||||
status: '2',
|
||||
specificationType: item.specificationType,
|
||||
machineTypeName: item.machineTypeName,
|
||||
repairNum: item.repairNum,
|
||||
repairedNum: item.repairedNum,
|
||||
scrapNum:item.scrapNum,
|
||||
typeId: item.typeId,
|
||||
taskId: item.taskId,
|
||||
auditId: item.id,
|
||||
repairId: item.repairId,
|
||||
maId: item.maId,
|
||||
maCode:item.maCode
|
||||
}
|
||||
ids.push(obj)
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue