989 lines
38 KiB
Vue
Raw Normal View History

2024-07-09 18:07:55 +08:00
<template>
2024-08-19 18:14:28 +08:00
<div style="padding: 20px">
<div style="width: 80%;margin: 0 auto;">
<div>
<div style="color: #2E2E2E;font-size: 30px;">1.入会资料</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="padding: 30px 0px">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item name="name" label="推荐人">
<t-select filterable v-model="formData.recommendation_id">
<t-option label="无" :value="0"/>
<t-option v-for="item in member_list" :label="item.nikename" :value="item.id"/>
</t-select>
</t-form-item>
</t-form>
</div>
</div>
<div style="margin-top: 20px">
<div style="color: #2E2E2E;font-size: 30px;">2.基本信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="display: flex;justify-items: center;padding: 30px 0px">
<div>
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="姓名" :rules="[ { required: true, message: '此项必填' }]">
<t-input v-model="formData.nikename" placeholder="请输入姓名"/>
</t-form-item>
<t-form-item label="手机号" :rules="[ { required: true, message: '此项必填' }]">
<t-input v-model="formData.phone" placeholder="请输入手机号"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="区域" name="region_id">
<t-cascader v-model="formData.region_id" :options="region_list"></t-cascader>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="出生年月日">
2024-07-09 18:07:55 +08:00
<t-date-picker :style="{ width: '200px' }" v-model="formData.birth_time"/>
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="性别" name="name">
<t-select v-model="formData.gender" :style="{ width: '200px' }">
<t-option :key="0" label="女" :value="0"></t-option>
<t-option :key="1" label="男" :value="1"></t-option>
</t-select>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="政治面貌">
<t-input v-model="formData.political" placeholder="请输入政治面貌"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="民族">
<t-input v-model="formData.nation" placeholder="请输入民族"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="毕业院校">
<t-input v-model="formData.institution" placeholder="请输入毕业院校"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
</t-space>
</div>
<div>
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="身份证号码">
<t-input v-model="formData.card_number" placeholder="请输入身份证号码"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="籍贯">
<t-input v-model="formData.jiguan" placeholder="请输入籍贯"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="邮箱">
<t-input v-model="formData.mailbox" placeholder="请输入邮箱"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="单位职务">
<t-input v-model="formData.unit_position" placeholder="请输入单位职务"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="其他联系人">
<t-input v-model="formData.other_contacts" placeholder="请输入其他联系人"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
<t-form-item label="其他社会职务">
<t-input v-model="formData.other_social_positions" placeholder="请输入其他社会职务"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="学位">
<t-input v-model="formData.academic_degree" placeholder="请输入学位"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
</t-space>
</div>
<div>
<div>证件照</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div class="t-upload" @click="openCai" style="margin-top: 20px">
<div class="t-upload__card-container" style="cursor: pointer">
<img :src="$store.state.user.apiUrl+formData.photo_image" style="width: 110px;height: 110px;"
v-if="formData.photo_image!=''">
<svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-add"
v-if="formData.photo_image==''">
<path fill="currentColor" d="M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"></path>
</svg>
<p class="t-size-s t-upload__add-text" v-if="formData.photo_image==''">点击上传图片</p>
</div>
<small class="t-upload__tips t-size-s">请上传证件照照片将作为会员证照</small>
2024-07-09 18:07:55 +08:00
</div>
2024-08-19 18:14:28 +08:00
</div>
</div>
<div>
<div>身份证照</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="display: flex;justify-items: center;padding: 30px 0px">
<div>
<div class="sfz">
<span v-if="formData.cardz_image==''">请上传身份证正面照片</span>
<img v-if="formData.cardz_image!=''" :src="$store.state.user.apiUrl+formData.cardz_image"
style="width: 100%;max-height: 200px;">
</div>
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.cardz_image_show"
theme="custom"
:data="{association_id:1}"
accept="image/*"
:format-response="(response) => formatResponse(response, 1)"
>
<t-button>上传图片</t-button>
</t-upload>
2024-07-09 18:07:55 +08:00
</div>
2024-08-19 18:14:28 +08:00
<div style="margin-left: 100px">
<div class="sfz">
<span v-if="formData.cardf_image==''">请上传身份证背面照片</span>
<img v-if="formData.cardf_image!=''" :src="$store.state.user.apiUrl+formData.cardf_image"
style="width: 100%;max-height: 200px;">
</div>
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.cardf_image_show"
:data="{association_id:1}"
theme="custom"
accept="image/*"
:format-response="(response) => formatResponse(response, 2)"
>
<t-button>上传图片</t-button>
</t-upload>
</div>
</div>
</div>
<div style="display: flex;justify-items: center;justify-content: space-between">
<div style="width: 49%">
<div>个人简介</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入个人简介" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.introduction"/>
</div>
</div>
<div style="width: 49%">
<div>主要成就以及获奖情况</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入主要成就以及获奖情况" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.achievement_award"/>
</div>
</div>
</div>
</div>
<div style="margin-top: 30px">
<div style="color: #2E2E2E;font-size: 30px;">3.企业信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="display: flex;justify-items: center;padding: 30px 0px">
<div style="width: 20%">
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="企业注册地">
<t-input v-model="formData.enterprise_location" placeholder="请输入企业注册地"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="是否上市" name="name">
2024-07-09 18:07:55 +08:00
<t-select v-model="formData.if_list" :style="{ width: '200px' }">
<t-option key="0" label="是" value="0"></t-option>
<t-option key="1" label="否" value="1"></t-option>
</t-select>
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="员工人数">
<t-input v-model="formData.employee" placeholder="请输入员工人数"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="所属行业" name="name">
<t-select v-model="formData.industry_id" :style="{ width: '200px' }">
<t-option v-for="(item,index) in industry_list" :label="item.industry_name"
:value="item.id"></t-option>
2024-07-09 18:07:55 +08:00
</t-select>
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
<!-- <t-form layout="inline" labelAlign="top" :labelWidth="100">-->
<!-- <t-form-item label="注册资金" name="name">-->
<!-- <t-input placeholder="请输入注册资金"/>-->
<!-- </t-form-item>-->
<!-- </t-form>-->
</t-space>
</div>
<div style="width: 20%">
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="企业名称">
<t-input v-model="formData.enterprise_name" placeholder="请输入企业名称"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="企业网址">
<t-input v-model="formData.enterprise_website" placeholder="请输入企业网址"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="统一社会信用代码">
<t-input v-model="formData.unified_code" placeholder="请输入统一社会信用代码"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="企业性质">
<t-input v-model="formData.enterprise_nature" placeholder="请输入企业性质"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
</t-space>
</div>
<div style="width: 20%">
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="上年营业额(万元)">
<t-input v-model="formData.previous_revenue" placeholder="请输入上年营业额(万元)"/>
</t-form-item>
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="上年纳税额(万元)">
<t-input v-model="formData.previous_tax" placeholder="请输入上年纳税额(万元)"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="上年度净利润(万元)">
<t-input v-model="formData.previous_profit" placeholder="请输入上年度净利润(万元)"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
2024-08-19 18:14:28 +08:00
</t-form>
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="上年公益性捐赠支出(万元)">
<t-input v-model="formData.previous_donation" placeholder="请输入上年公益性捐赠支出(万元)"/>
2024-07-09 18:07:55 +08:00
</t-form-item>
</t-form>
2024-08-19 18:14:28 +08:00
</t-space>
</div>
</div>
<div>
<div>公司形象</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="display: flex;justify-items: center;padding: 30px 0px">
<div>
<div class="sfz">
<span v-if="formData.business_license_image==''">请上传营业执照</span>
<img v-if="formData.business_license_image!=''"
:src="$store.state.user.apiUrl+formData.business_license_image"
style="width: 100%;max-height: 200px;">
</div>
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.business_license_image_show"
theme="custom"
:data="{association_id:1}"
accept="image/*"
:format-response="(response) => formatResponse(response, 3)"
>
<t-button>上传图片</t-button>
</t-upload>
</div>
<div style="margin-left: 100px">
<div class="sfz">
<span v-if="formData.company_image==''">请上传公司LOGO</span>
<img v-if="formData.company_image!=''" :src="$store.state.user.apiUrl+formData.company_image"
style="width: 100%;max-height: 200px;">
2024-07-09 18:07:55 +08:00
</div>
2024-08-19 18:14:28 +08:00
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.company_image_show"
:data="{association_id:1}"
theme="custom"
accept="image/*"
:format-response="(response) => formatResponse(response, 5)"
>
<t-button>上传图片</t-button>
</t-upload>
</div>
</div>
</div>
<div style="display: flex;justify-items: center;justify-content: space-between;margin-top: 20px">
<div style="width: 49%">
<div>公司介绍</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入公司介绍" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.enterprise_Introduction"/>
</div>
</div>
<div style="width: 49%">
<div>主营业务介绍</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入主营业务介绍" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.introdiction"/>
</div>
</div>
</div>
<div style="display: flex;justify-items: center;justify-content: space-between;margin-top: 20px">
<div style="width: 49%">
<div>企业所获荣誉以及专利</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入企业所获荣誉以及专利" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.enterprise_honor"/>
2024-07-09 18:07:55 +08:00
</div>
2024-08-19 18:14:28 +08:00
</div>
<div style="width: 49%">
<div>其他企业任职情况</div>
<div style="height: 1px;background-color: #999999;width: 100%;margin-top: 10px"></div>
<div style="margin-top: 20px;">
<t-textarea placeholder="请输入其他企业任职情况" :autosize="{ minRows: 15, maxRows: 20 }"
v-model="formData.qitaqiyerenzhiqingkuang"/>
</div>
</div>
</div>
2024-07-09 18:07:55 +08:00
</div>
2024-08-19 18:14:28 +08:00
<div style="margin-top: 30px">
<div style="color: #2E2E2E;font-size: 30px;">4.建团信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="padding: 30px 0px">
<t-space direction="vertical">
<t-form layout="inline" labelAlign="top" :labelWidth="100">
<t-form-item label="是否建立团组织" name="name">
<t-select v-model="formData.if_organization" :style="{ width: '200px' }">
<t-option key="0" label="是" value="0"></t-option>
<t-option key="1" label="否" value="1"></t-option>
</t-select>
</t-form-item>
</t-form>
<t-form v-if="formData.if_organization==0" labelAlign="top"
layout="inline">
<t-form-item label="团组织性质" name="nature">
<t-input v-model="formData.nature" placeholder="团组织性质"></t-input>
</t-form-item>
<t-form-item label="建团时间" name="jiantuan_time">
<t-date-picker :style="{ width: '200px' }" v-model="formData.jiantuan_time"/>
</t-form-item>
<t-form-item label="建团人数" name="jiantuan_number">
<t-input v-model="formData.jiantuan_number" placeholder="建团人数"></t-input>
</t-form-item>
<t-form-item label="青年人数" name="youth_number">
<t-input v-model="formData.youth_number" placeholder="青年人数"></t-input>
</t-form-item>
<t-form-item label="上级团组织" name="superior_nature">
<t-input v-model="formData.superior_nature" placeholder="上级团组织"></t-input>
</t-form-item>
<t-form-item label="团委负责人信息" name="tuanweifuzerenxinxi">
<t-input v-model="formData.tuanweifuzerenxinxi" placeholder="团委负责人信息"></t-input>
</t-form-item>
<t-form-item label="批复文件">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.documents_file_show"
theme="image"
tips="请选择批复文件(图片)"
accept="image/*"
:format-response="(response) => formatResponse(response, 4)"
></t-upload>
</t-form-item>
</t-form>
</t-space>
</div>
</div>
<div style="padding: 100px 0px;text-align: center">
<t-button @click="submit">确定保存</t-button>
<t-button @click="download" theme="warning" style="margin-left: 40px">生成PDF</t-button>
2024-07-09 18:07:55 +08:00
</div>
</div>
2024-08-19 18:14:28 +08:00
<t-dialog header="图片上传" :visible="caiMode" width="40%" top="20px" :onClose="onCloseMy" @confirm="onSubmit">
<div class="cropper-content">
<div class="cropper">
<vue-cropper
ref="cropper"
:img="caiImg"
:canMoveBox="false"
:output-size="1"
output-type="png"
:info="true"
:full="false"
:auto-crop="true"
autoCropWidth="200px"
autoCropHeight="200px"
mode="100%"
@realTime="realTime"
@imgLoad="imgLoad"
:fixed="true"
:fixedNumber="[1,1]"
></vue-cropper>
</div>
<div class="show-preview"
:style="{'width': previews.w + 'px', 'height': previews.h + 'px', 'overflow': 'hidden', 'margin': '5px'}">
<div :style="previews.div" class="preview">
<img :src="previews.url" :style="previews.img">
</div>
</div>
</div>
<div class="footer-btn">
<div class="scope-btn">
<label class="btn" for="uploads">上传图片</label>
<input type="file" id="uploads" style="position:absolute; clip:rect(0 0 0 0);"
accept="image/png, image/jpeg, image/gif, image/jpg" @change="uploadImg($event, 1)">
</div>
</div>
</t-dialog>
2024-07-09 18:07:55 +08:00
</div>
</template>
2024-08-19 18:14:28 +08:00
<script lang="ts">
import store from '@/store';
import {VueCropper} from 'vue-cropper';
import axios from 'axios';
import {CheckCircleIcon, LockOnIcon, UserIcon} from "tdesign-icons-vue";
2024-07-09 18:07:55 +08:00
export default {
components: {
2024-08-19 18:14:28 +08:00
VueCropper,
2024-07-09 18:07:55 +08:00
},
data() {
return {
2024-08-19 18:14:28 +08:00
caiMode: false,
previews: {},
caiImg: '',
2024-07-09 18:07:55 +08:00
formData: {
2024-08-19 18:14:28 +08:00
region_id: null,
recommendation_id: 0,
position_id: null,
industry_id: null,
2024-07-09 18:07:55 +08:00
phone: '',
password: '',
nikename: '',
gender: null,
birth_time: '',
nation: '',
political: '',
jiguan: '',
institution: '',
education: '',
academic_degree: '',
card_number: '',
work_unit: '',
unit_position: '',
wx_number: '',
mailbox: '',
fixed_telephone: '',
achievement_award: '',
other_contacts: '',
other_social_positions: '',
position: '',
cardf_image_show: [],
cardz_image_show: [],
photo_image_show: [],
cardf_image: '',
cardz_image: '',
photo_image: '',
business_license_image_show: [],
business_license_image: '',
unified_code: '',
enterprise_nature: '',
enterprise_website: '',
if_list: null,
employee: '',
previous_revenue: '',
previous_tax: '',
previous_profit: '',
previous_donation: '',
qitaqiyerenzhiqingkuang: '',
enterprise_Introduction: '',
introdiction: '',
enterprise_honor: '',
if_organization: null,
nature: '',
jiantuan_time: '',
jiantuan_number: '',
youth_number: '',
superior_nature: '',
tuanweifuzerenxinxi: '',
documents_file: '',
documents_file_show: [],
2024-08-19 18:14:28 +08:00
enterprise_location: '',
introduction: '',
enterprise_name: '',
company_image: '',
company_image_show: [],
token: '',
openid: '',
2024-07-09 18:07:55 +08:00
},
current: 2,
2024-08-19 18:14:28 +08:00
industry_list: [],
plan_list: [],
member_list: [],
region_list: [],
2024-07-09 18:07:55 +08:00
};
},
mounted() {
console.log(this.$route.query.id);
2024-08-19 18:14:28 +08:00
// if (typeof (this.$route.query.id) != 'undefined') {
// this.id = .id;
// this.getInfo();
// this.getPlan();
// this.getIndustry();
// } else {
// this.$message.error('入会链接有误!', 0);
// }
console.log();
this.formData.token = this.$route.query.token;
this.formData.openid = this.$route.query.openid;
this.getIndustry();
this.getMemberList();
this.getRegion();
this.getInfo();
2024-07-09 18:07:55 +08:00
},
methods: {
2024-08-19 18:14:28 +08:00
download(){
//https://hnyea.0rui.cn/api/move/pdf_member/exportPdf PDF导出
//window.location.href="https://hnyea.0rui.cn/api/move/pdf_member/exportPdf?openid="+this.formData.openid;
const link = document.createElement('a');
link.href = `https://hnyea.0rui.cn/api/move/pdf_member/exportPdf?openid=${this.formData.openid}`;
link.target = '_blank'; // 新标签页打开
link.rel = 'noopener noreferrer'; // 安全考虑
link.style.display = 'none';
document.body.appendChild(link);
link.click();
document.body.removeChild(link); // 清理 DOM
},
uploadImg(e, num) {
// 上传图片
// this.option.img
const file = e.target.files[0]
if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
return false
}
const reader = new FileReader()
reader.onload = (e) => {
let data
if (typeof e.target.result === 'object') {
// 把Array Buffer转化为blob 如果是base64不需要
data = window.URL.createObjectURL(new Blob([e.target.result]))
} else {
data = e.target.result
}
if (num === 1) {
this.caiImg = data
} else if (num === 2) {
this.example2.img = data
}
}
// 转化为base64
// reader.readAsDataURL(file)
// 转化为blob
reader.readAsArrayBuffer(file)
},
onSubmit() {
this.$refs.cropper.getCropBlob(data => {
// do something
console.log(data)
console.log(this.caiImg);
const formData = new FormData();
formData.append('file', data, 'image.jpg');
formData.append('association_id', 1);
console.log(formData);
axios.post(`${store.state.user.apiUrl}/api/common/upload`, formData, {
headers: {
'Content-Type': 'multipart/form-data'
}
})
.then(response => {
console.log(response);
const {data} = response;
if (data.code == 1) {
this.formData.photo_image = data.data.url;
this.$message.success('图片上传成功!');
this.caiMode = false;
this.caiImg = '';
this.$refs.cropper.stopCrop();
this.$refs.cropper.clearCrop();
} else {
this.$message.error('图片上传失败!');
}
})
.catch(error => {
console.error('文件上传失败', error);
});
})
},
onCloseMy() {
this.caiMode = false;
},
realTime(data) {
this.previews = data
},
imgLoad(msg) {
console.log(msg)
},
openCai() {
this.caiImg= store.state.user.apiUrl +this.formData.photo_image;
this.$refs.cropper.startCrop();
this.caiMode = true;
},
getInfo() {
2024-07-09 18:07:55 +08:00
this.$request
2024-08-19 18:14:28 +08:00
.post("/move/temporary_token/tokenMember", {openid: this.formData.openid, token: this.formData.token})
.then((res) => {
console.log(res);
this.formData.phone = res.data.phone;
this.formData.position_id = res.data.position_id;
this.formData.industry_id = res.data.industry_id;
this.formData.region_id = res.data.region_id;
this.formData.password = res.data.password;
this.formData.nikename = res.data.nikename;
this.formData.gender = res.data.gender;
this.formData.birth_time = res.data.birth_time;
this.formData.nation = res.data.nation;
this.formData.political = res.data.political;
this.formData.jiguan = res.data.jiguan;
this.formData.institution = res.data.institution;
this.formData.education = res.data.education;
this.formData.academic_degree = res.data.academic_degree;
this.formData.card_number = res.data.card_number;
// this.formData.work_unit = res.data.work_unit;
this.formData.unit_position = res.data.unit_position;
this.formData.wx_number = res.data.wx_number;
this.formData.mailbox = res.data.mailbox;
this.formData.fixed_telephone = res.data.fixed_telephone;
this.formData.achievement_award = res.data.achievement_award;
this.formData.other_contacts = res.data.other_contacts;
this.formData.other_social_positions = res.data.other_social_positions;
this.formData.position = res.data.position;
this.formData.cardf_image = res.data.cardf_image == null ? '' : res.data.cardf_image;
this.formData.cardz_image = res.data.cardz_image == null ? '' : res.data.cardz_image;
this.formData.photo_image = res.data.photo_image == null ? '' : res.data.photo_image;
this.formData.company_image = res.data.company_image == null ? '' : res.data.company_image;
this.formData.business_license_image = res.data.business_license_image == null ? '' : res.data.business_license_image;
this.formData.unified_code = res.data.unified_code;
this.formData.enterprise_nature = res.data.enterprise_nature;
this.formData.enterprise_website = res.data.enterprise_website;
this.formData.if_list = res.data.if_list;
this.formData.employee = res.data.employee;
this.formData.previous_revenue = res.data.previous_revenue;
this.formData.previous_tax = res.data.previous_tax;
this.formData.previous_profit = res.data.previous_profit;
this.formData.previous_donation = res.data.previous_donation;
this.formData.qitaqiyerenzhiqingkuang = res.data.qitaqiyerenzhiqingkuang;
this.formData.enterprise_Introduction = res.data.enterprise_Introduction;
this.formData.introdiction = res.data.introdiction;
this.formData.enterprise_honor = res.data.enterprise_honor;
this.formData.if_organization = res.data.if_organization;
this.formData.nature = res.data.nature;
this.formData.jiantuan_time = res.data.jiantuan_time;
this.formData.jiantuan_number = res.data.jiantuan_number;
this.formData.youth_number = res.data.youth_number;
this.formData.superior_nature = res.data.superior_nature;
this.formData.tuanweifuzerenxinxi = res.data.tuanweifuzerenxinxi;
this.formData.documents_file = res.data.documents_file;
this.formData.enterprise_location = res.data.enterprise_location;
this.formData.introduction = res.data.introduction;
this.formData.enterprise_name = res.data.enterprise_name;
})
.catch((e) => {
console.log(e);
});
},
getRegion() {
this.$request
.post("/region")
.then((res) => {
2024-07-09 18:07:55 +08:00
console.log(res);
2024-08-19 18:14:28 +08:00
if (res.code == 1) {
this.region_list = res.data;
2024-07-09 18:07:55 +08:00
}
})
.catch((e) => {
console.log(e);
});
},
2024-08-19 18:14:28 +08:00
getMemberList() {
2024-07-09 18:07:55 +08:00
this.$request
2024-08-19 18:14:28 +08:00
.post("/move/association/memberList")
.then((res) => {
2024-07-09 18:07:55 +08:00
console.log(res);
2024-08-19 18:14:28 +08:00
if (res.code == 1) {
this.member_list = res.data;
}
})
.catch((e) => {
console.log(e);
});
},
getIndustry() {
this.$request
.post("/industry")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.industry_list = res.data;
this.industry_list.push({id: -1, industry_name: '其他行业'});
}
})
.catch((e) => {
console.log(e);
});
},
getPlan() {
this.$request
.post("/position", {association_id: 1})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.plan_list = res.data;
2024-07-09 18:07:55 +08:00
}
})
.catch((e) => {
console.log(e);
});
},
formatResponse(res, type) {
console.log(res);
if (type == 0) {
this.formData.photo_image = res.data.url;
} else if (type == 1) {
this.formData.cardz_image = res.data.url;
} else if (type == 2) {
this.formData.cardf_image = res.data.url;
} else if (type == 3) {
this.formData.business_license_image = res.data.url;
2024-08-19 18:14:28 +08:00
} else if (type == 4) {
2024-07-09 18:07:55 +08:00
this.formData.documents_file = res.data.url;
2024-08-19 18:14:28 +08:00
} else {
this.formData.company_image = res.data.url;
2024-07-09 18:07:55 +08:00
}
return {url: res.data.fullurl};
},
2024-08-19 18:14:28 +08:00
submit() {
if (this.formData.nikename == '') {
this.$message.error('请输入姓名!');
2024-07-09 18:07:55 +08:00
return;
}
if (this.formData.phone == '') {
this.$message.error('请输入手机号!');
return;
}
2024-08-19 18:14:28 +08:00
if (this.formData.region_id == null) {
this.$message.error('请选择区域!');
2024-07-09 18:07:55 +08:00
return;
}
2024-08-19 18:14:28 +08:00
if (this.formData.birth_time == null) {
this.$message.error('请选择出生日期!');
2024-07-09 18:07:55 +08:00
return;
}
if (this.formData.gender == null) {
this.$message.error('请选择性别!');
return;
}
if (this.formData.political == '') {
this.$message.error('请输入政治面貌!');
return;
}
2024-08-19 18:14:28 +08:00
if (this.formData.nation == '') {
this.$message.error('请输入民族!');
2024-07-09 18:07:55 +08:00
return;
}
if (this.formData.card_number == '') {
2024-08-19 18:14:28 +08:00
this.$message.error('请输入身份证号码!');
2024-07-09 18:07:55 +08:00
return;
}
2024-08-19 18:14:28 +08:00
if (this.formData.jiguan == '') {
this.$message.error('请输入籍贯!');
2024-07-09 18:07:55 +08:00
return;
}
if (this.formData.business_license_image == '') {
this.$message.error('请上传营业执照!');
return;
}
if (this.formData.unified_code == '') {
this.$message.error('请输入统一社会信用代码!');
return;
}
2024-08-19 18:14:28 +08:00
if (this.formData.enterprise_name == '') {
2024-07-09 18:07:55 +08:00
this.$message.error('请输入企业名称!');
return;
}
if (this.formData.industry_id == null) {
this.$message.error('请选择行业!');
return;
}
2024-08-19 18:14:28 +08:00
// if (this.formData.if_organization == 0) {
// if (this.formData.nature == '') {
// this.$message.error('请输主团组织性质!');
// return;
// }
// if (this.formData.jiantuan_time == '') {
// this.$message.error('请输入建团时间!');
// return;
// }
// if (this.formData.jiantuan_number == '') {
// this.$message.error('请输入建团人数!');
// return;
// }
// if (this.formData.youth_number == '') {
// this.$message.error('请输入青年人数!');
// return;
// }
// if (this.formData.superior_nature == '') {
// this.$message.error('请输入上级团组织!');
// return;
// }
// if (this.formData.tuanweifuzerenxinxi == '') {
// this.$message.error('请输入团委负责人信息!');
// return;
// }
// if (this.formData.documents_file == '') {
// this.$message.error('请上传批复文件!');
// return;
// }
// }
this.formData.association_id = 1;
2024-07-09 18:07:55 +08:00
this.$request
2024-08-19 18:14:28 +08:00
.post("/move/temporary_token/shenqing", this.formData)
2024-07-09 18:07:55 +08:00
.then((res) => {
console.log(res);
2024-08-19 18:14:28 +08:00
if (res.code == 1) {
2024-07-09 18:07:55 +08:00
this.$message.success(res.msg);
2024-08-19 18:14:28 +08:00
this.show = 0;
} else {
2024-07-09 18:07:55 +08:00
this.$message.error(res.msg);
}
// setTimeout(() => {
// this.$router.push(`/login?id=`+this.id);
// }, 1000);
//this.getInfo();
})
.catch((e) => {
console.log(e);
});
},
},
};
</script>
<style lang="less" scoped>
@import '@/style/variables.less';
.result-success {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
&-icon {
font-size: 72px;
color: var(--td-success-color);
}
&-title {
margin-top: 28px;
font-size: 20px;
color: var(--td-text-color-primary);
text-align: center;
line-height: 28px;
font-weight: 500;
}
&-describe {
margin: 8px 0 32px;
font-size: 14px;
color: var(--td-text-color-secondary);
line-height: 22px;
}
}
.t-button + .t-button {
margin-left: var(--td-comp-margin-s);
}
2024-08-19 18:14:28 +08:00
.cropper-content {
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
.cropper {
width: 350px;
height: 300px;
}
.show-preview {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
.preview {
overflow: hidden;
border-radius: 50%;
border: 1px solid #cccccc;
background: #cccccc;
margin-left: 40px;
}
}
}
.footer-btn {
margin-top: 30px;
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
.scope-btn {
width: 350px;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
}
.upload-btn {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
}
.btn {
outline: none;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 8px 15px;
font-size: 12px;
border-radius: 3px;
color: #fff;
background-color: #67c23a;
border-color: #67c23a;
}
}
.sfz {
cursor: pointer;
text-align: center;
width: 300px;
height: 200px;
line-height: 200px;
border: 1px dashed #999999;
margin-bottom: 20px;
}
.sfz:hover {
border: 1px dashed #409EFF;
}
2024-07-09 18:07:55 +08:00
</style>