From bbce52ba47c11eb6a6d3527055fd13f3f3d2901a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 21 十月 2025 18:12:38 +0800
Subject: [PATCH] fix: bug

---
 src/views/EmploymentManage/components/AddOrEditEmploymentView.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
index 59fd2eb..8cd8dac 100644
--- a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
+++ b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
@@ -25,7 +25,7 @@
                       if (!form.billingMethod) {
                         callback(new Error('璇烽�夋嫨鏈嶅姟璐圭被鍨�'));
                       }
-                      if (!form.serviceFee) {
+                      if (!form.serviceFee && form.billingMethod !== EnumBillingMethod.Face) {
                         callback(new Error('璇疯緭鍏ユ湇鍔¤垂'));
                       }
                       callback();
@@ -38,15 +38,18 @@
                   :value-enum="EnumBillingMethodText"
                   :showExtra="true"
                   :button-style="false"
+                  :disabled="feeCannotEdit"
                 >
                   <template #extra>
                     <ProFormInputNumber
+                      v-if="form.billingMethod !== EnumBillingMethod.Face"
                       :controls="false"
                       v-model="form.serviceFee"
                       placeholder="璇疯緭鍏�"
                       :min="0"
                       :max="999999999999"
                       :unit="EnumBillingMethodUnitText[form.billingMethod]"
+                      :disabled="feeCannotEdit"
                     ></ProFormInputNumber>
                   </template>
                 </RadioWithExtra>
@@ -73,6 +76,7 @@
                     :min="0"
                     :max="999999999999"
                     unit="灏忔椂/澶�"
+                    :disabled="feeCannotEdit"
                   ></ProFormInputNumber>
                 </ProFormItemV2>
               </ProFormColItem>
@@ -91,6 +95,7 @@
                     :min="0"
                     :max="999999999999"
                     unit="鍏�/灏忔椂"
+                    :disabled="feeCannotEdit"
                   ></ProFormInputNumber>
                 </ProFormItemV2>
               </ProFormColItem>
@@ -109,6 +114,7 @@
                   :value-enum="EnumSettlementCycleText"
                   :button-style="false"
                   @change="handleSettlementCycleChange"
+                  :disabled="feeCannotEdit"
                 ></ProFormRadio>
               </ProFormItemV2>
             </ProFormColItem>
@@ -387,9 +393,13 @@
 }
 
 function disabledapplyDate(time: Date) {
-  return dayjs(time).isBefore(form.time[0], 'day');
+  return dayjs(time).isBefore(form.time[0], 'day') || dayjs(time).isAfter(form.time[1], 'day');
 }
 
+const feeCannotEdit = computed(() => {
+  return dayjs().isAfter(form.time[0], 'second') && isEdit;
+});
+
 const eventContext = useGlobalEventContext();
 
 const { closeViewPush } = useRouteView();

--
Gitblit v1.9.1