driverIdentityEdit.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  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. <view class="con-list">
  177. <input placeholder="请填写开户支行" name="input" v-model="items.bankDepositBranch"></input>
  178. </view>
  179. </view>
  180. <view class="c-row b-b">
  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 b-b">
  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 b-b">
  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 b-b">
  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 b-b">
  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. 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. bankstatus:true,
  304. region:"请选择常驻城市",
  305. }
  306. },
  307. computed: {
  308. ...mapState(['hasLogin', 'userInfo'])
  309. },
  310. computed:{
  311. yearchange() {
  312. this.show = true
  313. },
  314. startData(){
  315. var data = new Date()
  316. return data.getFullYear() - 30
  317. },
  318. endData(){
  319. var data = new Date()
  320. return data.getFullYear()
  321. }
  322. },
  323. onLoad(option) {
  324. this.getList(option.id)
  325. },
  326. methods: {
  327. regionchange() {
  328. this.show1 = 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. if (this.opencarboolean == false) {
  378. this.opencarboolean = true;
  379. this.opencar = "../../static/img/authentication/up2%20(3).png"
  380. } else if (this.opencarboolean == true) {
  381. this.opencarboolean = false;
  382. this.opencar = "../../static/img/authentication/down2@3x.png"
  383. }
  384. },
  385. openuserclick() {
  386. if (this.openuserboolean == false) {
  387. this.openuserboolean = true;
  388. this.openuser = "../../static/img/authentication/up2%20(3).png"
  389. } else if (this.openuserboolean == true) {
  390. this.openuserboolean = false;
  391. this.openuser = "../../static/img/authentication/down2@3x.png"
  392. }
  393. },
  394. openfujianclick() {
  395. if (this.openfujianboolean == false) {
  396. this.openfujianboolean = true;
  397. this.openfujian = "../../static/img/authentication/up2%20(3).png"
  398. } else if (this.openfujianboolean == true) {
  399. this.openfujianboolean = false;
  400. this.openfujian = "../../static/img/authentication/down2@3x.png"
  401. }
  402. },
  403. bankChange(e) {
  404. this.bankIndex = e.detail.value
  405. this.Model = this.bankType[this.bankIndex];
  406. this.driverPayeeInfoList[index].bankDepositBranch = this.bankType[this.bankIndex];
  407. },
  408. getList(ids) {
  409. this.$api.doRequest('get', '/driverViewInfo/getDriver', {
  410. id: ids
  411. }, 'application/json;charset=UTF-8').then(res => {
  412. this.procurementPlanInfos = res.data.data
  413. this.DriverViewInfo = res.data.data
  414. console.log(this.DriverViewInfo)
  415. this.driverCarInfoList = this.DriverViewInfo.driverCarInfoList
  416. this.driverPayeeInfoList = this.DriverViewInfo.driverPayeeInfoList
  417. this.addressUrl = this.DriverViewInfo.addressUrl.split(",")
  418. this.drivers = res.data.data
  419. if (this.drivers.cardAddressUrl != "") {
  420. this.cardAddress = this.drivers.cardAddressUrl.split(",")
  421. }
  422. if (this.drivers.addressUrl != "") {
  423. this.address = this.drivers.addressUrl.split(","),
  424. this.travels = this.address[0]
  425. this.drives = this.address[1]
  426. this.operates = this.address[2]
  427. this.practices = this.address[3]
  428. }
  429. this.region = this.DriverViewInfo.residentCityProvincial
  430. })
  431. .catch(res => {
  432. if(res.errmsg){
  433. uni.showToast({
  434. title: res.errmsg,
  435. icon: 'none',
  436. duration: 2000
  437. })
  438. }
  439. else{
  440. uni.showToast({
  441. title: "系统异常,请联系管理员",
  442. icon: 'none',
  443. duration: 2000
  444. })
  445. }
  446. });
  447. },
  448. commitEdit() {
  449. console.log(this.addressUrl, "数组")
  450. this.DriverViewInfo.addressUrl = this.addressUrl.toString()
  451. console.log(this.DriverViewInfo.addressUrl, "字符串")
  452. this.DriverViewInfo.driverCarInfoList = this.driverCarInfoList
  453. this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
  454. this.DriverViewInfo.commonId = this.userInfo.id
  455. this.DriverViewInfo.cardAddressUrl = this.id.toString()
  456. this.DriverViewInfo.pcFlag = 0
  457. this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
  458. console.log(this.DriverViewInfo, "司机对象")
  459. this.$api.doRequest('post', '/driverViewInfo/api/editInfo', this.DriverViewInfo).then(res => {}).catch(
  460. res => {
  461. uni.showToast({
  462. title: res.data.message,
  463. icon: 'none',
  464. duration: 2000
  465. })
  466. })
  467. },
  468. bankimgs(items) {
  469. console.log(items)
  470. var that = this
  471. uni.chooseImage({
  472. success: function(res) {
  473. uni.uploadFile({
  474. url: 'https://www.zthymaoyi.com/upload/admin',
  475. filePath: res.tempFilePaths[0],
  476. name: 'file',
  477. success(res) {
  478. var data = res.data
  479. var strToObj = JSON.parse(data)
  480. // that.id[0] = strToObj.url
  481. that.bankimg = strToObj.url
  482. that.bankImgs1.bankImg = strToObj.url
  483. that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
  484. .bankImgs1).then(res => {
  485. console.log(res)
  486. that.$set(that.driverPayeeInfoList[items], 'bankCard', res
  487. .data.data.bankNo)
  488. that.$set(that.driverPayeeInfoList[items], 'bankDeposit',
  489. res.data.data.bankName)
  490. that.bankType = res.data.data.bankNameZhihang
  491. console.log(that.ban)
  492. }).catch(res => {
  493. uni.showToast({
  494. title: res.data.message,
  495. icon: 'none',
  496. duration: 2000
  497. })
  498. })
  499. }
  500. })
  501. }
  502. })
  503. },
  504. idUp() {
  505. var that = this
  506. uni.chooseImage({
  507. success: function(res) {
  508. uni.uploadFile({
  509. url: 'https://www.zthymaoyi.com/upload/admin',
  510. filePath: res.tempFilePaths[0],
  511. name: 'file',
  512. success(res) {
  513. var data = res.data
  514. var strToObj = JSON.parse(data)
  515. that.id[0] = strToObj.url
  516. that.id1 = strToObj.url
  517. }
  518. })
  519. }
  520. })
  521. },
  522. idLow() {
  523. var that = this
  524. uni.chooseImage({
  525. success: function(res) {
  526. uni.uploadFile({
  527. url: 'https://www.zthymaoyi.com/upload/admin',
  528. filePath: res.tempFilePaths[0],
  529. name: 'file',
  530. success(res) {
  531. var data = res.data
  532. var strToObj = JSON.parse(data)
  533. that.id[1] = strToObj.url
  534. that.id2 = strToObj.url
  535. }
  536. })
  537. }
  538. })
  539. },
  540. travel() {
  541. var that = this
  542. uni.chooseImage({
  543. success: function(res) {
  544. uni.uploadFile({
  545. url: 'https://www.zthymaoyi.com/upload/admin',
  546. filePath: res.tempFilePaths[0],
  547. name: 'file',
  548. success(res) {
  549. var data = res.data
  550. var strToObj = JSON.parse(data)
  551. that.travels = strToObj.url
  552. that.addressUrl[0] = strToObj.url
  553. console.log(that.addressUrl)
  554. }
  555. })
  556. }
  557. })
  558. },
  559. drive(){
  560. var that = this
  561. uni.chooseImage({
  562. success: function(res) {
  563. uni.uploadFile({
  564. url: 'https://www.zthymaoyi.com/upload/admin',
  565. filePath: res.tempFilePaths[0],
  566. name: 'file',
  567. success(res) {
  568. var data = res.data
  569. var strToObj = JSON.parse(data)
  570. that.drives = strToObj.url
  571. that.addressUrl[1] = strToObj.url
  572. console.log(that.addressUrl)
  573. }
  574. })
  575. }
  576. })
  577. },
  578. operate(){
  579. var that = this
  580. uni.chooseImage({
  581. success: function(res) {
  582. uni.uploadFile({
  583. url: 'https://www.zthymaoyi.com/upload/admin',
  584. filePath: res.tempFilePaths[0],
  585. name: 'file',
  586. success(res) {
  587. var data = res.data
  588. var strToObj = JSON.parse(data)
  589. that.operates = strToObj.url
  590. that.addressUrl[2] = strToObj.url
  591. console.log(that.addressUrl)
  592. }
  593. })
  594. }
  595. })
  596. },
  597. practice(){
  598. var that = this
  599. uni.chooseImage({
  600. success: function(res) {
  601. uni.uploadFile({
  602. url: 'https://www.zthymaoyi.com/upload/admin',
  603. filePath: res.tempFilePaths[0],
  604. name: 'file',
  605. success(res) {
  606. var data = res.data
  607. var strToObj = JSON.parse(data)
  608. that.practices = strToObj.url
  609. that.addressUrl[3] = strToObj.url
  610. console.log(that.addressUrl)
  611. }
  612. })
  613. },
  614. })
  615. },
  616. getcode() {
  617. var that = this
  618. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
  619. console.log(that.DriverViewInfo.driverPhone)
  620. this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
  621. phone: that.DriverViewInfo.driverPhone
  622. }).then(res => {
  623. if (res.data.code == 200) {
  624. that.sendDisabled = true
  625. let sec = 60
  626. let interval = setInterval(() => {
  627. sec--;
  628. that.sendText = sec + 's后重发'
  629. if (sec <= 0) {
  630. that.sendDisabled = false
  631. that.sendText = "获取验证码"
  632. clearInterval(interval)
  633. }
  634. }, 1000)
  635. } else {
  636. uni.showToast({
  637. title: res.data.message,
  638. icon: 'none',
  639. duration: 2000
  640. })
  641. }
  642. })
  643. .catch(res => {
  644. uni.showToast({
  645. title: res.data.message,
  646. icon: 'none',
  647. duration: 2000
  648. })
  649. });
  650. } else {
  651. uni.showToast({
  652. title: '请输入正确的手机号',
  653. icon: 'none',
  654. duration: 2000
  655. })
  656. }
  657. },
  658. ModelChange(e) {
  659. this.ModelIndex = e.detail.value
  660. this.Model = this.ModelType[this.ModelIndex];
  661. this.driverCarInfoList.carModel = this.ModelType[this.ModelIndex];
  662. },
  663. carLongChange(e) {
  664. this.carLongIndex = e.detail.value
  665. this.carLong = this.carLongType[this.carLongIndex];
  666. },
  667. }
  668. }
  669. </script>
  670. <style>
  671. .center {
  672. padding: 10px 20px;
  673. }
  674. .labels {
  675. font-size: 14px;
  676. }
  677. .cardaddress{
  678. background:#fff;
  679. padding:10px;
  680. border-radius:8px;
  681. }
  682. .cardaddress .title{
  683. padding:0px 0 10px;
  684. border-bottom:1px solid #EEEEEE;
  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>