| | |
| | | :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" |
| | |
| | | :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" |
| | |
| | | :min="0" |
| | | :max="999999999999" |
| | | unit="元/小时" |
| | | :disabled="feeCannotEdit" |
| | | ></ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | :value-enum="EnumSettlementCycleText" |
| | | :button-style="false" |
| | | @change="handleSettlementCycleChange" |
| | | :disabled="feeCannotEdit" |
| | | ></ProFormRadio> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormItemV2 |
| | | label="结算方式:" |
| | | prop="settlementAccess" |
| | | :check-rules="[{ message: '请选择结算方式' }]" |
| | | > |
| | | <ProFormSelect |
| | | v-model="form.settlementAccess" |
| | | :value-enum="settlementAccessList" |
| | | :disabled="isEdit" |
| | | placeholder="请选择结算方式" |
| | | ></ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <el-button @click="handleBack()">关闭</el-button> |
| | |
| | | EnumSettlementCycleDateWeekArray, |
| | | EnumSettlementCycle, |
| | | EnumTaskCheckReceiveMethodText, |
| | | EnumEnterpriseWalletAccessText, |
| | | } from '@/constants'; |
| | | import { format, FormValidator } from '@/utils'; |
| | | import dayjs from 'dayjs'; |
| | |
| | | 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).isBefore(form.time[0], 'day') || dayjs(time).isAfter(form.time[1], 'day'); |
| | | } |
| | | |
| | | const feeCannotEdit = computed(() => { |
| | | return dayjs(form.time[0]).isBefore(dayjs(), 'day'); |
| | | }); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | |
| | | description: '', |
| | | checkReceiveMethod: '' as any as EnumTaskCheckReceiveMethod, |
| | | applyTime: [] as unknown as ModelValueType, |
| | | settlementAccess: '' as any as EnumEnterpriseWalletAccess, |
| | | }); |
| | | |
| | | const { isLoading } = useQuery({ |
| | |
| | | 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: isEdit, |
| | | }); |
| | |
| | | timeoutServiceFee: form.timeoutServiceFee, |
| | | description: form.description, |
| | | checkReceiveMethod: form.checkReceiveMethod, |
| | | settlementAccess: form.settlementAccess, |
| | | }; |
| | | if (isEdit) { |
| | | params.id = id; |