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-24 16:53:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6a9e98c0daf20272addc5dde038e65e8e74a134e
6a9e98c0
1 parent
0a34bcbe
待申领物资-购物车操作逻辑完善
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
src/views/material_pre_request.vue
src/views/material_request.vue
src/views/material_pre_request.vue
View file @
6a9e98c
This diff is collapsed. Click to expand it.
src/views/material_request.vue
View file @
6a9e98c
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-24 1
4:44:31
* @LastEditTime: 2024-07-24 1
5:15:38
* @FilePath: /temple_material_request/src/views/material_request.vue
* @Description: 申领物资页面
-->
<template>
<div class="material-request-page">
<van-tabs v-model:active="active" @change="onChange" sticky :color="styleColor.baseColor">
<van-tab v-for="index in 8" :title="'标签 ' + index">
<div class="list-wrapper">
...
...
@@ -81,7 +80,7 @@
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { showToast } from 'vant';
import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
...
...
@@ -192,6 +191,11 @@ const addShoppingCart = () => { // 加入购物车
.forEach(item => {
shop_cart_list.value = shop_cart_list.value.concat(item);
});
// 购物车为空提示
if (!shop_cart_list.value.length) {
showToast('请选择物资');
return;
}
// 校验购物车值
let error_list = shop_cart_list.value.filter((item) => { if (item.num === null || item.num === '') { return item;} })
if (error_list.length) {
...
...
@@ -213,7 +217,7 @@ const goShoppingCart = () => { // 跳转购物车
}
const show_choose_material = ref(false);
const onCloseChoose = () => {
const onCloseChoose = () => {
// 关闭选择物资弹窗回调
show_choose_material.value = false;
}
...
...
Please
register
or
login
to post a comment