维修问题修复
This commit is contained in:
parent
bd66735d4f
commit
ed0f491dc7
|
|
@ -1,12 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 数量出库 -->
|
<!-- 数量出库 -->
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="table-list-item">
|
<view class="table-list-item top-content" :class="{ 'is-expanded': isExpanded }">
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24" style="display: flex;align-items: center;">
|
||||||
<uni-col :span="6">物资名称:</uni-col>
|
<uni-col :span="6">物资名称:</uni-col>
|
||||||
<uni-col :span="18"
|
<uni-col :span="15"
|
||||||
><view class="cont">{{ queryParams.typeName }}</view>
|
><view class="cont">{{ queryParams.typeName }}</view>
|
||||||
</uni-col>
|
</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>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">物资类型:</uni-col>
|
<uni-col :span="6">物资类型:</uni-col>
|
||||||
|
|
@ -26,25 +35,25 @@
|
||||||
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
|
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</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>
|
</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">
|
<scroll-view scroll-y style="padding-bottom: 20rpx">
|
||||||
<!-- <view class="table-list-item">
|
<!-- <view class="table-list-item">
|
||||||
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
|
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
|
||||||
|
|
@ -110,8 +119,8 @@
|
||||||
:clear="false"
|
:clear="false"
|
||||||
/>
|
/>
|
||||||
<div class="operation-btns">
|
<div class="operation-btns">
|
||||||
<span class="add" @click="addPart">+</span>
|
<span class="add" @click="addPart">加</span>
|
||||||
<span class="remove" @click="delPart(index)">-</span>
|
<span class="remove" @click="delPart(index)">减</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
@ -180,8 +189,8 @@
|
||||||
@input="costCheckNum(item)"
|
@input="costCheckNum(item)"
|
||||||
/>
|
/>
|
||||||
<div class="operation-btns">
|
<div class="operation-btns">
|
||||||
<span class="add" @click="addMidPart">+</span>
|
<span class="add" @click="addMidPart">加</span>
|
||||||
<span class="remove" @click="delMidPart(index)">-</span>
|
<span class="remove" @click="delMidPart(index)">减</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
@ -283,6 +292,7 @@ const partFileList = ref([])
|
||||||
const returnRemark = ref('') // 返厂
|
const returnRemark = ref('') // 返厂
|
||||||
const returnImgUrl = ref('')
|
const returnImgUrl = ref('')
|
||||||
const returnFileList = ref([])
|
const returnFileList = ref([])
|
||||||
|
const isExpanded = ref(false)
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options)
|
console.log(options)
|
||||||
|
|
@ -516,7 +526,7 @@ const partTreeChange = (val, index) => {
|
||||||
} else {
|
} else {
|
||||||
partItems.value[index].partId = val.id
|
partItems.value[index].partId = val.id
|
||||||
partItems.value[index].storageNum = val.storageNum
|
partItems.value[index].storageNum = val.storageNum
|
||||||
partItems.value[index].partNum = 0
|
partItems.value[index].partNum = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -577,13 +587,13 @@ const getSupplierListData = async () => {
|
||||||
}
|
}
|
||||||
getSupplierListData()
|
getSupplierListData()
|
||||||
const partItemsMiddle = ref([
|
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 = () => {
|
const addMidPart = () => {
|
||||||
partItemsMiddle.value.push({
|
partItemsMiddle.value.push({
|
||||||
partName: '',
|
partName: '',
|
||||||
supplierId: '',
|
supplierId: '',
|
||||||
partNum: 0,
|
partNum: 1,
|
||||||
partPrice: 0,
|
partPrice: 0,
|
||||||
partType: 1,
|
partType: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
|
@ -1105,4 +1115,23 @@ const saveCodeApi = async () => {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
color: #fff;
|
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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
<!-- 中间:设备编码 -->
|
<!-- 中间:设备编码 -->
|
||||||
<view class="middle-section">
|
<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>
|
||||||
|
|
||||||
<!-- 右侧:状态 -->
|
<!-- 右侧:状态 -->
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,18 @@ const search = () => {
|
||||||
}
|
}
|
||||||
// 获取列表详情
|
// 获取列表详情
|
||||||
const getRepairDetailsData = async () => {
|
const getRepairDetailsData = async () => {
|
||||||
const res = await getRepairDetailsAPI({ taskId: taskId.value,keyword:keyWord.value })
|
try {
|
||||||
detailsList.value = res.data
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
detailsList.value = detailsList.value.map((e) => {
|
const res = await getRepairDetailsAPI({ taskId: taskId.value,keyword:keyWord.value })
|
||||||
return { ...e, isChecked: false }
|
detailsList.value = res.data
|
||||||
})
|
detailsList.value = detailsList.value.map((e) => {
|
||||||
|
return { ...e, isChecked: false }
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ getRepairDetailsData ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复选框全选
|
// 复选框全选
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue