2022-03-22 03:38:06 +00:00
|
|
|
|
<template>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
<view class="content">
|
|
|
|
|
<statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav>
|
|
|
|
|
|
|
|
|
|
<container-subgroup-two>
|
|
|
|
|
<view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
|
2022-04-22 10:39:36 +00:00
|
|
|
|
<view class="li animated fadeIn" v-for="(item,index) in dataList" :key="index">
|
|
|
|
|
<view class="title mar-y120 clips1">项目名称:{{item.name}}</view>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
<view class="text-content">
|
|
|
|
|
<view class="left">
|
2022-04-22 10:39:36 +00:00
|
|
|
|
<view class="text clips1">核心品牌:{{item.brand}}</view>
|
|
|
|
|
<view class="text clips1">规格型号:{{item.model}}</view>
|
|
|
|
|
<view class="text clips1">批 次 号:{{item.batch_number}}</view>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view class="rigth">
|
2022-04-22 10:39:36 +00:00
|
|
|
|
<view class="text">备品数量:<text class="cor">{{item.quantity}}张</text></view>
|
|
|
|
|
<view class="text cor1">备品尺寸:{{item.size}}</view>
|
|
|
|
|
<view class="text cor1">入库时间:{{item.time}}</view>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2022-04-22 10:39:36 +00:00
|
|
|
|
<view class="icon1" :class="['icon','icon1']"><text class="icon-text">{{['正常','待维保'][item.status]}}</text></view>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
</view>
|
2022-04-22 10:39:36 +00:00
|
|
|
|
<pitera v-if="total==dataList.length && !ifLoading" textStr="查询数据加载完毕~" textFontSize="30rpx" textColor="#b5b2b2"></pitera>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
</view>
|
|
|
|
|
</container-subgroup-two>
|
|
|
|
|
</view>
|
2022-03-22 03:38:06 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-04-13 12:36:32 +00:00
|
|
|
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
2022-04-18 09:08:12 +00:00
|
|
|
|
import statusNav from '../../components/status-nav.vue';
|
|
|
|
|
import {
|
|
|
|
|
queryFun
|
|
|
|
|
} from '../../jsFile/public-api.js';
|
|
|
|
|
import pitera from '@/components/nothing/pitera.vue';
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
statusNav,
|
|
|
|
|
containerSubgroupTwo,
|
|
|
|
|
pitera
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-04-22 10:39:36 +00:00
|
|
|
|
dataList: [
|
|
|
|
|
// {
|
|
|
|
|
// id:1,
|
|
|
|
|
// name:'湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室',//项目名称
|
|
|
|
|
// brand:'海康威视',//核心品牌
|
|
|
|
|
// quantity: 0,//备品数量
|
|
|
|
|
// model:'DS-CK18FI-H',//规格型号
|
|
|
|
|
// size:'320*160',//产品尺寸
|
|
|
|
|
// batch_number:'2210122',//批次号
|
|
|
|
|
// time:'2021-04-06 16:45:45',//入库时间
|
|
|
|
|
// status:0
|
|
|
|
|
// },
|
|
|
|
|
],
|
2022-04-18 09:08:12 +00:00
|
|
|
|
list_rows: 20,
|
|
|
|
|
page: 1,
|
|
|
|
|
total: 0,
|
2022-04-22 10:39:36 +00:00
|
|
|
|
key_word: '' ,//关键词
|
|
|
|
|
ifLoading:true
|
2022-04-18 09:08:12 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
if (this.total != this.dataList.length) {
|
|
|
|
|
this.page++;
|
|
|
|
|
this.queryFunEv();
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-13 12:36:32 +00:00
|
|
|
|
onLoad(op) {
|
2022-04-18 09:08:12 +00:00
|
|
|
|
if (op.key_word != undefined) {
|
|
|
|
|
this.key_word = op.key_word;
|
2022-04-15 10:44:40 +00:00
|
|
|
|
// 调用查询(备品)列表事件
|
2022-04-18 09:08:12 +00:00
|
|
|
|
this.queryFunEv();
|
2022-04-15 10:44:40 +00:00
|
|
|
|
}
|
2022-04-13 12:36:32 +00:00
|
|
|
|
},
|
2022-04-18 09:08:12 +00:00
|
|
|
|
methods: {
|
2022-04-15 10:44:40 +00:00
|
|
|
|
// 查询(备品)列表事件
|
2022-04-18 09:08:12 +00:00
|
|
|
|
queryFunEv() {
|
2022-04-22 10:39:36 +00:00
|
|
|
|
uni.showLoading({
|
|
|
|
|
title:'加载中...',
|
|
|
|
|
mask:true
|
|
|
|
|
})
|
2022-04-15 10:44:40 +00:00
|
|
|
|
let params = {
|
2022-04-18 09:08:12 +00:00
|
|
|
|
type_id: 3,
|
|
|
|
|
keyword: this.key_word,
|
|
|
|
|
list_rows: this.list_rows,
|
|
|
|
|
page: this.page
|
2022-04-15 10:44:40 +00:00
|
|
|
|
}
|
2022-04-18 09:08:12 +00:00
|
|
|
|
queryFun(params).then(res => {
|
2022-06-17 07:48:17 +00:00
|
|
|
|
console.log(res,'备品列表')
|
2022-04-18 09:08:12 +00:00
|
|
|
|
if (res.code) {
|
|
|
|
|
this.total = res.data.total; //设置总条数
|
|
|
|
|
if (this.page == 1) this.dataList = [];
|
2022-04-22 10:39:36 +00:00
|
|
|
|
if(res.data.data.length) {
|
|
|
|
|
res.data.data.forEach(item=>{
|
|
|
|
|
let obj = {
|
|
|
|
|
id:item.spare_id,
|
2022-06-17 07:48:17 +00:00
|
|
|
|
name:item.project_name,//项目名称
|
2022-04-22 10:39:36 +00:00
|
|
|
|
brand:item.brand,//核心品牌
|
|
|
|
|
quantity: item.quantity,//备品数量
|
2022-06-17 07:48:17 +00:00
|
|
|
|
model:item.product_model,//规格型号
|
2022-04-22 10:39:36 +00:00
|
|
|
|
size:item.size,//产品尺寸
|
|
|
|
|
batch_number:item.batch_number,//批次号
|
2022-06-17 07:48:17 +00:00
|
|
|
|
time:item.warehousing_time,//入库时间
|
2022-04-22 10:39:36 +00:00
|
|
|
|
status:item.status //0:正常 1:待维修
|
|
|
|
|
}
|
|
|
|
|
this.dataList.push(obj);
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-04-18 09:08:12 +00:00
|
|
|
|
} else {
|
|
|
|
|
this.$toolAll.tools.showToast(res.msg);
|
2022-04-13 12:36:32 +00:00
|
|
|
|
}
|
2022-04-22 10:39:36 +00:00
|
|
|
|
uni.hideLoading();
|
|
|
|
|
this.ifLoading = false;
|
2022-04-13 12:36:32 +00:00
|
|
|
|
})
|
|
|
|
|
}
|
2022-04-18 09:08:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-03-22 03:38:06 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
2022-04-18 09:08:12 +00:00
|
|
|
|
.dataQuery-content {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 15rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li {
|
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
|
padding: 26rpx 28rpx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
margin-bottom: 14rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li {
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .text-content {
|
|
|
|
|
display: flex;
|
|
|
|
|
border-bottom: 2rpx solid #EEEEEE;
|
|
|
|
|
padding-bottom: 10rpx;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .text-content .left {
|
|
|
|
|
width: 48%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .text-content .text {
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cor {
|
|
|
|
|
color: #ff9000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cor1 {
|
|
|
|
|
color: #999999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .icon {
|
|
|
|
|
background-image: url(../../static/iocn/zc.png);
|
|
|
|
|
width: 125rpx;
|
|
|
|
|
height: 91rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
padding-left: 30rpx;
|
|
|
|
|
right: 20rpx;
|
|
|
|
|
top: 20rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .icon .icon-text {
|
|
|
|
|
transform: rotateZ(20deg);
|
|
|
|
|
color: #53e5d0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .icon1 {
|
|
|
|
|
background-image: url(../../static/iocn/dwx.png);
|
|
|
|
|
width: 125rpx;
|
|
|
|
|
height: 91rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
padding-left: 30rpx;
|
|
|
|
|
right: 20rpx;
|
|
|
|
|
top: 20rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dataQuery-content .li .icon1 .icon-text {
|
|
|
|
|
transform: rotateZ(20deg);
|
|
|
|
|
color: #ff0006;
|
|
|
|
|
|
|
|
|
|
}
|
2022-03-22 03:38:06 +00:00
|
|
|
|
</style>
|