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-11-11 13:40:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
69965bb962b2b7748abecc640939dcae5c505297
69965bb9
1 parent
cbb3003d
✨ feat(申领物质页面): 参考上一次活动的领用页面,数量的默认值不在使用 total_apply_number 字段,改成使用 total_number 字段
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/views/material_request.vue
src/views/material_request.vue
View file @
69965bb
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-
07-29 17:40:2
4
* @LastEditTime: 2024-
11-11 13:39:1
4
* @FilePath: /temple_material_request/src/views/material_request.vue
* @Description: 申领物资页面
-->
...
...
@@ -37,7 +37,7 @@
</van-col>
<van-col span="8" style="display: flex; align-items: center;">
<van-field
v-model="item.total_
apply_
number"
v-model="item.total_number"
style="border: 1px solid #f0f0f0; padding: 0; border-radius: 5px;"
label=""
label-width="0"
...
...
@@ -173,7 +173,7 @@ const onCheck = (item) => { // 单选操作
const onBlur = (item) => { // 输入框失去焦点回调
if (item.checked) {
// 错误提示
if (item.total_
apply_number === null || item.total_apply
_number === '') {
if (item.total_
number === null || item.total
_number === '') {
item.error = true;
} else {
item.error = false;
...
...
@@ -253,7 +253,7 @@ const addShoppingCart = async () => { // 加入购物车
return;
}
// 校验购物车值
let error_list = shop_cart_list.value.filter((item) => { if (item.total_
apply_number === null || item.total_apply
_number === '') { return item;} })
let error_list = shop_cart_list.value.filter((item) => { if (item.total_
number === null || item.total
_number === '') { return item;} })
if (error_list.length) {
// 跳到第一个错误框
scrollToSection(error_list[0].id);
...
...
@@ -265,7 +265,7 @@ const addShoppingCart = async () => { // 加入购物车
}
//
shop_cart_list.value.forEach(item => {
item.apply_number = item.total_
apply_
number;
item.apply_number = item.total_number;
});
// 请求购物车接口
const { code, data } = await addCartAPI({ activity_id, good_list: shop_cart_list.value });
...
...
Please
register
or
login
to post a comment