SmartStorage/pages/preCrashList/preCrashList.vue

253 lines
5.2 KiB
Vue
Raw Normal View History

<template>
<view>
<view class="search-bar">
<uni-easyinput suffixIcon="search" v-model="subIpt" placeholder="请输入关键字" @iconClick="searchKeyword"></uni-easyinput>
</view>
<view
class="single-fetch"
v-for="(pre, index) in preCrashList"
:key="index"
>
<view class="fetch-upper">
<!-- <checkbox-group
v-show="pre.taskStatus == 58"
style="margin-right: 15rpx;"
@change="checkClick(pre)"
>
<checkbox :checked="pre.checked" />
</checkbox-group> -->
<view class="upper-lef">
{{ pre.createBy == null ? '' : pre.createBy.slice(0, 1) }}
</view>
<view class="upper-rig">
<h4 style="font-size: 16px;">{{ pre.createBy }}</h4>
<h4 style="color: #989898;">{{ pre.unitName }}</h4>
</view>
</view>
<view class="fetch-lower">
<view>
<span>预报废单号</span>
<h4>{{ pre.repairNum }}</h4>
</view>
<view>
<span>报废单号</span>
<h4>{{ pre.scrapNum }}</h4>
</view>
<view>
<span>报废来源</span>
<h4>{{ pre.scrapSource == '1' ? '退料' : '维修' }}</h4>
</view>
<view>
<span>设备类型</span>
<h4>{{ pre.itemType }}</h4>
</view>
</view>
<view class="fetch-btns">
<view
style="background-color: #3788FF;"
@click="seeListDetail(pre.taskId)"
>
<uni-icons style="color: #fff;" type="eye"></uni-icons>
查看
</view>
<view
style="background-color: #FCA30D;"
>
<uni-icons style="color: #fff;" type="auth"></uni-icons>
审核
</view>
<view
style="background-color: #1BD30B;"
>
<uni-icons style="color: #fff;" type="paperplane"></uni-icons>
提交
</view>
</view>
<view class="sticky-area">
<!-- <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 == '124'"
>
待提交
</h4>
<h4
v-show="pre.taskStatus == '58'"
>
审核中
</h4>
<h4
v-show="pre.taskStatus == '59'"
style="border: 1px solid #27D870; color: #27D870;"
>
已通过
</h4>
<h4
v-show="pre.taskStatus == '61'"
style="border: 1px solid #EE603D; color: #EE603D;"
>
已驳回
</h4>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
preCrashList: [],
subIpt: ''
}
},
methods: {
searchKeyword () {
this.getSubList(this.subIpt)
},
getSubList (keyword) {
let that = this
that.$api.preCrashList.fetchPreSubList({
keyword
}).then(res => {
console.log(res);
if (res.data.code == 200) {
that.preCrashList = res.data.data
2024-06-25 11:11:12 +08:00
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
},
seeListDetail (taskId) {
console.log(taskId);
uni.navigateTo({
url: `/pages/preCrashListDetail/preCrashListDetail?taskId=${taskId}`
})
}
},
onShow() {
this.getSubList('')
}
}
</script>
<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;
}
}
}
</style>