first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
b523b2b8-8e69-4bcc-b9b4-b5bbb2e9932e

View 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>

View File

@@ -0,0 +1,166 @@
<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">税务信息</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.invoiceTitle"/>
</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.taxpayer"/>
</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.openingBank"/>
</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.hedgeFund"/>
</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 authentication from '../../utils/models/auth.js'
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
export default {
components: {
HeaderTop
},
data() {
return {
list_index:2,
form:{
invoiceTitle:'', //发票抬头
taxpayer:"",//纳税人识别号
hedgeFund:"",//对公账号
openingBank:"",//开户行
name:"",//持卡人姓名
},
}
},
onLoad(e) {
},
methods: {
// 提交认证
next(){
let that = this
uni.showModal({
title: '提示',
content: '是否确认提交认证',
success: function(res) {
if (res.confirm) {
that.do_submit()
uni.showToast({
title: '资质提交成功!等待客服审核',
duration: 2000,
icon: 'none'
});
} else if (res.cancel) {
}
}
});
},
async do_submit(){
let res = await authentication.authBank(this.form.invoiceTitle,
this.form.taxpayer,
this.form.openingBank,
this.form.hedgeFund,
this.form.name)
this.handleError(res, res => {
})
// uni.switchTab({
// url:'../my/my'
// })
uni.redirectTo({
url:'../auth/is_Authentication'
});
},
async getInfo() {
let data = await authentication.viewBank()
let info = data.data
if (info) {
this.is_edit = false
this.form.invoiceTitle = info.invoice_title
this.form.taxpayer = info.tax_number
this.form.hedgeFund = info.bank_account
this.form.openingBank = info.bank_name
this.form.name = info.account_name
}
this.handleError(data, res => {
})
}
},
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;
}
.btn3{
width: 340upx;height: 82upx;
}
</style>

View File

@@ -0,0 +1,170 @@
<template>
<view class="content">
<HeaderTop page_title='认证'></HeaderTop>
<!-- <view class="b_header bg-linear-gradient x-text-white d-flex j-sb a-center padding-zy30" style="height:144upx; line-height: 184upx; padding-top:46upx;">
<image src="../../static/my/left.png" mode="" class="goback" @click="before()" style="height:30upx; width:18upx;"></image>
<view class="" style="font-size: 32upx;">认证</view>
<view v-if="is_edit ? false : true" class="" style="font-size: 32upx;" @click="edit()">修改</view>
<view v-if="is_edit ? true : false" class="" style="font-size: 32upx;" @click="edit()">取消</view>
</view> -->
<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="place"></view> -->
<!-- 认证界面 -->
<view class="list">
<view class="mt-3 scope" v-for="(item,index) of subTypeInfo" :key='index'>
<view class="d-flex padding-zy30">
<text class="text-danger ml-2 mr-1" v-if="item.required">*</text>
<card :headTitle="item.name" :headBorderBottom="false"></card>
</view>
<view class="tui-box-upload d-flex w-100 padding-zy30" style="display: inline-block;">
<tui-upload :limit="1" :fileKey="item.value" :value="item.path" :fileKeyName="'app'" @complete="result" @remove="remove" style="display: inline-block; float: left;height:200upx; width:300upx;"></tui-upload>
<view v-if="item.required && item.image" style="float: right;">
<image :src="item.image" mode="" class="eg_img" style="" @tap='look_img(item.image)'></image>
</view>
</view>
<!-- <view v-if="item.required && item.image">
<image :src="item.image" mode="" class="eg_img" style=""></image>
</view> -->
</view>
</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 class="d-flex bottom-0 right-0 w-100 " >
<view class="flex-1 main-bg-color text-white font-md py-2 text-center btn3"
hover-class="main-bg-hover-color" @click="before()">上一步</view>
<view class="flex-1 bg-danger text-white font-md py-2 text-center btn3"
hover-class="main-bg-hover-color" @click="next()">{{is_edit ? '立即提交':'下一页'}}</view>
</view> -->
</view>
</template>
<script>
import authentication from '../../utils/models/auth.js'
import tuiUpload from '@/components/tui-upload/tui-upload'
import tui from '@/components/tui-upload/tui'
import PublicTop from '../../components/HeaderTop/PublicTop.vue'
import card from "@/components/common/card_.vue"
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
export default {
components: {
PublicTop,
card,
tuiUpload,
tui,
HeaderTop
},
data() {
return {
list_index:1,
is_show:true,
business_license:[],//资质url
sub_type:'', //企业类型
imageData: [],
showRigth: false,
subTypeInfo:[]
}
},
onLoad(option) {
},
methods: {
// 查看图片
look_img(path){
let arr = []
arr.push(path)
if (!path) return;
uni.previewImage({
loop: true,
urls: arr
})
},
result: function(e) {
this.is_show = false
if(e.status == 1){
this.subTypeInfo.forEach(item => {
if(item.value == e.key ){
item.path[0] = e.pathArr[0]
return
}
})
}
// console.log(this.subTypeInfo)
},
remove: function(e) {
//移除图片
this.subTypeInfo.forEach(item => {
if(item.value == e.key ){
item.path = []
return
}
})
},
async viewCertificate() {
let data = await authentication.viewCertificate()
this.subTypeInfo = data.data
this.handleError(data, res => {
})
},
async next() {
let parames = {
sub_type:this.sub_type,
role_type:'buyer'
}
for (let i = 0; i < this.subTypeInfo.length; i++) {
if(this.subTypeInfo[i].path){
parames[this.subTypeInfo[i].value] = this.subTypeInfo[i].path[0]
}
}
let data = await authentication.authCertificate(parames)
uni.navigateTo({
url: '../auth/bank'
})
this.handleError(data, res => {
})
},
},
onShow() {
if(this.is_show){
this.viewCertificate()
}
},
created() {
}
}
</script>
<style lang="scss">
.content{
background-color:#F2F2F2;
.b_header {
padding-top: 60upx;
width: 100%;
z-index: 1000;
font-size: 32upx;
}
}
.progress{
color:#FFFFFF;
padding-top: 30px;
height:200upx;
}
.eg_img{
height: 200upx;
/* width:150upx; */
width: 300upx;
margin-bottom:20upx;
}
.list{
height:calc(100% - 240upx);
overflow-y: auto;
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<view class="content w-100 h-100">
<HeaderTop page_title='认证'></HeaderTop>
<view class=" list">
<view class="padding-30 x-bg-white d-flex j-sb">
<view class="d-flex">
<view class="font-weight font_28">当前企业信息</view>
<!-- <view class="margin-zy20 bg_F2F2F2" style="border-radius: 50upx; padding:2upx 14upx;">未认证</view> -->
<!-- <view class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #edca4a;">待审核</view>
<view class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #008be6;">已认证</view> -->
<view v-if="authStatus != 'auditing' && authStatus != 'waiting' && authStatus != 'finish'" class="margin-zy20 bg_F2F2F2" style="border-radius: 50upx; padding:2upx 14upx;">未认证</view>
<view v-if="authStatus == 'waiting'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx;background-color: #FF0000;">未通过</view>
<view v-if="authStatus == 'auditing'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #edca4a;">待审核</view>
<view v-if="authStatus == 'finish'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #008be6;">已认证</view>
</view>
<view v-if="authStatus != 'auditing' && authStatus != 'waiting' && authStatus != 'finish'" class="x-text-159 text-right lookAll" @tap='to_auth()'>去认证</view>
<view v-if="authStatus == 'waiting' || authStatus == 'finish'" class="x-text-159 text-right lookAll" @tap='to_auth()'>重新认证</view>
</view>
<view class="line bg_F2F2F2 w-100" style="height:10upx;" v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'"></view>
<view class="x-bg-white padding-30" v-if="authStatus == 'auditing' || authStatus == 'waiting'|| authStatus == 'finish'">
<view class="d-flex">
<view>企业名称</view>
<view class="margin-zy20">{{info.name}}</view>
</view>
<view class="d-flex">
<view>企业地址</view>
<view class="margin-zy20">{{regionsName}} {{info.business_address}}</view>
</view>
</view>
<view class="line bg_F2F2F2 w-100" style="height:10upx;" v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'"></view>
<view v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'">
<view class="padding-30 x-bg-white j-sb d-flex">
<view class="font-weight font_28">资质图片</view>
<view class="x-text-159 lookAll" @tap='look_all()'>查看全部></view>
</view>
<view class="imgBox d-flex j-sb padding-zy30">
<view class="x_textCenter margin-shu20" v-for="(item,index) of subTypeInfo" :key='index' v-if="item.path[0] || item.image">
<img :src="item.path[0]?item.path[0]:item.image" alt="" class='img'>
<view>{{item.name}}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
import authentication from '../../utils/models/auth.js'
export default {
data() {
return {
info: {},
regionsName: '',
subTypeInfo: [],
authStatus: 'authBaisc',
}
},
comments: {
HeaderTop
},
methods: {
// look_all
look_all() {
uni.navigateTo({
url: './look_Authentication'
})
},
// 去认证
to_auth() {
uni.navigateTo({
url: './baisc'
})
},
async checkAuth() {
let data = await authentication.checkAuth()
this.authStatus = data.data
if(this.authStatus == 'auditing' || this.authStatus == 'waiting' || this.authStatus == 'finish'){
this.viewBaisc()
this.viewCertificate()
}
this.handleError(data, res => {
})
},
async viewBaisc() {
let data = await authentication.viewBaisc()
console.log(data)
this.info = data.data
if (this.info) {
this.regionsName = this.info.area_name.map(item => item.area_name).join(' ')
}
this.handleError(data, res => {
})
},
async viewCertificate() {
let data = await authentication.viewCertificate()
this.subTypeInfo = data.data
this.handleError(data, res => {
})
}
},
onShow() {
this.checkAuth()
}
}
</script>
<style lang="scss">
.list {
.imgBox {
flex-wrap: wrap;
.img {
height: 208upx;
width: 327upx;
}
}
.lookAll {
border: 2upx solid #EB5159;
border-radius: 50upx;
padding: 2upx 14upx;
}
}
</style>

View File

@@ -0,0 +1,296 @@
<template>
<view class="content w-100 h-100">
<HeaderTop page_title='认证'></HeaderTop>
<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">
企业名称</view>
<input class="px-1 font-md flex-1" type="text" v-model="form.name" placeholder="请输入企业名称" :disabled="true" />
</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>
<view class="uni-list-cell-db px-1 font-md flex-1">
<picker @change="bindPickerChange" :value="index" :range="list" range-key="name" :disabled="true">
<view class="uni-input">{{list[index].name}}</view>
</picker>
</view>
</view>
<pick-regions :defaultRegions="defaultRegions" :defaultDisabled="true" @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">
注册区域
</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">
详细地址</view>
<input placeholder="(请输入营业执照上的详细地址)" class="px-1 font-md flex-1" type="text" v-model="form.detailPath" :disabled="true"/>
</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.linkman" :disabled="true"/>
</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.phone" :disabled="true"/>
</view>
<view class="line bg_F2F2F2 w-100" style="height:10upx;"></view>
<view class="x-bg-white font-weight padding-30">税务信息</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">
发票抬头</view>
<input class="px-1 font-md flex-1" type="text" v-model="bank.invoiceTitle" :disabled="true"/>
</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="bank.taxpayer" :disabled="true"/>
</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="bank.openingBank" :disabled="true"/>
</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="bank.hedgeFund" :disabled="true"/>
</view>
<view class="line bg_F2F2F2 w-100" style="height:10upx;"></view>
<view class="x-bg-white padding-30 font-weight">资质图片</view>
<view class="line bg_F2F2F2 w-100" style="height:10upx;"></view>
<view class="imgBox d-flex j-sb padding-30">
<view class="imgBox d-flex j-sb padding-zy30">
<view class="x_textCenter margin-shu20" v-for="(item,index) of subTypeInfo" :key='index' v-if="item.path[0] || item.image">
<!-- <img :src="item.path[0]?item.path[0]:item.image" alt="" class='img'> -->
<image :src="item.path[0]?item.path[0]:item.image" alt="" class='img'></image>
<view>{{item.name}}</view>
</view>
</view>
</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'
export default {
components: {
commonPopup,
HeaderTop,
pickRegions
},
data() {
return {
list_index: 1,
regions: [],
defaultRegions: ['安徽省', '合肥市', '蜀山区'],
area_id: 2,
list: [{
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: "", //企业名称
type: "", //企业类型
detailPath: "", //详细地址
linkman: "", //联系人姓名
kefu: '' //客服
},
bank:{
},
subTypeInfo:[],
}
},
methods: {
bindPickerChange: function(e) {
this.index = e.detail.value
this.form.sub_type = this.list[this.index].key
},
before() {
uni.navigateBack()
},
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,
}
let res = await authentication.authBaisc(parames);
uni.redirectTo({
url: '../auth/certificate'
})
this.handleError(res, res => {
})
},
async getInfo() {
let data = await authentication.viewBaisc()
let info = data.data
if (info) {
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
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('-')
},
async viewCertificate() {
let data = await authentication.viewCertificate()
this.subTypeInfo = data.data
this.handleError(data, res => {
})
},
async viewBank() {
let data = await authentication.viewBank()
let info = data.data
if (info) {
this.bank.invoiceTitle = info.invoice_title
this.bank.taxpayer = info.tax_number
this.bank.hedgeFund = info.bank_account
this.bank.openingBank = info.bank_name
this.bank.account_name = info.account_name
}
this.handleError(data, res => {
})
}
},
computed: {
regionsName() {
// 转为字符串
return this.regions.map(item => item.area_name).join(' ')
}
},
onShow() {
this.getInfo()
this.viewBank()
this.viewCertificate()
},
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 {
.imgBox {
flex-wrap: wrap;
.img {
height: 208upx;
width: 327upx;
}
}
.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>