driverIdentityEdit.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <template>
  2. <view class="center">
  3. <view>
  4. <!-- <view>
  5. <view style="margin: 0 auto;" v-if="id != ''" @click="idUp">
  6. <image v-bind:src="id1" class="picture"></image>
  7. </view>
  8. <view style="margin: 0 auto;" v-if="id2 != ''" @click="idLow">
  9. <image v-bind:src="id2" class="picture"></image>
  10. </view>
  11. </view> -->
  12. <view class='cardaddress'>
  13. <view class='title'>身份证</view>
  14. <swiper class="screen-swiper header-swiper" ::class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true" interval="3000" duration="500" indicator-color="#8799a3"
  15. indicator-active-color="#0081ff">
  16. <swiper-item class="swiper-item" v-for="(item,index) in cardAddress" :key="index" :class="cardCur==index?'text-white':''" @click="naviageToPage(item.url)">
  17. <image :src="item"></image>
  18. <!-- <view style='position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);'>11111</view> -->
  19. </swiper-item>
  20. </swiper>
  21. </view>
  22. <view class="personalcss">
  23. <view class="c-row ">
  24. <text class="tit">姓名</text>
  25. <view class="con-list">
  26. <input placeholder="请填写姓名" name="input" v-model="DriverViewInfo.driverName"></input>
  27. </view>
  28. </view>
  29. <view class="c-row ">
  30. <text class="tit">身份证号</text>
  31. <view class="con-list">
  32. <input placeholder="请填写身份证号" maxlength="18" name="input" v-model="DriverViewInfo.numberCard"></input>
  33. </view>
  34. </view>
  35. <view class="c-row ">
  36. <text class="tit">手机号</text>
  37. <view class="con-list">
  38. <input type='number' placeholder="请填写手机号" name="input" v-model="DriverViewInfo.driverPhone"></input>
  39. </view>
  40. </view>
  41. <view style='width:100%;position:relative;padding:10px;' class="flex">
  42. <button :class='!sendDisabled?"getcode active":"getcode"' @click='getcode'
  43. >{{sendText}}</button>
  44. <view style='width:70%;position:relative;margin-left: 200rpx;'>
  45. <view class="con-list">
  46. <!-- style='width:70%;position:relative;margin-left: 200px;' -->
  47. <input v-model='verifyCode' placeholder="请输入验证码" type="text">
  48. </view>
  49. </view>
  50. </view>
  51. <view class="c-row ">
  52. <text class="tit">常驻城市</text>
  53. <view class="con-list">
  54. <view @click='regionchange'>{{region}}</view>
  55. <u-picker :params='params1' @confirm='regionpicker' mode="region" v-model="showFlag"></u-picker>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- 车辆信息 -->
  61. <view class="information">
  62. <view class="c-row">
  63. <text class="tit">货车信息</text>
  64. <view class="con-list">
  65. <image v-bind:src="opencar" class="icon-up" @click="opencarclick"></image>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="informations" v-if="opencarboolean == true" v-for="(item , index) in driverCarInfoList"
  70. :Key="index">
  71. <view class="c-row ">
  72. <text class="tit">车辆 -{{index+1}}</text>
  73. <view class="con-list">
  74. <image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="carDel(index)">
  75. </image>
  76. </view>
  77. </view>
  78. <view class="c-row ">
  79. <text class="tit">车牌号</text>
  80. <view class="con-list">
  81. <input placeholder="请填写车牌号" name="input" v-model="item.carNumber"></input>
  82. </view>
  83. </view>
  84. <view class="c-row ">
  85. <text class="tit">车型</text>
  86. <picker @change="ModelChange" :value="ModelIndex" :range="ModelType" class="con-list">
  87. <view class="picker " v-model="item.carModel">
  88. {{item.carModel?item.carModel:'请选择车型'}}
  89. </view>
  90. </picker>
  91. <!-- </view> -->
  92. </view>
  93. <view class="c-row ">
  94. <text class="tit">不含车头车长(米)</text>
  95. <picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list"
  96. v-if="carchength">
  97. <view class="picker" v-model="item.carLength">
  98. {{item.carLength?item.carLength:'请选择车长'}}
  99. </view>
  100. </picker>
  101. <view v-else class="con-list">
  102. <input placeholder="请填写车长(米)" name="input" v-model="item.carLength"></input>
  103. </view>
  104. <button v-if="carchength" class='cu-btn bg-green shadow' @click="changeCarChength">填写</button>
  105. <button v-else class='cu-btn bg-green shadow' @click="changeCarChength">选择</button>
  106. </view>
  107. <view class="c-row ">
  108. <text class="tit">载重(吨)</text>
  109. <view class="con-list">
  110. <input placeholder="请填写载重(吨)" name="input" v-model="item.carLoad"></input>
  111. </view>
  112. </view>
  113. <view class="c-row ">
  114. <text class="tit">出厂年份</text>
  115. <view class="con-list" >
  116. <view @click="yearchange">{{item.yearManufacture?item.yearManufacture:"请选择出厂年份"}}</view>
  117. <u-picker :params='params' @confirm='yearpicker($event,index)' v-model="showYearFlag" mode="time"
  118. :start-year="startData" :end-year="endData">
  119. </u-picker>
  120. </view>
  121. </view>
  122. </view>
  123. <button class="btn" v-if="opencarboolean == true" @click="carAdd">
  124. <image style='width:16px;height:16px;margin-right:3px;position:relative;top:2px;' src="../../static/img/add@3x.png" mode=""></image>
  125. <texe>添加车辆</texe>
  126. </button>
  127. <!-- 账户信息 -->
  128. <view @click="openuserclick" class="information">
  129. <view class="c-row">
  130. <text class="tit" style="line-height: 36px;">账户信息</text>
  131. <view class="con-list">
  132. <image style='width:17px;height:9px;' v-bind:src="openuser" class="icon-up" openuserboolean></image>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="informations" v-if="openuserboolean == true" v-for="(items , index) in driverPayeeInfoList"
  137. :Key="index">
  138. <!-- <view class="labels"> 账户 -?</view> -->
  139. <view class="c-row ">
  140. <text class="tit">账户 -{{index+1}}</text>
  141. <view class="con-list">
  142. <image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="userDel(index)">
  143. </image>
  144. </view>
  145. </view>
  146. <view class="c-row ">
  147. <text class="tit">账户类型</text>
  148. <view class="con-list">
  149. <input placeholder="请填写账户类型" name="input" v-model="items.accountType"></input>
  150. </view>
  151. </view>
  152. <view class="c-row ">
  153. <text class="tit">银行卡照片(可选)</text>
  154. <view class="con-list">
  155. <!-- <input placeholder="请上传照片" name="input" v-model="items.payeeAddressUrl" @clisk="bankimg(items)"></input> -->
  156. <view v-if="bankimg == ''" @click="bankimgs(index)">请上传照片</view>
  157. <view v-if="bankimg != ''" @click="bankimgs(index)">
  158. <image v-bind:src="bankimg" style="width: 40px; height: 40px;"></image>
  159. </view>
  160. </view>
  161. </view>
  162. <view class="c-row ">
  163. <text class="tit">银行卡号</text>
  164. <view class="con-list">
  165. <input type='number' placeholder="请输入银行卡号" name="input" v-model="items.bankCard"></input>
  166. </view>
  167. </view>
  168. <view class="c-row ">
  169. <text class="tit">开户行</text>
  170. <view class="con-list">
  171. <input placeholder="请输入开户行" name="input" v-model="items.bankDeposit"></input>
  172. </view>
  173. </view>
  174. <view class="c-row ">
  175. <text class="tit">开户支行</text>
  176. <view class="con-list">
  177. <input placeholder="请填写开户支行" name="input" v-model="items.bankDepositBranch"></input>
  178. </view>
  179. </view>
  180. <view class="c-row ">
  181. <text class="tit">收款人姓名</text>
  182. <view class="con-list">
  183. <input placeholder="请输入收款人姓名" name="input" v-model="items.payeeName"></input>
  184. </view>
  185. </view>
  186. <view class="c-row ">
  187. <text class="tit">收款人身份证号</text>
  188. <view class="con-list">
  189. <input placeholder="请输入收款人身份证号" name="input" v-model="items.payeeNumberCard"></input>
  190. </view>
  191. </view>
  192. </view>
  193. <button class="btn" v-if="openuserboolean == true" @click="userAdd()">
  194. <image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image>
  195. <text style="margin-top: -2px;">添加账户</text>
  196. </button>
  197. <!-- 账户信息 -->
  198. <view @click="openfujianclick" class="information">
  199. <view class="c-row">
  200. <text class="tit" style="line-height: 36px;">附件信息</text>
  201. <view class="con-list">
  202. <image style='width:17px;height:9px;' v-bind:src="openfujian" class="icon-up" openuserboolean></image>
  203. </view>
  204. </view>
  205. </view>
  206. <view v-if='openfujianboolean'>
  207. <view class="fujians" v-if="travels != ''" @click="travel">
  208. <view class="c-row ">
  209. <text class="picturebiaoti">行驶证</text>
  210. </view>
  211. <image v-bind:src="travels" class="picture"></image>
  212. </view>
  213. <view class="fujians" v-if="drives != ''" @click="drive">
  214. <view class="c-row ">
  215. <text class="picturebiaoti">驾驶证</text>
  216. </view>
  217. <image v-bind:src="drives" class="picture"></image>
  218. </view>
  219. <view class="fujians" v-if="operates != ''" @click="operate">
  220. <view class="c-row ">
  221. <text class="picturebiaoti">道路运营证</text>
  222. </view>
  223. <image v-bind:src="operates" class="picture"></image>
  224. </view>
  225. <view class="fujians" v-if="practices != ''" @click="practice">
  226. <view class="c-row ">
  227. <text class="picturebiaoti">从业资格证</text>
  228. </view>
  229. <image v-bind:src="practices" class="picture"></image>
  230. </view>
  231. </view>
  232. <button class="btn btns commit" @click="commitEdit">修改</button>
  233. </view>
  234. </view>
  235. </template>
  236. <script>
  237. import {
  238. mapState
  239. } from 'vuex';
  240. export default {
  241. data() {
  242. return {
  243. goods: {},
  244. ModelIndex: '高栏',
  245. Model: '',
  246. ModelType: ["高栏", "集装箱", "自卸车"],
  247. carLong: '',
  248. carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
  249. id: [],
  250. id1: "",
  251. id2: "",
  252. travels: "",
  253. drives: "",
  254. operates: "",
  255. practices: "",
  256. // bank1:"",
  257. // bank2:"",
  258. // bankid:[],
  259. sendText: '获取验证码',
  260. sendDisabled: false,
  261. cardAddress:[],
  262. sendText: '获取验证码',
  263. ModelIndex: '高栏',
  264. Model: '',
  265. dotStyle: false,
  266. ModelType: ["高栏", "集装箱", "自卸车"],
  267. carLong: '',
  268. carLongIndex: 0,
  269. carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
  270. driverCarInfoList: [],
  271. driverPayeeInfoList: [
  272. {bankDepositBranch:''}
  273. ],
  274. DriverViewInfo: {
  275. driverCarInfoList: [],
  276. driverPayeeInfoList: [],
  277. },
  278. params: {
  279. year: true,
  280. },
  281. params1: {
  282. province: true,
  283. city: true,
  284. },
  285. verifyCode: "",
  286. codestatus: false,
  287. customerPhone: '',
  288. addressUrl: [],
  289. opencarboolean: false,
  290. openuserboolean: false,
  291. openfujianboolean:false,
  292. carchength: true,
  293. showYearFlag: false,
  294. showFlag: false,
  295. opencar: "../../static/img/authentication/down2@3x.png",
  296. openuser: "../../static/img/authentication/down2@3x.png",
  297. openfujian: "../../static/img/authentication/down2@3x.png",
  298. bankimg: "",
  299. bankImgs1: {},
  300. bankIndex: -1,
  301. bankType: [],
  302. year:[],
  303. bankstatus:true,
  304. region:"请选择常驻城市",
  305. }
  306. },
  307. computed: {
  308. ...mapState(['hasLogin', 'userInfo'])
  309. },
  310. computed:{
  311. startData(){
  312. var data = new Date()
  313. return data.getFullYear() - 30
  314. },
  315. endData(){
  316. var data = new Date()
  317. return data.getFullYear()
  318. }
  319. },
  320. onLoad(option) {
  321. this.getList(option.id)
  322. },
  323. methods: {
  324. yearchange() {
  325. this.showYearFlag = true
  326. },
  327. regionchange() {
  328. this.showFlag = true
  329. },
  330. regionpicker(e) {
  331. // this.deptList.outputPrivate = e.province.label
  332. // this.deptList.outputCity = e.city.label
  333. this.region = e.province.label + '-' + e.city.label
  334. this.DriverViewInfo.residentCityProvincial = e.province.label + e.city.label
  335. },
  336. yearpicker(e, index) {
  337. this.year[index] = e.year
  338. this.driverCarInfoList[index].yearManufacture = e.year
  339. },
  340. changeCarChength() {
  341. this.carchength = !this.carchength
  342. },
  343. bankstatusChength() {
  344. this.bankstatus = !this.carchength
  345. },
  346. carAdd() {
  347. this.driverCarInfoList.push({
  348. carNumber: '',
  349. carModel: "",
  350. carLength: "",
  351. carLoad: "",
  352. yearManufacture: "",
  353. })
  354. },
  355. userAdd() {
  356. this.driverPayeeInfoList.push({
  357. accountType: "",
  358. cardAddressUrl: "",
  359. bankCard: "",
  360. bankDeposit: "",
  361. bankDepositBranch: "",
  362. payeeName: "",
  363. payeeNumberCard: "",
  364. })
  365. },
  366. carDel(index) {
  367. if (this.driverCarInfoList.length > 1) {
  368. this.driverCarInfoList.splice(index, 1)
  369. }
  370. },
  371. userDel(index) {
  372. if (this.driverPayeeInfoList.length > 1) {
  373. this.driverPayeeInfoList.splice(index, 1)
  374. }
  375. },
  376. opencarclick() {
  377. this.showYearFlag = false
  378. if (this.opencarboolean == false) {
  379. this.opencarboolean = true;
  380. this.opencar = "../../static/img/authentication/up2%20(3).png"
  381. } else if (this.opencarboolean == true) {
  382. this.opencarboolean = false;
  383. this.opencar = "../../static/img/authentication/down2@3x.png"
  384. }
  385. },
  386. openuserclick() {
  387. if (this.openuserboolean == false) {
  388. this.openuserboolean = true;
  389. this.openuser = "../../static/img/authentication/up2%20(3).png"
  390. } else if (this.openuserboolean == true) {
  391. this.openuserboolean = false;
  392. this.openuser = "../../static/img/authentication/down2@3x.png"
  393. }
  394. },
  395. openfujianclick() {
  396. if (this.openfujianboolean == false) {
  397. this.openfujianboolean = true;
  398. this.openfujian = "../../static/img/authentication/up2%20(3).png"
  399. } else if (this.openfujianboolean == true) {
  400. this.openfujianboolean = false;
  401. this.openfujian = "../../static/img/authentication/down2@3x.png"
  402. }
  403. },
  404. bankChange(e) {
  405. this.bankIndex = e.detail.value
  406. this.Model = this.bankType[this.bankIndex];
  407. this.driverPayeeInfoList[index].bankDepositBranch = this.bankType[this.bankIndex];
  408. },
  409. getList(ids) {
  410. this.$api.doRequest('get', '/driverViewInfo/getDriver', {
  411. id: ids
  412. }, 'application/json;charset=UTF-8').then(res => {
  413. this.procurementPlanInfos = res.data.data
  414. this.DriverViewInfo = res.data.data
  415. console.log(this.DriverViewInfo)
  416. this.driverCarInfoList = this.DriverViewInfo.driverCarInfoList
  417. this.driverPayeeInfoList = this.DriverViewInfo.driverPayeeInfoList
  418. this.addressUrl = this.DriverViewInfo.addressUrl.split(",")
  419. this.drivers = res.data.data
  420. if (this.drivers.cardAddressUrl != "") {
  421. this.cardAddress = this.drivers.cardAddressUrl.split(",")
  422. }
  423. if (this.drivers.addressUrl != "") {
  424. this.address = this.drivers.addressUrl.split(","),
  425. this.travels = this.address[0]
  426. this.drives = this.address[1]
  427. this.operates = this.address[2]
  428. this.practices = this.address[3]
  429. }
  430. this.region = this.DriverViewInfo.residentCityProvincial
  431. })
  432. .catch(res => {
  433. if(res.errmsg){
  434. uni.showToast({
  435. title: res.errmsg,
  436. icon: 'none',
  437. duration: 2000
  438. })
  439. }
  440. else{
  441. uni.showToast({
  442. title: "系统异常,请联系管理员",
  443. icon: 'none',
  444. duration: 2000
  445. })
  446. }
  447. });
  448. },
  449. commitEdit() {
  450. console.log(this.addressUrl, "数组")
  451. this.DriverViewInfo.addressUrl = this.addressUrl.toString()
  452. console.log(this.DriverViewInfo.addressUrl, "字符串")
  453. this.DriverViewInfo.driverCarInfoList = this.driverCarInfoList
  454. this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
  455. this.DriverViewInfo.commonId = this.userInfo.id
  456. this.DriverViewInfo.cardAddressUrl = this.id.toString()
  457. this.DriverViewInfo.pcFlag = 0
  458. // this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
  459. console.log(this.DriverViewInfo, "司机对象")
  460. this.$api.doRequest('post', '/driverViewInfo/api/editInfo', this.DriverViewInfo).then(res => {}).catch(
  461. res => {
  462. uni.showToast({
  463. title: res.data.message,
  464. icon: 'none',
  465. duration: 2000
  466. })
  467. })
  468. },
  469. bankimgs(items) {
  470. console.log(items)
  471. var that = this
  472. uni.chooseImage({
  473. success: function(res) {
  474. uni.uploadFile({
  475. url: 'https://www.zthymaoyi.com/upload/admin',
  476. filePath: res.tempFilePaths[0],
  477. name: 'file',
  478. success(res) {
  479. var data = res.data
  480. var strToObj = JSON.parse(data)
  481. // that.id[0] = strToObj.url
  482. that.bankimg = strToObj.url
  483. that.bankImgs1.bankImg = strToObj.url
  484. that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
  485. .bankImgs1).then(res => {
  486. console.log(res)
  487. that.$set(that.driverPayeeInfoList[items], 'bankCard', res
  488. .data.data.bankNo)
  489. that.$set(that.driverPayeeInfoList[items], 'bankDeposit',
  490. res.data.data.bankName)
  491. that.bankType = res.data.data.bankNameZhihang
  492. console.log(that.ban)
  493. }).catch(res => {
  494. uni.showToast({
  495. title: res.data.message,
  496. icon: 'none',
  497. duration: 2000
  498. })
  499. })
  500. }
  501. })
  502. }
  503. })
  504. },
  505. idUp() {
  506. var that = this
  507. uni.chooseImage({
  508. success: function(res) {
  509. uni.uploadFile({
  510. url: 'https://www.zthymaoyi.com/upload/admin',
  511. filePath: res.tempFilePaths[0],
  512. name: 'file',
  513. success(res) {
  514. var data = res.data
  515. var strToObj = JSON.parse(data)
  516. that.id[0] = strToObj.url
  517. that.id1 = strToObj.url
  518. }
  519. })
  520. }
  521. })
  522. },
  523. idLow() {
  524. var that = this
  525. uni.chooseImage({
  526. success: function(res) {
  527. uni.uploadFile({
  528. url: 'https://www.zthymaoyi.com/upload/admin',
  529. filePath: res.tempFilePaths[0],
  530. name: 'file',
  531. success(res) {
  532. var data = res.data
  533. var strToObj = JSON.parse(data)
  534. that.id[1] = strToObj.url
  535. that.id2 = strToObj.url
  536. }
  537. })
  538. }
  539. })
  540. },
  541. travel() {
  542. var that = this
  543. uni.chooseImage({
  544. success: function(res) {
  545. uni.uploadFile({
  546. url: 'https://www.zthymaoyi.com/upload/admin',
  547. filePath: res.tempFilePaths[0],
  548. name: 'file',
  549. success(res) {
  550. var data = res.data
  551. var strToObj = JSON.parse(data)
  552. that.travels = strToObj.url
  553. that.addressUrl[0] = strToObj.url
  554. console.log(that.addressUrl)
  555. }
  556. })
  557. }
  558. })
  559. },
  560. drive(){
  561. var that = this
  562. uni.chooseImage({
  563. success: function(res) {
  564. uni.uploadFile({
  565. url: 'https://www.zthymaoyi.com/upload/admin',
  566. filePath: res.tempFilePaths[0],
  567. name: 'file',
  568. success(res) {
  569. var data = res.data
  570. var strToObj = JSON.parse(data)
  571. that.drives = strToObj.url
  572. that.addressUrl[1] = strToObj.url
  573. console.log(that.addressUrl)
  574. }
  575. })
  576. }
  577. })
  578. },
  579. operate(){
  580. var that = this
  581. uni.chooseImage({
  582. success: function(res) {
  583. uni.uploadFile({
  584. url: 'https://www.zthymaoyi.com/upload/admin',
  585. filePath: res.tempFilePaths[0],
  586. name: 'file',
  587. success(res) {
  588. var data = res.data
  589. var strToObj = JSON.parse(data)
  590. that.operates = strToObj.url
  591. that.addressUrl[2] = strToObj.url
  592. console.log(that.addressUrl)
  593. }
  594. })
  595. }
  596. })
  597. },
  598. practice(){
  599. var that = this
  600. uni.chooseImage({
  601. success: function(res) {
  602. uni.uploadFile({
  603. url: 'https://www.zthymaoyi.com/upload/admin',
  604. filePath: res.tempFilePaths[0],
  605. name: 'file',
  606. success(res) {
  607. var data = res.data
  608. var strToObj = JSON.parse(data)
  609. that.practices = strToObj.url
  610. that.addressUrl[3] = strToObj.url
  611. console.log(that.addressUrl)
  612. }
  613. })
  614. },
  615. })
  616. },
  617. getcode() {
  618. var that = this
  619. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
  620. console.log(that.DriverViewInfo.driverPhone)
  621. this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
  622. phone: that.DriverViewInfo.driverPhone
  623. }).then(res => {
  624. if (res.data.code == 200) {
  625. that.sendDisabled = true
  626. let sec = 60
  627. let interval = setInterval(() => {
  628. sec--;
  629. that.sendText = sec + 's后重发'
  630. if (sec <= 0) {
  631. that.sendDisabled = false
  632. that.sendText = "获取验证码"
  633. clearInterval(interval)
  634. }
  635. }, 1000)
  636. } else {
  637. uni.showToast({
  638. title: res.data.message,
  639. icon: 'none',
  640. duration: 2000
  641. })
  642. }
  643. })
  644. .catch(res => {
  645. uni.showToast({
  646. title: res.data.message,
  647. icon: 'none',
  648. duration: 2000
  649. })
  650. });
  651. } else {
  652. uni.showToast({
  653. title: '请输入正确的手机号',
  654. icon: 'none',
  655. duration: 2000
  656. })
  657. }
  658. },
  659. ModelChange(e) {
  660. this.ModelIndex = e.detail.value
  661. this.Model = this.ModelType[this.ModelIndex];
  662. this.driverCarInfoList.carModel = this.ModelType[this.ModelIndex];
  663. },
  664. carLongChange(e) {
  665. this.carLongIndex = e.detail.value
  666. this.carLong = this.carLongType[this.carLongIndex];
  667. },
  668. }
  669. }
  670. </script>
  671. <style>
  672. .center {
  673. padding: 10px 20px;
  674. }
  675. .labels {
  676. font-size: 14px;
  677. }
  678. .cardaddress{
  679. background:#fff;
  680. padding:10px;
  681. border-radius:8px;
  682. }
  683. .cardaddress .title{
  684. padding:0px 0 10px;
  685. margin-bottom:10px;
  686. }
  687. .swiper-item image{
  688. border-radius:8px;
  689. }
  690. .c-row {
  691. display: -webkit-box;
  692. display: -webkit-flex;
  693. display: flex;
  694. -webkit-box-align: center;
  695. -webkit-align-items: center;
  696. align-items: center;
  697. padding: 20rpx 30rpx;
  698. position: relative;
  699. }
  700. .con-list {
  701. -webkit-box-flex: 1;
  702. -webkit-flex: 1;
  703. flex: 1;
  704. display: -webkit-box;
  705. display: -webkit-flex;
  706. display: flex;
  707. -webkit-box-orient: vertical;
  708. -webkit-box-direction: normal;
  709. -webkit-flex-direction: column;
  710. flex-direction: column;
  711. color: #303133;
  712. line-height: 40rpx;
  713. text-align: right;
  714. padding-right: 20rpx;
  715. font-size: 14px;
  716. }
  717. .con-list input{
  718. font-size:14px;
  719. }
  720. .getcode {
  721. font-size: 14px;
  722. position: absolute;
  723. top: 50%;
  724. transform: translateY(-50%);
  725. color: #AFB3BF;
  726. background: #F5F6F9;
  727. height: 30px;
  728. line-height: 30px;
  729. }
  730. .active {
  731. background: #22C572;
  732. color: #fff;
  733. }
  734. .uni-navigator {
  735. display: inline-block;
  736. color: #22C572;
  737. }
  738. .verificationCode {
  739. margin-top: 20px;
  740. background: #F5F6F9;
  741. color: #AFB3BF;
  742. }
  743. .verificationCode:after {
  744. border: none;
  745. }
  746. .verificationCode.active {
  747. background: #22C572;
  748. color: #fff;
  749. }
  750. .getcode {
  751. font-size: 14px;
  752. position: absolute;
  753. /* right:0; */
  754. top: 50%;
  755. transform: translateY(-50%);
  756. color: #AFB3BF;
  757. background: #F5F6F9;
  758. height: 30px;
  759. line-height: 30px;
  760. }
  761. .getcode:after {
  762. border: none;
  763. }
  764. .getcode.active {
  765. background: #22C572;
  766. color: #fff;
  767. }
  768. .picture {
  769. width: 100%;
  770. height: 220px;
  771. text-align: center;
  772. margin-top: 10px;
  773. }
  774. .fujians {
  775. margin: 0 auto;
  776. background-color: #FFFFFF;
  777. margin-top: 10px;
  778. border-radius: 8px;
  779. padding: 10px 10px;
  780. }
  781. .btn {
  782. margin-top: 10px;
  783. background-color: #FFFFFF;
  784. border-radius: 8px;
  785. color:#00C265;
  786. border: none;
  787. }
  788. .btn:after{
  789. border:none;
  790. }
  791. .btns {
  792. background-color: #22C572;
  793. color: white;
  794. }
  795. .btn.commit{
  796. color:#fff;
  797. }
  798. .information {
  799. margin-top: 10px;
  800. width: 100%;
  801. height: 56px;
  802. background-color: #FFFFFF;
  803. border-radius: 8px;
  804. line-height: 56px;
  805. }
  806. .information .c-row{
  807. height:56px;
  808. align-items: center;
  809. }
  810. .information .c-row .icon-up{
  811. align-self:flex-end;
  812. }
  813. .informations {
  814. margin-top: 10px;
  815. background-color: #FFFFFF;
  816. border-radius: 8px;
  817. }
  818. .personalcss {
  819. background-color: #FFFFFF;
  820. border-radius: 8px;
  821. margin-top: 10px;
  822. }
  823. .open {
  824. width: 30px;
  825. height: 20px;
  826. position: absolute;
  827. right: 20px;
  828. margin-top: -10px;
  829. }
  830. .add {
  831. width: 26px;
  832. height: 26px;
  833. /* background-image: url(../../static/img/jiaoyi/ic_fabu@3x.png); */
  834. }
  835. /* 清除 */
  836. .eliminate {
  837. width: 20px;
  838. height: 20px;
  839. align-self: flex-end;
  840. }
  841. .bankImg {
  842. width: 20px;
  843. height: 20px;
  844. }
  845. .icon-up{
  846. width:17px;height:9px;
  847. }
  848. </style>