|
@@ -8,8 +8,7 @@
|
|
|
<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(1,1)"
|
|
|
- class="preview-card-img picture">
|
|
|
+ <view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)" class="preview-card-img picture">
|
|
|
<view @click.stop="delCard(1)">
|
|
|
<image class='del-card' src="@/static/images/common/quxiao@2x.png">
|
|
|
</image>
|
|
@@ -32,68 +31,79 @@
|
|
|
</view>
|
|
|
<view class="flex row">
|
|
|
<view class="left-text">姓名</view>
|
|
|
- <u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.driverName">
|
|
|
+ <u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.name">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
<view class="flex row">
|
|
|
<view class="left-text">身份证号</view>
|
|
|
- <u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none" v-model="dataDetails.numberCard" maxlength="18">
|
|
|
+ <u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none"
|
|
|
+ v-model="dataDetails.idCard" maxlength="18">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
|
|
|
<view class="flex row flex-space-between">
|
|
|
<view class="left-text">身份证有效期</view>
|
|
|
- <view class="" @click="selectValidityPeriod">
|
|
|
- {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期>'}}
|
|
|
+ <!-- <view class="" @click="selectValidityPeriod(1)">
|
|
|
+ {{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:"选择身份证起始日期>"}}
|
|
|
+ {{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'选择身份证截止日期>'}}
|
|
|
+ </view> -->
|
|
|
+ <view style='font-size:14px;' class="" @click="selectValidityPeriod(3)">
|
|
|
+ {{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:'起始时间'}}
|
|
|
+ </view>
|
|
|
+ <view>~</view>
|
|
|
+ <view style='font-size:14px;' class="" @click="selectValidityPeriod(1)">
|
|
|
+ {{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'结束时间'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="content3 flex s-row" v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index'>
|
|
|
- <view class="flex">
|
|
|
+ <!-- v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index' -->
|
|
|
+ <view class="content3 flex s-row">
|
|
|
+ <!-- <view class="flex">
|
|
|
银行卡-{{index+1}}
|
|
|
- </view>
|
|
|
- <view @click="delBankNumber(dataDetails.hyDriverPayeeInfoList,index)" class="" v-if="index!=0">
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="">
|
|
|
<image class='del-bank' src="@/static/images/common/quxiao@2x.png">
|
|
|
</image>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="title">上传银行卡卡号页</view>
|
|
|
- <view @click="uploadImg(3,index)" class="picture picture3" v-if="!item.payeeAddressUrl">
|
|
|
+ <view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.payeeAddressUrl">
|
|
|
<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
|
|
|
<view class="text">上传银行卡卡号页</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view v-if="item.payeeAddressUrl" @click.stop="uploadImg(3,index)" class="preview-card-img picture">
|
|
|
+
|
|
|
+ <view v-if="dataDetails.payeeAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
|
|
|
<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
|
|
|
<view @click.stop="delCard(3)">
|
|
|
<image class='del-card' src="@/static/images/common/quxiao@2x.png">
|
|
|
</image>
|
|
|
</view>
|
|
|
- <image class="" :src="item.payeeAddressUrl" mode="aspectFit"></image>
|
|
|
+ <image class="" :src="dataDetails.payeeAddressUrl" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="flex row flex-space-between">
|
|
|
<view class="left-text">银行卡卡号</view>
|
|
|
<view class="flex">
|
|
|
- <u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard" maxlength="19">
|
|
|
+ <u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="dataDetails.bankCard"
|
|
|
+ maxlength="19">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex row">
|
|
|
<view class="left-text">开户行</view>
|
|
|
- <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="item.bankDeposit">
|
|
|
+ <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
<view class="flex row">
|
|
|
<view class="left-text khzh-styel">开户支行</view>
|
|
|
<view class="flex" v-if="isShowManualInput">
|
|
|
<u--input class="select-bankzh" placeholder="输入开户支行" inputAlign='right' border="none"
|
|
|
- v-model="item.bankDepositBranch">
|
|
|
+ v-model="dataDetails.bankDepositBranch">
|
|
|
</u--input>
|
|
|
- <view @click="manualInput(index)" class="type">选择支行</view>
|
|
|
+ <view @click="manualInput" class="type">选择支行</view>
|
|
|
</view>
|
|
|
<view class="flex align-center" v-if="!isShowManualInput">
|
|
|
- <view
|
|
|
- :style="{'color':item.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
|
|
|
- {{item.bankDepositBranch?item.bankDepositBranch:'选择开户支行'}}
|
|
|
+ <view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}"
|
|
|
+ style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
|
|
|
+ {{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
|
|
|
</view>
|
|
|
<view @click="manualInput" class="type">手动输入</view>
|
|
|
</view>
|
|
@@ -101,39 +111,43 @@
|
|
|
<view class="flex row flex-space-between">
|
|
|
<view class="left-text">收款人</view>
|
|
|
<view class="flex">
|
|
|
- <u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName" readonly>
|
|
|
+ <u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none"
|
|
|
+ v-model="dataDetails.payeeName" readonly>
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-picker :show="isShowBank" :columns="bankType[index]" :closeOnClickOverlay='true' @close='zhBankClose'
|
|
|
+ <u-picker :show="isShowBank" :columns="bankType[0]" :closeOnClickOverlay='true' @close='zhBankClose'
|
|
|
@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
|
|
|
</u-picker>
|
|
|
</view>
|
|
|
<view class="content3 flex s-row">
|
|
|
<view class="title">道路运输许可证</view>
|
|
|
- <view @click="uploadImg(4)" class="picture picture8" v-if="!dataDetails.operationCertificate">
|
|
|
+ <view @click="uploadImg(4)" class="picture picture8" v-if="!dataDetails.roadTransportOperationLicense">
|
|
|
<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
|
|
|
<view class="text">上传道路运输许可证</view>
|
|
|
</view>
|
|
|
- <view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(4)" class="preview-card-img picture">
|
|
|
+ <view v-if="dataDetails.roadTransportOperationLicense" @click.stop="uploadImg(4)"
|
|
|
+ class="preview-card-img picture">
|
|
|
<view @click.stop="delCard(4)">
|
|
|
<image class='del-card' src="@/static/images/common/quxiao@2x.png">
|
|
|
</image>
|
|
|
</view>
|
|
|
- <image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
|
|
|
+ <image class="" :src="dataDetails.roadTransportOperationLicense" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="flex row">
|
|
|
<view class="left-text">许可证编号</view>
|
|
|
- <u--input maxlength='12' placeholder="输入许可证编号" inputAlign='right' border="none"
|
|
|
- v-model="dataDetails.operationCertificateNumber">
|
|
|
+ <u--input maxlength='20' placeholder="输入许可证编号" inputAlign='right' border="none"
|
|
|
+ v-model="dataDetails.roadTransportOperationLicenseNo">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
<view class="flex row flex-space-between">
|
|
|
<view class="left-text">许可证有效期</view>
|
|
|
- <view class="" @click="selectValidityPeriod(4)">
|
|
|
- <view :style="{'color':dataDetails.operationCertificateValidityDate?'#000':'rgb(192, 196, 204)'}">
|
|
|
- {{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期'}}
|
|
|
- <image v-if='!dataDetails.operationCertificateValidityDate' style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
|
|
|
+ <view class="" @click="selectValidityPeriod(2)">
|
|
|
+ <view
|
|
|
+ :style="{'color':dataDetails.roadTransportOperationLicenseValidityDate?'#000':'rgb(192, 196, 204)'}">
|
|
|
+ {{dataDetails.roadTransportOperationLicenseValidityDate?dataDetails.roadTransportOperationLicenseValidityDate:'选择有效期'}}
|
|
|
+ <image v-if='!dataDetails.roadTransportOperationLicenseValidityDate'
|
|
|
+ style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -142,15 +156,23 @@
|
|
|
@confirm="confirmValidityPeriod" @change="changeHandler" @cancel='isShowcardValidity= false'>
|
|
|
</u-picker>
|
|
|
<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
|
|
|
- :checkYear="year" :checkMonth="month" :checkDay="day"
|
|
|
- ref="dateEl" :startYear="1999" :futureYear="30"
|
|
|
- @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
|
+ :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :startYear="1999" :futureYear="30"
|
|
|
+ @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
|
|
|
+ <itmister-date-picker :overdueContent="'许可证已过期'" :dateStatus="status" :periodOfValidity="true"
|
|
|
+ :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl1" :startYear="1999" :futureYear="30"
|
|
|
+ @dateConfirm="confirmValidityPeriod1"></itmister-date-picker>
|
|
|
+ <itmister-date-picker :dateStatus="0" :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl2"
|
|
|
+ :startYear="1980" :futureYear="30" @dateConfirm="confirmValidityPeriod2">
|
|
|
+ </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>
|
|
|
+ <u-modal :show="auditShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
|
|
|
+ confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
|
+ <u-toast ref="uToast"></u-toast>
|
|
|
<view class="content4">
|
|
|
<view class="next-btn" @click="next()">提交</view>
|
|
|
</view>
|
|
@@ -171,90 +193,64 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- canvasSiz: {
|
|
|
- width: 188,
|
|
|
- height: 273
|
|
|
- },
|
|
|
- status:1,
|
|
|
- tips: '',
|
|
|
- // refCode: null,
|
|
|
+ status: 1,
|
|
|
seconds: 30,
|
|
|
- year:'',
|
|
|
- month:'',
|
|
|
- day:'',
|
|
|
- radiolist1: [{
|
|
|
- name: '男',
|
|
|
- disabled: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '女',
|
|
|
- disabled: false
|
|
|
- },
|
|
|
-
|
|
|
- ],
|
|
|
+ year: '',
|
|
|
+ month: '',
|
|
|
+ day: '',
|
|
|
validityPeriod: [],
|
|
|
isShowcardValidity: false,
|
|
|
uploadType: '',
|
|
|
isShowimgType: false,
|
|
|
dataDetails: {
|
|
|
commonId: '',
|
|
|
- driverName: '',
|
|
|
- driverSex: '',
|
|
|
- driverCall: '',
|
|
|
- driverPhone: '',
|
|
|
- numberCard: '',
|
|
|
+ name: '',
|
|
|
+ idCard: '',
|
|
|
cardAddressUrl: '',
|
|
|
cardBackAddressUrl: '',
|
|
|
- cardValidityDate: '',
|
|
|
- driverType: '',
|
|
|
- driverLicenseHomePage: '',
|
|
|
- driverLicenseBackPage: '',
|
|
|
- driverLicenseValidityDate: '',
|
|
|
- drivingLicenseHomePage: '',
|
|
|
- drivingLicenseBackPage: '',
|
|
|
- drivingLicenseValidityDate: '',
|
|
|
- trailerLicenseHomePage: '',
|
|
|
- trailerLicenseBackPage: '',
|
|
|
- trailerLicenseValidityDate: '',
|
|
|
- qualificationCertificate: '',
|
|
|
- qualificationCertificateValidityDate: '',
|
|
|
- operationCertificate: '',
|
|
|
- operationCertificateValidityDate: '',
|
|
|
- trailerOperationCertificate: '',
|
|
|
- trailerOperationCertificateValidityDate: '',
|
|
|
- hyDriverPayeeInfoList: [{
|
|
|
- payeeAddressUrl: '',
|
|
|
- bankCard: '',
|
|
|
- bankDeposit: '',
|
|
|
- bankDepositBranch: '',
|
|
|
- payeeName: '',
|
|
|
- }],
|
|
|
-
|
|
|
+ cardValidityEndDate: '',
|
|
|
+ roadTransportOperationLicense: '',
|
|
|
+ roadTransportOperationLicenseValidityDate: "",
|
|
|
},
|
|
|
action: this.$helper.ossUploadUrl,
|
|
|
// maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
|
// isAdd: true,
|
|
|
imagesrc: null,
|
|
|
- isShowBank:false,
|
|
|
+ isShowBank: false,
|
|
|
isShowManualInput: false,
|
|
|
bankType: [],
|
|
|
+ auditShow: false,
|
|
|
+ alertTitle: "",
|
|
|
+ checkType:"",
|
|
|
};
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
_this = this;
|
|
|
- console.log(this.userInfo)
|
|
|
this.get_camera_permission()
|
|
|
- // this.dataDetails.driverPhone = this.userInfo.phone
|
|
|
- this.dataDetails.commonId = this.userInfo.id
|
|
|
- //获取认证状态
|
|
|
- this.getAuthenticationStatus()
|
|
|
+ if (options.data) { //编辑
|
|
|
+ this.dataDetails = JSON.parse(options.data)
|
|
|
+ this.checkType = "2" //编辑
|
|
|
+ } else {
|
|
|
+ //获取认证状态
|
|
|
+ this.getAuthenticationStatus()
|
|
|
+ this.dataDetails.commonId = this.userInfo.id
|
|
|
+ this.checkType = "1" //新增
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
|
},
|
|
|
methods: {
|
|
|
+ cancelClick() {
|
|
|
+ this.auditShow = false
|
|
|
+ },
|
|
|
+ next() {
|
|
|
+ if (this.validate()) return
|
|
|
+ this.alertTitle = "确定提交认证信息?"
|
|
|
+ this.auditShow = true
|
|
|
+ },
|
|
|
confirmBank(e) {
|
|
|
- console.log(e)
|
|
|
this.dataDetails.hyDriverPayeeInfoList[this.index].bankDepositBranch = e.value[0]
|
|
|
this.isShowBank = false
|
|
|
},
|
|
@@ -270,20 +266,20 @@
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.isShowBank = true
|
|
|
},
|
|
|
manualInput(val) {
|
|
|
this.index = val
|
|
|
if (this.isShowManualInput) {
|
|
|
- if (!this.dataDetails.hyDriverPayeeInfoList[this.index].payeeAddressUrl) {
|
|
|
+ if (!this.dataDetails.payeeAddressUrl) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "请先上传银行卡!",
|
|
|
})
|
|
|
return true
|
|
|
- } else if (this.dataDetails.hyDriverPayeeInfoList[this.index].payeeAddressUrl && uni.$u.test.isEmpty(
|
|
|
- this.bankType[this.index])) {
|
|
|
+ } else if (this.dataDetails.payeeAddressUrl && uni.$u.test.isEmpty(
|
|
|
+ this.bankType[0])) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "请选择手动输入开户支行!",
|
|
@@ -297,20 +293,20 @@
|
|
|
this.isShowManualInput = !this.isShowManualInput
|
|
|
},
|
|
|
async get_camera_permission() {
|
|
|
- var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
- if(photol == false){
|
|
|
+ var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
+ if (photol == false) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '您已经关闭相册权限,去设置',
|
|
|
- success: function (res) {
|
|
|
+ success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
permision.gotoAppPermissionSetting()
|
|
|
- // plus.runtime.openURL("app-settings:");
|
|
|
+ // plus.runtime.openURL("app-settings:");
|
|
|
} else if (res.cancel) {
|
|
|
console.log('用户点击取消');
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
changeHandler(e) {
|
|
@@ -333,9 +329,6 @@
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
- codeChange(text) {
|
|
|
- this.tips = text;
|
|
|
- },
|
|
|
getCode() {
|
|
|
if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.dataDetails.driverPhone)) {
|
|
|
if (this.$refs.uCode.canGetCode) {
|
|
@@ -374,34 +367,25 @@
|
|
|
start() {
|
|
|
// uni.$u.toast('倒计时开始');
|
|
|
},
|
|
|
-
|
|
|
- // 性别切换
|
|
|
- radioChange(n) {
|
|
|
- console.log('radioChange', n);
|
|
|
- this.dataDetails.driverSex = n
|
|
|
- },
|
|
|
//判断是否是初次认证
|
|
|
getAuthenticationStatus() {
|
|
|
this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
|
|
|
driverPhone: this.userInfo.phone,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.dataDetails = res.data
|
|
|
- // this.dataDetails.hyDriverPayeeInfoList = [{
|
|
|
- // payeeAddressUrl: '',
|
|
|
- // bankCard: '',
|
|
|
- // bankDeposit: '',
|
|
|
- // bankDepositBranch: '',
|
|
|
- // payeeName: '',
|
|
|
- // }]
|
|
|
- // this.dataDetails.driverName = res.data.driverName
|
|
|
- // this.dataDetails.driverSex = res.data.driverSex
|
|
|
- // this.dataDetails.driverCall = res.data.driverCall
|
|
|
- // this.dataDetails.driverPhone = res.data.driverPhone
|
|
|
- // this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
|
|
|
- // this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
|
|
|
- // this.dataDetails.numberCard = res.data.numberCard
|
|
|
- // this.dataDetails.cardValidityDate = res.data.cardValidityDate
|
|
|
+ // this.dataDetails = res.data
|
|
|
+ this.dataDetails.accountNumber = res.data.accountNumber
|
|
|
+ this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
|
|
|
+ this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
|
|
|
+ this.dataDetails.name = res.data.driverName
|
|
|
+ this.dataDetails.idCard = res.data.numberCard
|
|
|
+ this.dataDetails.cardValidityStartDate = res.data.cardValidityStartDate
|
|
|
+ this.dataDetails.cardValidityEndDate = res.data.cardValidityDate
|
|
|
+ this.dataDetails.payeeAddressUrl = res.data.hyDriverPayeeInfoList[0].payeeAddressUrl
|
|
|
+ this.dataDetails.bankCard = res.data.hyDriverPayeeInfoList[0].bankCard
|
|
|
+ this.dataDetails.bankDeposit = res.data.hyDriverPayeeInfoList[0].bankDeposit
|
|
|
+ this.dataDetails.bankDepositBranch = res.data.hyDriverPayeeInfoList[0].bankDepositBranch
|
|
|
+ this.dataDetails.payeeName = res.data.hyDriverPayeeInfoList[0].payeeName
|
|
|
}
|
|
|
})
|
|
|
.catch(res => {
|
|
@@ -409,22 +393,37 @@
|
|
|
});
|
|
|
},
|
|
|
confirmValidityPeriod(date) {
|
|
|
- console.log('confirm', date)
|
|
|
- this.dataDetails.cardValidityDate = date.date
|
|
|
+ this.dataDetails.cardValidityEndDate = date.date
|
|
|
},
|
|
|
- selectValidityPeriod() {
|
|
|
- if(this.dataDetails.cardValidityDate!='长期'){
|
|
|
- var arr=this.dataDetails.cardValidityDate.split('-')
|
|
|
- this.year=arr[0]
|
|
|
- this.month=arr[1]
|
|
|
- this.day=arr[2]
|
|
|
- }
|
|
|
- if(this.dataDetails.cardValidityDate=='长期'){
|
|
|
- this.year='长期'
|
|
|
- this.month=''
|
|
|
- this.day=''
|
|
|
+ confirmValidityPeriod1(date) {
|
|
|
+ this.dataDetails.roadTransportOperationLicenseValidityDate = date.date
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ confirmValidityPeriod2(date) {
|
|
|
+ debugger
|
|
|
+ this.dataDetails.cardValidityStartDate = date.date
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+
|
|
|
+ selectValidityPeriod(num) {
|
|
|
+ if (num == 1) {
|
|
|
+ if (this.dataDetails.cardValidityEndDate && this.dataDetails.cardValidityEndDate != '长期') {
|
|
|
+ var arr = this.dataDetails.cardValidityEndDate.split('-')
|
|
|
+ this.year = arr[0]
|
|
|
+ this.month = arr[1]
|
|
|
+ this.day = arr[2]
|
|
|
+ }
|
|
|
+ if (this.dataDetails.cardValidityEndDate == '长期') {
|
|
|
+ this.year = '长期'
|
|
|
+ this.month = ''
|
|
|
+ this.day = ''
|
|
|
+ }
|
|
|
+ this.$refs.dateEl.show()
|
|
|
+ } else if (num == 2) {
|
|
|
+ this.$refs.dateEl1.show()
|
|
|
+ } else if (num == 3) {
|
|
|
+ this.$refs.dateEl2.show()
|
|
|
}
|
|
|
- this.$refs.dateEl.show()
|
|
|
},
|
|
|
//设置图片
|
|
|
setImage(e) {
|
|
@@ -459,14 +458,25 @@
|
|
|
|
|
|
},
|
|
|
delCard(type) {
|
|
|
- var _this=this
|
|
|
+ var _this = this
|
|
|
switch (type) {
|
|
|
case 1:
|
|
|
_this.dataDetails.cardAddressUrl = ""
|
|
|
break;
|
|
|
+
|
|
|
case 2:
|
|
|
_this.dataDetails.cardBackAddressUrl = ""
|
|
|
break;
|
|
|
+ case 3:
|
|
|
+ _this.dataDetails.payeeAddressUrl = ""
|
|
|
+ _this.dataDetails.bankCard = ""
|
|
|
+ _this.dataDetails.bankDeposit = ""
|
|
|
+ _this.dataDetails.bankDepositBranch = ""
|
|
|
+ _this.$forceUpdate()
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ _this.dataDetails.roadTransportOperationLicense = ""
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
// 上传图片
|
|
@@ -474,58 +484,64 @@
|
|
|
// console.log(val)
|
|
|
console.log(this.uploadType)
|
|
|
// if (val.name == '相册') {
|
|
|
- uni.chooseImage({
|
|
|
- count: 1,
|
|
|
- // sourceType: this.$helper.chooseImage.sourceType,
|
|
|
- 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.dataDetails.cardAddressUrl = result
|
|
|
- // 识别
|
|
|
- _this.$request.baseRequest('get',
|
|
|
- '/driverInfo/personShibie', {
|
|
|
- personImg: result,
|
|
|
- flag:1
|
|
|
- }).then(res => {
|
|
|
- if(res.data){
|
|
|
- _this.dataDetails.cardAddress=res.data.recPersonAddr
|
|
|
- // _this.dataDetails.numberCard = res.data.recPersonNo
|
|
|
- if (res.data.recPerson) {
|
|
|
- _this.dataDetails.driverName = res.data.recPerson
|
|
|
- _this.dataDetails.driverCall = res.data.recPerson.substring(0,1)
|
|
|
- }
|
|
|
- _this.dataDetails.driverBirthday=res.data.recPersonBrithday
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
- uni.$u.toast(res.message);
|
|
|
- });
|
|
|
- break
|
|
|
- // 身份反面
|
|
|
- case 2:
|
|
|
- _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('.', '-')
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1,
|
|
|
+ // sourceType: this.$helper.chooseImage.sourceType,
|
|
|
+ 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.dataDetails.cardAddressUrl = result
|
|
|
+ // 识别
|
|
|
+ _this.$request.baseRequest('get',
|
|
|
+ '/driverInfo/personShibie', {
|
|
|
+ personImg: result,
|
|
|
+ flag: 1
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ _this.dataDetails.cardAddress = res.data
|
|
|
+ .recPersonAddr
|
|
|
+ _this.dataDetails.idCard = res.data.recPersonNo
|
|
|
+ if (res.data.recPerson) {
|
|
|
+ _this.dataDetails.name = res.data
|
|
|
+ .recPerson
|
|
|
+ // _this.dataDetails.driverCall = res.data
|
|
|
+ // .recPerson.substring(0, 1)
|
|
|
}
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
- uni.$u.toast(res.message);
|
|
|
- });
|
|
|
- break
|
|
|
- case 3:
|
|
|
+ _this.dataDetails.driverBirthday = res.data
|
|
|
+ .recPersonBrithday
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
+ break
|
|
|
+ // 身份反面
|
|
|
+ case 2:
|
|
|
+ _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.cardValidityEndDate = date
|
|
|
+ .replace(
|
|
|
+ '.', '-').replace('.', '-')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
_this.bankType[_this.index] = []
|
|
|
_this.$request.baseRequest('get',
|
|
|
'/driverInfo/bankShibie', {
|
|
@@ -536,7 +552,8 @@
|
|
|
if (res.data) {
|
|
|
if (res.data.bankNo) {
|
|
|
_this.dataDetails.hyDriverPayeeInfoList[_this
|
|
|
- .index].bankCard = res.data.bankNo.replace(/\s*/g,"")
|
|
|
+ .index].bankCard = res.data.bankNo
|
|
|
+ .replace(/\s*/g, "")
|
|
|
}
|
|
|
if (res.data.bankName) {
|
|
|
_this.dataDetails.hyDriverPayeeInfoList[_this
|
|
@@ -553,130 +570,167 @@
|
|
|
.catch(res => {
|
|
|
uni.$u.toast(res.message);
|
|
|
});
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- _this.dataDetails.cardBackAddressUrl = result
|
|
|
-
|
|
|
- break;
|
|
|
- }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ _this.dataDetails.roadTransportOperationLicense = result
|
|
|
+ _this.$forceUpdate()
|
|
|
+ break;
|
|
|
}
|
|
|
- )
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- // } else {
|
|
|
- // switch (this.uploadType) {
|
|
|
- // case 0:
|
|
|
- // break
|
|
|
- // case 1:
|
|
|
- // uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=idcardface');
|
|
|
- // console.log('身份正面')
|
|
|
- // break
|
|
|
- // case 2:
|
|
|
- // uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=badge');
|
|
|
- // console.log('身份反面')
|
|
|
- // break
|
|
|
- // case 3:
|
|
|
- // break
|
|
|
- // case 4:
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- },
|
|
|
- next(val) {
|
|
|
- if (this.validate()) return
|
|
|
- uni.$u.route('/pages/mine/editDriverCertificationNext', {
|
|
|
- data: JSON.stringify(this.dataDetails),
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
+ confirmClick(val) {
|
|
|
+ this.auditShow = false
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ debugger
|
|
|
+ console.log(this.checkType)
|
|
|
+ if (this.checkType == 1) {
|
|
|
+ this.$request.baseRequest('post', '/hyCarCaptainInfo/api/addCarCaptain', this.dataDetails).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ uni.hideLoading()
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "提交成功,待平台审核!",
|
|
|
+ complete() {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // uni.$u.route('/pages/mine/index');
|
|
|
+ } else {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ }
|
|
|
+ }).catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
+ } else if (this.checkType == 2) {
|
|
|
+ this.$request.baseRequest('post', '/hyCarCaptainInfo/api/editCarCaptain', this.dataDetails).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ uni.hideLoading()
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "修改成功,待平台审核!",
|
|
|
+ complete() {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ }
|
|
|
+ }).catch(res => {
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
validate() {
|
|
|
// true 为校验不通过
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.driverName)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "司机姓名不能为空!",
|
|
|
+ message: "身份证人像页不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
-
|
|
|
- if (!uni.$u.test.chinese(this.dataDetails.driverName)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "姓名为汉字!",
|
|
|
+ message: "身份证国徽页不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.driverCall)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.name)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "司机称呼不能为空!",
|
|
|
+ message: "姓名不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (!uni.$u.test.chinese(this.dataDetails.driverCall)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.idCard)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "称呼为汉字!",
|
|
|
+ message: "身份证号不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.driverPhone)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.cardValidityStartDate)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "联系电话不能为空!",
|
|
|
+ message: "身份证起始日期不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (!uni.$u.test.mobile(this.dataDetails.driverPhone)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.cardValidityEndDate)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "电话号码格式错误!",
|
|
|
+ message: "身份证截止日期不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- // for (let i = 0; i < this.dataDetails.hyDriverCarInfoList.length; i++) {
|
|
|
- // let _item = this.dataDetails.hyDriverCarInfoList[i]
|
|
|
- // if (uni.$u.test.isEmpty(_item.carNumber)) {
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // type: 'error',
|
|
|
- // message: "车牌号不能为空!",
|
|
|
- // })
|
|
|
- // return true
|
|
|
- // }
|
|
|
- // if (uni.$u.test.isEmpty(_item.fileList1)) {
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // type: 'error',
|
|
|
- // message: "人车合影不能为空!",
|
|
|
- // })
|
|
|
- // return true
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "身份证人像页不能为空!",
|
|
|
+ message: "请上传银行卡卡号页!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "身份证国徽页不能为空!",
|
|
|
+ message: "银行卡卡号不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.cardValidityDate)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "身份证人有效截止日期不能为空!",
|
|
|
+ message: "开户行不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (uni.$u.test.isEmpty(this.dataDetails.cardAddress)) {
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
- message: "身份证地址为空!",
|
|
|
+ message: "开户支行不能为空!",
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.payeeName)) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "收款人不能为空!",
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicense)) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "道路运输许可证不能为空!",
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseNo)) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "许可证编号不能为空!",
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseValidityDate)) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "许可证有效期不能为空!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
@@ -919,6 +973,7 @@
|
|
|
justify-content: center;
|
|
|
background: white;
|
|
|
padding: 40rpx 20rpx 50rpx 20rpx;
|
|
|
+
|
|
|
.next-btn {
|
|
|
background: rgb(39, 114, 251);
|
|
|
width: 90%;
|
|
@@ -953,20 +1008,25 @@
|
|
|
height: 80rpx;
|
|
|
z-index: 9;
|
|
|
}
|
|
|
- /deep/.u-radio{
|
|
|
- margin-left:10px;
|
|
|
+
|
|
|
+ /deep/.u-radio {
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
+
|
|
|
/deep/.uni-input-input:disabled {
|
|
|
background: #fff;
|
|
|
}
|
|
|
+
|
|
|
/deep/.u-radio-group--row {
|
|
|
- justify-content: flex-end;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
- /deep/.u-textarea{
|
|
|
- padding:9px 0;
|
|
|
+
|
|
|
+ /deep/.u-textarea {
|
|
|
+ padding: 9px 0;
|
|
|
}
|
|
|
- /deep/.u-textarea__field{
|
|
|
- color:#000;
|
|
|
- text-align:right;
|
|
|
+
|
|
|
+ /deep/.u-textarea__field {
|
|
|
+ color: #000;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
</style>
|