From 2113cac0255e380c39f79477d5fc04dabea02cb6 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 20 十月 2025 10:20:56 +0800
Subject: [PATCH] fix: bug

---
 src/views/TaskManage/components/TaskDetailView.vue |  177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 173 insertions(+), 4 deletions(-)

diff --git a/src/views/TaskManage/components/TaskDetailView.vue b/src/views/TaskManage/components/TaskDetailView.vue
index f2d9083..742dc81 100644
--- a/src/views/TaskManage/components/TaskDetailView.vue
+++ b/src/views/TaskManage/components/TaskDetailView.vue
@@ -31,6 +31,45 @@
               </ProFormItemV2>
             </ProFormColItem>
           </ProFormCol>
+          <template
+            v-if="
+              form.billingMethod === EnumBillingMethod.Hour ||
+              form.billingMethod === EnumBillingMethod.Day
+            "
+          >
+            <ProFormCol>
+              <ProFormColItem :span="12">
+                <ProFormItemV2
+                  label="鏍稿畾宸ユ椂:"
+                  prop="verifyWorkHours"
+                  :check-rules="[{ message: '璇疯緭鍏ユ牳瀹氬伐鏃�' }]"
+                >
+                  <ProFormInputNumber
+                    :controls="false"
+                    v-model="form.verifyWorkHours"
+                    placeholder="璇疯緭鍏ユ牳瀹氬伐鏃�"
+                    :min="0"
+                    :max="999999999999"
+                    unit="灏忔椂/澶�"
+                  ></ProFormInputNumber>
+                </ProFormItemV2>
+              </ProFormColItem>
+            </ProFormCol>
+            <ProFormCol>
+              <ProFormColItem :span="12">
+                <ProFormItemV2 label="瓒呮椂鏈嶅姟璐�:" prop="timeoutServiceFee">
+                  <ProFormInputNumber
+                    :controls="false"
+                    v-model="form.timeoutServiceFee"
+                    placeholder="璇疯緭鍏ヨ秴鏃舵湇鍔¤垂"
+                    :min="0"
+                    :max="999999999999"
+                    unit="鍏�/灏忔椂"
+                  ></ProFormInputNumber>
+                </ProFormItemV2>
+              </ProFormColItem>
+            </ProFormCol>
+          </template>
           <ProFormCol>
             <ProFormColItem :span="12">
               <ProFormItemV2 label="缁撶畻鏂瑰紡:" prop="settlementCycle">
@@ -39,6 +78,24 @@
                   :value-enum="EnumSettlementCycleText"
                   :button-style="false"
                 ></ProFormRadio>
+              </ProFormItemV2>
+            </ProFormColItem>
+          </ProFormCol>
+          <ProFormCol>
+            <ProFormColItem :span="12" class="settlement-cycle-date-form-item">
+              <ProFormItemV2
+                v-if="form.settlementCycle !== EnumSettlementCycle.Day"
+                label="缁撶畻鏃ユ湡:"
+                prop="settlementCycle"
+                :check-rules="[{ message: '璇烽�夋嫨缁撶畻鏃ユ湡' }]"
+              >
+                {{ EnumSettlementCycleDateText[form.settlementCycle] }}
+                <ProFormSelect
+                  v-model="form.settlementDate"
+                  :value-enum="settlementDateList"
+                  :button-style="false"
+                ></ProFormSelect>
+                {{ '缁撶畻' }}
               </ProFormItemV2>
             </ProFormColItem>
           </ProFormCol>
@@ -57,17 +114,18 @@
               <ProFormItemV2 label="骞撮緞鑼冨洿:" prop="ageRange" class="form-age-range">
                 <ProFormInputNumber
                   :controls="false"
-                  :min="0"
+                  :min="16"
                   v-model="form.ageMinLimit"
                   placeholder="璇疯緭鍏�"
                 ></ProFormInputNumber>
                 <div class="form-input-separator">鑷�</div>
                 <ProFormInputNumber
                   :controls="false"
-                  :min="0"
+                  :min="16"
                   v-model="form.ageMaxLimit"
                   placeholder="璇疯緭鍏�"
                 ></ProFormInputNumber>
+                宀�
               </ProFormItemV2>
             </ProFormColItem>
           </ProFormCol>
@@ -105,8 +163,19 @@
           </ProFormCol>
           <ProFormCol>
             <ProFormColItem :span="12">
-              <ProFormItemV2 label="璇︾粏鍦板潃:" prop="addressDetail">
-                <ProFormText v-model.trim="form.addressDetail" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" />
+              <ProFormItemV2 label="鍦扮偣璇存槑:" prop="addressDetail">
+                <ProFormText v-model.trim="form.addressDetail" placeholder="璇疯緭鍏ュ湴鐐硅鏄�" />
+              </ProFormItemV2>
+            </ProFormColItem>
+          </ProFormCol>
+          <ProFormCol>
+            <ProFormColItem :span="12">
+              <ProFormItemV2 label="浠诲姟鎻忚堪:" prop="description">
+                <ProFormTextArea
+                  :rows="4"
+                  v-model.trim="form.description"
+                  placeholder="璇疯緭鍏ヤ换鍔℃弿杩�"
+                />
               </ProFormItemV2>
             </ProFormColItem>
           </ProFormCol>
@@ -123,6 +192,49 @@
               </ProFormItemV2>
             </ProFormColItem>
           </ProFormCol>
+          <ProFormCol>
+            <ProFormColItem :span="12">
+              <ProFormItemV2
+                label="鎶ュ悕鏃堕棿:"
+                prop="applyTime"
+                :check-rules="[{ message: '璇烽�夋嫨鎶ュ悕鏃堕棿', type: 'array' }]"
+              >
+                <ProFormDatePicker
+                  v-model="form.applyTime"
+                  type="daterange"
+                  range-separator="鑷�"
+                  start-placeholder="寮�濮嬫棩鏈�"
+                  end-placeholder="缁撴潫鏃ユ湡"
+                ></ProFormDatePicker>
+              </ProFormItemV2>
+            </ProFormColItem>
+          </ProFormCol>
+          <ProFormCol>
+            <ProFormColItem :span="12">
+              <ProFormItemV2
+                label="楠屾敹鏂瑰紡:"
+                prop="checkReceiveMethod"
+                :check-rules="[{ message: '璇烽�夋嫨楠屾敹鏂瑰紡' }]"
+              >
+                <ProFormRadio
+                  v-model="form.checkReceiveMethod"
+                  :value-enum="EnumTaskCheckReceiveMethodText"
+                  :button-style="false"
+                ></ProFormRadio>
+              </ProFormItemV2>
+            </ProFormColItem>
+          </ProFormCol>
+          <ProFormItemV2
+            label="缁撶畻鏂瑰紡:"
+            prop="settlementAccess"
+            :check-rules="[{ message: '璇烽�夋嫨缁撶畻鏂瑰紡' }]"
+          >
+            <ProFormSelect
+              v-model="form.settlementAccess"
+              :value-enum="EnumEnterpriseWalletAccessTextForSettle"
+              placeholder="璇烽�夋嫨缁撶畻鏂瑰紡"
+            ></ProFormSelect>
+          </ProFormItemV2>
         </ProForm>
         <template #footer>
           <el-button @click="handleBack">鍏抽棴</el-button>
@@ -146,14 +258,23 @@
   ProFormRadio,
   ProFormDatePicker,
   ProFormCheckbox,
+  ProFormSelect,
+  ProFormTextArea,
 } from '@bole-core/components';
 import { useQuery } from '@tanstack/vue-query';
 import * as taskServices from '@/services/api/task';
 import {
   EnumUserGenderText,
+  EnumBillingMethod,
   EnumBillingMethodText,
   EnumBillingMethodUnitText,
+  EnumSettlementCycle,
   EnumSettlementCycleText,
+  EnumSettlementCycleDateText,
+  EnumSettlementCycleDateMonthArray,
+  EnumSettlementCycleDateWeekArray,
+  EnumTaskCheckReceiveMethodText,
+  EnumEnterpriseWalletAccessTextForSettle,
 } from '@/constants';
 import { ModelValueType } from 'element-plus';
 import { format } from '@/utils';
@@ -172,11 +293,22 @@
   categoryCode: CategoryCode.CertificateType,
 });
 
+const settlementDateList = computed(() => {
+  if (form.settlementCycle === EnumSettlementCycle.Month) {
+    return EnumSettlementCycleDateMonthArray;
+  }
+  if (form.settlementCycle === EnumSettlementCycle.Week) {
+    return EnumSettlementCycleDateWeekArray;
+  }
+  return [];
+});
+
 const form = reactive({
   name: '',
   billingMethod: '' as any as EnumBillingMethod,
   serviceFee: 0,
   settlementCycle: '' as any as EnumSettlementCycle,
+  settlementDate: null as number,
   benefits: [] as string[],
   ageMinLimit: 0,
   ageMaxLimit: 0,
@@ -185,6 +317,13 @@
   time: [] as unknown as ModelValueType,
   weMapInfo: {} as WeMapModel,
   addressDetail: '',
+
+  verifyWorkHours: null as number,
+  timeoutServiceFee: null as number,
+  description: '',
+  checkReceiveMethod: '' as any as EnumTaskCheckReceiveMethod,
+  applyTime: [] as unknown as ModelValueType,
+  settlementAccess: '' as any as EnumEnterpriseWalletAccess,
 });
 
 const { isLoading } = useQuery({
@@ -203,6 +342,7 @@
     form.billingMethod = data.billingMethod;
     form.serviceFee = data.serviceFee;
     form.settlementCycle = data.settlementCycle;
+    form.settlementDate = data.settlementDate;
     form.benefits = data.benefits?.map((x) => x.benefitCode) ?? [];
     form.ageMinLimit = data.ageMinLimit;
     form.ageMaxLimit = data.ageMaxLimit;
@@ -222,6 +362,16 @@
       addressName: data.addressName,
     };
     form.addressDetail = data.addressDetail;
+
+    form.verifyWorkHours = data.verifyWorkHours;
+    form.timeoutServiceFee = data.timeoutServiceFee;
+    form.description = data.description;
+    form.checkReceiveMethod = data.checkReceiveMethod;
+    form.applyTime = [
+      format(data.applyBeginTime, 'YYYY-MM-DD 00:00:00'),
+      format(data.applyEndTime, 'YYYY-MM-DD 23:59:59'),
+    ];
+    form.settlementAccess = data.settlementAccess;
   },
   enabled: computed(() => !!id),
 });
@@ -246,5 +396,24 @@
       width: auto;
     }
   }
+
+  .settlement-cycle-date-form-item {
+    color: inherit;
+
+    .el-form-item__content {
+      flex-wrap: nowrap;
+
+      .el-select {
+        margin: 0 20px;
+        width: auto;
+        min-width: 0;
+        flex: 1;
+      }
+
+      .pro-from-item-read-content-wrapper {
+        width: auto;
+      }
+    }
+  }
 }
 </style>

--
Gitblit v1.9.1