From e3c8ba4028047cdc56aaaa7edd2690e2d3043d43 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 12 八月 2025 17:42:54 +0800
Subject: [PATCH] fix: 灵工管理

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

diff --git a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
index 47fdecc..f828627 100644
--- a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
+++ b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
@@ -110,14 +110,14 @@
               >
                 <ProFormInputNumber
                   :controls="false"
-                  :min="1"
+                  :min="0"
                   v-model="form.ageMinLimit"
                   placeholder="璇疯緭鍏�"
                 ></ProFormInputNumber>
                 <div class="form-input-separator">鑷�</div>
                 <ProFormInputNumber
                   :controls="false"
-                  :min="1"
+                  :min="0"
                   v-model="form.ageMaxLimit"
                   placeholder="璇疯緭鍏�"
                 ></ProFormInputNumber>
@@ -134,9 +134,6 @@
                 <ProFormRadio
                   v-model="form.genderLimit"
                   :value-enum="EnumUserGenderTextForEdit"
-                  show-all-btn
-                  :all-btn-label="'涓嶉檺'"
-                  :allBtnValue="0"
                 ></ProFormRadio>
               </ProFormItemV2>
             </ProFormColItem>
@@ -204,6 +201,7 @@
                   range-separator="鑷�"
                   start-placeholder="寮�濮嬫棩鏈�"
                   end-placeholder="缁撴潫鏃ユ湡"
+                  :disabled-date="disabledDate"
                 ></ProFormDatePicker>
               </ProFormItemV2>
             </ProFormColItem>
@@ -257,6 +255,10 @@
 const id = route.params.id as string;
 const isEdit = !!id;
 
+function disabledDate(time: Date) {
+  return dayjs(time).isBefore(dayjs(), 'day');
+}
+
 const eventContext = useGlobalEventContext();
 
 const { closeViewPush } = useRouteView();
@@ -277,12 +279,12 @@
 
 const form = reactive({
   name: '',
-  billingMethod: '' as any as EnumBillingMethod,
-  serviceFee: 0,
-  settlementCycle: '' as any as EnumSettlementCycle,
+  billingMethod: EnumBillingMethod.Month,
+  serviceFee: null,
+  settlementCycle: EnumSettlementCycle.Month,
   benefits: [] as string[],
-  ageMinLimit: 0,
-  ageMaxLimit: 0,
+  ageMinLimit: null,
+  ageMaxLimit: null,
   genderLimit: 0 as any as EnumUserGender,
   credentialLimits: [] as string[],
   time: [] as unknown as ModelValueType,

--
Gitblit v1.9.1