1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171 |
- <template>
- <view class="content">
- <view v-if="videoPlay">
- <video controls id="myvideo" :src="dataDetails.videoAddressUrl" @fullscreenchange="screenChange"></video>
- </view>
- <view style='margin:10px 0 0 19px;font-size:12px;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='font-size:14px;' class='flex align-center' @click="selectData(0)">
- <view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
- {{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
- </view>
- <view>
- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
- </view>
- </view>
- </view>
- <view class="flex row noborder">
- <view class="left-text">统一社会信用代码</view>
- <u--input placeholder="请输入统一社会信用代码" inputAlign='right' border="none"
- v-model="dataDetails.unifiedSocialCreditCode" maxlength='18'>
- </u--input>
- </view>
- </view>
- <view class='wrap'>
- <view class="flex border-bottom mt20 align-center">
- <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 style='padding-top:10rpx;' class="flex border-bottom mt20 align-center flex-space-between">
- <view class="left">法定代表人姓名</view>
- <view>{{dataDetails.legalPersonName}}</view>
- </view>
- <view style='padding-top:10rpx;' class="flex border-bottom mt20 align-center">
- <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 style='padding-top:30rpx;' 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 style='padding-top:30rpx;' 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 style='padding-top:10rpx;' class="flex border-bottom mt20 align-center">
- <view class="left">身份证号</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 style='padding-top:10rpx;' class="flex flex-space-between row border-bottom mt20">
- <view class="left">身份证有效期</view>
- <view style='font-size:14px;' class='flex align-center' @click="selectData(1)">
- <view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
- {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
- </view>
- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
- <view>
- </view>
- </view>
- </view>
- <view style='padding-top:10rpx;' class="flex border-bottom mt20 align-center">
- <view class="left">通讯地址</view>
- <view class="flex right">
- <u--input disabledColor='#fff' placeholder="输入通讯地址" inputAlign='right' border="none"
- v-model="dataDetails.mailingAddress">
- </u--input>
- </view>
- </view>
- <view style='padding-top:10rpx;' class="flex row border-bottom mt20 flex-space-between">
- <view class="left">对公账户</view>
- <view class="flex">
- {{dataDetails.corporateAccount}}
- <!-- <u--input disabled placeholder="户名与企业名称一致" inputAlign='left' border="none"
- v-model="">
- </u--input> -->
- </view>
- </view>
- <view style='padding-top:10rpx;' class="flex row border-bottom mt20 align-center flex-space-between">
- <view class="left">卡号</view>
- <view class="flex">
- <u--input maxlength='19' placeholder="输入银行卡号码" inputAlign='left' border="none"
- v-model="dataDetails.bankCard">
- </u--input>
- <view class="" @click="uploadImg(5)">
- <image src="../../../static/images/xiangji-2.png" mode=""
- style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
- </view>
- </view>
- </view>
- <view style='padding-top:10rpx;' class="flex row border-bottom mt20 align-center">
- <view class="left">开户行</view>
- <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
- </u--input>
- </view>
- <view style='padding-top:10rpx;' class="flex row border-bottom mt20 align-center flex-space-between">
- <view class="left 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 style='margin-left:5px;' @click="manualInput" class="type">选择支行</view>
- </view>
- <view class="flex align-center" v-if="!isShowManualInput">
- <!-- <u--input @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
- </u--input> -->
- <view class="select-bankzh" @click="selectZhbank">
- {{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
- </view>
- <view style='margin-left:5px;' @click="manualInput" class="type">手动输入</view>
- </view>
- </view>
- <!-- <view class="flex mt20 align-center">
- <view class="left">注册实缴金额</view>
- <view class="flex right align-center">
- <u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none"
- v-model="dataDetails.registeredPaidAmount">
- </u--input>
- <view>万元</view>
- </view>
- </view> -->
- </view>
- <!-- http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 -->
- <!-- dataDetails.videoAddressUrl -->
- <!-- <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='#2772FB' type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')"
- size="mini">重新上传
- </u-button>
- </view>
- </view> -->
- <!-- <video class="myVideo" :src="dataDetails.videoAddressUrl" controls></video> -->
- <!-- <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 mt20 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="dataDetails.advanceFreightService == 1" 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='4'>
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- <view class="title">{{dataDetails.landOwnership=='自有'?'上传房产证':'上传租赁合同(扫描件或图片)'}}</view>
- <view style='position:relative;'>
- <view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(2)" class="picture">
- <image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
- </view>
- <view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(2)" 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>
- <u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
- @cancel='zhBankClose' @confirm='confirmBank'></u-picker>
- </u-picker>
- <!-- <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
- @change="changeHandler" @cancel="isShowcardValidity=false">
- </u-picker> -->
- <itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="1" :periodOfValidity="true" :futureYear="30"
- :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateValidityPeriod"
- @dateConfirm="confirmValidityPeriod"></itmister-date-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: '',
- value: false,
- columns: [],
- radioCustomStyle: {
- margin: '0 0 0 20rpx'
- },
- isShowBank: false,
- radiolist1: [{
- name: '自有',
- disabled: false
- },
- {
- name: '租赁',
- disabled: false
- },
- ],
- year: '',
- month: '',
- day: '',
- isShowManualInput: false,
- isShowcardValidity: false,
- uploadType: '',
- index: '',
- submitstatus: false,
- isShowimgType: false,
- checked: false,
- checked1: false,
- dataDetails: {
- phone: '',
- businessLicenseAddressUrl: '',
- propertyAddressUrl: '',
- advanceFreightService: 1,
- landOwnership: '自有',
- videoAddressUrl: null,
- legalPersonName: ''
- },
- dataType: ""
- }
- },
- onShow() {
- var viderSrc = uni.getStorageSync("videoSrc")
- if (viderSrc) {
- this.dataDetails.videoAddressUrl = viderSrc
- }
- },
- onLoad(options) {
- this.get_camera_permission()
- this.dataDetails.id = options.id
- this.dataDetails.commonId = this.userInfo.id
- this.dataDetails.phone = this.userInfo.phone
- console.log('```````````````')
- console.log(options)
- if (uni.getStorageSync('companydata')) {
- this.dataDetails = uni.getStorageSync('companydata')
- }
- this.dataDetails.videoAddressUrl = options.videoSrc
- this.getList()
- },
- 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('用户点击取消');
- }
- }
- });
- }
- },
- manualInput() {
- if (this.isShowManualInput) {
- if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "请填写卡号!",
- })
- return true
- }
- this.isShowBank = true
- } else {
- this.isShowBank = false
- }
- this.isShowManualInput = !this.isShowManualInput
- },
- selectData(num) {
- this.dataType = num
- switch (this.dataType) {
- case 0:
- if (this.dataDetails.businessTermDate == '长期') {
- this.year = this.dataDetails.businessTermDate
- } else {
- var arr = this.dataDetails.businessTermDate.split('-')
- this.year = arr[0]
- this.month = arr[1]
- this.day = arr[2]
- }
- break
- case 1:
- if (this.dataDetails.cardValidityDate == '长期') {
- this.year = this.dataDetails.cardValidityDate
- } else {
- var arr = this.dataDetails.cardValidityDate.split('-')
- this.year = arr[0]
- this.month = arr[1]
- this.day = arr[2]
- }
- break
- }
- 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
- },
- confirmBank(e) {
- console.log(e)
- this.dataDetails.bankDepositBranch = e.value[0]
- this.isShowBank = false
- },
- confirmValidityPeriod(date) {
- 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();
- 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()
- if (res.data) {
- _this.dataDetails = res.data
- if (_this.dataDetails.advanceFreightService == 1) {
- this.value = true
- } else {
- this.value = false
- }
- }
- })
- .catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- });
- },
- companyNameBlur() {
- this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
- commonId: this.userInfo.id,
- companyName: this.dataDetails.companyName
- }).then(res => {
- if (res.code == 200) {
- // that.dataDetails.legalPersonName = res.data.name
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration: 2000
- })
- }
- })
- .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.registeredPaidAmount)) {
- // 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.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
- // }
- },
- companyNamechange(e) {
- console.log(e)
- this.dataDetails.corporateAccount = e
- },
- submit() {
- if (this.validate()) return
- if (!this.submitstatus) {
- this.submitstatus = true
- 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/editCompanyInfo', _this.dataDetails).then(res => {
- uni.hideLoading()
- uni.$u.toast('提交成功')
- this.submitstatus = false
- uni.navigateBack({
- delta: 1
- })
- // this.goDetailPage('/pages/mine/company/index')
- })
- .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 {
- }
- },
- clickcancel() {
- this.isShowcardValidity = false
- },
- imgTypeSelect(val) {
- var _this = this
- // if (val.name == '相册') {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- // sourceType: ,
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- 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()
- } else {
- // uni.$u.toast('请上传营业执照');
- }
- }
- })
- .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);
- });
- _this.$forceUpdate()
- 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 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
- _this.columns = []
- if (res.data.bankNameZhihang) {
- _this.columns.push(res.data
- .bankNameZhihang)
- }
- _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.index = index
- },
- goDetailPage(src) {
- uni.setStorageSync('companydata', this.dataDetails);
- uni.$u.route(src);
- },
- selectValidityPeriod(type) {
- this.ValidityPeriodType = type
- this.isShowcardValidity = true
- },
- 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;
- }
- /deep/.uni-input-input:disabled {
- background: transparent;
- }
- page {
- background: #F5F6FA;
- }
- .next {
- color: #2772FB;
- font-size: 13px;
- }
- .wrap {
- background: #fff;
- padding: 10rpx 30rpx 20rpx;
- border-radius: 5px;
- margin: 20rpx;
- .left-text {
- // background: red;
- width: 50%;
- color: #333333;
- display: flex;
- align-items: center;
- font-size: 14px;
- }
- .left {
- width: 240rpx;
- font-size: 28rpx;
- }
- .right {
- font-size: 28rpx;
- width: calc(100% - 240rpx);
- }
- }
- .preview-card-img {
- overflow: hidden;
- // /deep/uni-image>div, uni-image>img {
- // transform: scale(1.5) rotate(-90deg);
- // }
- }
- .type {
- background: #2772FB;
- border-radius: 10rpx;
- color: white;
- box-sizing: border-box;
- padding: 4rpx 10rpx;
- font-size: 26rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 68rpx;
- min-width: 124rpx;
- }
- .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%;
- }
- .content1 {
- background: #fff;
- padding: 20rpx 20rpx 0;
- 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;
- }
- .title {
- color: #333333;
- margin: 20rpx 0;
- }
- }
- .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;
- }
- .newlyIncreased {
- width: 100%;
- height: 80rpx;
- margin: 0 auto;
- text-align: center;
- color: #fff;
- background: #2772FB;
- 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 {}
- </style>
|