From ebea958ab2324104b59f83675a6347d4a6b1d9d1 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 29 十月 2025 16:58:13 +0800
Subject: [PATCH] feat: 页面
---
src/views/EmploymentManage/components/AddOrEditEmploymentView.vue | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 48 insertions(+), 5 deletions(-)
diff --git a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
index 4368f34..8c2f0c5 100644
--- a/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
+++ b/src/views/EmploymentManage/components/AddOrEditEmploymentView.vue
@@ -3,6 +3,17 @@
<AppContainer>
<PageFormLayout title="鍩烘湰淇℃伅">
<ProForm :model="form" ref="productFormRef" label-width="110px" :is-read="isDetail">
+ <ProFormItemV2
+ label="渚涘簲鍟�:"
+ prop="settlementAccess"
+ :check-rules="[{ message: '璇烽�夋嫨渚涘簲鍟�' }]"
+ >
+ <ProFormSelect
+ v-model="form.settlementAccess"
+ :value-enum="[]"
+ placeholder="璇烽�夋嫨渚涘簲鍟�"
+ ></ProFormSelect>
+ </ProFormItemV2>
<ProFormCol>
<ProFormColItem :span="12">
<ProFormItemV2
@@ -25,7 +36,7 @@
if (!form.billingMethod) {
callback(new Error('璇烽�夋嫨鏈嶅姟璐圭被鍨�'));
}
- if (!form.serviceFee) {
+ if (!form.serviceFee && form.billingMethod !== EnumBillingMethod.Face) {
callback(new Error('璇疯緭鍏ユ湇鍔¤垂'));
}
callback();
@@ -38,46 +49,68 @@
: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>
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
- <template v-if="form.billingMethod === EnumBillingMethod.Hour">
+ <template
+ v-if="
+ form.billingMethod === EnumBillingMethod.Hour ||
+ form.billingMethod === EnumBillingMethod.Day
+ "
+ >
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="鏍稿畾宸ユ椂:" prop="verifyWorkHours">
+ <ProFormItemV2
+ label="鏍稿畾宸ユ椂:"
+ prop="verifyWorkHours"
+ :check-rules="[{ message: '璇疯緭鍏ユ牳瀹氬伐鏃�' }]"
+ >
+ <span v-if="isDetail && !form.verifyWorkHours"></span>
<ProFormInputNumber
+ v-else
:controls="false"
v-model="form.verifyWorkHours"
placeholder="璇疯緭鍏ユ牳瀹氬伐鏃�"
:min="0"
:max="999999999999"
unit="灏忔椂/澶�"
+ :disabled="feeCannotEdit"
></ProFormInputNumber>
</ProFormItemV2>
</ProFormColItem>
</ProFormCol>
<ProFormCol>
<ProFormColItem :span="12">
- <ProFormItemV2 label="瓒呮椂鏈嶅姟璐�:" prop="timeoutServiceFee">
+ <ProFormItemV2
+ label="瓒呮椂鏈嶅姟璐�:"
+ prop="timeoutServiceFee"
+ :check-rules="[{ message: '璇疯緭鍏ヨ秴鏃舵湇鍔¤垂' }]"
+ >
+ <span v-if="isDetail && !form.timeoutServiceFee"></span>
<ProFormInputNumber
+ v-else
:controls="false"
v-model="form.timeoutServiceFee"
placeholder="璇疯緭鍏ヨ秴鏃舵湇鍔¤垂"
:min="0"
:max="999999999999"
unit="鍏�/灏忔椂"
+ :disabled="feeCannotEdit"
></ProFormInputNumber>
</ProFormItemV2>
</ProFormColItem>
@@ -96,6 +129,7 @@
:value-enum="EnumSettlementCycleText"
:button-style="false"
@change="handleSettlementCycleChange"
+ :disabled="feeCannotEdit"
></ProFormRadio>
</ProFormItemV2>
</ProFormColItem>
@@ -260,6 +294,7 @@
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
:disabled-date="disabledDate"
+ @change="handleTimeChange"
></ProFormDatePicker>
</ProFormItemV2>
</ProFormColItem>
@@ -374,8 +409,12 @@
}
function disabledapplyDate(time: Date) {
- return dayjs(time).isBefore(form.time[0], 'day');
+ return dayjs(time).isAfter(dayjs(form.time[1]), 'day') || dayjs(time).isBefore(dayjs(), 'day');
}
+
+const feeCannotEdit = computed(() => {
+ return dayjs().isAfter(form.time[0], 'second') && isEdit;
+});
const eventContext = useGlobalEventContext();
@@ -484,6 +523,10 @@
form.settlementDate = null as number;
}
+function handleTimeChange() {
+ form.applyTime = [] as unknown as ModelValueType;
+}
+
function handleBack() {
closeViewPush(route, {
name: 'TaskManageList',
--
Gitblit v1.9.1