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-26 17:40:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2b8afb6c1afd33d69727f627937bebf8cdad9eb3
2b8afb6c
1 parent
dce04f5e
fix 页面显示细节调整
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
35 deletions
src/views/material_list.vue
src/views/material_pre_request.vue
src/views/material_request.vue
src/views/material_list.vue
View file @
2b8afb6
<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 17:
17:26
* @LastEditTime: 2024-07-26 17:
27:03
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description: 物资情况页面
-->
...
...
@@ -38,6 +38,7 @@
</van-list>
</van-tab>
</van-tabs>
<van-empty v-if="!tabList.length" image="error" description="物资情况列表为空" />
<div style="height: 4rem;"></div>
<div style="position: fixed; left: 0; right: 0; bottom: 0; padding: 1rem; background-color: white; box-shadow: 0rem -0.33rem 0.33rem 0.08rem rgba(0,0,0,0.06);">
<van-button @click="onClickRequest" type="primary" block :color="styleColor.baseColor">我要申领</van-button>
...
...
src/views/material_pre_request.vue
View file @
2b8afb6
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 17:
22:46
* @LastEditTime: 2024-07-26 17:
39:31
* @FilePath: /temple_material_request/src/views/material_pre_request.vue
* @Description: 待申领物资页面
-->
...
...
@@ -360,13 +360,17 @@ const checkShoppingCart = () => { // 检查购物车有效性
}
const onConfirmRequest = () => { // 确定申领回调
if (!list.value.length) {
showToast('请先添加申领物资');
return;
}
if (!use_time.value) {
showToast('请选择使用日期');
return;
}
let sum = list.value.some((item) => { return +item.apply_number > 0 }); // 判断是否有一个值不等于0
if (!sum) {
showToast('
物资数量都没有填写
');
showToast('
请检查申领物资的数量
');
return;
} else {
showType.value = true;
...
...
src/views/material_request.vue
View file @
2b8afb6
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 1
6:4
4:38
* @LastEditTime: 2024-07-26 1
7:3
4:38
* @FilePath: /temple_material_request/src/views/material_request.vue
* @Description: 申领物资页面
-->
...
...
@@ -57,6 +57,7 @@
</div>
</van-tab>
</van-tabs>
<van-empty v-if="!tabList.length" image="error" description="物资情况列表为空" />
<div class="control-bar">
<div>
<van-button icon="plus" type="primary" :color="styleColor.baseColor" @click="addMore">添加更多</van-button>
...
...
@@ -284,37 +285,45 @@ const addShoppingCart = async () => { // 加入购物车
}
const goShoppingCart = () => { // 跳转购物车
if (!cart_count.value) {
//
showDialog({
title: '温馨提示',
message:
`您的购物车为空,将前往添加!`,
confirmButtonColor: styleColor.baseColor,
})
.then(() => {
$router.push({
path: '/material_pre_request',
query: {
activity_id,
form_id,
client_id
}
});
})
.catch(() => {
// on cancel
});
} else {
$router.push({
path: '/material_pre_request',
query: {
activity_id,
form_id,
client_id
}
});
}
// if (!cart_count.value) {
// //
// showDialog({
// title: '温馨提示',
// message:
// `您的购物车为空,将前往添加!`,
// confirmButtonColor: styleColor.baseColor,
// })
// .then(() => {
// $router.push({
// path: '/material_pre_request',
// query: {
// activity_id,
// form_id,
// client_id
// }
// });
// })
// .catch(() => {
// // on cancel
// });
// } else {
// $router.push({
// path: '/material_pre_request',
// query: {
// activity_id,
// form_id,
// client_id
// }
// });
// }
$router.push({
path: '/material_pre_request',
query: {
activity_id,
form_id,
client_id
}
});
}
const show_choose_material = ref(false);
...
...
Please
register
or
login
to post a comment