维修查看
This commit is contained in:
parent
848e0c6456
commit
5939668077
|
|
@ -137,7 +137,7 @@ const queryParams = ref({
|
|||
keyWord: '', // 关键字
|
||||
appTaskStatus: 0, // 状态
|
||||
pageNum: 1,
|
||||
pageSize: 3,
|
||||
pageSize: 20,
|
||||
})
|
||||
|
||||
// 右滑按钮组
|
||||
|
|
@ -251,7 +251,7 @@ onLoad(() => {
|
|||
const onScrollTolower = debounce(() => {
|
||||
console.log('触底事件')
|
||||
if (total.value > tableList.value.length) {
|
||||
queryParams.value.pageSize += 5
|
||||
queryParams.value.pageSize += 10
|
||||
getTableList()
|
||||
}
|
||||
}, 500)
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
<template>
|
||||
<view class="page-container">
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="20">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
<uni-easyinput placeholder="请输入内容" v-model="queryParams.keyWord" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="search">查询</view>
|
||||
<view class="search" @click="getDetailsList">查询</view>
|
||||
</uni-col>
|
||||
<!-- <uni-col :span="4">
|
||||
<view class="search" style="background: #19be6b" @click="onQualified">合格</view>
|
||||
</uni-col> -->
|
||||
</uni-row>
|
||||
<view class="table-list-item">
|
||||
<!-- <view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="18"
|
||||
|
|
@ -37,23 +34,24 @@
|
|||
<uni-col :span="18"><view class="cont">{{queryParams.typeRepairedNum}}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<!-- <uni-row :gutter="24" v-if="queryParams.manageType==1">
|
||||
<uni-col :span="6">维修人:</uni-col>
|
||||
<uni-col :span="18"><view class="cont">111</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" v-if="queryParams.manageType==1">
|
||||
<uni-col :span="6">维修时间:</uni-col>
|
||||
<uni-col :span="18"><view class="cont">222</view>
|
||||
</uni-col>
|
||||
</uni-row> -->
|
||||
</view>
|
||||
</view> -->
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" style="padding-bottom: 90rpx">
|
||||
<view class="table-list-item" v-for="item in repairDeviceList" :key="item.maId">
|
||||
<uni-row :gutter="24" v-if="queryParams.manageType==0" >
|
||||
<uni-row :gutter="24" v-if="queryParams.manageType == 0">
|
||||
<uni-col :span="6">设备编码:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<view class="cont">{{ item.maCode }}</view>
|
||||
<view v-if="item.status == '已报废'" class="cont" style="color: red">{{
|
||||
item.status
|
||||
}}</view>
|
||||
</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<!-- <uni-row :gutter="24" v-if="queryParams.manageType==0" >
|
||||
|
|
@ -65,25 +63,25 @@
|
|||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">维修人员:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.repairer || item.createBy || "" }}</view>
|
||||
<view class="cont">{{ item.repairer || item.createBy || '' }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-row :gutter="24" v-if="item.partName">
|
||||
<uni-col :span="6">配件:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.partName||"" }}</view>
|
||||
<view class="cont">{{ item.partName || '' }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">操作人:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.createBy||"" }}</view>
|
||||
<view class="cont">{{ item.createBy || '' }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">操作时间:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{item.createTime||""}}</view>
|
||||
<view class="cont">{{ item.createTime || '' }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
|
|
@ -105,16 +103,22 @@
|
|||
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { auditRepairPass,getDetailsListApi } from '@/services/repair/repair.js'
|
||||
import { auditRepairPass, getDetailsListApi } from '@/services/repair/repair.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
// const query = defineProps() // 获取上级页面传递的由参数
|
||||
// const queryParams = JSON.parse(query.queryParams)
|
||||
const queryParams = ref({})
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 15,
|
||||
keyWord: null,
|
||||
})
|
||||
const total = ref(0)
|
||||
// console.log(queryParams)
|
||||
const allChecked = ref(false)
|
||||
const repairDeviceList = ref([])
|
||||
onLoad((options) => {
|
||||
queryParams.value = JSON.parse(options.queryParams)
|
||||
const opt = JSON.parse(options.queryParams)
|
||||
queryParams.value = { ...queryParams.value, ...opt }
|
||||
console.log(queryParams.value)
|
||||
getDetailsList()
|
||||
// repairDeviceList.value=queryParams.value.repairDeviceList;
|
||||
|
|
@ -123,14 +127,32 @@ onLoad((options) => {
|
|||
|
||||
// 点击跳转维修页面
|
||||
const getDetailsList = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: '加载中...', mask: true })
|
||||
let param = {
|
||||
typeId:queryParams.value.typeId,
|
||||
taskId:queryParams.value.taskId
|
||||
pageNum: queryParams.value.pageNum,
|
||||
pageSize: queryParams.value.pageSize,
|
||||
typeId: queryParams.value.typeId,
|
||||
taskId: queryParams.value.taskId,
|
||||
keyWord: queryParams.value.keyWord || null,
|
||||
}
|
||||
console.log("yyyyyyyyy",param)
|
||||
console.log('🚀 ~ getDetailsList ~ param:', param)
|
||||
const res = await getDetailsListApi(param)
|
||||
total.value = res.total
|
||||
console.log(res)
|
||||
repairDeviceList.value = res.rows
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getDetailsList ~ error:', error)
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
const onScrollTolower = () => {
|
||||
console.log('上拉加载更多')
|
||||
if (total.value == queryParams.value.length) return
|
||||
queryParams.value.pageSize += 10
|
||||
getDetailsList()
|
||||
}
|
||||
|
||||
const onQualified = async () => {
|
||||
|
|
@ -262,12 +284,12 @@ const onQualified = async () => {
|
|||
border-radius: 8rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
&[style*="color: green"] {
|
||||
&[style*='color: green'] {
|
||||
color: #52c41a !important;
|
||||
background-color: rgba(82, 196, 26, 0.1);
|
||||
}
|
||||
|
||||
&[style*="color: red"] {
|
||||
&[style*='color: red'] {
|
||||
color: #f5222d !important;
|
||||
background-color: rgba(245, 34, 45, 0.1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
<!-- 领料出库详情 -->
|
||||
<view class="page-container">
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="12">
|
||||
<uni-col :span="20">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入内容" v-model="keyWord" maxlength="10"/>
|
||||
<uni-easyinput placeholder="请输入内容" v-model="keyWord" maxlength="30"/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
|
|
@ -57,12 +57,12 @@
|
|||
<view class="cont">{{ item.type }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" v-if="item.manageType == 0">
|
||||
<!-- <uni-row :gutter="24" v-if="item.manageType == 0">
|
||||
<uni-col :span="6">设备编码:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.code }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-row> -->
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
|
||||
<uni-col :span="6">退料数量:</uni-col>
|
||||
|
|
|
|||
Loading…
Reference in New Issue