| | |
| | | import { cusExtendInfo, changeCusExtend } from "@/api/mine"; |
| | | import { Edit } from "@element-plus/icons-vue"; |
| | | import { enterpriseTypes } from "@/api/register/index"; |
| | | import { initRouter, getTopMenu, handleAliveRoute } from "@/router/utils"; |
| | | const isManager = useUserStoreHook().isManager; |
| | | import { type CusExtendDto } from "@/utils/auth"; |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | const isLoading = ref(false); |
| | | const showDialog = ref(false); |
| | | const nowRole = computed(() => { |
| | | return useUserStoreHook()?.nowRole; |
| | | if (!state?.ruleForm?.exRoles) { |
| | | return {}; |
| | | } |
| | | let nowRoleLiet; |
| | | let obj = {}; |
| | | let nowRole = useUserStoreHook()?.nowRole; |
| | | if (state?.ruleForm?.exRoles.length > 1) { |
| | | nowRoleLiet = state.ruleForm.exRoles.find(item => { |
| | | return item.exRoleId == nowRole.id; |
| | | }); |
| | | obj = Object.assign(nowRole, nowRoleLiet); |
| | | } else { |
| | | obj = Object.assign(nowRole, state.ruleForm.exRoles[0]); |
| | | } |
| | | return obj; |
| | | }); |
| | | const userInfo = computed(() => { |
| | | const userInfo = computed<CusExtendDto>(() => { |
| | | let obj = useUserStoreHook().enterpriseInfo; |
| | | return obj; |
| | | }); |
| | |
| | | // 企业开户行 |
| | | bankName: null, // string,可空 |
| | | // 企业银行账号 |
| | | bankAccount: null // string,可空 |
| | | bankAccount: null, // string,可空 |
| | | bankAccountIMG: null, |
| | | exRoles: null |
| | | }, |
| | | enterpriseList: [], |
| | | type: "", |
| | |
| | | // nowRole.value = useUserStoreHook()?.nowRole; |
| | | if (nowRole.value) { |
| | | state.ruleForm.transactionCode = nowRole.value.code; |
| | | // let nowRoleLiet; |
| | | // if (state.ruleForm.exRoles.length > 1) { |
| | | // nowRoleLiet = state.ruleForm.exRoles.find(item => { |
| | | // return item.exRoleId == nowRole.value.id; |
| | | // }); |
| | | // nowRole.value = Object.assign(nowRole.value, nowRoleLiet); |
| | | // } else { |
| | | // nowRole.value = Object.assign(nowRole.value, state.ruleForm.exRoles[0]); |
| | | // } |
| | | // state.userInfo.transactionName = nowRole.value.name; |
| | | } else { |
| | | state.ruleForm.transactionCode = route.query.code; |
| | | state.userInfo.enterpriseTypeName = route.query.name; |
| | | state.ruleForm.transactionCode = route.query.code as string; |
| | | // state.userInfo.enterpriseTypeName = route.query.name; |
| | | } |
| | | let restypes = await enterpriseTypes(); |
| | | state.enterpriseList = restypes?.result; |
| | |
| | | await useUserStoreHook().changeLogoInExRule({ |
| | | ruleCode: useUserStoreHook().nowRole.code |
| | | }); |
| | | initRouter(); |
| | | message("修改成功!", { |
| | | type: "success" |
| | | }); |
| | |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const handlebankAccountIMG: UploadProps["onSuccess"] = ( |
| | | response, |
| | | uploadFile |
| | | ) => { |
| | | if (response.code == "200") { |
| | | // state.ruleForm.businessLicense = URL.createObjectURL(uploadFile.raw!); |
| | | state.ruleForm.bankAccountIMG = response.result; |
| | | } else { |
| | | message(response.message, { |
| | | type: "error" |
| | | }); |
| | | } |
| | | isLoading.value = false; |
| | | }; |
| | | |
| | | defineOptions({ |
| | | name: "mine" |
| | | }); |
| | |
| | | <div class="cell-item">交易主体</div> |
| | | </template> |
| | | {{ nowRole?.name }} |
| | | <el-tag v-if="nowRole?.hasFlsh" type="success">审核已通过 </el-tag> |
| | | <el-tag v-else type="danger">资料审核中 </el-tag> |
| | | <el-tag v-if="nowRole.steps == 2" type="success">审核已通过 </el-tag> |
| | | <el-tag v-else-if="nowRole.steps == 3" type="danger" |
| | | >资料未通过 |
| | | </el-tag> |
| | | <el-tag v-else type="warning">资料审核中 </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template #label> |
| | |
| | | <template #label> |
| | | <div class="cell-item">联系电话</div> |
| | | </template> |
| | | {{ userInfo.legalRepresentativePhone }} |
| | | {{ userInfo.enterprisePhone }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template #label> |
| | |
| | | </template> |
| | | {{ userInfo.bankAccount }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template #label> |
| | | <div class="cell-item">银行收款二维码</div> |
| | | </template> |
| | | <span style="margin-right: auto" @click="showImg('bankAccountIMG')"> |
| | | <el-link type="primary" underline>查看二维码</el-link> |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <div class="m-5"> |
| | | <div v-if="isManager" class="m-5"> |
| | | <el-button type="primary" :icon="Edit" @click="() => (showDialog = true)" |
| | | >修改资料</el-button |
| | | > |
| | |
| | | <img |
| | | v-if="state.ruleForm.businessLicense" |
| | | :src="state.ruleForm.businessLicense" |
| | | width="200px" |
| | | height="150px" |
| | | width="80px" |
| | | height="50px" |
| | | /> |
| | | <el-button v-else type="primary">上传</el-button> |
| | | </el-upload> |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"> |
| | | <el-form-item label="开户行" prop="bankName"> |
| | | <el-input |
| | | v-model="state.ruleForm.bankName" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16"> |
| | | <el-form-item label="银行账号" prop="bankAccount"> |
| | | <el-input |
| | | v-model="state.ruleForm.bankAccount" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"> |
| | | <el-form-item label="开户行收款二维码" prop="bankAccountIMG"> |
| | | <el-upload |
| | | :action="`${baseUrlApi('/api/upFile/file')}`" |
| | | :show-file-list="false" |
| | | :on-success="handlebankAccountIMG" |
| | | :before-upload="beforeAvatarUpload" |
| | | :headers="state.headers" |
| | | > |
| | | <img |
| | | v-if="state.ruleForm.bankAccountIMG" |
| | | :src="state.ruleForm.bankAccountIMG" |
| | | width="85.6px" |
| | | height="5.4px" |
| | | /> |
| | | <el-button v-else type="primary">上传</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"> |
| | | <el-form-item label="法定代表人" prop="legalRepresentativeIdCard"> |
| | |
| | | <el-form-item label="联系电话" prop="operatorPhone"> |
| | | <el-input |
| | | v-model="state.ruleForm.operatorPhone" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"> |
| | | <el-form-item label="开户行" prop="bankName"> |
| | | <el-input |
| | | v-model="state.ruleForm.bankName" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16"> |
| | | <el-form-item label="银行账号" prop="bankAccount"> |
| | | <el-input |
| | | v-model="state.ruleForm.bankAccount" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |