| | |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | </ProForm> |
| | | </ChunkCell> |
| | | <ChunkCell title="合作信息"> |
| | | <ProForm |
| | | :model="form" |
| | | ref="cooperationFormRef" |
| | | label-width="140px" |
| | | :scroll-to-error="false" |
| | | :is-read="isDetail" |
| | | > |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="合作状态:" prop="cooperationStatus"> |
| | | <ProFormRadio |
| | | v-model="form.cooperationStatus" |
| | | :value-enum="EnumEnterpriseCooperationStatusText" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="签约状态:" prop="signStatus"> |
| | | <ProFormRadio |
| | | v-model="form.signStatus" |
| | | :value-enum="EnumEnterpriseCooperationSignStatusText" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="合作协议:" prop="cooperationAgreementUrl"> |
| | | <ProFormUpload |
| | | v-model:file-url="form.cooperationAgreementUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="jpg/jpeg,png,pdf" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="服务费收取方式:" prop="serviceFeeCollectType"> |
| | | <ProFormSelect |
| | | v-model="form.serviceFeeCollectType" |
| | | :valueEnum="EnumEnterpriseCooperationServiceFeeCollectTypeText" |
| | | placeholder="请选择服务费收取方式" |
| | | > |
| | | </ProFormSelect> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 |
| | | label="服务费:" |
| | | prop="serviceFeeRate" |
| | | :check-rules=" |
| | | form.serviceFeeCollectType ? [{ message: '请输入服务费' }] : undefined |
| | | " |
| | | :required="!!form.serviceFeeCollectType" |
| | | > |
| | | <ProFormInputNumber |
| | | v-model="form.serviceFeeRate" |
| | | :controls="false" |
| | | :min="0" |
| | | :precision="2" |
| | | placeholder="请输入" |
| | | :unit="serviceFeeCollectTypeUnit" |
| | | :showReadContent="!!form.serviceFeeRate" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <ProFormCol> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="发票税点:" prop="invoiceTaxPointRate"> |
| | | <ProFormInputNumber |
| | | v-model="form.invoiceTaxPointRate" |
| | | :controls="false" |
| | | :min="0" |
| | | :precision="2" |
| | | placeholder="请输入" |
| | | unit="%" |
| | | :showReadContent="!!form.invoiceTaxPointRate" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button @click="handleBack">返回</el-button> |
| | | <el-button v-if="!isDetail" type="primary" @click="handleSubmit">确认</el-button> |
| | |
| | | ProFormTextArea, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | UploadUserFile, |
| | | ProFormRadio, |
| | | ProFormInputNumber, |
| | | ProFormUpload, |
| | | } from '@bole-core/components'; |
| | | import { FormRules, FormInstance } from 'element-plus'; |
| | | import * as enterpriseServices from '@/services/api/enterprise'; |
| | | import { useRouteView, useGlobalEventContext, GlobalEvent } from '@/hooks'; |
| | | import _ from 'lodash'; |
| | | import { validateFormList, filterCN, removeEmptyKeys } from '@/utils'; |
| | | import { validateFormList, filterCN, removeEmptyKeys, convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { Message, BoleRegExp } from '@bole-core/core'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { AreaType } from '@/constants'; |
| | | import { |
| | | AreaType, |
| | | EnumEnterpriseCooperationSignStatusText, |
| | | EnumEnterpriseCooperationStatusText, |
| | | EnumEnterpriseCooperationServiceFeeCollectTypeText, |
| | | } from '@/constants'; |
| | | |
| | | defineOptions({ name: 'AddOrEditEnterpriseView' }); |
| | | |
| | |
| | | contactEmail: '', |
| | | userName: '', |
| | | password: '', |
| | | |
| | | cooperationStatus: EnumEnterpriseCooperationStatus.None, |
| | | signStatus: EnumEnterpriseCooperationSignStatus.None, |
| | | cooperationAgreementUrl: [] as UploadUserFile[], |
| | | serviceFeeCollectType: '' as any as EnumEnterpriseCooperationServiceFeeCollectType, |
| | | serviceFeeRate: null as any as number, |
| | | invoiceTaxPointRate: null as any as number, |
| | | }); |
| | | |
| | | const serviceFeeCollectTypeUnit = computed(() => { |
| | | if (!form.serviceFeeCollectType) { |
| | | return ''; |
| | | } else { |
| | | return form.serviceFeeCollectType === EnumEnterpriseCooperationServiceFeeCollectType.Rate |
| | | ? '%' |
| | | : '元/人'; |
| | | } |
| | | }); |
| | | |
| | | const { isLoading } = useQuery({ |
| | |
| | | form.contactEmail = data.contactEmail; |
| | | form.userName = data.userName; |
| | | form.areaList = [data.provinceCode, data.cityCode].filter(Boolean); |
| | | |
| | | form.cooperationStatus = data.cooperationStatus; |
| | | form.signStatus = data.signStatus; |
| | | form.cooperationAgreementUrl = convertApi2FormUrlOnlyOne(data.cooperationAgreementUrl); |
| | | form.serviceFeeCollectType = data.serviceFeeCollectType; |
| | | form.serviceFeeRate = data.serviceFeeRate; |
| | | form.invoiceTaxPointRate = data.invoiceTaxPointRate; |
| | | }, |
| | | enabled: computed(() => !!id), |
| | | }); |
| | |
| | | contactEmail: form.contactEmail, |
| | | userName: form.userName, |
| | | password: form.password, |
| | | |
| | | cooperationStatus: form.cooperationStatus, |
| | | signStatus: form.signStatus, |
| | | cooperationAgreementUrl: form.cooperationAgreementUrl[0]?.path, |
| | | serviceFeeCollectType: form.serviceFeeCollectType, |
| | | serviceFeeRate: form.serviceFeeRate, |
| | | invoiceTaxPointRate: form.invoiceTaxPointRate, |
| | | }; |
| | | if (isEdit.value) { |
| | | params.id = id; |