zhengyiming
2 天以前 852c9a7af36bcffb0c37cea6224c5391b5eac398
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,25 +38,37 @@
                  :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: '请输入核定工时' }]"
                >
                  <ProFormInputNumber
                    :controls="false"
                    v-model="form.verifyWorkHours"
@@ -64,13 +76,18 @@
                    :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: '请输入超时服务费' }]"
                >
                  <ProFormInputNumber
                    :controls="false"
                    v-model="form.timeoutServiceFee"
@@ -78,6 +95,7 @@
                    :min="0"
                    :max="999999999999"
                    unit="元/小时"
                    :disabled="feeCannotEdit"
                  ></ProFormInputNumber>
                </ProFormItemV2>
              </ProFormColItem>
@@ -96,6 +114,7 @@
                  :value-enum="EnumSettlementCycleText"
                  :button-style="false"
                  @change="handleSettlementCycleChange"
                  :disabled="feeCannotEdit"
                ></ProFormRadio>
              </ProFormItemV2>
            </ProFormColItem>
@@ -260,6 +279,7 @@
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  :disabled-date="disabledDate"
                  @change="handleTimeChange"
                ></ProFormDatePicker>
              </ProFormItemV2>
            </ProFormColItem>
@@ -304,7 +324,7 @@
          >
            <ProFormSelect
              v-model="form.settlementAccess"
              :value-enum="EnumEnterpriseWalletAccessText"
              :value-enum="settlementAccessList"
              :disabled="isEdit"
              placeholder="请选择结算方式"
            ></ProFormSelect>
@@ -367,13 +387,19 @@
const id = route.params.id as string;
const isEdit = !!id;
const { settlementAccessList } = useEnterpriseWalletAccessSelect();
function disabledDate(time: Date) {
  return dayjs(time).isBefore(dayjs(), 'day');
}
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();
@@ -482,6 +508,10 @@
  form.settlementDate = null as number;
}
function handleTimeChange() {
  form.applyTime = [] as unknown as ModelValueType;
}
function handleBack() {
  closeViewPush(route, {
    name: 'TaskManageList',