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 14:34:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6dc390618e70a0079f5e25900009553642dcfe8d
6dc39061
1 parent
6d34a3ad
新增申领物资页面
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
10 deletions
src/App.vue
src/main.js
src/route.js
src/views/material_list.vue
src/views/material_request.vue
src/App.vue
View file @
6dc3906
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 1
0:33:45
* @LastEditTime: 2024-07-23 1
4:14:14
* @FilePath: /temple_material_request/src/App.vue
* @Description:
-->
...
...
@@ -144,8 +144,9 @@ body {
body {
position: relative;
display: flex;
justify-content: center;
// display: flex;
// justify-content: center;
p {
margin: 0;
padding: 0;
...
...
@@ -154,7 +155,7 @@ body {
#app {
min-height: calc(100vh);
max-width: 800px;
//
max-width: 800px;
position: relative;
}
...
...
src/main.js
View file @
6dc3906
...
...
@@ -2,12 +2,12 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-31 12:06:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-0
6-07 10:28:48
* @FilePath: /
data-table
/src/main.js
* @LastEditTime: 2024-0
7-23 13:46:16
* @FilePath: /
temple_material_request
/src/main.js
* @Description:
*/
import
{
createApp
}
from
'vue'
;
import
{
Button
,
Image
as
VanImage
,
Col
,
Row
,
Icon
,
Form
,
Field
,
CellGroup
,
ConfigProvider
,
Toast
,
Uploader
,
Empty
,
Tab
,
Tabs
,
Overlay
,
NumberKeyboard
,
Lazyload
,
List
,
PullRefresh
,
Popup
,
Picker
,
Sticky
,
Stepper
,
Tag
,
Swipe
,
SwipeItem
,
Dialog
,
ActionSheet
,
Loading
,
Checkbox
,
Search
,
NavBar
,
Collapse
,
CollapseItem
,
RadioGroup
,
Radio
,
CheckboxGroup
,
Area
,
DatePicker
,
TimePicker
,
PickerGroup
,
Rate
,
Calendar
,
Divider
,
Popover
,
NoticeBar
,
ImagePreview
,
FloatingBubble
}
from
'vant'
;
import
{
Button
,
Image
as
VanImage
,
Col
,
Row
,
Icon
,
Form
,
Field
,
CellGroup
,
ConfigProvider
,
Toast
,
Uploader
,
Empty
,
Tab
,
Tabs
,
Overlay
,
NumberKeyboard
,
Lazyload
,
List
,
PullRefresh
,
Popup
,
Picker
,
Sticky
,
Stepper
,
Tag
,
Swipe
,
SwipeItem
,
Dialog
,
ActionSheet
,
Loading
,
Checkbox
,
Search
,
NavBar
,
Collapse
,
CollapseItem
,
RadioGroup
,
Radio
,
CheckboxGroup
,
Area
,
DatePicker
,
TimePicker
,
PickerGroup
,
Rate
,
Calendar
,
Divider
,
Popover
,
NoticeBar
,
ImagePreview
,
FloatingBubble
,
Badge
}
from
'vant'
;
import
router
from
'./router'
;
import
App
from
'./App.vue'
;
// import axios from './utils/axios';
...
...
@@ -25,6 +25,6 @@ app.config.warnHandler = () => null;
app
.
config
.
globalProperties
.
$http
=
axios
;
// 关键语句
app
.
use
(
pinia
).
use
(
router
).
use
(
Button
).
use
(
VanImage
).
use
(
Col
).
use
(
Row
).
use
(
Icon
).
use
(
Form
).
use
(
Field
).
use
(
CellGroup
).
use
(
Toast
).
use
(
Uploader
).
use
(
Empty
).
use
(
Tab
).
use
(
Tabs
).
use
(
Overlay
).
use
(
NumberKeyboard
).
use
(
Lazyload
).
use
(
List
).
use
(
PullRefresh
).
use
(
Popup
).
use
(
Picker
).
use
(
Sticky
).
use
(
Stepper
).
use
(
Tag
).
use
(
Swipe
).
use
(
SwipeItem
).
use
(
Dialog
).
use
(
ActionSheet
).
use
(
Loading
).
use
(
Checkbox
).
use
(
Search
).
use
(
ConfigProvider
).
use
(
NavBar
).
use
(
Collapse
).
use
(
CollapseItem
).
use
(
Radio
).
use
(
RadioGroup
).
use
(
CheckboxGroup
).
use
(
Area
).
use
(
DatePicker
).
use
(
TimePicker
).
use
(
PickerGroup
).
use
(
Rate
).
use
(
Calendar
).
use
(
Divider
).
use
(
Popover
).
use
(
NoticeBar
).
use
(
ImagePreview
).
use
(
FloatingBubble
);
app
.
use
(
pinia
).
use
(
router
).
use
(
Button
).
use
(
VanImage
).
use
(
Col
).
use
(
Row
).
use
(
Icon
).
use
(
Form
).
use
(
Field
).
use
(
CellGroup
).
use
(
Toast
).
use
(
Uploader
).
use
(
Empty
).
use
(
Tab
).
use
(
Tabs
).
use
(
Overlay
).
use
(
NumberKeyboard
).
use
(
Lazyload
).
use
(
List
).
use
(
PullRefresh
).
use
(
Popup
).
use
(
Picker
).
use
(
Sticky
).
use
(
Stepper
).
use
(
Tag
).
use
(
Swipe
).
use
(
SwipeItem
).
use
(
Dialog
).
use
(
ActionSheet
).
use
(
Loading
).
use
(
Checkbox
).
use
(
Search
).
use
(
ConfigProvider
).
use
(
NavBar
).
use
(
Collapse
).
use
(
CollapseItem
).
use
(
Radio
).
use
(
RadioGroup
).
use
(
CheckboxGroup
).
use
(
Area
).
use
(
DatePicker
).
use
(
TimePicker
).
use
(
PickerGroup
).
use
(
Rate
).
use
(
Calendar
).
use
(
Divider
).
use
(
Popover
).
use
(
NoticeBar
).
use
(
ImagePreview
).
use
(
FloatingBubble
)
.
use
(
Badge
)
;
app
.
use
(
vueEsign
)
app
.
mount
(
'#app'
);
...
...
src/route.js
View file @
6dc3906
...
...
@@ -12,6 +12,12 @@ export default [{
title
:
'物资情况'
,
}
},
{
path
:
'/material_request'
,
component
:
()
=>
import
(
'@/views/material_request.vue'
),
meta
:
{
title
:
'申领物资'
,
}
},
{
path
:
'/auth'
,
component
:
()
=>
import
(
'@/views/auth.vue'
),
meta
:
{
...
...
src/views/material_list.vue
View file @
6dc3906
<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 1
1:34:47
* @LastEditTime: 2024-07-23 1
4:24:52
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description:
文件描述
* @Description:
物资情况页面
-->
<template>
<div class="material-list-page">
...
...
src/views/material_request.vue
0 → 100644
View file @
6dc3906
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-23 14:27:11
* @FilePath: /temple_material_request/src/views/material_request.vue
* @Description: 申领物资页面
-->
<template>
<div class="material-request-page">
<div class="list-wrapper">
<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-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: 5rem;"></div>
</div>
<div class="control-bar">
<div>
<van-button icon="plus" type="primary" :color="styleColor.baseColor" @click="addMore">添加更多</van-button>
</div>
<div style="display: flex; align-items: center;">
<van-button plain type="primary" :color="styleColor.baseColor" @click="addShoppingCart">加入购物车</van-button>
<van-badge :content="5">
<van-icon name="shopping-cart-o" size="2.5rem" :color="styleColor.baseColor" @click="goShoppingCart" />
</van-badge>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { styleColor } from "@/constant.js";
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const num_value = ref('');
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
const onLoad = () => {
// 异步更新数据
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
setTimeout(() => {
for (let i = 0; i < 10; i++) {
list.value.push(list.value.length + 1);
}
// 加载状态结束
loading.value = false;
// 数据全部加载完成
if (list.value.length >= 40) {
finished.value = true;
}
}, 1000);
};
const onClickTitle = (item) => { // 点击物资标题回调
console.warn(item);
}
const addMore = () => { // 添加更多
console.warn('addMore');
}
const addShoppingCart = () => { // 加入购物车
console.warn('addShoppingCart');
}
const goShoppingCart = () => { // 跳转购物车
console.warn('goShoppingCart');
}
</script>
<style lang="less" scoped>
.material-request-page {
.list-wrapper {
width: 100%;
.select-all-item {
padding: 0.5rem 1rem;
}
.list-boxer {
margin: 0; padding: 1rem; border-top: 1px solid #f0f0f0;
}
}
.control-bar {
display: flex; position: fixed; padding: 1rem 1.5rem; left: 0; right: 0; bottom: 0; background-color: white; width: calc(100% - 3rem); justify-content: space-between; align-items: center; box-shadow: 0rem -0.33rem 0.33rem 0.08rem rgba(0,0,0,0.06);
}
}
</style>
Please
register
or
login
to post a comment