我的资产调整首页调整提交企业认证接口调整
This commit is contained in:
@@ -13,15 +13,6 @@
|
||||
<label>企业名称</label>
|
||||
<input type="text" v-model="name" placeholder="输入企业名称" />
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业类型</label>
|
||||
<picker v-if="type.length > 0" :range="type" :value="typeIndex" range-key="name" @change="changePicker" data-type="type">
|
||||
<view class="picker-text nowrap">
|
||||
{{type[typeIndex].name}}
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业行业</label>
|
||||
<picker v-if="industry.length > 0" :range="industry" :value="industryIndex" range-key="title" @change="changePicker" data-type="industry">
|
||||
@@ -31,6 +22,13 @@
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>经营类目</label>
|
||||
<view class="picker-text" @click="opnePopup">
|
||||
选择经营类目
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>法人姓名</label>
|
||||
<input type="text" v-model="corporate" placeholder="输入法人姓名" />
|
||||
@@ -51,6 +49,21 @@
|
||||
<button type="default" size="default" @click="submitApplies">提交认证</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 经营类目 -->
|
||||
<uni-popup ref="categoryPopup">
|
||||
<view class="category-popup">
|
||||
<view class="header">
|
||||
<view class="title">经营类目</view>
|
||||
<view class="subtitle">请选择经营类目</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in category" :key="index" @click="item.check = !item.check">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -67,22 +80,22 @@
|
||||
org : "",
|
||||
logo : "",
|
||||
license : "",
|
||||
type : [],
|
||||
industry : [],
|
||||
typeIndex : 0,
|
||||
industryIndex: 0,
|
||||
reason : ''
|
||||
reason : '',
|
||||
category : [],
|
||||
categorys : []
|
||||
};
|
||||
},
|
||||
created(){
|
||||
// 读取配置信息
|
||||
appliesCreate().then(res=>{
|
||||
console.log(res)
|
||||
this.industry = res.industries
|
||||
this.type = res.type
|
||||
this.formType = this.$Route.query.formType
|
||||
this.name = res.info.name
|
||||
this.typeIndex = res.type.findIndex(val => val.id === res.info.type.id) || 0
|
||||
this.industryIndex = res.industries.findIndex(val => val.industry_id === res.info.industry.industry_id) || 0
|
||||
this.category = res.info.categories
|
||||
if(this.formType === 'put'){
|
||||
appliesInfo().then(formValue => {
|
||||
this.corporate = formValue.certification.name
|
||||
@@ -91,7 +104,10 @@
|
||||
this.logo = formValue.cover
|
||||
this.license = formValue.certification.license
|
||||
}).catch(valueErr => {
|
||||
console.log(valueErr)
|
||||
uni.showToast({
|
||||
title: valueErr.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}).catch(err =>{
|
||||
@@ -102,9 +118,22 @@
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 选择经营类目
|
||||
opnePopup(){
|
||||
this.$refs.categoryPopup.open('bottom')
|
||||
},
|
||||
// 确认选择类目
|
||||
affirmCategory(){
|
||||
this.categorys = []
|
||||
for(let val of this.category){
|
||||
if(val.check){
|
||||
this.categorys.push(val.category_id)
|
||||
}
|
||||
}
|
||||
this.$refs.categoryPopup.close()
|
||||
},
|
||||
// 提交信息
|
||||
submitApplies(){
|
||||
|
||||
let method = this.formType === 'put' ? 'PUT' : 'POST'
|
||||
applies({
|
||||
name : this.name,
|
||||
@@ -113,8 +142,8 @@
|
||||
user_name : this.corporate,
|
||||
id_card : this.identity,
|
||||
code : this.org,
|
||||
type : this.type[this.typeIndex].id,
|
||||
industry_id : this.industry[this.industryIndex].industry_id,
|
||||
categories : this.categorys
|
||||
}, method).then(res => {
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
@@ -135,28 +164,23 @@
|
||||
|
||||
// 选择器
|
||||
changePicker(e){
|
||||
let changeType = e.target.dataset.type,
|
||||
changeVlae = e.detail.value
|
||||
|
||||
switch(changeType){
|
||||
case 'type':
|
||||
this.typeIndex = changeVlae
|
||||
break
|
||||
case 'industry':
|
||||
this.industryIndex = changeVlae
|
||||
break
|
||||
}
|
||||
this.industryIndex = e.detail.value
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
updImg(type){
|
||||
uni.chooseImage({
|
||||
count : 1,
|
||||
success : choose => {
|
||||
let paths = choose.tempFilePaths
|
||||
uploading(paths).then(res => {
|
||||
this[type] = res.url
|
||||
console.log(this[type])
|
||||
success : path => {
|
||||
uploads([{
|
||||
uri : path.tempFilePaths[0]
|
||||
}]).then(res => {
|
||||
this[type] = res.url[0]
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -255,5 +279,46 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// 经营类目
|
||||
.category-popup{
|
||||
background: #F5F5F5;
|
||||
padding: 0 $padding * 2 $padding * 2 $padding * 2;
|
||||
.header{
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
.category-flex{
|
||||
margin: 0 -10rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.category-flex-item{
|
||||
margin: 10rpx;
|
||||
background: white;
|
||||
width: calc(33.33% - 20rpx);
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
font-size: $title-size-m;
|
||||
@extend .nowrap;
|
||||
&.show{
|
||||
color: white;
|
||||
background-color: $text-price;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user