hookehuyr

🐞 fix: 待申领物资页面,如果没有组别就不能操作

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-08-02 23:04:47 4 + * @LastEditTime: 2024-08-12 12:55:41
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 -->
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 </span> 18 </span>
19 <span v-else :style="{ color: styleColor.baseColor }">品项数: {{ sum_num }}</span> 19 <span v-else :style="{ color: styleColor.baseColor }">品项数: {{ sum_num }}</span>
20 </van-col> 20 </van-col>
21 - <van-col span="16" :style="{ textAlign: 'right', fontSize: '0.85rem', color: styleColor.baseColor }"> 21 + <van-col v-if="status" span="16" :style="{ textAlign: 'right', fontSize: '0.85rem', color: styleColor.baseColor }">
22 <span v-if="model !== 'edit'" @click="onClickEdit"><van-icon name="records-o" />&nbsp;编辑</span> 22 <span v-if="model !== 'edit'" @click="onClickEdit"><van-icon name="records-o" />&nbsp;编辑</span>
23 <span v-else> 23 <span v-else>
24 <span @click="onClickDel"><van-icon name="delete-o" />&nbsp;删除</span>&nbsp;&nbsp; 24 <span @click="onClickDel"><van-icon name="delete-o" />&nbsp;删除</span>&nbsp;&nbsp;
...@@ -149,6 +149,7 @@ const form_id = $route.query.form_id ? $route.query.form_id : ''; ...@@ -149,6 +149,7 @@ const form_id = $route.query.form_id ? $route.query.form_id : '';
149 const client_id = $route.query.client_id ? $route.query.client_id : ''; 149 const client_id = $route.query.client_id ? $route.query.client_id : '';
150 150
151 const disabled_btn = ref(false); 151 const disabled_btn = ref(false);
152 +const status = ref(true);
152 153
153 /** 154 /**
154 * 获取我的组别列表 155 * 获取我的组别列表
...@@ -164,6 +165,7 @@ const getDeptsList = async () => { ...@@ -164,6 +165,7 @@ const getDeptsList = async () => {
164 if (!data.length) { 165 if (!data.length) {
165 showToast('您暂无组别无法申领物资'); 166 showToast('您暂无组别无法申领物资');
166 disabled_btn.value = true; 167 disabled_btn.value = true;
168 + status.value = false; // 不能操作状态
167 } 169 }
168 } 170 }
169 } 171 }
......