hookehuyr

✨ feat: 物资申领-【添加更多】页选择物资后,直接返回到编辑模式

李琛优化需求
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-28 00:55:37 4 + * @LastEditTime: 2024-07-28 12:06:16
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 -->
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
53 <template #left-icon></template> 53 <template #left-icon></template>
54 </van-field>&nbsp;&nbsp;<span style="font-size: 0.9rem; color: #666;">个</span> 54 </van-field>&nbsp;&nbsp;<span style="font-size: 0.9rem; color: #666;">个</span>
55 </van-col> 55 </van-col>
56 - <van-col v-else span="8" style="display: flex; align-items: center; justify-content: end;"> 56 + <van-col v-else span="8" style="display: flex; align-items: center; justify-content: flex-end;">
57 <span style="font-size: 0.9rem; color: #666;">{{ item.apply_number }}</span>&nbsp;&nbsp;<span style="font-size: 0.9rem; color: #666;">个</span> 57 <span style="font-size: 0.9rem; color: #666;">{{ item.apply_number }}</span>&nbsp;&nbsp;<span style="font-size: 0.9rem; color: #666;">个</span>
58 </van-col> 58 </van-col>
59 </van-row> 59 </van-row>
...@@ -439,10 +439,19 @@ const onDialogCancel = () => { ...@@ -439,10 +439,19 @@ const onDialogCancel = () => {
439 } 439 }
440 440
441 const show_choose_material = ref(false); 441 const show_choose_material = ref(false);
442 -const onCloseChoose = () => { // 关闭选择物资弹窗回调 442 +const onCloseChoose = async () => { // 关闭选择物资弹窗回调
443 show_choose_material.value = false; 443 show_choose_material.value = false;
444 // 刷新购物车列表 444 // 刷新购物车列表
445 - getCartList(); 445 + const { data, code } = await getCartListAPI({ activity_id });
446 + if (code) {
447 + list.value = data;
448 + list.value.forEach(item => {
449 + item.checked = false;
450 + });
451 + sum_num.value = list.value.length; // 品项数量
452 + onClickEdit(); // 打开编辑模式
453 + }
454 + //
446 } 455 }
447 456
448 const show_material_detail = ref(false); 457 const show_material_detail = ref(false);
......