Showing
3 changed files
with
27 additions
and
11 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-07-23 10:50:38 | 2 | * @Date: 2024-07-23 10:50:38 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-07-23 14:24:52 | 4 | + * @LastEditTime: 2024-07-23 16:36:26 |
| 5 | * @FilePath: /temple_material_request/src/views/material_list.vue | 5 | * @FilePath: /temple_material_request/src/views/material_list.vue |
| 6 | * @Description: 物资情况页面 | 6 | * @Description: 物资情况页面 |
| 7 | --> | 7 | --> |
| ... | @@ -87,7 +87,9 @@ const onClickTitle = (item) => { // 点击物资标题回调 | ... | @@ -87,7 +87,9 @@ const onClickTitle = (item) => { // 点击物资标题回调 |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | const onClickRequest = () => { // 我要申领物资 | 89 | const onClickRequest = () => { // 我要申领物资 |
| 90 | - | 90 | + $router.push({ |
| 91 | + path: '/material_request' | ||
| 92 | + }) | ||
| 91 | } | 93 | } |
| 92 | </script> | 94 | </script> |
| 93 | 95 | ... | ... |
| ... | @@ -78,6 +78,9 @@ | ... | @@ -78,6 +78,9 @@ |
| 78 | </div> | 78 | </div> |
| 79 | </div> | 79 | </div> |
| 80 | </van-dialog> | 80 | </van-dialog> |
| 81 | + | ||
| 82 | + <choose-material :show="show_choose_material" @close="onCloseChoose"></choose-material> | ||
| 83 | + | ||
| 81 | </template> | 84 | </template> |
| 82 | 85 | ||
| 83 | <script setup> | 86 | <script setup> |
| ... | @@ -90,6 +93,8 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ | ... | @@ -90,6 +93,8 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ |
| 90 | //import { } from '@/composables' | 93 | //import { } from '@/composables' |
| 91 | import { styleColor } from "@/constant.js"; | 94 | import { styleColor } from "@/constant.js"; |
| 92 | import dayjs from "dayjs"; | 95 | import dayjs from "dayjs"; |
| 96 | +import chooseMaterial from '@/components/chooseMaterial/index.vue'; | ||
| 97 | + | ||
| 93 | 98 | ||
| 94 | const $route = useRoute(); | 99 | const $route = useRoute(); |
| 95 | const $router = useRouter(); | 100 | const $router = useRouter(); |
| ... | @@ -141,6 +146,7 @@ onMounted(() => { | ... | @@ -141,6 +146,7 @@ onMounted(() => { |
| 141 | 146 | ||
| 142 | const addMore = () => { // 添加更多回调 | 147 | const addMore = () => { // 添加更多回调 |
| 143 | console.warn('addMore'); | 148 | console.warn('addMore'); |
| 149 | + show_choose_material.value = true; | ||
| 144 | } | 150 | } |
| 145 | 151 | ||
| 146 | const onConfirmRequest = () => { // 确定申领回调 | 152 | const onConfirmRequest = () => { // 确定申领回调 |
| ... | @@ -154,6 +160,11 @@ const type_checked = ref(''); | ... | @@ -154,6 +160,11 @@ const type_checked = ref(''); |
| 154 | const onDialogConfirm = () => { | 160 | const onDialogConfirm = () => { |
| 155 | console.warn(type_checked.value); | 161 | console.warn(type_checked.value); |
| 156 | } | 162 | } |
| 163 | + | ||
| 164 | +const show_choose_material = ref(false); | ||
| 165 | +const onCloseChoose = () => { | ||
| 166 | + show_choose_material.value = false; | ||
| 167 | +} | ||
| 157 | </script> | 168 | </script> |
| 158 | 169 | ||
| 159 | <style lang="less" scoped> | 170 | <style lang="less" scoped> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-07-23 12:53:15 | 2 | * @Date: 2024-07-23 12:53:15 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-07-23 16:12:12 | 4 | + * @LastEditTime: 2024-07-23 16:38:59 |
| 5 | * @FilePath: /temple_material_request/src/views/material_request.vue | 5 | * @FilePath: /temple_material_request/src/views/material_request.vue |
| 6 | * @Description: 申领物资页面 | 6 | * @Description: 申领物资页面 |
| 7 | --> | 7 | --> |
| ... | @@ -9,12 +9,6 @@ | ... | @@ -9,12 +9,6 @@ |
| 9 | <div class="material-request-page"> | 9 | <div class="material-request-page"> |
| 10 | <van-tabs v-model:active="active" @change="onChange" sticky :color="styleColor.baseColor"> | 10 | <van-tabs v-model:active="active" @change="onChange" sticky :color="styleColor.baseColor"> |
| 11 | <van-tab v-for="index in 8" :title="'标签 ' + index"> | 11 | <van-tab v-for="index in 8" :title="'标签 ' + index"> |
| 12 | - <van-list | ||
| 13 | - v-model:loading="loading" | ||
| 14 | - :finished="finished" | ||
| 15 | - finished-text="没有更多了" | ||
| 16 | - @load="onLoad" | ||
| 17 | - > | ||
| 18 | <div class="list-wrapper"> | 12 | <div class="list-wrapper"> |
| 19 | <van-sticky :offset-top="44"> | 13 | <van-sticky :offset-top="44"> |
| 20 | <van-row justify="space-between" class="select-all-item"> | 14 | <van-row justify="space-between" class="select-all-item"> |
| ... | @@ -41,9 +35,8 @@ | ... | @@ -41,9 +35,8 @@ |
| 41 | </van-row> | 35 | </van-row> |
| 42 | </div> | 36 | </div> |
| 43 | </van-list> | 37 | </van-list> |
| 44 | - <div style="height: 3rem;"></div> | 38 | + <div style="height: 6rem;"></div> |
| 45 | </div> | 39 | </div> |
| 46 | - </van-list> | ||
| 47 | </van-tab> | 40 | </van-tab> |
| 48 | </van-tabs> | 41 | </van-tabs> |
| 49 | <div class="control-bar"> | 42 | <div class="control-bar"> |
| ... | @@ -59,6 +52,8 @@ | ... | @@ -59,6 +52,8 @@ |
| 59 | </div> | 52 | </div> |
| 60 | </div> | 53 | </div> |
| 61 | </div> | 54 | </div> |
| 55 | + | ||
| 56 | + <choose-material :show="show_choose_material" @close="onCloseChoose"></choose-material> | ||
| 62 | </template> | 57 | </template> |
| 63 | 58 | ||
| 64 | <script setup> | 59 | <script setup> |
| ... | @@ -70,6 +65,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ | ... | @@ -70,6 +65,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ |
| 70 | //import { } from '@/utils/generateIcons.js' | 65 | //import { } from '@/utils/generateIcons.js' |
| 71 | //import { } from '@/composables' | 66 | //import { } from '@/composables' |
| 72 | import { styleColor } from "@/constant.js"; | 67 | import { styleColor } from "@/constant.js"; |
| 68 | +import chooseMaterial from '@/components/chooseMaterial/index.vue'; | ||
| 73 | 69 | ||
| 74 | const $route = useRoute(); | 70 | const $route = useRoute(); |
| 75 | const $router = useRouter(); | 71 | const $router = useRouter(); |
| ... | @@ -110,6 +106,7 @@ const onClickTitle = (item) => { // 点击物资标题回调 | ... | @@ -110,6 +106,7 @@ const onClickTitle = (item) => { // 点击物资标题回调 |
| 110 | 106 | ||
| 111 | const addMore = () => { // 添加更多 | 107 | const addMore = () => { // 添加更多 |
| 112 | console.warn('addMore'); | 108 | console.warn('addMore'); |
| 109 | + show_choose_material.value = true; | ||
| 113 | } | 110 | } |
| 114 | 111 | ||
| 115 | const addShoppingCart = () => { // 加入购物车 | 112 | const addShoppingCart = () => { // 加入购物车 |
| ... | @@ -118,6 +115,12 @@ const addShoppingCart = () => { // 加入购物车 | ... | @@ -118,6 +115,12 @@ const addShoppingCart = () => { // 加入购物车 |
| 118 | 115 | ||
| 119 | const goShoppingCart = () => { // 跳转购物车 | 116 | const goShoppingCart = () => { // 跳转购物车 |
| 120 | console.warn('goShoppingCart'); | 117 | console.warn('goShoppingCart'); |
| 118 | + $router.push({ path: '/material_pre_request' }); | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +const show_choose_material = ref(false); | ||
| 122 | +const onCloseChoose = () => { | ||
| 123 | + show_choose_material.value = false; | ||
| 121 | } | 124 | } |
| 122 | </script> | 125 | </script> |
| 123 | 126 | ... | ... |
-
Please register or login to post a comment