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-23 16:41:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
de20ca3b7bdab109e65caaf4a85b935d1cbb3a03
de20ca3b
1 parent
497aa888
完善相应页面跳转和选择物资组件显示
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
37 deletions
src/views/material_list.vue
src/views/material_pre_request.vue
src/views/material_request.vue
src/views/material_list.vue
View file @
de20ca3
<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 1
4:24:52
* @LastEditTime: 2024-07-23 1
6:36:26
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description: 物资情况页面
-->
...
...
@@ -87,7 +87,9 @@ const onClickTitle = (item) => { // 点击物资标题回调
}
const onClickRequest = () => { // 我要申领物资
$router.push({
path: '/material_request'
})
}
</script>
...
...
src/views/material_pre_request.vue
View file @
de20ca3
...
...
@@ -78,6 +78,9 @@
</div>
</div>
</van-dialog>
<choose-material :show="show_choose_material" @close="onCloseChoose"></choose-material>
</template>
<script setup>
...
...
@@ -90,6 +93,8 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/composables'
import { styleColor } from "@/constant.js";
import dayjs from "dayjs";
import chooseMaterial from '@/components/chooseMaterial/index.vue';
const $route = useRoute();
const $router = useRouter();
...
...
@@ -141,6 +146,7 @@ onMounted(() => {
const addMore = () => { // 添加更多回调
console.warn('addMore');
show_choose_material.value = true;
}
const onConfirmRequest = () => { // 确定申领回调
...
...
@@ -154,6 +160,11 @@ const type_checked = ref('');
const onDialogConfirm = () => {
console.warn(type_checked.value);
}
const show_choose_material = ref(false);
const onCloseChoose = () => {
show_choose_material.value = false;
}
</script>
<style lang="less" scoped>
...
...
src/views/material_request.vue
View file @
de20ca3
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 16:
12:12
* @LastEditTime: 2024-07-23 16:
38:59
* @FilePath: /temple_material_request/src/views/material_request.vue
* @Description: 申领物资页面
-->
...
...
@@ -9,41 +9,34 @@
<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">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div class="list-wrapper">
<van-sticky :offset-top="44">
<van-row justify="space-between" class="select-all-item">
<van-col span="8"><van-icon name="passed" size="1.25rem" /> <span :style="{ color: styleColor.baseColor }">全选</span></van-col>
<van-col span="16" style="text-align: right; font-size: 0.85rem; color: #666666;">参考上次同类活动的领用情况</van-col>
<div class="list-wrapper">
<van-sticky :offset-top="44">
<van-row justify="space-between" class="select-all-item">
<van-col span="8"><van-icon name="passed" size="1.25rem" /> <span :style="{ color: styleColor.baseColor }">全选</span></van-col>
<van-col span="16" style="text-align: right; font-size: 0.85rem; color: #666666;">参考上次同类活动的领用情况</van-col>
</van-row>
</van-sticky>
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="item in list" :key="item" class="list-boxer">
<van-row align="center" justify="space-between">
<van-col span="16" style="display: flex;">
<van-icon name="passed" size="1.25rem" /> <div class="van-ellipsis" :style="{ color: styleColor.baseColor, textDecoration: 'underline' }" @click="onClickTitle(item)">床垫 1.2m*2m</div>
</van-col>
<van-col span="8" style="display: flex; align-items: center;">
<van-field v-model="num_value" style="border: 1px solid #f0f0f0; padding: 0; border-radius: 5px;" label="" label-width="0" input-align="center" placeholder="数量" type="number" >
<template #left-icon></template>
</van-field> <span style="font-size: 0.9rem; color: #666;">个</span>
</van-col>
</van-row>
</van-sticky>
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="item in list" :key="item" class="list-boxer">
<van-row align="center" justify="space-between">
<van-col span="16" style="display: flex;">
<van-icon name="passed" size="1.25rem" /> <div class="van-ellipsis" :style="{ color: styleColor.baseColor, textDecoration: 'underline' }" @click="onClickTitle(item)">床垫 1.2m*2m</div>
</van-col>
<van-col span="8" style="display: flex; align-items: center;">
<van-field v-model="num_value" style="border: 1px solid #f0f0f0; padding: 0; border-radius: 5px;" label="" label-width="0" input-align="center" placeholder="数量" type="number" >
<template #left-icon></template>
</van-field> <span style="font-size: 0.9rem; color: #666;">个</span>
</van-col>
</van-row>
</div>
</van-list>
<div style="height: 3rem;"></div>
</div>
</van-list>
</div>
</van-list>
<div style="height: 6rem;"></div>
</div>
</van-tab>
</van-tabs>
<div class="control-bar">
...
...
@@ -59,6 +52,8 @@
</div>
</div>
</div>
<choose-material :show="show_choose_material" @close="onCloseChoose"></choose-material>
</template>
<script setup>
...
...
@@ -70,6 +65,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { styleColor } from "@/constant.js";
import chooseMaterial from '@/components/chooseMaterial/index.vue';
const $route = useRoute();
const $router = useRouter();
...
...
@@ -110,6 +106,7 @@ const onClickTitle = (item) => { // 点击物资标题回调
const addMore = () => { // 添加更多
console.warn('addMore');
show_choose_material.value = true;
}
const addShoppingCart = () => { // 加入购物车
...
...
@@ -118,6 +115,12 @@ const addShoppingCart = () => { // 加入购物车
const goShoppingCart = () => { // 跳转购物车
console.warn('goShoppingCart');
$router.push({ path: '/material_pre_request' });
}
const show_choose_material = ref(false);
const onCloseChoose = () => {
show_choose_material.value = false;
}
</script>
...
...
Please
register
or
login
to post a comment