Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
temple_material_request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-07-25 13:23:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7e93ecc65d0b60962e70d115fb95ce2572a549ad
7e93ecc6
1 parent
af1afe29
fix 购物车列表一次性全查出来
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
38 deletions
src/views/material_pre_request.vue
src/views/material_pre_request.vue
View file @
7e93ecc
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-2
4 18:26:06
* @LastEditTime: 2024-07-2
5 13:21:17
* @FilePath: /temple_material_request/src/views/material_pre_request.vue
* @Description: 待申领物资页面
-->
...
...
@@ -29,42 +29,35 @@
</van-col>
</van-row>
</van-sticky>
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="item in list" :id="item.id" :key="item" class="list-boxer">
<van-row align="center" justify="space-between">
<van-col span="16" style="display: flex;">
<span v-if="item.edit">
<van-icon v-if="item.checked" @click="onCheck(item)" name="checked" size="1.25rem" :color="styleColor.baseColor" />
<van-icon v-else name="passed" @click="onCheck(item)" size="1.25rem" />
</span>
<div class="van-ellipsis" :style="{ color: styleColor.baseColor, textDecoration: 'underline' }" @click="onClickTitle(item)">
{{ item.name }}
</div>
</van-col>
<van-col span="8" style="display: flex; align-items: center;">
<van-field
v-model="item.num"
style="border: 1px solid #f0f0f0; padding: 0; border-radius: 5px;"
label=""
label-width="0"
input-align="center"
placeholder="数量"
type="number"
:disabled="!item.edit"
@blur="onBlur(item)"
>
<template #left-icon></template>
</van-field> <span style="font-size: 0.9rem; color: #666;">个</span>
</van-col>
</van-row>
<div v-if="item.error" style="padding: 0.5rem 2rem 0 0; font-size: 0.85rem; color: red; text-align: right;">输入值有误</div>
</div>
</van-list>
<div v-for="item in list" :id="item.id" :key="item" class="list-boxer">
<van-row align="center" justify="space-between">
<van-col span="16" style="display: flex;">
<span v-if="item.edit">
<van-icon v-if="item.checked" @click="onCheck(item)" name="checked" size="1.25rem" :color="styleColor.baseColor" />
<van-icon v-else name="passed" @click="onCheck(item)" size="1.25rem" />
</span>
<div class="van-ellipsis" :style="{ color: styleColor.baseColor, textDecoration: 'underline' }" @click="onClickTitle(item)">
{{ item.name }}
</div>
</van-col>
<van-col span="8" style="display: flex; align-items: center;">
<van-field
v-model="item.num"
style="border: 1px solid #f0f0f0; padding: 0; border-radius: 5px;"
label=""
label-width="0"
input-align="center"
placeholder="数量"
type="number"
:disabled="!item.edit"
@blur="onBlur(item)"
>
<template #left-icon></template>
</van-field> <span style="font-size: 0.9rem; color: #666;">个</span>
</van-col>
</van-row>
<div v-if="item.error" style="padding: 0.5rem 2rem 0 0; font-size: 0.85rem; color: red; text-align: right;">输入值有误</div>
</div>
<div style="height: 6rem;"></div>
<div style="position: fixed; left: 0; right: 0; bottom:4.5rem; padding: 1rem;">
<van-button icon="plus" type="primary" :color="styleColor.baseColor" plain block @click="addMore">添加更多</van-button>
...
...
@@ -287,7 +280,9 @@ const onConfirm = ({ selectedValues, selectedOptions }) => {
};
onMounted(() => {
minDate.value = new Date()
minDate.value = new Date();
// 测试
onLoad()
})
const addMore = () => { // 添加更多回调
...
...
Please
register
or
login
to post a comment