driverIdentityEdit.vue 23 KB

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