hookehuyr

fix 页面显示细节调整

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-26 17:17:26 4 + * @LastEditTime: 2024-07-26 17:27:03
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 -->
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
38 </van-list> 38 </van-list>
39 </van-tab> 39 </van-tab>
40 </van-tabs> 40 </van-tabs>
41 + <van-empty v-if="!tabList.length" image="error" description="物资情况列表为空" />
41 <div style="height: 4rem;"></div> 42 <div style="height: 4rem;"></div>
42 <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);"> 43 <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);">
43 <van-button @click="onClickRequest" type="primary" block :color="styleColor.baseColor">我要申领</van-button> 44 <van-button @click="onClickRequest" type="primary" block :color="styleColor.baseColor">我要申领</van-button>
......
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-26 17:22:46 4 + * @LastEditTime: 2024-07-26 17:39:31
5 * @FilePath: /temple_material_request/src/views/material_pre_request.vue 5 * @FilePath: /temple_material_request/src/views/material_pre_request.vue
6 * @Description: 待申领物资页面 6 * @Description: 待申领物资页面
7 --> 7 -->
...@@ -360,13 +360,17 @@ const checkShoppingCart = () => { // 检查购物车有效性 ...@@ -360,13 +360,17 @@ const checkShoppingCart = () => { // 检查购物车有效性
360 } 360 }
361 361
362 const onConfirmRequest = () => { // 确定申领回调 362 const onConfirmRequest = () => { // 确定申领回调
363 + if (!list.value.length) {
364 + showToast('请先添加申领物资');
365 + return;
366 + }
363 if (!use_time.value) { 367 if (!use_time.value) {
364 showToast('请选择使用日期'); 368 showToast('请选择使用日期');
365 return; 369 return;
366 } 370 }
367 let sum = list.value.some((item) => { return +item.apply_number > 0 }); // 判断是否有一个值不等于0 371 let sum = list.value.some((item) => { return +item.apply_number > 0 }); // 判断是否有一个值不等于0
368 if (!sum) { 372 if (!sum) {
369 - showToast('物资数量都没有填写'); 373 + showToast('请检查申领物资的数量');
370 return; 374 return;
371 } else { 375 } else {
372 showType.value = true; 376 showType.value = true;
......
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-26 16:44:38 4 + * @LastEditTime: 2024-07-26 17:34:38
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 -->
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
57 </div> 57 </div>
58 </van-tab> 58 </van-tab>
59 </van-tabs> 59 </van-tabs>
60 + <van-empty v-if="!tabList.length" image="error" description="物资情况列表为空" />
60 <div class="control-bar"> 61 <div class="control-bar">
61 <div> 62 <div>
62 <van-button icon="plus" type="primary" :color="styleColor.baseColor" @click="addMore">添加更多</van-button> 63 <van-button icon="plus" type="primary" :color="styleColor.baseColor" @click="addMore">添加更多</van-button>
...@@ -284,28 +285,37 @@ const addShoppingCart = async () => { // 加入购物车 ...@@ -284,28 +285,37 @@ const addShoppingCart = async () => { // 加入购物车
284 } 285 }
285 286
286 const goShoppingCart = () => { // 跳转购物车 287 const goShoppingCart = () => { // 跳转购物车
287 - if (!cart_count.value) { 288 + // if (!cart_count.value) {
288 - // 289 + // //
289 - showDialog({ 290 + // showDialog({
290 - title: '温馨提示', 291 + // title: '温馨提示',
291 - message: 292 + // message:
292 - `您的购物车为空,将前往添加!`, 293 + // `您的购物车为空,将前往添加!`,
293 - confirmButtonColor: styleColor.baseColor, 294 + // confirmButtonColor: styleColor.baseColor,
294 - }) 295 + // })
295 - .then(() => { 296 + // .then(() => {
296 - $router.push({ 297 + // $router.push({
297 - path: '/material_pre_request', 298 + // path: '/material_pre_request',
298 - query: { 299 + // query: {
299 - activity_id, 300 + // activity_id,
300 - form_id, 301 + // form_id,
301 - client_id 302 + // client_id
302 - } 303 + // }
303 - }); 304 + // });
304 - }) 305 + // })
305 - .catch(() => { 306 + // .catch(() => {
306 - // on cancel 307 + // // on cancel
307 - }); 308 + // });
308 - } else { 309 + // } else {
310 + // $router.push({
311 + // path: '/material_pre_request',
312 + // query: {
313 + // activity_id,
314 + // form_id,
315 + // client_id
316 + // }
317 + // });
318 + // }
309 $router.push({ 319 $router.push({
310 path: '/material_pre_request', 320 path: '/material_pre_request',
311 query: { 321 query: {
...@@ -314,7 +324,6 @@ const goShoppingCart = () => { // 跳转购物车 ...@@ -314,7 +324,6 @@ const goShoppingCart = () => { // 跳转购物车
314 client_id 324 client_id
315 } 325 }
316 }); 326 });
317 - }
318 } 327 }
319 328
320 const show_choose_material = ref(false); 329 const show_choose_material = ref(false);
......