12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226 |
- <template>
- <view class="content">
- <!-- <web-view :src="srcHandler()" v-if="isSshowPlayVideo"></web-view> -->
- <!-- <u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="true">
- <view class="u-nav-slot" slot="left">
- <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
- </view>
- <view class="u-nav-slot" slot="right">
- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
- </view>
- </u-navbar> -->
- <view v-show="videoPlay">
- <video controls id="myvideo" :src="dataDetails.videoAddressUrl" @fullscreenchange="screenChange"></video>
- </view>
- <view style='margin:10px 0 0 19px;font-size:13px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
- <view class='content1'>
- <view class="title">上传营业执照</view>
- <view style='position:relative;' @click="uploadImg(1)">
- <view v-if='!dataDetails.businessLicenseAddressUrl' class="picture picture7">
- <image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传营业执照</view>
- </view>
- <view v-if='dataDetails.businessLicenseAddressUrl' @click.stop="uploadImg(1)"
- class="preview-card-img picture ">
- <view @click.stop="delCard(1)">
- <image class='del-card' src="@/static/images/common/quxiao@2x.png">
- </image>
- </view>
- <image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
- </view>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">营业期限截止日期</view>
- <view style='' class='flex flex-space-between align-center' @click="selectData(0)">
- <view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
- {{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
- </view>
- <u-icon name="arrow-right" color="#7E7E7E" size="14"></u-icon>
- </view>
- </view>
- <view class="flex row noborder flex-space-between">
- <view class="left-text">统一社会信用代码</view>
- <u--input @blur='codeBlur' placeholder="请输入统一社会信用代码" inputAlign='right' border="none"
- v-model="dataDetails.unifiedSocialCreditCode" maxlength='18'>
- </u--input>
- </view>
- </view>
- <view class='wrap'>
- <view class="flex border-bottom mt20 flex-space-between">
- <view class="left">企业名称</view>
- <view class="flex right">
- <u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='right' border="none"
- v-model="dataDetails.companyName" @blur='companyNameBlur'>
- </u--input>
- </view>
- </view>
- <view class="flex border-bottom mt20 flex-space-between">
- <view class="left">法定代表人姓名</view>
- <view class="flex">
- <!-- <u--input disabled placeholder="输入法定代表人姓名" inputAlign='right' border="none"
- v-model="dataDetails.legalPersonName" >
- </u--input> -->
- {{dataDetails.legalPersonName}}
- </view>
- </view>
- <view class="flex border-bottom mt20 flex-space-between">
- <view class="left">联系电话</view>
- <view class="flex right">
- <u--input disabledColor='#fff' placeholder="输入联系电话" maxlength="15" inputAlign='right' border="none"
- v-model="dataDetails.phone">
- </u--input>
- </view>
- </view>
- <view class="flex border-bottom mt20 flex-space-between">
- <view class="left">通讯地址</view>
- <view class="flex right">
- <u--input disabledColor='#fff' placeholder="输入通讯地址" maxlength="15" inputAlign='right' border="none"
- v-model="dataDetails.mailingAddress">
- </u--input>
- </view>
- </view>
- <view class="title">上传身份证人像面</view>
- <view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传身份证人像面</view>
- </view>
- <view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
- <image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
- </view>
- <view class="title">上传身份证国徽面</view>
- <view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传身份证国徽面</view>
- </view>
- <view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
- <image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
- </view>
- <view class="flex border-bottom mt20 flex-space-between">
- <view class="left-text">身份证号</view>
- <view class="flex right">
- <u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='right' border="none"
- v-model="dataDetails.cardNumber">
- </u--input>
- </view>
- </view>
- <view class="flex border-bottom mt20 flex-space-between align-center">
- <view class="left-text">身份证有效期</view>
- <view class='flex' @click="selectData(1)">
- <span :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
- {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证有效期'}}
- </span>
- <u-icon name="arrow-right" color="#7E7E7E" size="14"></u-icon>
- </view>
- </view>
- <view class="flex row border-bottom mt20 flex-space-between">
- <view class="left-text">对公账户</view>
- <view class="flex">
- <!-- <u--input disabled placeholder="户名与企业名称一致" inputAlign='right' border="none"
- v-model="dataDetails.corporateAccount">
- </u--input> -->
- {{dataDetails.corporateAccount}}
- </view>
- </view>
- <view class="flex row border-bottom mt20 flex-space-between">
- <view class="left-text">卡号</view>
- <view class="flex right">
- <u--input maxlength='19' placeholder="输入银行卡号码" inputAlign='right' border="none"
- v-model="dataDetails.bankCard">
- </u--input>
- <view class="" @click="uploadImg(5)" style="display: flex;align-items: center;margin-left: 20rpx;">
- <image src="../../../static/images/xiangji-2.png" mode="" style="width: 40rpx ;height: 40rpx;">
- </image>
- </view>
- </view>
- </view>
- <view class="flex row border-bottom mt20 flex-space-between">
- <view class="left-text">开户行</view>
- <view class="flex right">
- <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
- </u--input>
- </view>
- </view>
- <view class="flex row border-bottom mt20 flex-space-between noborder">
- <view class="left-text khzh-styel">开户支行</view>
- <view class="flex align-center" v-if="isShowManualInput">
- <u--input class="select-bankzh point" placeholder="输入开户支行" inputAlign='left' border="none"
- v-model="dataDetails.bankDepositBranch">
- </u--input>
- <view @click="manualInput" class="type">选择支行</view>
- </view>
- <view class="flex align-center" v-if="!isShowManualInput">
- <view class="select-bankzh" @click="selectZhbank">
- {{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
- </view>
- <view @click="manualInput" class="type">手动输入</view>
- </view>
- </view>
- <!-- <view class="flex row noborder">
- <view class="left-text">身份证截止日期</view>
- <view class="" @click="selectData(1)">
- {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期>'}}
- </view>
- </view> -->
- </view>
- <!-- <view class='content3' v-if="!dataDetails.videoAddressUrl"
- @click="goDetailPage('/pages/mine/company/companyvideo')">
- <view class="left-text">视频验证(打开摄像头并阅读提示文字)</view>
- <view class="video-icon">
- <u-icon size="40" name="camera-fill"></u-icon>
- </view>
- </view> -->
- <!-- <view class='content3' v-if="dataDetails.videoAddressUrl">
- <view class="flex row noborder mt20 flex-space-between">
- <view class="left-text">视频验证(点击按钮播放视频)</view>
- <view>
- <u-button color='#F5BA3C' type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')"
- size="mini">重新上传
- </u-button>
- </view>
- </view>
- <view>
- <view class="video-icon">
- <u-icon size="40" name="play-circle-fill" @click="videoShow()"></u-icon>
- </view>
- </view>
- </view> -->
- <view class='content3'>
- <view class="flex row noborder flex-space-between">
- <view class="left-text">申请开通平台垫付运费业务</view>
- <view>
- <u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20"></u-switch>
- </view>
- </view>
- </view>
- <!-- <view v-if="value" class='content1'>
- <view class="flex row">
- <view class="left-text">企业用地是否自有</view>
- <view class="flex right">
- <u-radio-group placement="row" class="select-type" v-model="dataDetails.landOwnership">
- <u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
- :label="item.name" :name="item.name" @change="radioChange($event,item)" labelSize='12px'
- :iconSize='10'>
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- <view class="title">{{dataDetails.landOwnership=='自有'?'上传房产证':'上传租赁合同(扫描件或图片)'}}</view>
- <view style='position:relative;'>
- <view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(4)" class="picture">
- <image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
- </view>
- <view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(4)" style='position:relative;'
- class="preview-card-img picture">
- <view @click.stop="delCard(2)">
- <image class='del-card' src="@/static/images/common/quxiao@2x.png">
- </image>
- </view>
- <image class="uploadimage uploadimage-small" :src="dataDetails.propertyAddressUrl" mode="aspectFit">
- </image>
- </view>
- </view>
- <view v-if="dataDetails.landOwnership=='租赁'" class="flex border-bottom mt20 align-center">
- <view class="left-text">场地租赁截止日期</view>
- <view style='font-size:14px;width:50%;' class='flex flex-space-between'
- @click="selectValidityPeriod(1)">
- <view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">
- {{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}
- </view>
- <view>
- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
- </view>
- </view>
- </view>
- </view> -->
- <view class="content4">
- <view class="flex service align-center">
- <u--image @click='consent'
- :src="consentStatus==true?'../../../static/images/mine/duihao@2x.png':'../../../static/images/mine/wxz.png'"
- width="12px" height="12px"></u--image>
- 我已阅读并同意
- <navigator
- url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
- class="path" hover-class="navigator-hover">《服务协议》</navigator>和<navigator
- url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
- class="path" hover-class="navigator-hover">《隐私政策》</navigator>
- </view>
- </view>
- <view class='footer'>
- <!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
- <view @click="$u.throttle(submit(), 1000)" class='newlyIncreased'>提交</view>
- </view>
- <itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" :futureYear="30"
- ref="dateValidityPeriod" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
- <u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
- @cancel='zhBankClose' @confirm='confirmBank'></u-picker>
- </u-picker>
- <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
- @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
- </u-action-sheet>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- import upload from '@/components/upload.vue';
- import permision from "@/js_sdk/wa-permission/permission.js"
- import uploadImage from '@/components/ossutil/uploadFile.js';
- export default {
- components: {},
- data() {
- return {
- videoPlay: false,
- isSshowPlayVideo: false,
- srcHandler() {
- return `/hybrid/html/play.html?src=${this.dataDetails.videoAddressUrl}`
- },
- consentStatus: false,
- ValidityPeriodType: '',
- isShowManualInput: false,
- value: false,
- isShowBank: false,
- columns: [],
- overdueContent: '',
- radioCustomStyle: {
- margin: '0 0 0 20rpx'
- },
- radiolist1: [{
- name: '自有',
- disabled: false
- },
- {
- name: '租赁',
- disabled: false
- },
- ],
- uploadType: '',
- index: '',
- isShowimgType: false,
- validityPeriod: [],
- submitstatus: false,
- checked: false,
- checked1: false,
- dataDetails: {
- legalPersonName: '',
- cardAddressUrl: '',
- cardBackAddressUrl: '',
- cardNumber: '',
- cardValidityDate: '',
- phone: '',
- businessLicenseAddressUrl: '',
- propertyAddressUrl: '',
- advanceFreightService: 0,
- landOwnership: '自有',
- videoAddressUrl: null,
- corporateAccount: ''
- },
- dataType: ""
- }
- },
- onShow() {
- var viderSrc = uni.getStorageSync("videoSrc")
- if (viderSrc) {
- this.dataDetails.videoAddressUrl = viderSrc
- }
- },
- onLoad(options) {
- this.dataDetails.videoAddressUrl = options.videoSrc
- // #ifdef APP-PLUS
- this.get_camera_permission()
- //#endif
- this.getName()
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- },
- methods: {
- async get_camera_permission() {
- var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
- if (photol == false) {
- uni.showModal({
- title: '提示',
- content: '您已经关闭相机权限,去设置',
- success: function(res) {
- if (res.confirm) {
- permision.gotoAppPermissionSetting()
- // plus.runtime.openURL("app-settings:");
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- },
- selectData(num) {
- this.dataType = num
- if (num == 0) {
- this.overdueContent = '营业执照已过期'
- } else if (num == 1) {
- this.overdueContent = '身份证已过期'
- }
- this.$refs.dateValidityPeriod.show()
- },
- zhBankClose() {
- this.isShowBank = false
- },
- // 选择支行
- selectZhbank() {
- if (uni.$u.test.isEmpty(this.columns)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "支行获取失败,请手动输入!",
- })
- return true
- }
- this.isShowBank = true
- },
- manualInput() {
- if (this.isShowManualInput) {
- // this.isShowBank = true
- // if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "请填写卡号!",
- // })
- // return true
- // }
- // if (this.columns.length == 0) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "请选择手动输入!",
- // })
- // return true
- // }
- } else {
- // this.isShowBank = false
- }
- this.isShowManualInput = !this.isShowManualInput
- },
- confirmBank(e) {
- console.log(e)
- this.dataDetails.bankDepositBranch = e.value[0]
- this.isShowBank = false
- },
- // uploadImg() {
- // this.uploadType = 5
- // this.imgTypeSelect()
- // // this.isShowimgType = true
- // },
- confirmValidityPeriod(date) {
- console.log(date, this.dataType)
- switch (this.dataType) {
- case 0:
- this.dataDetails.businessTermDate = date.date
- break
- case 1:
- this.dataDetails.cardValidityDate = date.date
- break
- }
- this.$forceUpdate()
- },
- screenChange(e) {
- let fullScreen = e.detail.fullScreen; // 值true为进入全屏,false为退出全屏
- console.log(e, "全屏");
- if (!fullScreen) {
- //退出全屏
- this.videoPlay = false; // 隐藏播放盒子
- }
- },
- // 触发全屏播放的点击事件
- videoShow() {
- this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传
- this.videoContext.requestFullScreen({
- direction: 270
- });
- this.videoContext.play();
- console.log(this.videoContext)
- this.videoPlay = true; // 显示播放盒子
- },
- // getList(){
- // uni.showLoading({
- // title: '加载中',
- // mask:true
- // })
- // var _this=this
- // this.$request.baseRequest('get', '/companyInfo/getCompanyInfo', {id:this.dataDetails.id}).then(res => {
- // uni.hideLoading()
- // _this.dataDetails=res.data
- // })
- // .catch(res => {
- // uni.hideLoading()
- // uni.showToast({
- // title: res.message,
- // icon: 'none',
- // duration: 2000
- // })
- // });
- // },
- companyNamechange(e) {
- console.log(e)
- this.dataDetails.corporateAccount = e
- },
- companyNameBlur() {
- this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
- commonId: this.userInfo.id,
- companyName: this.dataDetails.companyName
- }).then(res => {
- console.log(res)
- if (res.code == 200) {
- // that.dataDetails.legalPersonName = res.data.name
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- }
- })
- .catch(res => {
- console.log(res)
- uni.hideLoading()
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- });
- },
- codeBlur() {
- this.$request.baseRequest('get', '/companyInfo/checkCreditCode', {
- unifiedSocialCreditCode: this.dataDetails.unifiedSocialCreditCode
- }).then(res => {
- console.log(res)
- if (res.code == 200) {
- // that.dataDetails.legalPersonName = res.data.name
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- }
- })
- .catch(res => {
- console.log(res)
- uni.hideLoading()
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- });
- },
- getName() {
- let that = this
- this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
- commonId: this.userInfo.id
- }).then(res => {
- if (res.code == 200) {
- console.log(this, res.data)
- if (uni.getStorageSync('companydata')) {
- this.dataDetails = uni.getStorageSync('companydata')
- if (!this.dataDetails.businessLicenseAddressUrl) {
- this.dataDetails.businessLicenseAddressUrl = ""
- }
- }
- that.dataDetails.commonId = that.userInfo.id
- that.dataDetails.phone = that.userInfo.phone
- that.dataDetails.legalPersonName = res.data.name
- that.dataDetails.cardAddressUrl = res.data.cardAddressUrl
- that.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
- that.dataDetails.cardNumber = res.data.cardNumber
- that.dataDetails.cardValidityDate = res.data.cardValidityDate
- }
- })
- .catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- });
- },
- loadedmetadata(event) {
- console.log(event)
- },
- loadeddata(event) {
- console.log(event)
- },
- videoErrorCallback: function(e) {
- uni.showModal({
- content: e.target.errMsg,
- showCancel: false
- })
- },
- validate() {
- if (uni.$u.test.isEmpty(this.dataDetails.companyName)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "企业名称不能为空!",
- })
- return true
- }
- if (this.dataDetails.companyName.length < 4 || this.dataDetails.companyName.length > 25) {
- this.$refs.uToast.show({
- type: 'error',
- message: "企业名称字数在4-25个字!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.legalPersonName)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "法定代表人姓名不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.phone)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "联系电话不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.mailingAddress)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "通讯地址不能为空!",
- })
- return true
- }
- // if (uni.$u.test.isEmpty(this.dataDetails.registeredPaidAmount)) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "注册实缴金额不能为空!",
- // })
- // return true
- // }
- if (this.dataDetails.cardNumber.length != 18) {
- this.$refs.uToast.show({
- type: 'error',
- message: "身份证号输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.businessLicenseAddressUrl)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "营业执照不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.businessTermDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "营业期限截止日期不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.unifiedSocialCreditCode)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "统一社会信用代码不能为空!",
- })
- return true
- }
- if (this.dataDetails.unifiedSocialCreditCode.length != 18) {
- this.$refs.uToast.show({
- type: 'error',
- message: "统一社会信用代码输出错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "卡号不能为空!",
- })
- return true
- }
- if (this.dataDetails.bankCard.length < 16 || this.dataDetails.bankCard.length > 19) {
- this.$refs.uToast.show({
- type: 'error',
- message: "卡号输出错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "开户行不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "开户支行不能为空!",
- })
- return true
- }
- //先注释掉
- // if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
- // .propertyAddressUrl)) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "房产证或租赁合同不能为空!",
- // })
- // return true
- // }
- // if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
- // if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "场地租赁截止日期不能为空!",
- // })
- // return true
- // }
- // }
- // if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
- // this.$refs.uToast.show({
- // type: 'error',
- // message: "视频认证不能为空!",
- // })
- // return true
- // }
- },
- submit() {
- if (this.validate()) return
- if (!this.consentStatus) {
- uni.showToast({
- title: '请勾选协议',
- icon: 'none',
- duration: 2000
- })
- return
- }
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- var _this = this
- this.$request.baseRequest('post', '/companyInfo/api/addCompanyInfo', _this.dataDetails).then(res => {
- uni.hideLoading()
- uni.$u.toast('提交成功')
- this.submitstatus = false
- uni.removeStorageSync("videoSrc")
- uni.navigateBack({
- delta: 1
- })
- })
- .catch(res => {
- uni.hideLoading()
- this.submitstatus = false
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- });
- },
- consent() {
- this.consentStatus = !this.consentStatus
- },
- change(e) {
- if (this.value) {
- this.$set(this.dataDetails, 'advanceFreightService', 1)
- } else {
- this.$set(this.dataDetails, 'advanceFreightService', 0)
- }
- },
- radioChange(n) {
- console.log('radioChange', n);
- this.dataDetails.landOwnership = n
- console.log('this.dataDetails.landOwnership', this.dataDetails.landOwnership);
- },
- delCard(type) {
- if (type == 1) {} else {
- }
- this.dataDetails.businessLicenseAddressUrl = ''
- this.$forceUpdate()
- },
- navBack() {
- uni.navigateBack();
- },
- checkedchange() {
- this.checked = !this.checked
- if (this.checked) {
- this.dataDetails.landOwnership = 0
- this.checked1 = false
- } else {
- }
- },
- checkedchange1() {
- this.checked1 = !this.checked1
- if (this.checked1) {
- this.dataDetails.landOwnership = 1
- this.checked = false
- } else {
- }
- },
- imgTypeSelect(val) {
- var _this = this
- // if (val.name == '相册') {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- // sourceType: ,
- success: function(res) {
- console.log(_this.uploadType);
- uploadImage('image', res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功回调函数
- switch (_this.uploadType) {
- case 1:
- _this.dataDetails.businessLicenseAddressUrl = result
- // 识别
- _this.$request.baseRequest('get',
- '/cargoOwnerInfo/api/licenseShibie', {
- licenseImg: result,
- }).then(res => {
- if (res.code == '200') {
- if (res.data) {
- if (res.data.validPeriod == '29991231') {
- _this.dataDetails.businessTermDate = '长期'
- }
- _this.dataDetails.unifiedSocialCreditCode = res
- .data.regNum
- // _this.dataDetails.legalPersonName = res.data
- // .licensePerson
- _this.dataDetails.companyName = res.data
- .licenseName
- _this.dataDetails.corporateAccount = _this
- .dataDetails.companyName
- console.log(res)
- _this.$forceUpdate()
- }
- }
- })
- .catch(res => {
- console.log(res)
- uni.$u.toast(res.message);
- });
- console.log(_this.dataDetails.businessLicenseAddressUrl)
- break
- // 身份正面
- case 2:
- _this.dataDetails.cardAddressUrl = result
- // 识别
- _this.$request.baseRequest('get',
- '/driverInfo/personShibie', {
- personImg: result,
- flag: 1
- }).then(res => {
- _this.dataDetails.cardNumber = res.data.recPersonNo
- _this.$forceUpdate()
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break
- case 3:
- _this.dataDetails.cardBackAddressUrl = result
- // 识别
- _this.$request.baseRequest('get',
- '/driverInfo/personShibie', {
- personImg: result,
- flag: 2
- }).then(res => {
- if (res.data.idCardValidity) {
- let date = res.data.idCardValidity.split("-")[1]
- _this.dataDetails.cardValidityDate = date.replace(
- '.', '-').replace('.', '-')
- }
- _this.$forceUpdate()
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- _this.$forceUpdate()
- break;
- case 4:
- _this.dataDetails.propertyAddressUrl = result
- break;
- case 5:
- _this.$request.baseRequest('get',
- '/driverInfo/bankShibie', {
- bankImg: result,
- }).then(res => {
- console.log(res)
- _this.dataDetails.payeeAddressUrl = result
- if (res.data.bankNo) {
- _this.dataDetails.bankCard = res.data.bankNo
- }
- if (res.data.bankName) {
- _this.dataDetails.bankDeposit = res.data.bankName
- }
- // 开户支行LIst
- if (res.data.bankNameZhihang) {
- _this.columns.push(res.data
- .bankNameZhihang)
- } else {
- _this.columns = []
- }
- _this.$forceUpdate()
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- }
- }
- )
- }
- });
- // } else {
- // uni.chooseImage({
- // count: 1,
- // sourceType: ['camera'],
- // success: function(res) {
- // console.log(JSON.stringify(res.tempFilePaths));
- // uploadImage('image', res.tempFilePaths[0], 'appData/',
- // result => {
- // // 上传成功回调函数
- // console.log('图片地址', result)
- // switch (_this.uploadType) {
- // // 身份正面
- // case 1:
- // // 识别
- // _this.$request.baseRequest('get',
- // '/cargoOwnerInfo/api/licenseShibie', {
- // licenseImg: result,
- // }).then(res => {
- // if (res.code == '200') {
- // if (res.data.validPeriod == '29991231') {
- // _this.dataDetails.businessTermDate = '长期'
- // }
- // _this.dataDetails.unifiedSocialCreditCode = res
- // .data.regNum
- // _this.dataDetails.legalPersonName = res.data
- // .licensePerson
- // _this.dataDetails.companyName = res.data
- // .licenseName
- // console.log(res)
- // _this.$forceUpdate()
- // }
- // })
- // .catch(res => {
- // uni.$u.toast(res.message);
- // });
- // _this.dataDetails.businessLicenseAddressUrl = result
- // console.log(_this.dataDetails.businessLicenseAddressUrl)
- // break
- // // 身份反面
- // case 2:
- // _this.dataDetails.propertyAddressUrl = result
- // console.log(_this.dataDetails.propertyAddressUrl)
- // break
- // case 3:
- // break;
- // }
- // }
- // )
- // }
- // });
- // }
- },
- uploadImg(type) {
- this.uploadType = type
- this.imgTypeSelect()
- // this.isShowimgType = true
- // this.index = index
- },
- goDetailPage(src) {
- uni.setStorageSync('companydata', this.dataDetails);
- uni.$u.route(src);
- },
- selectValidityPeriod(type) {
- this.ValidityPeriodType = type
- this.imgTypeSelect()
- },
- changeHandler(e) {
- const {
- columnIndex,
- value,
- values,
- index,
- picker = this.$refs.uPicker
- } = e
- // if (columnIndex === 0) {
- //
- // if (e.index != 0) {
- // picker.setColumnValues(1, this.validityPeriod[1].shift())
- // }
- // } else if (columnIndex === 1) {
- // if (e.index != 0) {
- // picker.setColumnValues(2, this.validityPeriod[2].shift())
- // }
- // }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- padding: 0 0 200rpx 0;
- }
- page {
- background: #F5F6FA;
- }
- /deep/uni-image.uploadimage-small {
- width: 100% !important;
- }
- .title {
- color: #333333;
- margin: 20rpx 0;
- }
- .next {
- color: #F5BA3C;
- font-size: 13px;
- }
- .wrap {
- background: #fff;
- padding: 20rpx 30rpx;
- border-radius: 5px;
- margin: 20rpx;
- .left {
- // width: 50%;
- // font-size: 28rpx;
- }
- .left-text {
- // background: red;
- // width: 50%;
- color: #333333;
- display: flex;
- align-items: center;
- // font-size: 14px;
- }
- .right {
- font-size: 32rpx;
- width: calc(100% - 240rpx);
- }
- }
- .preview-card-img {
- // /deep/uni-image>div, uni-image>img {
- // transform: scale(1.5) rotate(-90deg);
- // }
- }
- .picture {
- margin-top: 20rpx;
- background: #F5F6FA;
- width: 100%;
- height: 440rpx;
- border-radius: 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #6A7282;
- }
- .picture1 {
- background: url(../../../static/images/mine/zm.png);
- background-size: 100% 100%;
- }
- .picture2 {
- background: url(../../../static/images/mine/gh.png);
- background-size: 100% 100%;
- }
- .type {
- background: #F5BA3C;
- border-radius: 10rpx;
- color: white;
- box-sizing: border-box;
- padding: 8rpx 14rpx;
- // font-size: 26rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-left: 8rpx;
- // height: 68rpx;
- min-width: 160rpx;
- }
- .content1 {
- background: #fff;
- padding: 20rpx;
- margin: 20rpx;
- border-radius: 10rpx;
- .row {
- border-bottom: 1px solid #EEEEEE;
- padding-bottom: 28rpx;
- margin-top: 26rpx;
- }
- .left-text {
- // background: red;
- // width: 320rpx;
- color: #333333;
- display: flex;
- align-items: center;
- // font-size: 14px;
- }
- .picture {
- position: relative;
- width: 100%;
- height: 440rpx;
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- .text {
- margin-top: 20rpx;
- }
- }
- .picture7 {
- background: url(../../../static/mine/cy.png);
- background-size: 100% 100%;
- }
- .xj-image {
- width: 100rpx;
- height: 100rpx;
- }
- }
- .content2,
- .content3,
- .content4 {
- background: #fff;
- padding: 20rpx;
- margin: 20rpx;
- border-radius: 10rpx;
- }
- .u-input {
- // font-size: 16px;
- }
- .content4 {}
- .del-card {
- position: absolute;
- top: -10rpx;
- right: -6rpx;
- width: 80rpx;
- height: 80rpx;
- z-index: 9;
- }
- .footer {
- position: fixed;
- background: #fff;
- width: 100%;
- bottom: 0;
- left: 0;
- padding: 40rpx 60rpx;
- box-sizing: border-box;
- z-index: 9999;
- }
- .newlyIncreased {
- width: 100%;
- height: 80rpx;
- margin: 0 auto;
- text-align: center;
- color: #fff;
- background: #F5BA3C;
- background-size: 100%;
- border-radius: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .u-checkbox-label--left {
- margin: 0 10px;
- }
- .service {
- font-size: 24rpx;
- margin: 20rpx;
- justify-content: center;
- /deep/.u-image {
- margin: 0 20rpx;
- }
- }
- .video-icon {
- margin-top: 20rpx;
- background: #F5F6FA;
- width: 212rpx;
- height: 211rpx;
- border-radius: 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #6A7282;
- }
- .myVideo {}
- .khzh-styel {
- min-width: 160rpx;
- }
- // /deep/.u-input:disabled{
- // background:transparent !important;
- // }
- </style>
|