hookehuyr

fix 页面显示细节调整

<!--
* @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>
......
<!--
* @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;
......
<!--
* @Date: 2024-07-23 12:53:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 16:44:38
* @LastEditTime: 2024-07-26 17:34: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);
......