This commit is contained in:
parent
0a87dabfac
commit
8c215923b8
|
@ -116,7 +116,7 @@
|
|||
</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>
|
||||
<small class="t-upload__tips t-size-s">请选择形象照片</small>
|
||||
</div>
|
||||
</t-form-item>
|
||||
<t-form-item label="身份证正面照">
|
||||
|
@ -570,22 +570,17 @@ getRegion() {
|
|||
this.formData.other_contacts = res.data.other_contacts;
|
||||
this.formData.other_social_positions = res.data.other_social_positions;
|
||||
this.formData.position = res.data.position;
|
||||
if (res.data.cardf_image == '') {
|
||||
if (res.data.cardf_image == '' || res.data.cardf_image == null) {
|
||||
this.formData.cardf_image_show = [];
|
||||
} else {
|
||||
this.formData.cardf_image_show = [{url: store.state.user.apiUrl + res.data.cardf_image}];
|
||||
}
|
||||
if (res.data.cardz_image == '') {
|
||||
if (res.data.cardz_image == '' || res.data.cardz_image == null) {
|
||||
this.formData.cardz_image_show = [];
|
||||
} else {
|
||||
this.formData.cardz_image_show = [{url: store.state.user.apiUrl + res.data.cardz_image}];
|
||||
}
|
||||
if (res.data.photo_image == '') {
|
||||
this.formData.photo_image_show = [];
|
||||
} else {
|
||||
this.formData.photo_image_show = [{url: store.state.user.apiUrl + res.data.photo_image}];
|
||||
}
|
||||
if (res.data.company_image == '') {
|
||||
if (res.data.company_image == '' || res.data.company_image == null) {
|
||||
this.formData.company_image_show = [];
|
||||
} else {
|
||||
this.formData.company_image_show = [{url: store.state.user.apiUrl + res.data.company_image}];
|
||||
|
@ -594,7 +589,7 @@ getRegion() {
|
|||
this.formData.cardz_image = res.data.cardz_image;
|
||||
this.formData.photo_image = res.data.photo_image;
|
||||
this.formData.company_image = res.data.company_image;
|
||||
if (res.data.business_license_image == '') {
|
||||
if (res.data.business_license_image == ''|| res.data.business_license_image == null) {
|
||||
this.formData.business_license_image_show = [];
|
||||
} else {
|
||||
this.formData.business_license_image_show = [{url: store.state.user.apiUrl + res.data.business_license_image}];
|
||||
|
@ -622,7 +617,11 @@ getRegion() {
|
|||
this.formData.tuanweifuzerenxinxi = res.data.tuanweifuzerenxinxi;
|
||||
this.formData.documents_file = res.data.documents_file;
|
||||
this.formData.enterprise_location = res.data.enterprise_location;
|
||||
if (res.data.documents_file == ''|| res.data.documents_file == null) {
|
||||
this.formData.documents_file_show = [];
|
||||
} else {
|
||||
this.formData.documents_file_show = [{url: store.state.user.apiUrl + res.data.documents_file}];
|
||||
}
|
||||
this.formData.introduction = res.data.introduction;
|
||||
this.formData.enterprise_name = res.data.enterprise_name;
|
||||
|
||||
|
@ -746,6 +745,22 @@ getRegion() {
|
|||
// }
|
||||
// }
|
||||
this.formData.member_id = this.id;
|
||||
if(this.formData.cardz_image_show.length==0){
|
||||
this.formData.cardz_image='';
|
||||
}
|
||||
if(this.formData.cardf_image_show.length==0){
|
||||
this.formData.cardf_image='';
|
||||
}
|
||||
if(this.formData.company_image_show.length==0){
|
||||
this.formData.company_image='';
|
||||
}
|
||||
if(this.formData.documents_file_show.length==0){
|
||||
this.formData.documents_file='';
|
||||
}
|
||||
if(this.formData.business_license_image_show.length==0){
|
||||
this.formData.business_license_image='';
|
||||
}
|
||||
console.log(this.formData);
|
||||
this.$request
|
||||
.post("/member/update", this.formData)
|
||||
.then((res) => {
|
||||
|
|
|
@ -54,9 +54,23 @@
|
|||
<t-col :span="2" class="operation-container">
|
||||
<t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button>
|
||||
</t-col>
|
||||
<t-col :span="2" style="text-align: right">
|
||||
<t-col :span="1" style="text-align: right">
|
||||
<t-button @click="()=>$router.push('/user/user_add')"> 新增会员</t-button>
|
||||
</t-col>
|
||||
<t-col :span="1" style="text-align: right">
|
||||
<t-upload
|
||||
:action="$store.state.user.apiUrl+'/api/member/importExcel '"
|
||||
tips=""
|
||||
accept=""
|
||||
theme="custom"
|
||||
name="excel"
|
||||
:data="{association_id:this.association.association_id}"
|
||||
:showImageFileName="true"
|
||||
:format-response="formatResponse"
|
||||
>
|
||||
<t-button theme="default" variant="outline">批量导入</t-button>
|
||||
</t-upload>
|
||||
</t-col>
|
||||
</t-row>
|
||||
</t-form>
|
||||
<t-tabs v-model="tabIndex" @change="tabIndexChange">
|
||||
|
@ -159,6 +173,20 @@ export default {
|
|||
this.getRegion();
|
||||
},
|
||||
methods: {
|
||||
formatResponse(res) {
|
||||
console.log(res);
|
||||
if(res.code==1){
|
||||
this.$message.success('导入成功!');
|
||||
setTimeout(()=>{
|
||||
this.tabIndex=0;
|
||||
this.getList();
|
||||
},1000)
|
||||
}else{
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
//this.addForm.image = res.data.url;
|
||||
//return {url: res.data.fullurl,name:res.data.url};
|
||||
},
|
||||
getRegion() {
|
||||
this.$request
|
||||
.post("/region")
|
||||
|
|
Loading…
Reference in New Issue