Explorar o código

@
fix: 移除适用范围"暂不设置"选项,默认改为全体员工
@

alphaH hai 9 horas
pai
achega
1603fff397

+ 4 - 6
frontend/src/views/module_payment/institution/components/InstitutionForm.vue

@@ -147,8 +147,6 @@
                   <el-radio value="department">按部门</el-radio>
                   <el-radio value="employee">按员工</el-radio>
                   <el-radio value="all">全体员工</el-radio>
-                  <!-- <el-radio value="tag">按员工标签</el-radio> -->
-                  <el-radio value="none">暂不设置</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -258,7 +256,7 @@ const initialFormData = {
   effective_end_date: undefined,
   consult_mode: "0",
   grant_mode: "period",
-  applicable_scope: "none",
+  applicable_scope: "all",
   is_long_term: false,
   period_type: "monthly",
   amount: undefined,
@@ -373,15 +371,15 @@ watch(
         formData.effective_end_date = data.effective_end_date;
         formData.consult_mode = data.consult_mode || "0";
         formData.grant_mode = data.grant_mode || "period";
-        formData.applicable_scope = data.applicable_scope || "none";
+        formData.applicable_scope = data.applicable_scope || "all";
         formData.period_type = data.period_type || "monthly";
         formData.amount = data.amount;
         formData.single_limit = data.single_limit;
         formData.effective_time_type = data.effective_time_type || "unlimited";
 
-        // 回显适用范围:调用 scope 接口获取实际员工/部门ID
+        // 回显适用范围:调用 scope 接口获取实际员工/部门ID(全体员工无需查询)
         const eid = data.enterprise_id || props.enterpriseId;
-        if (eid && data.applicable_scope && data.applicable_scope !== "none") {
+        if (eid && data.applicable_scope && data.applicable_scope !== "all") {
           try {
             const scopeRes = await InstitutionAPI.listScope(newVal, {
               enterprise_id: eid,