12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838 |
- <!-- 管理车辆 -->
- <template>
- <view @click='hidden' class="content">
- <view class="flex s-row container">
- <view class="flex row">
- <view class="left-text">车型</view>
- <view class="color" @click="selectCarModel">{{dataDetails.carCategory}} {{dataDetails.carType}}</view>
- <view>></view>
- <u-picker :show="carModel" :columns="carModelColumns" :closeOnClickOverlay='true' @close='carModelClose'
- @cancel='carModelClose' @confirm='confirmCarModel' @change="changeCarModel"></u-picker>
- </view>
- <view class="title">道路运输证</view>
- <view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
- <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(8)" 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.operationCertificate" 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>
- </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>
- </view>
- </view>
- <view v-if="sign == '挂车'">
- <view class="title">挂车道路运输证</view>
- <view @click="uploadImg(9)" class="picture picture9" v-if="!dataDetails.trailerOperationCertificate">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传挂车道路运输证</view>
- </view>
- <view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(9)"
- 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="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
- </view>
- </view>
- <view class="flex row" v-if="sign == '挂车'">
- <view class="left-text">挂车道路运输证号</view>
- <u--input maxlength='12' placeholder="输入挂车道路运输证号" inputAlign='right' border="none"
- v-model="dataDetails.trailerOperationCertificateNumber">
- </u--input>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">挂车道路运输证有效期</view>
- <view class="" @click="selectValidityPeriod(5)">
- <view
- :style="{'color':dataDetails.trailerOperationCertificateValidityDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期'}}
- <image v-if='!dataDetails.trailerOperationCertificateValidityDate'
- style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="title" v-if="sign == '挂车'">牵引车行驶证主页</view>
- <view class="title" v-if="sign == '非挂车'">行驶证主页</view>
- <view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text" v-if="sign == '挂车'">上传牵引车行驶证主页</view>
- <view class="text" v-else>上传行驶证主页</view>
- </view>
- <view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(3)" class="preview-card-img picture">
- <view @click.stop="delCard(3)">
- <image class='del-card' src="@/static/images/common/quxiao@2x.png">
- </image>
- </view>
- <image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
- </view>
- <view class="title" v-if="sign == '挂车'">牵引车行驶证副页</view>
- <view class="title" v-if="sign == '非挂车'">行驶证副页</view>
- <view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text" v-if="sign == '挂车'">上传牵引车行驶证副页</view>
- <view class="text" v-else>上传行驶证副页</view>
- </view>
- <view v-if="dataDetails.drivingLicenseBackPage" @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.drivingLicenseBackPage" mode="aspectFit"></image>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">行驶证车辆类型</view>
- <u--input maxlength='10' placeholder="输入行驶证上的车辆类型" inputAlign='right' border="none"
- v-model="dataDetails.vehicleType">
- </u--input>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">行驶证车辆识别代号</view>
- <u--input maxlength='25' placeholder="输入行驶证车辆识别代号" inputAlign='right' border="none"
- v-model="dataDetails.carCode">
- </u--input>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">行驶证档案编号</view>
- <u--input maxlength='12' placeholder="输入行驶证档案编号" inputAlign='right' border="none"
- v-model="dataDetails.drivingLicenseNumber">
- </u--input>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">注册日期</view>
- <view class="" @click="selectValidityPeriod(6)">
- <view :style="{'color':dataDetails.drivingLicenseRegistrationDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.drivingLicenseRegistrationDate?dataDetails.drivingLicenseRegistrationDate:'选择注册日期'}}
- <image v-if='!dataDetails.drivingLicenseRegistrationDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">发证日期</view>
- <view class="" @click="selectValidityPeriod(7)">
- <view :style="{'color':dataDetails.drivingLicenseIssueDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.drivingLicenseIssueDate?dataDetails.drivingLicenseIssueDate:'选择发证日期'}}
- <image v-if='!dataDetails.drivingLicenseIssueDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">行驶证有效期</view>
- <view class="" @click="selectValidityPeriod(1)">
- <view :style="{'color':dataDetails.drivingLicenseValidityDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期'}}
- <image v-if='!dataDetails.drivingLicenseValidityDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">使用性质</view>
- {{dataDetails.useNature?dataDetails.useNature:'输入使用性质'}}
- <!-- <u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.useNature"
- disabled>
- </u--input> -->
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">发证机关</view>
- <u--input placeholder="输入发证机关" inputAlign='right' border="none" maxlength="25"
- v-model="dataDetails.lssuingAuthority">
- </u--input>
- </view>
- <view class="flex row noborder">
- <view class="left-text">车辆能源类型</view>
- <view style='text-align:right;width:50%;' class="" @click="driveType">
- <view :style="{'color':dataDetails.energyType?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.energyType?dataDetails.energyType:'选择车辆能源类型'}}
- <image v-if='!dataDetails.energyType' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- <!-- {{dataDetails.energyType?dataDetails.energyType:'选择车辆能源类型>'}}> -->
- </view>
- </view>
- <view class="" v-if="sign == '挂车'">
- <view class="title">挂车行驶证主页</view>
- <view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传挂车行驶证主页</view>
- </view>
- <view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(5)"
- class="preview-card-img picture">
- <view @click.stop="delCard(5)">
- <image class='del-card' src="@/static/images/common/quxiao@2x.png">
- </image>
- </view>
- <image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
- </view>
- </view>
- <view v-if="sign == '挂车'">
- <view class="title">挂车行驶证副页</view>
- <view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传挂车行驶证副页</view>
- </view>
- <view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(6)"
- class="preview-card-img picture">
- <view @click.stop="delCard(6)">
- <image class='del-card' src="@/static/images/common/quxiao@2x.png">
- </image>
- </view>
- <image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
- </view>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text" style="width: 150px !important;">挂车行驶证车辆类型</view>
- <u--input maxlength='12' placeholder="输入挂车行驶证车辆类型" inputAlign='right' border="none"
- v-model="dataDetails.trailerVehicleType">
- </u--input>
- <u-icon name="arrow-down-fill" @click="selectCarType"></u-icon>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">挂车行驶证车辆识别代号</view>
- <u--input maxlength='25' placeholder="输入挂车车辆识别代码" inputAlign='right' border="none"
- v-model="dataDetails.trailerCarCode">
- </u--input>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">挂车行驶证档案编号</view>
- <u--input maxlength='12' placeholder="输入挂车行驶证档案编号" inputAlign='right' border="none"
- v-model="dataDetails.trailerLicenseNumber">
- </u--input>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">注册日期</view>
- <view class="" @click="selectValidityPeriod(8)">
- <view :style="{'color':dataDetails.trailerLicenseRegistrationDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.trailerLicenseRegistrationDate?dataDetails.trailerLicenseRegistrationDate:'选择注册日期'}}
- <image v-if='!dataDetails.trailerLicenseRegistrationDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- <!-- {{dataDetails.trailerLicenseRegistrationDate?dataDetails.trailerLicenseRegistrationDate:'选择注册日期>'}} -->
- </view>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">发证日期</view>
- <view class="" @click="selectValidityPeriod(9)">
- <view :style="{'color':dataDetails.trailerLicenseIssueDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.trailerLicenseIssueDate?dataDetails.trailerLicenseIssueDate:'选择发证日期'}}
- <image v-if='!dataDetails.trailerLicenseIssueDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- <!-- {{dataDetails.trailerLicenseIssueDate?dataDetails.trailerLicenseIssueDate:'选择发证日期>'}} -->
- </view>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">挂车行驶证有效期</view>
- <view class="" @click="selectValidityPeriod(2)">
- <view :style="{'color':dataDetails.trailerLicenseValidityDate?'#000':'rgb(192, 196, 204)'}">
- {{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期'}}
- <image v-if='!dataDetails.trailerLicenseValidityDate' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- <!-- {{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}} -->
- </view>
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">使用性质</view>
- {{dataDetails.guaUseNature?dataDetails.guaUseNature:'输入使用性质'}}
- <!-- <u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.guaUseNature"
- disabled>
- </u--input> -->
- </view>
- <view class="flex row flex-space-between" v-if="sign == '挂车'">
- <view class="left-text">发证机关</view>
- <u--input placeholder="输入发证机关" inputAlign='right' border="none" maxlength="25"
- v-model="dataDetails.guaLssuingAuthority">
- </u--input>
- </view>
- <!-- 牵引车 -->
- <view class="flex row" v-if="sign == '挂车'">
- <view class="left left-text">牵引车车牌号</view>
- <view class="right flex">
- <input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
- :disabled="true" placeholder="输入牵引车车牌号" name="input"></input>
- </view>
- </view>
- <view class="flex row" v-if="sign == '非挂车'">
- <view class="left left-text">车牌号</view>
- <view class="right flex">
- <input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
- :disabled="true" placeholder="输入车牌号" name="input"></input>
- </view>
- </view>
- <view class="flex row flex-space-between">
- <view class="left-text">车牌颜色</view>
- <view class='flex'>
- <view class="color" @click="selectNoColor">{{dataDetails.carNumberColour}}</view>
- <view>
- <image v-if='!dataDetails.carNumberColour' style='width:12px;height:12px;'
- src="../../../static/right.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="flex row">
- <view class="left-text">车辆所属车主</view>
- <input style='text-align:right;' placeholder="输入车主姓名" v-model="dataDetails.owner" type="text">
- <!-- <u--input inputAlign='left' border="none"> -->
- <!-- </u--input> -->
- </view>
- <view class="flex row" v-if="sign == '非挂车'">
- <view class="left-text">总质量(千克)</view>
- <u--input type='number' placeholder="输入总质量" inputAlign='right' border="none"
- v-model="dataDetails.carTotalWeight">
- </u--input>
- </view>
- <view class="flex row" v-if="sign == '非挂车'">
- <view class="left-text">核定载质量(千克)</view>
- <u--input placeholder="输入核定载质量" inputAlign='left' border="none" v-model="dataDetails.carApprovedWeight">
- </u--input>
- </view>
- <view class="flex row" v-if="sign == '挂车'">
- <view class="left-text">整备质量(千克)</view>
- <u--input type='number' placeholder="输入整备质量" inputAlign='right' border="none"
- v-model="dataDetails.servicingWeight">
- </u--input>
- </view>
- <view class="flex row noborder" v-if="sign == '挂车'">
- <view style='width:390rpx;' class="left-text">牵引车外廓尺寸(毫米)</view>
- </view>
- <view class="flex row noborder" v-if="sign == '非挂车'">
- <view class="left-text">外廓尺寸(毫米)</view>
- </view>
- <view class="flex row noborder input-ckg">
- <view class="input-positon">
- <!-- <input type='number' class="input" placeholder="长" border="none"
- v-model="dataDetails.carLong"> -->
- <u--input type='number' class="input" placeholder="长" inputAlign='left' border="none"
- v-model="dataDetails.carLong">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- <view class="star">*</view>
- <view class="input-positon">
- <!-- <input type='number' class="input" placeholder="宽" border="none"
- v-model="dataDetails.carWidth"> -->
- <u--input type='number' placeholder="宽" inputAlign='left' border="none"
- v-model="dataDetails.carWidth">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- <view class="star">*</view>
- <view class="input-positon">
- <!-- <input type='number' class="input" placeholder="高" border="none"
- v-model="dataDetails.carHeight"> -->
- <u--input type='number' placeholder="高" inputAlign='left' border="none"
- v-model="dataDetails.carHeight">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- </view>
- <view class="flex row noborder s-row">
- <view class="left-text" style="width: 100%;" v-if="sign == '挂车'">上传人和牵引车合影(牵引车牌号可见)</view>
- <view class="left-text" style="width: 100%;" v-if="sign == '非挂车'">上传人车合影(车头车牌号可见)</view>
- <u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event,'1')"
- @delete="deletePic" name="1" multiple :maxCount="1"></u-upload>
- </view>
- <!-- 挂车 -->
- <view v-if="sign == '挂车'">
- <view class="flex row">
- <view class="left left-text">挂车车牌号</view>
- <view class="right flex">
- <input class="car-uumber" v-model='dataDetails.guaCarNumber1'
- @click.stop="handleShowKeyboard1(index)" :disabled="true" placeholder-class="phsy"
- placeholder="输入挂车牌号" name="input"></input>
- 挂
- </view>
- </view>
- <view class="flex row">
- <view class="left-text">挂车车辆所属车主</view>
- <u--input placeholder="输入车主姓名" inputAlign='right' border="none" v-model="dataDetails.guaOwner">
- </u--input>
- </view>
- <view class="flex row">
- <view class="left-text">挂车总质量(千克)</view>
- <u--input type='number' placeholder="输入挂车总质量" inputAlign='right' border="none"
- v-model="dataDetails.carTotalWeight">
- </u--input>
- </view>
- <view class="flex row">
- <view class="left-text">挂车整备质量(千克)</view>
- <u--input type='number' placeholder="输入整备质量" inputAlign='right' border="none"
- v-model="dataDetails.guaServicingWeight">
- </u--input>
- </view>
- <view class="flex row">
- <view style='width:180px' class="left-text">挂车核定载质量(千克)</view>
- <u--input type='number' placeholder="输入核定载质量" inputAlign='right' border="none"
- v-model="dataDetails.guaCarApprovedWeight">
- </u--input>
- </view>
- <view class="flex row noborder">
- <view style='width:390rpx;' class="left-text">挂车外廓尺寸(毫米)</view>
- </view>
- <view class="flex row noborder input-ckg">
- <view class="input-positon">
- <u--input type='number' class="input" placeholder="长" inputAlign='left' border="none"
- v-model="dataDetails.guaCarLong">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- <view class="star">*</view>
- <view class="input-positon">
- <u--input type='number' placeholder="宽" inputAlign='left' border="none"
- v-model="dataDetails.guaCarWidth">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- <view class="star">*</view>
- <view class="input-positon">
- <u--input type='number' placeholder="高" inputAlign='left' border="none"
- v-model="dataDetails.guaCarHeight">
- </u--input>
- <view class="position-right">
- mm
- </view>
- </view>
- </view>
- <view class="flex row noborder s-row">
- <view class="left-text" style="width: 100%;">上传人和挂车合影(挂车车牌号可见)</view>
- <u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event,'2')"
- @delete="deletePic" name="2" multiple :maxCount="1"></u-upload>
- </view>
- </view>
- <!-- <view class="level1-title">证件信息</view> -->
- </view>
- <view class='submit-btn-wrap'>
- <view class="submit-btn" @click="$u.throttle(submit, 1000)">提交</view>
- </view>
- <master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
- :defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
- <master-keyboard ref="keyboard1" :guastatus='true' keyboardtype="car" :show="keyShow1" :randomNumber="true"
- :newCar="false" :defaultValue="carNumber1" @keyboardClick="handleClick1"></master-keyboard>
- <u-toast ref="uToast"></u-toast>
- <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
- @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
- </u-action-sheet>
- <u-picker :show="carColor" :columns="colorColumns" :closeOnClickOverlay='true' @close='colorClose'
- @cancel='colorClose' @confirm='confirmColor'></u-picker>
- <!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
- :closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
- </u-picker> -->
- <itmister-date-picker :overdueContent="overdueContent" :dateStatus="0" :periodOfValidity="true" ref="dateEl"
- :startYear="1999" :futureYear="6" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
- <itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" ref="dateXSZEl"
- :startYear="1999" :futureYear="10" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
- <itmister-date-picker :dateStatus="0" ref="daterestsEl" :startYear="1980" :futureYear="0"
- @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
- <u-picker :show="isShowCarType" ref="uPicker" :columns="carTypeList" @confirm="confirmCarType"
- :closeOnClickOverlay='true' @close='isShowCarType=false' @cancel='isShowCarType=false'>
- </u-picker>
- <u-picker :show="carTypeShow" :closeOnClickOverlay='true' ref="uPicker" :columns="tcarTypeList"
- @close="carTypeShow = false" @cancel='carTypeShow=false' @confirm="tCarType"></u-picker>
- </view>
- </template>
- <script>
- import uploadImage from '@/components/ossutil/uploadFile.js';
- import permision from "@/js_sdk/wa-permission/permission.js"
- import keyboard from "@/components/master-keyboard/master-keyboard.vue";
- var _this;
- import {
- mapState
- } from 'vuex';
- export default {
- data() {
- return {
- index: '',
- keyShow: false,
- keyShow1: false,
- carNumber: '',
- carNumber1: "",
- overdueContent: '',
- dataDetails: {
- // driverId: '',
- // carNumber: '',
- carNumberColour: '黄色',
- carCategory: '挂车',
- carType: '高栏',
- useNature: "营业特种车",
- guaUseNature: "营运挂车",
- energyType: "汽油",
- owner: ''
- // carTotalWeight: '',
- // carApprovedWeight: '',
- // carLong: '',
- // carWidth: '',
- // carHeight: '',
- // addressUrl: ''
- },
- startYear: 1980,
- carTypeList: [
- ["汽油", "柴油", "油电混合", "纯电动", "插电式混合动力", "增程式"]
- ],
- isShowCarType: false,
- carModelColumns: [
- ['挂车', '非挂车'],
- ['高栏', '集装箱', '自卸车']
- ],
- carModelColumnData: [
- ['高栏', '集装箱', '自卸车'],
- ['重型仓栏']
- ],
- colorColumns: [
- ['黄色', '蓝色']
- ],
- carColor: false,
- carModel: false,
- fileList1: [],
- fileList2: [],
- ValidityPeriodType: "",
- validityPeriod: [],
- isShowValidity: false,
- uploadType: '',
- isShowimgType: false,
- sign: "挂车",
- carTypeShow: false,
- tcarTypeList: [],
- };
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
- },
- onLoad(options) {
- _this = this;
- this.dataDetails.commonId = this.userInfo.id
- this.xiala() //挂车行驶证车辆类型
- this.get_camera_permission()
- },
- onShow() {
- this.startYear = new Date().getFullYear() - 30
- },
- 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('用户点击取消');
- }
- }
- });
- }
- },
- tCarType(e) {
- this.dataDetails.trailerVehicleType = e.value[0]
- this.carTypeShow = false
- },
- xiala() {
- this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
- constId: "TRAILER1",
- }).then(res => {
- var list = []
- for (let i = 0; i < res.data.length; i++) {
- list.push(res.data[i].constValue)
- }
- this.tcarTypeList.push(list)
- })
- .catch(res => {
- // uni.$u.toast(res.message);
- });
- },
- selectCarType() {
- this.carTypeShow = true
- },
- driveType() {
- this.isShowCarType = true
- },
- confirmCarType(e) {
- this.dataDetails.energyType = e.value[0]
- this.isShowCarType = false
- },
- hidden() {
- this.$refs.keyboard.open(false)
- this.$refs.keyboard1.open(false)
- },
- //挂车牌号弹出键盘
- handleShowKeyboard1(index) {
- if (this.dataDetails.guaCarNumber1 == '') {
- this.carNumber1 = ''
- } else {
- this.carNumber1 = this.dataDetails.guaCarNumber1
- }
- if (this.$refs.keyboard1.open) {
- this.$refs.keyboard1.open(false) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard1[0].open(false)
- }
- this.index = index
- if (this.$refs.keyboard1.open) {
- this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard1[0].open(true)
- }
- },
- handleClick1(e) {
- this.carNumber1 = e.value
- this.dataDetails.guaCarNumber1 = e.value //键盘输入值
- },
- delCard(type) {
- switch (type) {
- case 1:
- _this.dataDetails.operationCertificate = "" //道路运输证
- break;
- case 2:
- _this.dataDetails.trailerOperationCertificate = "" //挂车道路运输证
- break;
- case 3:
- _this.dataDetails.drivingLicenseHomePage = "" //牵引车行驶证
- break;
- case 4:
- _this.dataDetails.drivingLicenseBackPage = "" //牵引车行驶证副页
- break;
- case 5:
- _this.dataDetails.trailerLicenseHomePage = "" //挂车行驶证
- break;
- case 6:
- _this.dataDetails.trailerLicenseBackPage = "" //挂车行驶证副页
- break;
- }
- _this.$forceUpdate()
- },
- uploadImg(type) {
- this.uploadType = type
- this.imgTypeSelect()
- // this.isShowimgType = true
- },
- selectValidityPeriod(type) {
- this.ValidityPeriodType = type
- switch (this.ValidityPeriodType) {
- case 1:
- this.overdueContent = '行驶证已过期'
- this.$refs.dateXSZEl.show()
- break;
- case 2:
- this.overdueContent = '挂车行驶证已过期'
- this.$refs.dateXSZEl.show()
- break;
- case 4:
- this.overdueContent = '道路运输证已过期'
- this.$refs.dateEl.show()
- break;
- case 5:
- this.overdueContent = '挂车道路运输证已过期'
- this.$refs.dateEl.show()
- break;
- case 6:
- this.$refs.daterestsEl.show()
- break;
- case 7:
- this.$refs.daterestsEl.show()
- break;
- case 8:
- this.$refs.daterestsEl.show()
- break;
- case 9:
- this.$refs.daterestsEl.show()
- break;
- }
- // this.isShowValidity = true
- },
- // 上传图片
- imgTypeSelect(val) {
- // if (val.name == '相册') {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- success: function(res) {
- uploadImage("images", res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功回调函数
- console.log('图片地址-----', result)
- switch (_this.uploadType) {
- case 1:
- _this.dataDetails.driverLicenseHomePage = result
- break;
- case 2:
- _this.dataDetails.driverLicenseBackPage = result
- break;
- case 3:
- _this.dataDetails.drivingLicenseHomePage = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/driveringLicenseShibie', {
- image: result,
- flag: 1
- }).then(res => {
- if (res.data) {
- _this.dataDetails.carNumber = res.data
- .carNum //车牌号
- _this.dataDetails.vehicleType = res.data
- .vehicleType
- _this.dataDetails.carCode = res.data.carCode
- _this.dataDetails.owner = res.data
- .owner //车辆所有人
- if (res.data.lssuingAuthority) { //行驶证发证机关
- _this.dataDetails.lssuingAuthority = res
- .data.lssuingAuthority
- }
- // if (res.data.licenseRegistrationDate) { //行驶证注册日期
- // _this.dataDetails
- // .drivingLicenseRegistrationDate = res
- // .data.licenseRegistrationDate
- // }
- // if (res.data.licenseIssueDate) { //行驶证发证日期
- // _this.dataDetails.drivingLicenseIssueDate =
- // res.data.licenseIssueDate
- // }
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- case 4:
- _this.dataDetails.drivingLicenseBackPage = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/driveringLicenseShibie', {
- image: result,
- flag: 2
- }).then(res => {
- if (res.data) {
- if (res.data.issuingAuthority) { //行驶证发证机关
- _this.dataDetails.lssuingAuthority = res
- .data.issuingAuthority
- }
- // if (res.data
- // .licenseRegistrationDate) { //行驶证注册日期
- // _this.dataDetails
- // .drivingLicenseRegistrationDate = res
- // .data.licenseRegistrationDate
- // }
- // if (res.data.licenseIssueDate) { //行驶证发证日期
- // _this.dataDetails.drivingLicenseIssueDate =
- // res.data.licenseIssueDate
- // }
- // _this.dataDetails.drivingLicenseValidityDate =
- // res.data.driveringEndDate //行驶证有效期
- // _this.dataDetails.drivingLicenseNumber = res
- // .data.driveringNum.replace(/\s*/g,
- // "") //行驶证档案编号
- if (_this.sign == "非挂车") {
- if (res.data.servicingMass && res.data
- .servicingMass.indexOf("kg") != -1) {
- res.data.servicingMass = res.data
- .servicingMass.slice(0, res.data
- .servicingMass.length - 2)
- }
- _this.dataDetails.carTotalWeight = res.data
- .servicingMass //总质量
- }
- if (res.data.approvedLoadMass.indexOf("kg") != -
- 1) {
- res.data.approvedLoadMass = res.data
- .approvedLoadMass.slice(0, res.data
- .approvedLoadMass.length - 2)
- }
- if (res.data.approvedLoadMass && !isNaN(res.data
- .approvedLoadMass)) {
- _this.dataDetails.carApprovedWeight = res.data
- .approvedLoadMass //核定载质量
- }
- if (res.data.size && res.data.size.indexOf(
- "mm") != -1) {
- res.data.size = res.data.size.slice(0, res
- .data.size.length - 2);
- }
- _this.dataDetails.carLong = res.data.size
- .split("X")[0] //车长
- _this.dataDetails.carWidth = res.data.size
- .split("X")[1] //车宽
- _this.dataDetails.carHeight = res.data.size
- .split("X")[2] //车高
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- case 5: //挂车行驶证
- _this.dataDetails.trailerLicenseHomePage = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/driveringLicenseShibie', {
- image: result,
- flag: 1
- }).then(res => {
- if (res.data) {
- if (res.data.lssuingAuthority) { //行驶证发证机关
- _this.dataDetails.guaLssuingAuthority = res
- .data.lssuingAuthority
- }
- // if (res.data.licenseRegistrationDate) { //行驶证注册日期
- // _this.dataDetails
- // .trailerLicenseRegistrationDate = res.data
- // .licenseRegistrationDate
- // }
- // if (res.data.licenseIssueDate) { //行驶证发证日期
- // _this.dataDetails.trailerLicenseIssueDate = res
- // .data.licenseIssueDate
- // }
- if (res.data
- .carNum) {
- _this.dataDetails.guaCarNumber1 = res.data
- .carNum.substring(0, 6)
- }
- //车牌号
- _this.dataDetails.guaOwner = res.data.owner //车辆所有人
- _this.dataDetails.trailerVehicleType = res.data
- .vehicleType
- _this.dataDetails.trailerCarCode = res.data.carCode
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- case 6:
- _this.dataDetails.trailerLicenseBackPage = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/driveringLicenseShibie', {
- image: result,
- flag: 2
- }).then(res => {
- if (res.data) {
- // _this.dataDetails.trailerLicenseValidityDate =
- // res.data.driveringEndDate //挂车行驶证有效期
- _this.dataDetails.trailerLicenseNumber = res
- .data.driveringNum.replace(/\s*/g,
- "") //挂车行驶证档案编号
- if (res.data.servicingMass && res.data
- .servicingMass.indexOf("kg") != -1) {
- res.data.servicingMass = res.data
- .servicingMass.slice(0, res.data
- .servicingMass.length - 2)
- }
- if (res.data.approvedLoadMass.indexOf("kg") != -
- 1) {
- res.data.approvedLoadMass = res.data
- .approvedLoadMass.slice(0, res.data
- .approvedLoadMass.length - 2)
- }
- _this.dataDetails.carTotalWeight = res.data
- .totalMass.split("kg").join("") //挂车总质量
- _this.dataDetails.guaServicingWeight = res.data
- .servicingMass //总质量
- _this.dataDetails.guaCarApprovedWeight = res.data
- .approvedLoadMass //核定载质量
- if (res.data.size && res.data.size.indexOf(
- "mm") != -1) {
- res.data.size = res.data.size.slice(0, res
- .data.size.length - 2);
- }
- _this.dataDetails.guaCarLong = res.data.size
- .split("X")[0] //车长
- _this.dataDetails.guaCarWidth = res.data.size
- .split("X")[1] //车宽
- _this.dataDetails.guaCarHeight = res.data.size
- .split("X")[2] //车高
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- case 7:
- _this.dataDetails.qualificationCertificate = result
- break;
- case 8:
- _this.dataDetails.operationCertificate = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/tranLicenseShibie', {
- image: result
- }).then(res => {
- if (res.data) {
- _this.dataDetails.operationCertificateNumber =
- res.data.tranNumber.replace(/\s*/g, "")
- // _this.dataDetails
- // .operationCertificateValidityDate = res
- // .data.tranEndDate
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- case 9:
- _this.dataDetails.trailerOperationCertificate = result
- _this.$request.baseRequest('get',
- '/driverCarInfo/api/tranLicenseShibie', {
- image: result
- }).then(res => {
- if (res.data) {
- _this.dataDetails
- .trailerOperationCertificateNumber = res
- .data.tranNumber.replace(/\s*/g, "")
- // _this.dataDetails
- // .trailerOperationCertificateValidityDate =
- // res.data.tranEndDate
- _this.$forceUpdate()
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- break;
- }
- _this.$forceUpdate()
- }
- )
- },
- fail: function(req) {
- console.log(req, 11111)
- },
- complete: function(req1) {
- console.log(req1, 22222)
- },
- });
- // }
- },
- confirmValidityPeriod(date) {
- switch (this.ValidityPeriodType) {
- case 0:
- this.dataDetails.driverLicenseValidityDate = date.date
- break
- case 1:
- this.dataDetails.drivingLicenseValidityDate = date.date
- break
- case 2:
- this.dataDetails.trailerLicenseValidityDate = date.date
- break
- case 3:
- this.dataDetails.qualificationCertificateValidityDate = date.date
- break
- case 4:
- this.dataDetails.operationCertificateValidityDate = date.date
- break
- case 5:
- this.dataDetails.trailerOperationCertificateValidityDate = date.date
- case 6: //行驶证注册日期
- this.dataDetails.drivingLicenseRegistrationDate = date.date
- break
- case 7: //行驶证发证日期
- this.dataDetails.drivingLicenseIssueDate = date.date
- break
- case 8: //挂车行驶证注册日期
- this.dataDetails.trailerLicenseRegistrationDate = date.date
- break
- case 9: //挂车行驶证发证日期
- this.dataDetails.trailerLicenseIssueDate = date.date
- break
- }
- this.$forceUpdate()
- },
- // 车型切换
- changeCarModel(e) {
- const {
- columnIndex,
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.carTypePicker
- } = e
- if (columnIndex === 0) {
- // 模拟网络请求
- picker.setColumnValues(1, this.carModelColumnData[index])
- }
- },
- // 删除图片
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1)
- },
- // 新增图片
- async afterRead(event, num) {
- // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this[`fileList${event.name}`].length
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url, num)
- let item = this[`fileList${event.name}`][fileListLen]
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: 'success',
- message: '',
- url: result
- }))
- fileListLen++
- }
- },
- // 新增图片
- async afterRead1(event, num) {
- // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this[`fileList${event.name}`].length
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url, num)
- let item = this[`fileList${event.name}`][fileListLen]
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: 'success',
- message: '',
- url: result
- }))
- fileListLen++
- }
- },
- uploadFilePromise(url, num) {
- uploadImage('image', url, 'appData/',
- result => {
- // 上传成功回调函数
- console.log('图片地址', result)
- if (num == 1) {
- if (!this.dataDetails.addressUrl) {
- this.dataDetails.addressUrl = result
- } else {
- this.dataDetails.addressUrl = this.dataDetails.addressUrl + ',' + result
- }
- } else if (num == 2) {
- if (!this.dataDetails.guaAddressUrl) {
- this.dataDetails.guaAddressUrl = result
- } else {
- this.dataDetails.guaAddressUrl = this.dataDetails.guaAddressUrl + ',' + result
- }
- }
- }
- )
- },
- //车牌号弹出键盘
- handleShowKeyboard(index) {
- if (this.dataDetails.carNumber == '') {
- this.carNumber = ''
- } else {
- this.carNumber = this.dataDetails.carNumber
- }
- if (this.$refs.keyboard.open) {
- this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard[0].open(false)
- }
- this.index = index
- if (this.$refs.keyboard.open) {
- this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard[0].open(true)
- }
- },
- //车牌号弹出键盘
- handleClick(e) {
- this.carNumber = e.value
- this.dataDetails.carNumber = e.value //键盘输入值
- },
- confirmColor(val) {
- this.dataDetails.carNumberColour = val.value[0]
- this.carColor = false
- },
- colorClose() {
- this.carColor = false
- },
- selectNoColor() {
- this.carColor = true
- },
- confirmCarModel(val) {
- if (val.value[0] == '挂车') {
- this.dataDetails.useNature = "营业特种车"
- this.dataDetails.guaUseNature = "营运挂车"
- } else if (val.value[0] == '非挂车') {
- this.dataDetails.useNature = "营运货车"
- }
- this.sign = val.value[0]
- // this.dataDetails.carType = val.value[0] + ' ' + val.value[1]
- this.dataDetails.carCategory = val.value[0]
- this.dataDetails.carType = val.value[1]
- this.carModel = false
- },
- carModelClose() {
- this.carModel = false
- },
- selectCarModel() {
- this.carModel = true
- },
- selectNoColor() {
- this.carColor = true
- },
- unloadGroupPhoto() {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- success: function(res) {
- uploadImage('image', res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- }
- });
- },
- validate() {
- if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "道路运输证不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "道路运输证号不能为空!",
- })
- return true
- }
- if (this.dataDetails.operationCertificateNumber.length != 12) {
- this.$refs.uToast.show({
- type: 'error',
- message: "道路运输证号输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "道路运输证有效期不能为空!",
- })
- return true
- }
- if (this.sign == '挂车') {
- if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车道路运输证不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车道路运输证号不能为空!",
- })
- return true
- }
- if (this.dataDetails.trailerOperationCertificateNumber.length != 12) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车道路运输证号输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车道路运输证有效期不能为空!",
- })
- return true
- }
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证主页不能为空!",
- })
- return true
- }
- if (!this.dataDetails.vehicleType) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证车辆类型不能为空!",
- })
- return true
- }
- if (!this.dataDetails.carCode) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证车辆识别代号不能为空!",
- })
- return true
- }
- if (this.dataDetails.vehicleType.length < 2 || this.dataDetails.vehicleType.length > 10) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证车辆类型输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证档案编号不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证档案编号不能为空!",
- })
- return true
- }
- if (this.dataDetails.drivingLicenseNumber.length != 12) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证档案编号输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseRegistrationDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证注册日期不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseIssueDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证发证日期不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证有效期不能为空!",
- })
- return true
- }
- if (this.dataDetails.drivingLicenseValidityDate != '长期') {
- var arr = this.dataDetails.drivingLicenseValidityDate.split('-')
- if (!this.$helper.periodOfValidity(arr[0], arr[1], arr[2])) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证已过期!",
- })
- return true
- }
- }
- if (uni.$u.test.isEmpty(this.dataDetails.lssuingAuthority)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证发证机关不能为空!",
- })
- return true
- }
- if (this.dataDetails.lssuingAuthority.length < 5 || this.dataDetails.lssuingAuthority.length > 25) {
- this.$refs.uToast.show({
- type: 'error',
- message: "行驶证发证机关输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.energyType)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "能源类型不能为空!",
- })
- return true
- }
- if (this.sign == '挂车') {
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证主页不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证副页不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerVehicleType)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证车辆类型不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerCarCode)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证识别代号不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证档案编号不能为空!",
- })
- return true
- }
- if (this.dataDetails.trailerLicenseNumber.length != 12) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证档案编号输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseRegistrationDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证注册日期不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseIssueDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证发证日期不能为空!!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证有效期不能为空!",
- })
- return true
- }
- if (this.dataDetails.trailerLicenseValidityDate != '长期') {
- var arr = this.dataDetails.trailerLicenseValidityDate.split('-')
- if (!this.$helper.periodOfValidity(arr[0], arr[1], arr[2])) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证已过期!",
- })
- return true
- }
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaLssuingAuthority)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证发证机关不能为空!",
- })
- return true
- }
- if (this.dataDetails.guaLssuingAuthority.length < 5 || this.dataDetails.guaLssuingAuthority.length >
- 25) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证发证机关输入错误!",
- })
- return true
- }
- }
- // true 为校验不通过
- if (uni.$u.test.isEmpty(this.dataDetails.carNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "车牌号不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.owner)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "车辆所属车主不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight) && this.sign == '非挂车') {
- this.$refs.uToast.show({
- type: 'error',
- message: "总质量不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight) && this.sign == '非挂车' && this.dataDetails
- .carTotalWeight < 500 ||
- uni.$u.test.isEmpty(this.dataDetails.carTotalWeight) && this.sign == '非挂车' && this.dataDetails
- .carTotalWeight > 60000) {
- this.$refs.uToast.show({
- type: 'error',
- message: "总质量输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carApprovedWeight) && this.sign == '非挂车') {
- this.$refs.uToast.show({
- type: 'error',
- message: "核定载质量不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carApprovedWeight) && this.sign == '非挂车' && this.dataDetails
- .carApprovedWeight < 500 ||
- uni.$u.test.isEmpty(this.dataDetails.carApprovedWeight) && this.sign == '非挂车' && this.dataDetails
- .carApprovedWeight > 60000) {
- this.$refs.uToast.show({
- type: 'error',
- message: "核定载质量输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.servicingWeight) && this.sign == '挂车') {
- this.$refs.uToast.show({
- type: 'error',
- message: "整备质量不能为空!",
- })
- return true
- }
- if (this.dataDetails.servicingWeight > 100000) {
- this.$refs.uToast.show({
- type: 'error',
- message: "整备质量输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carLong) || uni.$u.test.isEmpty(this.dataDetails.carWidth) || uni
- .$u.test.isEmpty(this.dataDetails.carHeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "外廓尺寸不能为空!",
- })
- return true
- }
- if (this.sign == '挂车') {
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证主页不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证副页不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车行驶证档案编号不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaCarNumber1)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车车牌号不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaOwner)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "车辆所属车主不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车总质量不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车整备质量不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车整备质量不能为空!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaCarApprovedWeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车核定载质量不能为空!",
- })
- return true
- }
- if (this.dataDetails.guaCarApprovedWeight < 500 || this.dataDetails.guaCarApprovedWeight > 60000) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车核定载质量输入错误!",
- })
- return true
- }
- if (uni.$u.test.isEmpty(this.dataDetails.guaCarLong) || uni.$u.test.isEmpty(this.dataDetails
- .guaCarWidth) || uni.$u.test.isEmpty(this.dataDetails.guaCarHeight)) {
- this.$refs.uToast.show({
- type: 'error',
- message: "挂车外廓尺寸不能为空!",
- })
- return true
- }
- if (this.fileList1.length == 0) {
- this.$refs.uToast.show({
- type: 'error',
- message: "请上传人和牵引车合影!",
- })
- return true
- }
- if (this.fileList2.length == 0) {
- this.$refs.uToast.show({
- type: 'error',
- message: "请上传人和挂车合影!",
- })
- return true
- }
- }
- return false
- },
- submit() {
- this.dataDetails.driverId = uni.getStorageSync("firstAuthentication").id
- // 校验
- if (this.validate()) return
- if (!this.dataDetails.carApprovedWeight) {
- delete this.dataDetails.carApprovedWeight
- }
- if (this.dataDetails.carCategory == "非挂车") {
- delete this.dataDetails.guaUseNature
- }
- if (this.dataDetails.carCategory == "挂车") {
- if (this.dataDetails.guaCarNumber1.indexOf('挂') == -1) {
- this.dataDetails.guaCarNumber = this.dataDetails.guaCarNumber1 + '挂'
- }
- }
- uni.showLoading({
- mask: true,
- title: '加载中'
- })
- this.$request.baseRequest('post', '/driverCarInfo/api/addInfo', this.dataDetails).then(res => {
- uni.hideLoading()
- if (res.code == '200') {
- this.$refs.uToast.show({
- type: 'success',
- message: "提交成功!",
- complete() {
- uni.navigateBack({
- delta: 1
- });
- // uni.$u.route('/pages/mine/manageVehicles/index');
- }
- })
- // this.$refs.uToast.show({
- // ...params
- // })
- // uni.$u.route('/pages/mine/manageVehicles/index');
- } else if (res.code == '400') {
- uni.$u.toast('您输入的内容有问题,请检查后重新提交');
- } else {
- uni.$u.toast(res.message);
- }
- })
- .catch(res => {
- uni.hideLoading()
- uni.$u.toast(res.message);
- });
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .container {
- margin: 20rpx;
- background: white;
- padding: 0 20rpx;
- border-radius: 20rpx;
- padding-bottom: 200rpx;
- .left-text {
- // background: red;
- width: 176px;
- color: #333333;
- display: flex;
- align-items: center;
- }
- .row {
- border-bottom: 1px solid #EEEEEE;
- padding-bottom: 28rpx;
- margin-top: 26rpx;
- .ch-style {}
- }
- .row-ch {
- padding-right: 250rpx;
- box-sizing: border-box;
- }
- .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;
- }
- .picture {
- position: relative;
- width: 100%;
- height: 440rpx;
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- .text {
- margin-top: 20rpx;
- }
- }
- .picture1 {
- background: url(../../../static/images/mine/jzz.png);
- background-size: 100% 100%;
- }
- .picture2 {
- background: url(../../../static/images/mine/jzf.png);
- background-size: 100% 100%;
- }
- .picture3 {
- background: url(../../../static/images/mine/xsz.png);
- background-size: 100% 100%;
- }
- .picture4 {
- background: url(../../../static/images/mine/xsf.png);
- background-size: 100% 100%;
- }
- .picture5 {
- background: url(../../../static/images/mine/gcxsz.png);
- background-size: 100% 100%;
- }
- .picture6 {
- background: url(../../../static/images/mine/gcxsf.png);
- background-size: 100% 100%;
- }
- .picture7 {
- background: url(../../../static/images/mine/cy.png);
- background-size: 100% 100%;
- }
- .picture8 {
- background: url(../../../static/images/mine/cy.png);
- background-size: 100% 100%;
- }
- .picture9 {
- background: url(../../../static/images/mine/cy.png);
- background-size: 100% 100%;
- }
- .xj-image {
- width: 100rpx;
- height: 100rpx;
- }
- .title {
- color: #000;
- margin: 20rpx 0;
- }
- }
- .input-ckg {
- height: 86rpx;
- margin-top: 0 !important;
- padding-bottom: 0 !important;
- .u-input {
- height: 100%;
- background: #F7F8FA;
- padding-left: 10rpx !important;
- padding-right: 85rpx !important;
- }
- .star {
- display: flex;
- align-items: center;
- margin: 0 10rpx;
- }
- .input-positon {
- position: relative;
- }
- .position-right {
- position: absolute;
- right: 20rpx;
- top: 0;
- width: 60rpx;
- height: 50rpx;
- bottom: 0;
- margin: auto;
- }
- }
- .picture {
- margin-top: 20rpx;
- background: #F5F6FA;
- width: 212rpx;
- height: 212rpx;
- border-radius: 10rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #6A7282;
- }
- .submit-btn-wrap {
- position: fixed;
- z-index: 1000;
- bottom: 0;
- left: 0;
- width: 100%;
- padding: 40rpx 0;
- background: #fff;
- }
- .submit-btn {
- bottom: 40rpx;
- width: 90%;
- background: #F5BA3C;
- color: white;
- text-align: center;
- margin: 0 auto;
- padding: 30rpx 0;
- border-radius: 50rpx;
- }
- .del-card {
- position: absolute;
- top: -10rpx;
- right: -6rpx;
- width: 80rpx;
- height: 80rpx;
- z-index: 9;
- }
- /deep/.uni-input-input:disabled {
- background: transparent;
- }
- .phsy {
- // font-size: 20px !important;
- color: #999 !important
- }
- .car-uumber {
- text-align: right;
- }
- .content {
- font-size: 15px;
- }
- </style>
|