维修问题修复

This commit is contained in:
bb_pan 2025-08-21 15:42:16 +08:00
parent bd66735d4f
commit ed0f491dc7
3 changed files with 70 additions and 34 deletions

View File

@ -1,12 +1,21 @@
<template>
<!-- 数量出库 -->
<view class="page-container">
<view class="table-list-item">
<uni-row :gutter="24">
<view class="table-list-item top-content" :class="{ 'is-expanded': isExpanded }">
<uni-row :gutter="24" style="display: flex;align-items: center;">
<uni-col :span="6">物资名称</uni-col>
<uni-col :span="18"
<uni-col :span="15"
><view class="cont">{{ queryParams.typeName }}</view>
</uni-col>
<uni-col :span="3">
<uni-icons
class="down-icon"
:class="{ 'icon-is-expanded': isExpanded }"
type="down"
size="19"
@click="isExpanded = !isExpanded"
></uni-icons>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">物资类型</uni-col>
@ -26,25 +35,25 @@
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
</uni-col>
</uni-row>
<uni-row
:gutter="24"
class="search-form"
style="background: #fff; padding: 10px; margin: 5px; border-radius: 5px"
>
<uni-col :span="6">
<view class="btnBox internal" @click="changeTab(1)"> 内部维修 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox return" @click="changeTab(2)"> 返厂维修 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox scrap" @click="changeTab(3)"> 待报废 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox complete" @click="saveCode"> 提交 </view>
</uni-col>
</uni-row>
</view>
<uni-row
:gutter="24"
class="search-form"
style="background: #fff; padding: 10px; margin: 5px; border-radius: 5px"
>
<uni-col :span="6">
<view class="btnBox internal" @click="changeTab(1)"> 内部维修 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox return" @click="changeTab(2)"> 返厂维修 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox scrap" @click="changeTab(3)"> 待报废 </view>
</uni-col>
<uni-col :span="6">
<view class="btnBox complete" @click="saveCode"> 提交 </view>
</uni-col>
</uni-row>
<scroll-view scroll-y style="padding-bottom: 20rpx">
<!-- <view class="table-list-item">
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
@ -110,8 +119,8 @@
:clear="false"
/>
<div class="operation-btns">
<span class="add" @click="addPart">+</span>
<span class="remove" @click="delPart(index)">-</span>
<span class="add" @click="addPart"></span>
<span class="remove" @click="delPart(index)"></span>
</div>
</div>
</uni-forms-item>
@ -180,8 +189,8 @@
@input="costCheckNum(item)"
/>
<div class="operation-btns">
<span class="add" @click="addMidPart">+</span>
<span class="remove" @click="delMidPart(index)">-</span>
<span class="add" @click="addMidPart"></span>
<span class="remove" @click="delMidPart(index)"></span>
</div>
</div>
</uni-forms-item>
@ -283,6 +292,7 @@ const partFileList = ref([])
const returnRemark = ref('') //
const returnImgUrl = ref('')
const returnFileList = ref([])
const isExpanded = ref(false)
onLoad((options) => {
console.log(options)
@ -516,7 +526,7 @@ const partTreeChange = (val, index) => {
} else {
partItems.value[index].partId = val.id
partItems.value[index].storageNum = val.storageNum
partItems.value[index].partNum = 0
partItems.value[index].partNum = 1
}
}
@ -577,13 +587,13 @@ const getSupplierListData = async () => {
}
getSupplierListData()
const partItemsMiddle = ref([
{ partName: '', supplierId: '', partNum: 0, partPrice: 0, partType: 1, remark: '', fileList: [] },
{ partName: '', supplierId: '', partNum: 1, partPrice: 0, partType: 1, remark: '', fileList: [] },
])
const addMidPart = () => {
partItemsMiddle.value.push({
partName: '',
supplierId: '',
partNum: 0,
partNum: 1,
partPrice: 0,
partType: 1,
remark: '',
@ -1105,4 +1115,23 @@ const saveCodeApi = async () => {
border-radius: 12rpx;
color: #fff;
}
.top-content {
height: 60px;
overflow: hidden;
transition: max-height 0.5s ease-out;
&.is-expanded {
height: 200px !important;
overflow: visible !important;
}
.down-icon {
display: inline-block;
transition: transform 0.5s ease; /* 添加动画过渡 */
transform: rotate(0deg);
&.icon-is-expanded {
transform: rotate(180deg) !important;
}
}
}
</style>

View File

@ -75,7 +75,7 @@
<!-- 中间设备编码 -->
<view class="middle-section">
<text class="device-code">{{ item.code }}</text>
<text class="device-code" :style="{color: item.status == 1 ? '#18bc37' : '#262626'}">{{ item.code }}</text>
</view>
<!-- 右侧状态 -->

View File

@ -110,11 +110,18 @@ const search = () => {
}
//
const getRepairDetailsData = async () => {
const res = await getRepairDetailsAPI({ taskId: taskId.value,keyword:keyWord.value })
detailsList.value = res.data
detailsList.value = detailsList.value.map((e) => {
return { ...e, isChecked: false }
})
try {
uni.showLoading({ title: '加载中...', mask: true })
const res = await getRepairDetailsAPI({ taskId: taskId.value,keyword:keyWord.value })
detailsList.value = res.data
detailsList.value = detailsList.value.map((e) => {
return { ...e, isChecked: false }
})
} catch (error) {
console.log('🚀 ~ getRepairDetailsData ~ error:', error)
} finally {
uni.hideLoading()
}
}
//