driverIdentity.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <view class="center">
  3. <view>
  4. <view class="labels">司机信息</view>
  5. <view>
  6. <button type="default" @click="idUp">上传身份证正面</button>
  7. <view style="width: 100px;margin: 0 auto;" v-if="id1 != ''">
  8. <image v-bind:src = "id1" style="width: 100px;height: 100px;"></image>
  9. </view>
  10. <button type="default" @click="idLow">上传身份证反面</button>
  11. <view style="width: 100px;margin: 0 auto;" v-if="id2 != ''">
  12. <image v-bind:src = "id2" style="width: 100px;height: 100px;"></image>
  13. </view>
  14. </view>
  15. <view class="c-row b-b">
  16. <text class="tit">姓名</text>
  17. <view class="con-list">
  18. <input placeholder="请填写姓名" name="input" @input="addressInput"></input>
  19. </view>
  20. </view>
  21. <view class="c-row b-b">
  22. <text class="tit">身份证号</text>
  23. <view class="con-list">
  24. <input placeholder="请填写身份证号" name="input" @input="addressInput"></input>
  25. </view>
  26. </view>
  27. <view class="c-row b-b">
  28. <text class="tit">手机号</text>
  29. <view class="con-list">
  30. <input placeholder="请填写手机号" name="input" @input="addressInput"></input>
  31. </view>
  32. </view>
  33. <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
  34. <button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
  35. class='getcode'>{{sendText}}</button>
  36. <view style='width:70%;position:relative;margin-left: 200px;'>
  37. <input v-model='verifyCode' placeholder="请输入验证码" type="text">
  38. </view>
  39. </view>
  40. <view class="c-row b-b">
  41. <text class="tit">常驻城市</text>
  42. <view class="con-list">
  43. <input placeholder="请填写常驻城市" name="input" @input="addressInput"></input>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="margin-top">
  48. <view class="labels">货车信息</view>
  49. <view class="labels"> 车辆 -?</view>
  50. <view class="c-row b-b">
  51. <text class="tit">车牌号</text>
  52. <view class="con-list">
  53. <input placeholder="请填写车牌号" name="input" @input="addressInput"></input>
  54. </view>
  55. </view>
  56. <view class="c-row b-b">
  57. <text class="tit">车型</text>
  58. <!-- <view class="con-list"> -->
  59. <picker @change="ModelChange" :value="ModelIndex" :range="ModelType" class="con-list">
  60. <view class="picker " >
  61. {{ModelIndex>-1?ModelType[ModelIndex]:'请选择车型'}}
  62. </view>
  63. </picker>
  64. <!-- </view> -->
  65. </view>
  66. <view class="c-row b-b">
  67. <text class="tit">不含车头车长(米)</text>
  68. <!-- <view class="con-list"> -->
  69. <picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list">
  70. <view class="picker">
  71. {{carLongIndex>-1?carLongType[carLongIndex]:'请选择车长'}}
  72. </view>
  73. </picker>
  74. <!-- </view> -->
  75. </view>
  76. <view class="c-row b-b">
  77. <text class="tit">载重(吨)</text>
  78. <view class="con-list">
  79. <input placeholder="请填写载重(吨)" name="input" @input="addressInput"></input>
  80. </view>
  81. </view>
  82. <view class="c-row b-b">
  83. <text class="tit">出厂年份</text>
  84. <view class="con-list">
  85. <input placeholder="请填写载重(吨)" name="input" @input="addressInput"></input>
  86. </view>
  87. </view>
  88. <button type="default">添加车辆</button>
  89. </view>
  90. <view class="margin-top">
  91. <view class="labels">账户信息</view>
  92. <view class="labels"> 账户 -?</view>
  93. <view class="c-row b-b">
  94. <text class="tit">账户类型</text>
  95. <view class="con-list">
  96. <input placeholder="请填写账户类型" name="input" @input="addressInput"></input>
  97. </view>
  98. </view>
  99. <view class="c-row b-b">
  100. <text class="tit">银行卡照片(可选)</text>
  101. <view class="con-list">
  102. <input placeholder="请上传照片" name="input" @input="addressInput"></input>
  103. </view>
  104. </view>
  105. <view class="c-row b-b">
  106. <text class="tit">银行卡号</text>
  107. <view class="con-list">
  108. <input placeholder="请输入银行卡号" name="input" @input="addressInput"></input>
  109. </view>
  110. </view>
  111. <view class="c-row b-b">
  112. <text class="tit">开户行</text>
  113. <view class="con-list">
  114. <input placeholder="请输入开户行" name="input" @input="addressInput"></input>
  115. </view>
  116. </view>
  117. <view class="c-row b-b">
  118. <text class="tit">开户支行</text>
  119. <view class="con-list">
  120. <input placeholder="请输入开户支行" name="input" @input="addressInput"></input>
  121. </view>
  122. </view>
  123. <view class="c-row b-b">
  124. <text class="tit">收款人姓名</text>
  125. <view class="con-list">
  126. <input placeholder="请输入收款人姓名" name="input" @input="addressInput"></input>
  127. </view>
  128. </view>
  129. <view class="c-row b-b">
  130. <text class="tit">收款人身份证号</text>
  131. <view class="con-list">
  132. <input placeholder="请输入收款人身份证号" name="input" @input="addressInput"></input>
  133. </view>
  134. </view>
  135. <button type="default">添加账号</button>
  136. </view>
  137. <view class="margin-top">
  138. <view class="labels">上传附件</view>
  139. <button type="default">行驶证</button>
  140. <button type="default">驾驶证</button>
  141. <button type="default">道路运营证</button>
  142. <button type="default">从业资格证</button>
  143. </view>
  144. </view>
  145. </template>
  146. <script>
  147. export default {
  148. data() {
  149. return {
  150. goods:{},
  151. ModelIndex:'高栏',
  152. Model:'',
  153. ModelType:["高栏","集装箱","自卸车"],
  154. carLong:'',
  155. carLongType:['13','9.6','8.2','8.7','11.7','12.5','13.7','15','16','17.5'],
  156. id:[],
  157. id1:"",
  158. id2:"",
  159. // bank1:"",
  160. // bank2:"",
  161. // bankid:[],
  162. sendText: '获取验证码',
  163. }
  164. },
  165. methods: {
  166. ModelChange(e){
  167. this.ModelIndex = e.detail.value
  168. this.Model = this.ModelType[this.ModelIndex];
  169. },
  170. carLongChange(e){
  171. this.carLongIndex = e.detail.value
  172. this.carLong = this.carLongType[this.carLongIndex];
  173. },
  174. idUp(){
  175. var that = this
  176. wx.chooseImage({
  177. success: function(res) {
  178. wx.uploadFile({
  179. url: 'https://www.zthymaoyi.com/upload/admin',
  180. filePath: res.tempFilePaths[0],
  181. name: 'file',
  182. success(res) {
  183. var data = res.data
  184. var strToObj = JSON.parse(data)
  185. that.id[0] = strToObj.url
  186. that.id1 = strToObj.url
  187. }
  188. })
  189. }
  190. })
  191. },
  192. idLow(){
  193. var that = this
  194. wx.chooseImage({
  195. success: function(res) {
  196. wx.uploadFile({
  197. url: 'https://www.zthymaoyi.com/upload/admin',
  198. filePath: res.tempFilePaths[0],
  199. name: 'file',
  200. success(res) {
  201. var data = res.data
  202. var strToObj = JSON.parse(data)
  203. that.id[1] = strToObj.url
  204. that.id2 = strToObj.url
  205. }
  206. })
  207. }
  208. })
  209. },
  210. getcode() {
  211. var that = this
  212. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.identityAuthenticationInfo.customerPhone)) {
  213. this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
  214. phone: this.identityAuthenticationInfo.customerPhone
  215. }).then(res => {
  216. if (res.data.code == 200) {
  217. that.sendDisabled = true
  218. let sec = 60
  219. let interval = setInterval(() => {
  220. sec--;
  221. that.sendText = sec + 's后重发'
  222. if (sec <= 0) {
  223. that.sendDisabled = false
  224. that.sendText = "获取验证码"
  225. clearInterval(interval)
  226. }
  227. }, 1000)
  228. } else {
  229. uni.showToast({
  230. title: res.data.message,
  231. icon: 'none',
  232. duration: 2000
  233. })
  234. }
  235. })
  236. .catch(res => {
  237. uni.showToast({
  238. title: res.data.message,
  239. icon: 'none',
  240. duration: 2000
  241. })
  242. });
  243. } else {
  244. uni.showToast({
  245. title: '请输入正确的手机号',
  246. icon: 'none',
  247. duration: 2000
  248. })
  249. }
  250. },
  251. }
  252. }
  253. </script>
  254. <style>
  255. .center{
  256. padding: 10px 20px;
  257. }
  258. .labels{
  259. font-size: 16px;
  260. font-weight: 400;
  261. }
  262. .c-row {
  263. display: -webkit-box;
  264. display: -webkit-flex;
  265. display: flex;
  266. -webkit-box-align: center;
  267. -webkit-align-items: center;
  268. align-items: center;
  269. padding: 20rpx 30rpx;
  270. position: relative;
  271. }
  272. .con-list {
  273. -webkit-box-flex: 1;
  274. -webkit-flex: 1;
  275. flex: 1;
  276. display: -webkit-box;
  277. display: -webkit-flex;
  278. display: flex;
  279. -webkit-box-orient: vertical;
  280. -webkit-box-direction: normal;
  281. -webkit-flex-direction: column;
  282. flex-direction: column;
  283. color: #303133;
  284. line-height: 40rpx;
  285. text-align: right;
  286. padding-right: 20rpx;
  287. font-size: 14px;
  288. }
  289. .getcode {
  290. font-size: 14px;
  291. position: absolute;
  292. top: 50%;
  293. transform: translateY(-50%);
  294. color: #AFB3BF;
  295. background: #F5F6F9;
  296. height: 30px;
  297. line-height: 30px;
  298. }
  299. .getcode.active {
  300. border: none;
  301. }
  302. .uni-navigator{
  303. display:inline-block;
  304. color:#22C572;
  305. }
  306. .getcode.active {
  307. background: #22C572;
  308. color: #fff;
  309. }
  310. </style>