2024-06-19 10:09:35 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<view class="search-bar">
|
|
|
|
|
|
<uni-easyinput suffixIcon="search" v-model="preIpt" placeholder="请输入关键字" @iconClick="searchKeyword"></uni-easyinput>
|
|
|
|
|
|
</view>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
<view
|
|
|
|
|
|
class="single-fetch"
|
2024-06-20 16:40:29 +08:00
|
|
|
|
v-for="(pre, index) in preCrashList"
|
2024-06-19 10:09:35 +08:00
|
|
|
|
:key="index"
|
|
|
|
|
|
>
|
|
|
|
|
|
<view class="fetch-upper">
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<!-- <checkbox-group
|
|
|
|
|
|
v-show="pre.taskStatus == 58"
|
2024-06-19 10:09:35 +08:00
|
|
|
|
style="margin-right: 15rpx;"
|
2024-06-20 16:40:29 +08:00
|
|
|
|
@change="checkClick(pre)"
|
2024-06-19 10:09:35 +08:00
|
|
|
|
>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<checkbox :checked="pre.checked" />
|
|
|
|
|
|
</checkbox-group> -->
|
2024-06-19 10:09:35 +08:00
|
|
|
|
<view class="upper-lef">
|
2024-06-20 16:40:29 +08:00
|
|
|
|
{{ pre.createBy == null ? '' : pre.createBy.slice(0, 1) }}
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="upper-rig">
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<h4 style="font-size: 16px;">{{ pre.createBy }}</h4>
|
|
|
|
|
|
<h4 style="color: #989898;">{{ pre.unitName }}</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="fetch-lower">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>预报废单号</span>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<h4>{{ pre.scrapNum }}</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>报废来源</span>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<h4>{{ pre.projectName }}</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>设备类型</span>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<h4>{{ pre.itemType }}</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>申请时间</span>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<h4>{{ pre.createTime }}</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="fetch-btns">
|
|
|
|
|
|
<view
|
|
|
|
|
|
style="background-color: #3788FF;"
|
2024-06-20 16:40:29 +08:00
|
|
|
|
@click="seePreDetail(pre.taskId)"
|
2024-06-19 10:09:35 +08:00
|
|
|
|
>
|
|
|
|
|
|
<uni-icons style="color: #fff;" type="eye"></uni-icons>
|
|
|
|
|
|
查看
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
|
|
|
style="background-color: #FCA30D;"
|
2024-06-20 16:40:29 +08:00
|
|
|
|
v-show="pre.taskStatus == '120' && ifRole"
|
|
|
|
|
|
@click="examPreDetail(pre.taskId)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<uni-icons style="color: #fff;" type="auth"></uni-icons>
|
|
|
|
|
|
审核
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
|
|
|
style="background-color: #FCA30D;"
|
|
|
|
|
|
v-show="pre.taskStatus == '121' && ifRole"
|
|
|
|
|
|
@click="examPreDetail(pre.taskId)"
|
2024-06-19 10:09:35 +08:00
|
|
|
|
>
|
|
|
|
|
|
<uni-icons style="color: #fff;" type="auth"></uni-icons>
|
|
|
|
|
|
审核
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sticky-area">
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<!-- <image src="/static/passed.png" v-show="pre.taskStatus == 59" mode=""></image>
|
|
|
|
|
|
<image src="/static/noPass.png" v-show="pre.taskStatus == 61" mode=""></image>
|
|
|
|
|
|
<image src="/static/noExam.png" v-show="pre.taskStatus == 58" mode=""></image> -->
|
|
|
|
|
|
<h4
|
|
|
|
|
|
v-show="pre.taskStatus == '120'"
|
|
|
|
|
|
>
|
|
|
|
|
|
待审核
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<h4
|
|
|
|
|
|
v-show="pre.taskStatus == '121'"
|
|
|
|
|
|
>
|
|
|
|
|
|
审核中
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<h4
|
|
|
|
|
|
v-show="pre.taskStatus == '122'"
|
|
|
|
|
|
style="border: 1px solid #27D870; color: #27D870;"
|
|
|
|
|
|
>
|
|
|
|
|
|
已通过
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<h4
|
|
|
|
|
|
v-show="pre.taskStatus == '123'"
|
|
|
|
|
|
style="border: 1px solid #EE603D; color: #EE603D;"
|
|
|
|
|
|
>
|
|
|
|
|
|
已驳回
|
|
|
|
|
|
</h4>
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<!-- <view class="btm-sticky">
|
2024-06-19 10:09:35 +08:00
|
|
|
|
<view class="checked">
|
|
|
|
|
|
<checkbox-group @tap="checkAll" style="margin-right: 15rpx;">
|
|
|
|
|
|
<checkbox :checked="allChecked" />
|
|
|
|
|
|
</checkbox-group>
|
|
|
|
|
|
<text>全选</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="exam"
|
|
|
|
|
|
@click="toggleExam"
|
|
|
|
|
|
>
|
|
|
|
|
|
审核
|
|
|
|
|
|
</view>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
</view> -->
|
|
|
|
|
|
<!-- <uni-popup
|
2024-06-19 10:09:35 +08:00
|
|
|
|
ref="popup"
|
|
|
|
|
|
type="center"
|
|
|
|
|
|
:mask-click="false"
|
|
|
|
|
|
>
|
|
|
|
|
|
<view class="popup">
|
|
|
|
|
|
<view class="pop-top">
|
|
|
|
|
|
<h4>审批</h4>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
style="color: #AAAAAA; font-weight: bold;"
|
|
|
|
|
|
type="closeempty"
|
|
|
|
|
|
@click="closePopup"
|
|
|
|
|
|
>
|
|
|
|
|
|
</uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<h4 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">是否通过审批?</h4>
|
|
|
|
|
|
<view class="select-area">
|
|
|
|
|
|
<view @click="modalConfirm">通过</view>
|
|
|
|
|
|
<view @click="modalReject">驳回</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-06-20 16:40:29 +08:00
|
|
|
|
</uni-popup> -->
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-06-20 16:40:29 +08:00
|
|
|
|
preCrashList: [],
|
|
|
|
|
|
preIpt: '',
|
|
|
|
|
|
roles: uni.getStorageSync('roles'),
|
|
|
|
|
|
ableRoleArr: ['admin', 'em03', 'dm02'],
|
|
|
|
|
|
ifRole: false
|
2024-06-19 10:09:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-06-20 16:40:29 +08:00
|
|
|
|
searchKeyword () {
|
|
|
|
|
|
this.fetchPreCrashList(this.preIpt)
|
|
|
|
|
|
},
|
|
|
|
|
|
fetchPreCrashList (keyword) {
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
that.$api.preCrashExam.fetchPreCrashList({
|
|
|
|
|
|
keyword
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
that.preCrashList = res.data.data
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
console.log(err);
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
seePreDetail (taskId) {
|
|
|
|
|
|
uni.setStorageSync('preTaskId', taskId)
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/preCrashExamDetail/preCrashExamDetail`
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
examPreDetail (taskId) {
|
|
|
|
|
|
uni.setStorageSync('preTaskId', taskId)
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/preCrashExamDetail/preCrashExamDetail?showBtn=0`
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
that.fetchPreCrashList('')
|
|
|
|
|
|
console.log(uni.getStorageSync('roles'));
|
|
|
|
|
|
for (let role of that.roles) {
|
|
|
|
|
|
if (that.ableRoleArr.includes(role)) {
|
|
|
|
|
|
that.ifRole = true;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
console.log(that.ifRole);
|
2024-06-19 10:09:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2024-06-20 16:40:29 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
body{
|
|
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding-bottom: 10vh;
|
|
|
|
|
|
}
|
|
|
|
|
|
.search-bar{
|
|
|
|
|
|
width: 95%;
|
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
.single-fetch{
|
|
|
|
|
|
width: 95%;
|
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
.fetch-upper{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
|
border-bottom: 1px solid #D7D7D7;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
.upper-lef{
|
|
|
|
|
|
width: 12%;
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
background-color: #3788FF;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.upper-rig{
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 10rpx 20rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
h4{
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.fetch-lower{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
|
border-bottom: 1px solid #D7D7D7;
|
|
|
|
|
|
view{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 15rpx;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
span{
|
|
|
|
|
|
color: #9D9D9D;
|
|
|
|
|
|
padding-right: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
h4{
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
view:last-child{
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.fetch-btns{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
view{
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 8rpx 25rpx;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
margin-right: 15rpx;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.sticky-area{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 20rpx;
|
|
|
|
|
|
right: 20rpx;
|
|
|
|
|
|
/* width: 11vh;
|
|
|
|
|
|
height: 10vh;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
} */
|
|
|
|
|
|
h4{
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 8rpx 20rpx;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border: 1px solid #3788FF;
|
|
|
|
|
|
color: #3788FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-06-19 10:09:35 +08:00
|
|
|
|
</style>
|