first commit
This commit is contained in:
264
金壶/appV1/pages/auth/baisc.vue
Normal file
264
金壶/appV1/pages/auth/baisc.vue
Normal file
@@ -0,0 +1,264 @@
|
||||
<template>
|
||||
<view class="content w-100 h-100">
|
||||
<HeaderTop page_title='认证'></HeaderTop>
|
||||
<view class="progress bg-linear-gradient w-100">
|
||||
<uni-steps :options="[{title: '基本信息'}, {title: '资质图片'}, {title: '税务信息'}]" :active=list_index active-color='#FFFFFF'></uni-steps>
|
||||
</view>
|
||||
<view class="x-bg-white padding-30 font-weight">当前企业信息</view>
|
||||
<view class="line bg_F2F2F2 w-100" style="height:10upx;"></view>
|
||||
<view class="p-2 border-bottom d-flex a-center bg-white">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
企业名称</view>
|
||||
<input class="px-1 font-md flex-1" type="text" v-model="form.name" placeholder="请输入企业名称"/>
|
||||
</view>
|
||||
<view class="p-2 border-bottom d-flex a-center bg-white">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
企业类型
|
||||
</view>
|
||||
<view class="uni-list-cell-db px-1 font-md flex-1">
|
||||
<picker @change="bindPickerChange" :value="index" :range="list" range-key="name">
|
||||
<view class="uni-input">{{list[index].name}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="p-2 border-bottom d-flex a-center bg-white">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
联系人</view>
|
||||
<input class="px-1 font-md flex-1" type="text" v-model="form.linkman"/>
|
||||
</view>
|
||||
<view class="p-2 border-bottom d-flex a-center bg-white">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
手机号</view>
|
||||
<input class="px-1 font-md flex-1" type="number" maxlength="11" v-model="form.phone"/>
|
||||
</view>
|
||||
<pick-regions :defaultRegions="defaultRegions" @getRegions="handleGetRegions">
|
||||
<view class="p-2 d-flex a-center bg-white border-bottom">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
注册区域
|
||||
</view>
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
{{regionsName}}
|
||||
</view>
|
||||
</view>
|
||||
</pick-regions>
|
||||
<view class="p-2 d-flex a-center bg-white border-bottom">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
<text class="mr-1 text-danger">*</text>
|
||||
详细地址</view>
|
||||
<input placeholder="(请输入营业执照上的详细地址)" class="px-1 font-md flex-1" type="text" v-model="form.detailPath" />
|
||||
</view>
|
||||
<view class="p-2 border-bottom d-flex a-center bg-white">
|
||||
<view class="font-md text-secondary mr-1 flex-shrink text-dark">
|
||||
客服编号 (选填)</view>
|
||||
<input class="px-1 font-md flex-1" type="text" v-model="form.kefu"/>
|
||||
</view>
|
||||
<view class="x_public_box x-text-white x-bg-159 margin-shu20 editBtn w-90" style="line-height: 80upx;" @click="next()">下一步</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue'
|
||||
import authentication from '../../utils/models/auth.js'
|
||||
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
|
||||
import commonPopup from "@/components/common/common-popup.vue"
|
||||
import shippingAddress from '../../utils/models/shop.js'
|
||||
import uniSteps from'../../components/uni-steps/uni-steps.vue'
|
||||
export default {
|
||||
components: {
|
||||
commonPopup,
|
||||
HeaderTop,
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list_index:0,
|
||||
regions:[],
|
||||
defaultRegions:['安徽省','合肥市','蜀山区'],
|
||||
area_id: 2,
|
||||
list: [{
|
||||
key: '0',
|
||||
name: '请选择类型'
|
||||
},{
|
||||
key: 'purchasing_enterprise',
|
||||
name: '商业公司'
|
||||
},
|
||||
{
|
||||
key: 'purchasing_chain_boss',
|
||||
name: '连锁药房(总店)'
|
||||
},
|
||||
{
|
||||
key: 'liansuo_drugstore',
|
||||
name: '连锁药房(分店)'
|
||||
},
|
||||
{
|
||||
key: 'drugstore',
|
||||
name: '单体药房'
|
||||
},
|
||||
{
|
||||
key: 'clinic_single',
|
||||
name: '单体诊所'
|
||||
},
|
||||
{
|
||||
key: 'clinic_door',
|
||||
name: '门诊'
|
||||
},
|
||||
{
|
||||
key: 'clinic_community',
|
||||
name: '社区卫生服务所'
|
||||
},
|
||||
{
|
||||
key: 'hospital_private',
|
||||
name: '私立医院'
|
||||
}
|
||||
],
|
||||
index: 0,
|
||||
current: 0,
|
||||
form: {
|
||||
path: '', //地址
|
||||
name: "", //企业名称
|
||||
sub_type: 0, //企业类型
|
||||
detailPath: "", //详细地址
|
||||
linkman: "", //联系人姓名
|
||||
kefu: '' //客服
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindPickerChange: function(e) {
|
||||
this.index = e.detail.value
|
||||
this.form.sub_type = this.list[this.index].key
|
||||
},
|
||||
before() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
// 下一步
|
||||
next() {
|
||||
this.do_auth()
|
||||
},
|
||||
async do_auth() {
|
||||
let parames = {
|
||||
name: this.form.name,
|
||||
area_id: this.area_id,
|
||||
sub_type: this.form.sub_type,
|
||||
business_address: this.form.detailPath,
|
||||
consignee: this.form.linkman,
|
||||
phone: this.form.phone,
|
||||
service_number: this.form.kefu,
|
||||
}
|
||||
if(parames.business_address==''){
|
||||
uni.showToast({
|
||||
title: '请填写详细地址',
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.regionsName==''){
|
||||
uni.showToast({
|
||||
title: '请选择注册区域',
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
let res = await authentication.authBaisc(parames);
|
||||
uni.navigateTo({
|
||||
url: '../auth/certificate'
|
||||
})
|
||||
this.handleError(res, res => {
|
||||
|
||||
})
|
||||
},
|
||||
async getInfo() {
|
||||
let data = await authentication.viewBaisc()
|
||||
|
||||
let info = data.data
|
||||
if (info.name) {
|
||||
this.form.name = info.name
|
||||
this.area_id = info.area_id
|
||||
this.form.sub_type = info.sub_type
|
||||
this.form.detailPath = info.business_address
|
||||
this.form.linkman = info.consignee
|
||||
this.form.phone = info.tel
|
||||
this.form.kefu = info.service_number
|
||||
if(info.area_name && info.area_name != 'undefined'){
|
||||
this.regions = info.area_name
|
||||
}
|
||||
for (let i in this.list) {
|
||||
if (this.form.sub_type == this.list[i]['key']) {
|
||||
this.index = i
|
||||
}
|
||||
}
|
||||
}
|
||||
this.handleError(data, res => {
|
||||
|
||||
})
|
||||
},
|
||||
// 获取选择的地区
|
||||
handleGetRegions(regions){
|
||||
this.regions = regions
|
||||
this.area_id = this.regions.map(item=>item.id).join('-')
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
regionsName(){
|
||||
// 转为字符串
|
||||
return this.regions.map(item=>item.area_name).join(' ')
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getInfo()
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.place {
|
||||
background-color: #ffffff;
|
||||
height: 148upx;
|
||||
}
|
||||
|
||||
.b_header {
|
||||
|
||||
height: 148upx;
|
||||
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
.content {
|
||||
.header {
|
||||
height: 148upx;
|
||||
font-size: 32upx;
|
||||
position: relative;
|
||||
line-height: 194upx;
|
||||
|
||||
.edit_shoppingCar {
|
||||
position: absolute;
|
||||
bottom: -48upx;
|
||||
right: 31upx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.progress{
|
||||
color:#FFFFFF;
|
||||
padding-top: 30px;
|
||||
height:200upx;
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user