driverCertificationNext.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <view class="content">
  3. <u-radio-group v-model="radiovalue1" iconPlacement="row">
  4. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  5. :label="item.name" :name="item.name" @change="radioChange">
  6. </u-radio>
  7. </u-radio-group>
  8. <view class="level1-title">证件信息</view>
  9. <view class="content1">
  10. <view class="flex flex-space-between">
  11. <view class="left">
  12. <view>驾驶证主页</view>
  13. <u-button type="primary">上传驾驶证主页</u-button>
  14. </view>
  15. <view class="left">
  16. <view>驾驶证副页</view>
  17. <u-button type="primary">上传驾驶证副页</u-button>
  18. </view>
  19. </view>
  20. <view class="flex flex-space-between">
  21. <view>驾驶证有效期</view>
  22. <view>选择驾驶证有效期</view>
  23. </view>
  24. </view>
  25. <u-divider text="分割线"></u-divider>
  26. <view class="content2">
  27. <view class="flex flex-space-between">
  28. <view class="left">
  29. <view>行驶证主页</view>
  30. <u-button type="primary">上传行驶证主页</u-button>
  31. </view>
  32. <view class="left">
  33. <view>行驶证副页</view>
  34. <u-button type="primary">上传行驶证副页</u-button>
  35. </view>
  36. </view>
  37. <view class="flex flex-space-between">
  38. <view>行驶证有效期</view>
  39. <view>选择行驶证有效期</view>
  40. </view>
  41. </view>
  42. <u-divider text="分割线"></u-divider>
  43. <view class="content3">
  44. <view class="flex flex-space-between">
  45. <view class="left">
  46. <view>挂车行驶证主页</view>
  47. <u-button type="primary">上传挂车行驶证主页</u-button>
  48. </view>
  49. <view class="left">
  50. <view>挂车行驶证副页</view>
  51. <u-button type="primary">上传挂车行驶证副页</u-button>
  52. </view>
  53. </view>
  54. <view class="flex flex-space-between">
  55. <view>挂车行驶证有效期</view>
  56. <view>选择挂车行驶证有效期</view>
  57. </view>
  58. <u-divider text="分割线"></u-divider>
  59. </view>
  60. <view class="content4">
  61. <view class="flex s-row">
  62. <view class="">从业资格证</view>
  63. <u-button type="primary">上传从业资格证</u-button>
  64. </view>
  65. <view class="flex flex-space-between">
  66. <view>从业资格证有效期</view>
  67. <view>选择从业资格证有效期</view>
  68. </view>
  69. </view>
  70. <u-divider text="分割线"></u-divider>
  71. <view class="content5">
  72. <view class="flex s-row">
  73. <view class="">运营证</view>
  74. <u-button type="primary">上传运营证</u-button>
  75. </view>
  76. <view class="flex flex-space-between">
  77. <view>运营证有效期</view>
  78. <view>选择运营证有效期</view>
  79. </view>
  80. </view>
  81. <u-divider text="分割线"></u-divider>
  82. <view class="content6">
  83. <view class="flex s-row">
  84. <view class="">挂车运营证</view>
  85. <u-button type="primary">上传挂车运营证</u-button>
  86. </view>
  87. <view class="flex flex-space-between">
  88. <view>挂车运营证有效期</view>
  89. <view>选择挂车运营证有效期</view>
  90. </view>
  91. </view>
  92. <u-button type="primary" @click="submit">提交</u-button>
  93. <u-toast ref="uToast"></u-toast>
  94. </view>
  95. </template>
  96. <script>
  97. import uploadImage from '@/components/ossutil/uploadFile.js';
  98. var _this;
  99. export default {
  100. components: {},
  101. data() {
  102. return {
  103. radiolist1: [{
  104. name: '挂车司机',
  105. disabled: false
  106. },
  107. {
  108. name: '非挂车司机',
  109. disabled: false
  110. }
  111. ],
  112. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  113. radiovalue1: '挂车司机',
  114. };
  115. },
  116. onLoad(options) {
  117. _this = this;
  118. console.log(options)
  119. },
  120. methods: {
  121. submit() {
  122. // 校验
  123. console.log('提交')
  124. },
  125. radioChange(n) {
  126. console.log('radioChange', n);
  127. },
  128. //设置图片
  129. setImage(e) {
  130. //
  131. console.log(e);
  132. //显示在页面
  133. //this.imagesrc = e.path;
  134. if (e.dotype == 'idphoto') {
  135. _this.zjzClipper(e.path);
  136. } else if (e.dotype == 'watermark') {
  137. _this.watermark(e.path);
  138. } else {
  139. _this.savePhoto(e.path);
  140. }
  141. },
  142. //保存图片到相册,方便核查
  143. savePhoto(path) {
  144. //
  145. this.imagesrc = path;
  146. uploadImage(path, 'appData/',
  147. result => {
  148. // 上传成功
  149. console.log('图片地址', result)
  150. }
  151. )
  152. //保存到相册
  153. // uni.saveImageToPhotosAlbum({
  154. // filePath: path,
  155. // success: () => {
  156. // uni.showToast({
  157. // title: '已保存至相册',
  158. // duration: 2000
  159. // });
  160. // }
  161. // });
  162. },
  163. uploadImg(type) {
  164. this.uploadType = type
  165. this.isShowimgType = true
  166. },
  167. photograph() {
  168. console.log('拍照')
  169. let that = this;
  170. uni.chooseImage({
  171. count: 1,
  172. success: function(res) {
  173. console.log(JSON.stringify(res.tempFilePaths));
  174. uploadImage(res.tempFilePaths[0], 'appData/',
  175. result => {
  176. // 上传成功
  177. console.log('图片地址', result)
  178. }
  179. )
  180. }
  181. });
  182. },
  183. imgTypeSelect(val) {
  184. console.log(val)
  185. console.log(this.uploadType)
  186. if (val.name == '相册') {
  187. uni.chooseImage({
  188. count: 1,
  189. sourceType: this.$helper.chooseImage.sourceType,
  190. success: function(res) {
  191. console.log(JSON.stringify(res.tempFilePaths));
  192. uploadImage(res.tempFilePaths[0], 'appData/',
  193. result => {
  194. // 上传成功
  195. console.log('图片地址', result)
  196. switch (this.uploadType) {
  197. case 0:
  198. console.log('人车合影')
  199. break
  200. case 1:
  201. console.log('身份正面')
  202. break
  203. case 2:
  204. console.log('身份反面')
  205. break
  206. case 3:
  207. console.log('银行卡')
  208. break
  209. case 4:
  210. }
  211. }
  212. )
  213. }
  214. });
  215. } else {
  216. //
  217. switch (this.uploadType) {
  218. case 0:
  219. console.log('人车合影')
  220. break
  221. case 1:
  222. uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=face');
  223. console.log('身份正面')
  224. break
  225. case 2:
  226. console.log('身份反面')
  227. break
  228. case 3:
  229. console.log('银行卡')
  230. break
  231. case 4:
  232. }
  233. }
  234. },
  235. // 上传人车合影
  236. unloadGroupPhoto() {
  237. this.isShowimgType = true
  238. // uni.chooseImage({
  239. // count: 1,
  240. // success: function (res) {
  241. // console.log(JSON.stringify(res.tempFilePaths));
  242. // uploadImage(res.tempFilePaths[0], 'appData/',
  243. // result => {
  244. // // 上传成功
  245. // console.log('图片地址', result)
  246. // }
  247. // )
  248. // }
  249. // });
  250. },
  251. //身份证正面
  252. getImgUrl1(src) {
  253. // console.log(src)
  254. // console.log('------------res-----------')
  255. // let that = this;
  256. // that.id[0] = src
  257. // that.id1 = src
  258. // that.certificates = false
  259. // that.personImgs.personImg = that.id[0]
  260. // that.$api.doRequest('get', '/driverViewInfo/personShibie', that
  261. // .personImgs).then(res => {
  262. // if (res.data.data.recPerson != null) {
  263. // if (res.data.data.recPerson != "") {
  264. // that.$set(that.DriverViewInfo, 'driverName', res
  265. // .data.data.recPerson)
  266. // }
  267. // }
  268. // if (res.data.data.recPersonNo != null) {
  269. // if (res.data.data.recPersonNo != "") {
  270. // that.$set(that.DriverViewInfo, 'numberCard', res
  271. // .data.data.recPersonNo)
  272. // }
  273. // }
  274. // }).catch(res => {
  275. // uni.showToast({
  276. // title: res.data.message,
  277. // icon: 'none',
  278. // duration: 2000
  279. // })
  280. // })
  281. },
  282. // getImgUrl(res) {
  283. // // this.detailData.addressUrl = res
  284. // console.log(res)
  285. // console.log('------------res-----------')
  286. // },
  287. // onError(error) {
  288. // console.log('------------error-----------')
  289. // console.log(error)
  290. // },
  291. // onRemove(index) {},
  292. // filterFileType(index, lists) {
  293. // if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  294. // lists.splice(index, 1);
  295. // // 当前文件不支持
  296. // uni.showModal({
  297. // title: '暂不支持当前图片类型',
  298. // showCancel: false
  299. // });
  300. // } else {
  301. // this.isAdd = false;
  302. // }
  303. // },
  304. // onProgress(e) {
  305. // console.log(e)
  306. // },
  307. },
  308. };
  309. </script>
  310. <style scoped lang="scss">
  311. .row4-img {
  312. width: 32rpx;
  313. height: 32rpx;
  314. }
  315. </style>