单条驳回
This commit is contained in:
parent
f5f772cba2
commit
8d73fc449e
|
|
@ -204,6 +204,7 @@ const uploadSignUrl = async (base64Data) => {
|
||||||
console.log('🚀 ~ success: ~ params:', params)
|
console.log('🚀 ~ success: ~ params:', params)
|
||||||
const res = await updateLeaseApplyInfoSign(params)
|
const res = await updateLeaseApplyInfoSign(params)
|
||||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||||
|
uni.showToast({ title: '签名成功'})
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} else if (opts.isToolsLease) {
|
} else if (opts.isToolsLease) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -214,6 +215,7 @@ const uploadSignUrl = async (base64Data) => {
|
||||||
publishTask: opts.publishTask || '',
|
publishTask: opts.publishTask || '',
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ success: ~ params:', params)
|
console.log('🚀 ~ success: ~ params:', params)
|
||||||
|
uni.showToast({ title: '签名成功'})
|
||||||
const res = await toolsLeaseApplyInfoSign(params)
|
const res = await toolsLeaseApplyInfoSign(params)
|
||||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|
@ -224,6 +226,7 @@ const uploadSignUrl = async (base64Data) => {
|
||||||
signType: signType.value,
|
signType: signType.value,
|
||||||
}
|
}
|
||||||
const res = await updateLeaseApplyInfoSignApi(params)
|
const res = await updateLeaseApplyInfoSignApi(params)
|
||||||
|
uni.showToast({ title: '签名成功'})
|
||||||
console.log('🚀 ~ uploadSignUrl ~ 项目部授权:', res)
|
console.log('🚀 ~ uploadSignUrl ~ 项目部授权:', res)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} else if (opts.isBack) {
|
} else if (opts.isBack) {
|
||||||
|
|
@ -234,6 +237,7 @@ const uploadSignUrl = async (base64Data) => {
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ success: ~ params:', params)
|
console.log('🚀 ~ success: ~ params:', params)
|
||||||
const res = await updateSignById(params)
|
const res = await updateSignById(params)
|
||||||
|
uni.showToast({ title: '签名成功'})
|
||||||
console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -242,6 +246,7 @@ const uploadSignUrl = async (base64Data) => {
|
||||||
signType: signType.value,
|
signType: signType.value,
|
||||||
}
|
}
|
||||||
const res = await updateSign(params)
|
const res = await updateSign(params)
|
||||||
|
uni.showToast({ title: '签名成功'})
|
||||||
console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
||||||
getSignData()
|
getSignData()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,93 +59,97 @@
|
||||||
class="table-list-item"
|
class="table-list-item"
|
||||||
@tap="onRepairItem(item)"
|
@tap="onRepairItem(item)"
|
||||||
>
|
>
|
||||||
<div class="title">
|
<uni-swipe-action ref="swipeRef">
|
||||||
<span style="font-size: 15px; font-weight: 800">修试审核</span>
|
<uni-swipe-action-item @click="onClick($event, item, index)" :right-options="item.options">
|
||||||
<span style="color:#e6a23c;" v-if="item.status==0">未审核</span>
|
<div class="title">
|
||||||
<span style="color:#3784fb;" v-if="item.status==1">已审核</span>
|
<span style="font-size: 15px; font-weight: 800">修试审核</span>
|
||||||
<span style="color:#ff4d4f;" v-if="item.status==2">驳回</span>
|
<span style="color:#e6a23c;" v-if="item.status==0">未审核</span>
|
||||||
</div>
|
<span style="color:#3784fb;" v-if="item.status==1">已审核</span>
|
||||||
<view class="line"></view>
|
<span style="color:#ff4d4f;" v-if="item.status==2">驳回</span>
|
||||||
<uni-row :gutter="24">
|
</div>
|
||||||
<!-- <uni-col :span="2">
|
<view class="line"></view>
|
||||||
<checkbox-group @change="onChangeChecked(item)">
|
<uni-row :gutter="24">
|
||||||
<label>
|
<!-- <uni-col :span="2">
|
||||||
<checkbox
|
<checkbox-group @change="onChangeChecked(item)">
|
||||||
color="#409eff"
|
<label>
|
||||||
borderColor="#409eff"
|
<checkbox
|
||||||
activeBorderColor="#409eff"
|
color="#409eff"
|
||||||
:checked="item.isChecked"
|
borderColor="#409eff"
|
||||||
:disabled="item.status!=0"
|
activeBorderColor="#409eff"
|
||||||
style="transform: scale(0.7)"
|
:checked="item.isChecked"
|
||||||
/>
|
:disabled="item.status!=0"
|
||||||
</label>
|
style="transform: scale(0.7)"
|
||||||
</checkbox-group>
|
/>
|
||||||
</uni-col> -->
|
</label>
|
||||||
<uni-col :span="6">物资名称:</uni-col>
|
</checkbox-group>
|
||||||
<uni-col :span="16">
|
</uni-col> -->
|
||||||
<view class="cont">{{ item.machineTypeName }}</view>
|
<uni-col :span="6">物资名称:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.machineTypeName }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">规格型号:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.specificationType }}</view>
|
<uni-col :span="6">规格型号:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.specificationType }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">单位:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.unitName }}</view>
|
<uni-col :span="6">单位:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.unitName }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">退料数量:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.repairNum }}</view>
|
<uni-col :span="6">退料数量:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.repairNum }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">已修数量:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.repairedNum }}</view>
|
<uni-col :span="6">已修数量:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.repairedNum }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">报废数量:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.scrapNum }}</view>
|
<uni-col :span="6">报废数量:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.scrapNum }}</view>
|
||||||
<uni-row :gutter="24" v-if="item.manageType == 0">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">设备编码:</uni-col>
|
<uni-row :gutter="24" v-if="item.manageType == 0">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<view class="cont">{{ item.maCode }}</view>
|
<uni-col :span="6">设备编码:</uni-col>
|
||||||
</uni-col>
|
<uni-col :span="16">
|
||||||
</uni-row>
|
<view class="cont">{{ item.maCode }}</view>
|
||||||
<uni-row :gutter="24">
|
</uni-col>
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
</uni-row>
|
||||||
<uni-col :span="6">管理模式:</uni-col>
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="16">
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<uni-tag
|
<uni-col :span="6">管理模式:</uni-col>
|
||||||
text="编码"
|
<uni-col :span="16">
|
||||||
type="warning"
|
<uni-tag
|
||||||
v-if="item.manageType == 0"
|
text="编码"
|
||||||
size="small"
|
type="warning"
|
||||||
/>
|
v-if="item.manageType == 0"
|
||||||
<uni-tag
|
size="small"
|
||||||
text="数量"
|
/>
|
||||||
type="success"
|
<uni-tag
|
||||||
v-if="item.manageType == 1"
|
text="数量"
|
||||||
size="small"
|
type="success"
|
||||||
/>
|
v-if="item.manageType == 1"
|
||||||
</uni-col>
|
size="small"
|
||||||
</uni-row>
|
/>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
</uni-swipe-action-item>
|
||||||
|
</uni-swipe-action>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -158,11 +162,22 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
const detailsList = ref([])
|
const detailsList = ref([])
|
||||||
const keyword = ref('')
|
const keyword = ref('')
|
||||||
const taskId = ref('')
|
const taskId = ref('')
|
||||||
|
const swipeRef = ref()
|
||||||
// 获取列表详情
|
// 获取列表详情
|
||||||
const getDetailsData = async () => {
|
const getDetailsData = async () => {
|
||||||
const res = await getAuditInfo({ taskId: taskId.value,keyword:keyword.value })
|
const res = await getAuditInfo({ taskId: taskId.value,keyword:keyword.value })
|
||||||
detailsList.value = res.data
|
detailsList.value = res.data
|
||||||
detailsList.value = detailsList.value.map((e) => {
|
detailsList.value = detailsList.value.map((e) => {
|
||||||
|
if (e.status == 0) {
|
||||||
|
e.options = [{
|
||||||
|
text: '驳回',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#ed6042',
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: '30rpx',
|
||||||
|
},
|
||||||
|
},]
|
||||||
|
}
|
||||||
return { ...e, isChecked: false }
|
return { ...e, isChecked: false }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -236,39 +251,26 @@ const handleAllPass = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击驳回按钮
|
// 点击驳回按钮
|
||||||
const handleAllFail = async () => {
|
const handleAllFail = async (item) => {
|
||||||
const isSelect = detailsList.value.some((e) => e.isChecked == true)
|
|
||||||
if (!isSelect) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请勾选需要需要驳回的数据!',
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 组装参数
|
// 组装参数
|
||||||
const ids = []
|
const ids = []
|
||||||
detailsList.value.forEach((item) => {
|
let obj = {
|
||||||
if (item.isChecked) {
|
id: item.id,
|
||||||
console.log(item)
|
status: '2',
|
||||||
let obj = {
|
specificationType: item.specificationType,
|
||||||
id: item.id,
|
machineTypeName: item.machineTypeName,
|
||||||
status: '2',
|
repairNum: item.repairNum,
|
||||||
specificationType: item.specificationType,
|
repairedNum: item.repairedNum,
|
||||||
machineTypeName: item.machineTypeName,
|
scrapNum:item.scrapNum,
|
||||||
repairNum: item.repairNum,
|
typeId: item.typeId,
|
||||||
repairedNum: item.repairedNum,
|
taskId: item.taskId,
|
||||||
scrapNum:item.scrapNum,
|
auditId: item.id,
|
||||||
typeId: item.typeId,
|
repairId: item.repairId,
|
||||||
taskId: item.taskId,
|
maId: item.maId,
|
||||||
auditId: item.id,
|
maCode:item.maCode
|
||||||
repairId: item.repairId,
|
}
|
||||||
maId: item.maId,
|
ids.push(obj)
|
||||||
maCode:item.maCode
|
console.log('🚀 ~ handleAllFail ~ ids:', ids)
|
||||||
}
|
|
||||||
ids.push(obj)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
console.log(ids)
|
|
||||||
const res = await innerAudit(ids)
|
const res = await innerAudit(ids)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({
|
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) => {
|
const onRepairItem = (item) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<span class="form-view">{{ formData.purchaseNum }}</span>
|
<span class="form-view">{{ formData.purchaseNum }}</span>
|
||||||
</uni-forms-item> -->
|
</uni-forms-item> -->
|
||||||
<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-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue