transportCarDetail.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <!-- 运输人员新增 -->
  2. <template>
  3. <view id="register">
  4. <viwe v-if="isAudit!=1" :class="isAudit==0?'tip':'reject'">{{isAudit==0?'信息正在审核中,请耐心等待...':'您提交的审核被驳回,驳回原因为:'+auditContent}}</viwe>
  5. <view class="register_li">
  6. <view class="register_li_min">
  7. <view></view>
  8. <view>车牌号:</view>
  9. <input v-model="form.carCode" type="text" placeholder-style="color:#999;" >
  10. </view>
  11. <view v-for="(item,index) in form.carCredentialsVos">
  12. <view class="driving_img" @click="lookItem(item)">
  13. <view>{{item.naturalName}}:</view>
  14. <img class="issue_img" :src="baseUrl+item.naturalUrl">
  15. </view>
  16. <view class="register_li_b2">
  17. <view>有效期</view>
  18. <picker mode="date" disabled @change="dateChange">
  19. <input class="picker-text" disabled type="text" v-model="item.startTime" placeholder="开始时间">
  20. </picker>
  21. <view>-</view>
  22. <picker mode="date" disabled @change="dateChange">
  23. <input class="picker-text2" disabled type="text" v-model="item.endTime" placeholder="结束时间">
  24. </picker>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="sub_btn" v-if="isAudit==1" @click="subBnt()">编辑</view>
  29. <view class="sub_btn" v-if="isAudit==2" @click="subBnt()">重新提交</view>
  30. </view>
  31. </template>
  32. <script>
  33. import {transportCarDetail} from '@/api/apiDemo/index.js'
  34. import { config } from '@/api/request/config.js'
  35. export default {
  36. data() {
  37. return {
  38. baseUrl:config.base_url,
  39. form:{
  40. carCode:'',
  41. },
  42. id:'',
  43. isAudit:1,//是否已经审核(0=未审核,1=已经审核,2=审核未通过
  44. auditContent:'',//驳回时审核内容
  45. }
  46. },
  47. onLoad(option) {
  48. this.id=option.id;
  49. },
  50. onShow(){
  51. },
  52. methods: {
  53. //获取详情
  54. async getInfo(){
  55. let _this = this;
  56. const {data} = await transportCarDetail(this.id)
  57. if(data.code==200){
  58. let res=data.data
  59. this.isAudit=res.isAudit;
  60. this.form=res;
  61. let arr=[];
  62. _this.form.carCredentialsVos.forEach(function(item,idnex) {
  63. if(item.naturalUrl && item.startTime && item.endTime){
  64. arr.push(item)
  65. }
  66. })
  67. _this.form.carCredentialsVos=arr
  68. //驳回
  69. if(res.syntheticalAudit){
  70. this.auditContent=res.syntheticalAudit.auditContent
  71. }
  72. }
  73. },
  74. subBnt(){
  75. uni.redirectTo({
  76. url:'/pages_supplier/transportCar/transportCarAdd?status=1&id='+this.id
  77. });
  78. },
  79. lookItem(item){
  80. //查看图片
  81. wx.previewImage({
  82. urls: [config.base_url+item.naturalUrl], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  83. current: '', // 当前显示图片的http链接,默认是第一个
  84. success: function(res) {},
  85. fail: function(res) {},
  86. complete: function(res) {},
  87. })
  88. },
  89. },
  90. mounted() {
  91. this.getInfo();
  92. }
  93. }
  94. </script>
  95. <style lang="stylus" scoped>
  96. #register{
  97. height:auto;
  98. width:100%;
  99. display flex
  100. flex-direction column;
  101. padding-bottom: 220rpx;
  102. /* 审核中 */
  103. .tip{
  104. width: 750rpx;
  105. background: rgba(255,144,0,0.2);
  106. font-size: 28rpx;
  107. font-family: PingFang SC;
  108. font-weight: 500;
  109. color: #FF9000;
  110. line-height: 28rpx;
  111. padding: 36rpx 20rpx;
  112. box-sizing: border-box;
  113. }
  114. /* 驳回 */
  115. .reject{
  116. width: 750rpx;
  117. background: #F3DCDC;
  118. font-size: 28rpx;
  119. font-family: PingFang SC;
  120. font-weight: 500;
  121. color: #DC0000;
  122. line-height: 36rpx;
  123. padding: 36rpx 20rpx;
  124. box-sizing: border-box;
  125. }
  126. .register_li{
  127. background #fff;
  128. border-radius:20rpx;
  129. margin:20rpx 20rpx 0;
  130. padding:20rpx 0;
  131. box-sizing: border-box;
  132. .register_li_min{
  133. margin:0 26rpx;
  134. display flex;
  135. align-items center;
  136. border-bottom: 1px solid #F5F5F5;
  137. view{
  138. line-height:100rpx;
  139. font-size:28rpx;
  140. }
  141. view:nth-child(1){
  142. color:red;
  143. line-height:28rpx;
  144. margin-right: 12rpx;
  145. }
  146. view:nth-child(2){
  147. width:140rpx;
  148. font-size: 28rpx;
  149. font-family: PingFang SC;
  150. font-weight: 500;
  151. color: #999999;
  152. }
  153. >input{
  154. width 500rpx;
  155. text-align: right;
  156. font-size: 24rpx;
  157. font-family: PingFang SC;
  158. font-weight: 500;
  159. color: #333;
  160. }
  161. }
  162. /* 驾驶证 */
  163. .driving_img{
  164. margin:34rpx 20rpx 0;
  165. display flex;
  166. justify-content: space-between;
  167. border-bottom: 1px solid #F5F5F5;
  168. padding-bottom: 28rpx;
  169. box-sizing: border-box;
  170. view{
  171. //width:140rpx;
  172. font-size: 28rpx;
  173. font-family: PingFang SC;
  174. font-weight: 500;
  175. color: #999999;
  176. }
  177. .issue_img{
  178. width: 210rpx;
  179. height: 210rpx;
  180. border-radius: 10rpx;
  181. margin-left:270rpx;
  182. }
  183. }
  184. /* 有效期 */
  185. .register_li_b2{
  186. border-bottom: 1px solid #f5f5f5;
  187. height: 100rpx;
  188. display: flex;
  189. justify-content: flex-start;
  190. align-items: center;
  191. margin:0 20rpx 0;
  192. >view:nth-child(1){
  193. font-size: 28rpx;
  194. font-family: PingFang SC;
  195. font-weight: 500;
  196. color: #333333;
  197. line-height: 100rpx;
  198. }
  199. .picker-text{
  200. font-size: 24rpx;
  201. font-family: PingFang SC;
  202. font-weight: 500;
  203. color: #CCCCCC;
  204. line-height: 100rpx;
  205. width: 188rpx;
  206. margin-left: 158rpx;
  207. }
  208. >view:nth-child(2){
  209. font-size: 24rpx;
  210. font-family: PingFang SC;
  211. font-weight: 500;
  212. color: #CCCCCC;
  213. line-height: 100rpx;
  214. }
  215. .picker-text2{
  216. font-size: 24rpx;
  217. font-family: PingFang SC;
  218. font-weight: 500;
  219. color: #CCCCCC;
  220. line-height: 100rpx;
  221. width: 188rpx;
  222. text-align: right;
  223. }
  224. }
  225. }
  226. /* 按钮 */
  227. .sub_btn{
  228. width: 650rpx;
  229. height: 100rpx;
  230. background: #0183FA;
  231. border-radius: 20rpx;
  232. font-size: 28rpx;
  233. font-family: PingFang SC;
  234. font-weight: 500;
  235. color: #FFFFFF;
  236. line-height: 100rpx;
  237. text-align: center;
  238. margin-left: 50rpx;
  239. position: fixed;
  240. bottom:30rpx;
  241. z-index: 1000;
  242. }
  243. }
  244. /deep/.input-value-border{
  245. display :none !important;
  246. }
  247. </style>