混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
4.7 KiB

1 week ago
  1. <template>
  2. <view class="content">
  3. <view class="cr mt40">
  4. <view class="re-card-p32">
  5. <view class="flex-sb">
  6. <view class="re-from-label">请点击下方图片上传车辆照片</view>
  7. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/car1.png')">查看示例</view>
  8. </view>
  9. <input-image :url="car.carimage" @success="(url) => car.carimage = url" :height="456"/>
  10. <view class="re-card-context" v-if="edit">
  11. 请在<span>支腿收起状态下在左前方45度角</span>进行拍摄
  12. </view>
  13. </view>
  14. <view class="re-card-p32">
  15. <view class="flex-sb">
  16. <view class="re-from-label">请点击下方图片上传车辆行驶证</view>
  17. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/car2.png')">查看示例</view>
  18. </view>
  19. <input-image :url="car.xszaimage" @success="(url) => car.xszaimage = url" :height="342"/>
  20. <input-image :url="car.xszbimage" @success="(url) => car.xszbimage = url" :height="342"/>
  21. <view class="re-card-context" v-if="edit">
  22. <p>中华人民共和国机动车<span>行驶证</span>正反面</p>
  23. <p>拍摄时确保行驶证<span>边框完整字迹清晰亮度均匀无遮挡涂鸦</span></p>
  24. </view>
  25. </view>
  26. <view class="re-card-p32">
  27. <view class="flex-sb">
  28. <view class="re-from-label">请点击下方图片上传车辆交强险截图</view>
  29. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/car4.png')">查看示例</view>
  30. </view>
  31. <input-image :url="car.jqximage" @success="(url) => car.jqximage = url" :height="800"/>
  32. <view class="re-card-context" v-if="edit">
  33. <p>您需要提供有效期内<span>机动车交通事故责任强制保险单</span>的纸质保单正面或电子保单截图</p>
  34. <p>上传时需确保截图内包含<span>车牌号车架号以及有效期</span>等关键信息</p>
  35. </view>
  36. </view>
  37. <view class="re-card-p32">
  38. <view class="flex-sb">
  39. <view class="re-from-label">请点击下方图片上传车辆商业险截图</view>
  40. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/car5.png')">查看示例</view>
  41. </view>
  42. <input-image :url="car.syximage" @success="(url) => car.syximage = url" :height="800"/>
  43. <view class="re-card-context" v-if="edit">
  44. <p>您需要提供有效期内<span>机动车商业保险保险单</span>的纸质保单正面或电子保单截图</p>
  45. <p>上传时需确保截图内包含<span>车牌号车架号以及有效期</span>等关键信息</p>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- <view class="re-end-pand">
  50. <button @click="clickSaveAndBack()">上传保存</button>
  51. </view> -->
  52. <show-example ref="showe" :show="show" :url="url" @close="show=false"/>
  53. </view>
  54. </template>
  55. <script>
  56. import InputImage from "/components/input-image.vue"
  57. import ShowExample from "/components/show-example.vue"
  58. export default {
  59. components: {
  60. InputImage,
  61. ShowExample
  62. },
  63. data() {
  64. return {
  65. edit: "",
  66. show: false,
  67. url: "",
  68. id: "",
  69. car: {
  70. carimage:"",
  71. xszaimage:"",
  72. xszbimage:"",
  73. jqximage:"",
  74. syximage:""
  75. },
  76. }
  77. },
  78. onLoad(opn) {
  79. console.log(opn);
  80. this.id = opn.id
  81. this.loadCar()
  82. },
  83. onShow(){
  84. this.loadCar()
  85. },
  86. methods: {
  87. clickShowExample(url){
  88. if(url){
  89. this.url = url
  90. } else {
  91. this.url = "https://relief.oss-cn-hangzhou.aliyuncs.com/yx.jpg"
  92. }
  93. this.show = true
  94. },
  95. clickSaveAndBack(){
  96. if(!this.car.carimage){
  97. uni.showToast({ icon: "none", title: "车辆照片缺失" })
  98. return
  99. }
  100. if(!this.car.xszaimage || !this.car.xszbimage){
  101. uni.showToast({ icon: "none", title: "行驶证照片缺失" })
  102. return
  103. }
  104. if(!this.car.jqximage){
  105. uni.showToast({ icon: "none", title: "交强险照片缺失" })
  106. return
  107. }
  108. if(!this.car.syximage){
  109. uni.showToast({ icon: "none", title: "商业险照片缺失" })
  110. return
  111. }
  112. },
  113. loadCar(){
  114. const _this = this
  115. this.$httpGet("/api/car/get", {id: this.id}, function(res) {
  116. console.log('[/car/get]', res);
  117. if(res.data){
  118. _this.car=res.data
  119. }
  120. })
  121. }
  122. }
  123. }
  124. </script>
  125. <style>
  126. page {
  127. background-color: #F5F5F5;
  128. }
  129. .cr {
  130. min-height: calc(88vh);
  131. }
  132. /deep/ uni-radio .uni-radio-input{
  133. background-color: #F40000 !important;
  134. border-color: #F40000 !important;
  135. }
  136. /deep/ uni-radio .uni-radio-input:empty{
  137. background-color: #ffffff !important;
  138. border-color: #d1d1d1 !important;
  139. }
  140. .re-from-car{
  141. width: 72rpx;
  142. height: 60rpx;
  143. margin: 0 16rpx -20rpx 0;
  144. }
  145. </style>