123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574 |
- <template>
- <view class="center">
- <view>
- <view style="margin: 0 auto;" v-if="id1 != ''" @click="idUp">
- <image v-bind:src="id1" class="picture"></image>
- </view>
- <view style="margin: 0 auto;" v-if="id2 != ''" @click="idLow">
- <image v-bind:src="id2" class="picture"></image>
- </view>
- </view>
- <view class="information">
- <view class="c-row b-b">
- <text class="tit">姓名</text>
- <view class="con-list">
- <input placeholder="请填写姓名" name="input" v-model="DriverViewInfo.driverName"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">身份证号</text>
- <view class="con-list">
- <input placeholder="请填写身份证号" name="input" v-model="DriverViewInfo.numberCard"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">手机号</text>
- <view class="con-list">
- <input placeholder="请填写手机号" name="input" v-model="DriverViewInfo.driverPhone"></input>
- </view>
- </view>
- <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
- <button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
- class='getcode'>{{sendText}}</button>
- <view style='width:70%;position:relative;margin-left: 200px;'>
- <view class="con-list">
- <!-- style='width:70%;position:relative;margin-left: 200px;' -->
- <input v-model='verifyCode' placeholder="请输入验证码" type="text">
- </view>
- </view>
- </view>
- <view class="c-row ">
- <text class="tit">常驻城市</text>
- <view class="con-list">
- <input placeholder="请填写常驻城市" name="input" v-model="DriverViewInfo.residentCityProvincial"></input>
- </view>
- </view>
- <!-- </view>
- <view class="margin-top">
- <view class="information">
- <view class="c-row ">
- <text class="tit">车辆 -?</text>
- <view class="con-list">
- <image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate"></image>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">车牌号</text>
- <view class="con-list">
- <input placeholder="请填写车牌号" name="input" v-model="driverCarInfoList.carNumber"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">车型</text>
- <picker @change="ModelChange" :value="ModelIndex" :range="ModelType" class="con-list">
- <view class="picker ">
- {{ModelIndex>-1?ModelType[ModelIndex]:'请选择车型'}}
- </view>
- </picker>
- </view>
- <view class="c-row b-b">
- <text class="tit">不含车头车长(米)</text>
- <picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list">
- <view class="picker">
- {{carLongIndex>-1?carLongType[carLongIndex]:'请选择车长'}}
- </view>
- </picker>
-
- </view>
- <view class="c-row b-b">
- <text class="tit">载重(吨)</text>
- <view class="con-list">
- <input placeholder="请填写载重(吨)" name="input" v-model="driverCarInfoList.carLoad"></input>
- </view>
- </view>
- <view class="c-row ">
- <text class="tit">出厂年份</text>
- <view class="con-list">
- <input placeholder="请填写出厂年份" name="input" v-model="driverCarInfoList.yearManufacture"></input>
- </view>
- </view>
-
-
- </view>
- <button class="btn">添加车辆</button>
- </view> -->
- <!-- <view class="margin-top">
- <view class="information">
- <view class="c-row ">
- <text class="tit">账户 -?</text>
- <view class="con-list">
- <image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate"></image>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">账户类型</text>
- <view class="con-list">
- <input placeholder="请填写账户类型" name="input" v-model="driverPayeeInfoList.accountType"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">银行卡照片(可选)</text>
- <view class="con-list">
- <input placeholder="请上传照片" name="input" v-model="driverPayeeInfoList.payeeAddressUrl"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">银行卡号</text>
- <view class="con-list">
- <input placeholder="请输入银行卡号" name="input" v-model="driverPayeeInfoList.bankCard"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">开户行</text>
- <view class="con-list">
- <input placeholder="请输入开户行" name="input" v-model="driverPayeeInfoList.bankDeposit"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">开户支行</text>
- <view class="con-list">
- <input placeholder="请输入开户支行" name="input" v-model="driverPayeeInfoList.bankDepositBranch"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">收款人姓名</text>
- <view class="con-list">
- <input placeholder="请输入收款人姓名" name="input" v-model="driverPayeeInfoList.payeeName"></input>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">收款人身份证号</text>
- <view class="con-list">
- <input placeholder="请输入收款人身份证号" name="input" v-model="driverPayeeInfoList.payeeNumberCard"></input>
- </view>
- </view>
- </view >
- <button class="btn">添加账号</button>
- </view>
- <view class="margin-top">
- <view class="labels">上传附件</view>
- <button type="default" @click="travel">行驶证</button>
- <view style="width: 100px;margin: 0 auto;" v-if="travels != ''">
- <image v-bind:src = "travels" style="width: 100px;height: 100px;"></image>
- </view>
- <button type="default" @click="drive">驾驶证</button>
- <view style="width: 100px;margin: 0 auto;" v-if="drives != ''">
- <image v-bind:src = "drives" style="width: 100px;height: 100px;"></image>
- </view>
- <button type="default" @click="operate">道路运营证</button>
- <view style="width: 100px;margin: 0 auto;" v-if="operates != ''">
- <image v-bind:src = "operates" style="width: 100px;height: 100px;"></image>
- </view>
- <button type="default" @click="practice">从业资格证</button>
- <view style="width: 100px;margin: 0 auto;" v-if="practices != ''">
- <image v-bind:src = "practices" style="width: 100px;height: 100px;"></image>
- </view>
- </view>
- <view class="padding flex flex-direction">
- <button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button>
- </view>-->
- </view>
- <button class="btns btn" @click="jumpUrl">下一步</button>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- data() {
- return {
- goods: {},
- ModelIndex: '高栏',
- Model: '',
- ModelType: ["高栏", "集装箱", "自卸车"],
- carLong: '',
- carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
- id: [],
- id1: "../../static/img/authentication/identityup(2).png",
- id2: "../../static/img/authentication/identitylow(2).png",
- travels: "",
- drives: "",
- practices: "",
- operates: "",
- sendText: '获取验证码',
- sendDisabled: false,
- sendText: '获取验证码',
- ModelIndex: '高栏',
- Model: '',
- ModelType: ["高栏", "集装箱", "自卸车"],
- carLong: '',
- carLongIndex: 0,
- carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
- driverCarInfoList: {},
- driverPayeeInfoList: {},
- DriverViewInfo: {
- },
- verifyCode: "",
- codestatus: false,
- customerPhone: '',
- addressUrl: [],
- personImgs:{},
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo'])
- },
- methods: {
- // phoneinput(e) {
- // if (e.detail.value.length == 11) {
- // this.codestatus = true
- // }
- // },
- jumpUrl() {
- if (this.id[0] == "" || this.id[0] == null) {
- this.$api.msg('请上传身份证正面!')
- return
- }
- if (this.id[1] == "" || this.id[1] == null) {
- this.$api.msg('请上传身份证反面!')
- return
- }
- if (!this.DriverViewInfo.driverName) {
- this.$api.msg('姓名不能为空')
- return
- }
- if (!this.DriverViewInfo.numberCard) {
- this.$api.msg('身份证号不能为空')
- return
- }
- if (!this.DriverViewInfo.driverPhone) {
- this.$api.msg('手机号不能为空')
- return
- }
- if (!this.DriverViewInfo.residentCityProvincial) {
- this.$api.msg('常住城市不能为空')
- return
- }
- this.DriverViewInfo.cardAddressUrl = this.id.toString()
- var model = JSON.stringify(this.DriverViewInfo);
- uni.navigateTo({
- url: `/pageD/identity/driverIdentityTwo?DriverViewInfo=` + model,
- })
- },
- getcode() {
- var that = this
- console.log(that.DriverViewInfo.driverPhone)
- if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
- this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
- customerPhone: that.DriverViewInfo.driverPhone
- }).then(res => {
- if (res.data.code == 200) {
- that.sendDisabled = true
- let sec = 60
- let interval = setInterval(() => {
- sec--;
- that.sendText = sec + 's后重发'
- if (sec <= 0) {
- that.sendDisabled = false
- that.sendText = "获取验证码"
- clearInterval(interval)
- }
- }, 1000)
- } else {
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 2000
- })
- }
- })
- .catch(res => {
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 2000
- })
- });
- } else {
- uni.showToast({
- title: '请输入正确的手机号',
- icon: 'none',
- duration: 2000
- })
- }
- },
- ModelChange(e) {
- this.ModelIndex = e.detail.value
- this.Model = this.ModelType[this.ModelIndex];
- this.driverCarInfoList.carModel = this.ModelType[this.ModelIndex];
- },
- carLongChange(e) {
- this.carLongIndex = e.detail.value
- this.carLong = this.carLongType[this.carLongIndex];
- },
- idUp() {
- var that = this
- wx.chooseImage({
- success: function(res) {
- wx.uploadFile({
- url: 'https://www.zthymaoyi.com/upload/admin',
- filePath: res.tempFilePaths[0],
- name: 'file',
- success(res) {
- var data = res.data
- var strToObj = JSON.parse(data)
- that.id[0] = strToObj.url
- that.id1 = strToObj.url
- that.personImgs.personImg = that.id[0]
- that.$api.doRequest('get', '/driverViewInfo/personShibie', that.personImgs).then(res => {
- console.log("成功!")
- that.DriverViewInfo.driverName = res.data.data.recPerson
- that.DriverViewInfo.numberCard = res.data.data.recPersonNo
- console.log(that.DriverViewInfo.driverName)
- }).catch(res => {
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 2000
- })
- })
- }
- })
- }
- })
- },
- idLow() {
- var that = this
- wx.chooseImage({
- success: function(res) {
- wx.uploadFile({
- url: 'https://www.zthymaoyi.com/upload/admin',
- filePath: res.tempFilePaths[0],
- name: 'file',
- success(res) {
- var data = res.data
- var strToObj = JSON.parse(data)
- that.id[1] = strToObj.url
- that.id2 = strToObj.url
- }
- })
- }
- })
- },
- commit() {
- this.DriverViewInfo.addressUrl = this.addressUrl.toString()
- this.DriverViewInfo.driverCarInfoList = [this.driverCarInfoList]
- this.DriverViewInfo.driverPayeeInfoList = [this.driverPayeeInfoList]
- this.DriverViewInfo.commonId = this.userInfo.id
- this.DriverViewInfo.cardAddressUrl = this.id.toString()
- this.DriverViewInfo.pcFlag = 0
- this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
- console.log(this.DriverViewInfo, "司机对象")
- this.$api.doRequest('post', '/driverViewInfo/api/addInfo', this.DriverViewInfo).then(res => {}).catch(
- res => {
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 2000
- })
- })
- },
- }
- }
- </script>
- <style scoped>
- .center {
- padding: 10px 20px;
- background-color: #F5F6FA;
- }
- .labels {
- font-size: 16px;
- font-weight: 400;
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 20rpx 30rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- color: #AFB3BF;
- line-height: 40rpx;
- text-align: right;
- padding-right: 20rpx;
- font-size: 14px;
- }
- .getcode {
- font-size: 14px;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- color: #AFB3BF;
- background: #F5F6F9;
- height: 30px;
- line-height: 30px;
- }
- .getcode.active {
- border: none;
- }
- .uni-navigator {
- display: inline-block;
- color: #22C572;
- }
- .getcode.active {
- background: #22C572;
- color: #fff;
- }
- .labels {
- font-size: 16px;
- font-weight: 400;
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 20rpx 30rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- color: #303133;
- line-height: 40rpx;
- text-align: right;
- padding-right: 20rpx;
- font-size: 14px;
- }
- .verificationCode {
- margin-top: 20px;
- background: #F5F6F9;
- color: #AFB3BF;
- }
- .verificationCode:after {
- border: none;
- }
- .verificationCode.active {
- background: #22C572;
- color: #fff;
- }
- .getcode {
- font-size: 14px;
- position: absolute;
- /* right:0; */
- top: 50%;
- transform: translateY(-50%);
- color: #AFB3BF;
- background: #F5F6F9;
- height: 30px;
- line-height: 30px;
- }
- .getcode:after {
- border: none;
- }
- .getcode.active {
- background: #22C572;
- color: #fff;
- }
- .picture {
- width: 100%;
- height: 220px;
- text-align: center;
- margin-top: 10px;
- }
- .tit {
- font-size: 14px;
- }
- .labels {
- margin: 5px 10px;
- }
- .information {
- margin-top: 10px;
- background-color: #FFFFFF;
- border-radius: 20px;
- }
- .btn {
- margin-top: 10px;
- background-color: #FFFFFF;
- border-radius: 25px;
- border: none;
- }
- /* //清除 */
- .eliminate {
- width: 20px;
- height: 20px;
- float: right;
- }
- /* 下一步 */
- .btn {
- margin-top: 10px;
- background-color: #FFFFFF;
- border-radius: 25px;
- border: none;
- }
- .btns {
- background-color: #22C572;
- }
- </style>
|