样式优化

This commit is contained in:
bb_pan 2025-08-12 18:26:03 +08:00
parent 206cf573ba
commit 3d83968969
1 changed files with 38 additions and 0 deletions

View File

@ -28,6 +28,33 @@
<uni-forms-item label="待出库数量:" name="maxNum">
<span class="form-view">{{ maxNum }}</span>
</uni-forms-item>
<uni-forms-item label="" name="" v-if="checkedIds.length > 0">
<div
style="
display: flex;
align-items: center;
flex-wrap: wrap;
max-height: 98px;
overflow-y: auto;
"
>
<div
v-for="(item, index) in checkedIds"
style="margin: 0 5px"
v-show="item.checked"
>
<span
>{{ item.maCode }}
<uni-icons
type="close"
size="18"
color="red"
@click="handleItemChecked(item)"
></uni-icons
></span>
</div>
</div>
</uni-forms-item>
</uni-forms>
</view>
</view>
@ -221,6 +248,17 @@ onShow(() => {
// getCodeDetailData(queryParams.value.id, queryParams.value.publishTask, queryParams.value.typeId) //
})
const handleItemChecked = (item) => {
console.log('🚀 ~ handleItemChecked ~ item:', item)
checkedIds.value = checkedIds.value.filter((el) => el.maId !== item.maId)
codeDeviceList.value.forEach((el) => {
if (el.maId === item.maId) {
el.checked = !el.checked
}
})
}
const isWithinOneMonth = (dateStr) => {
if (!dateStr) return false