yangan
2024-11-11 4e517dc54e1e3e5e5b543383c321161de351272e
pages/driver-page/drvier-my/drvier-my.vue
@@ -151,7 +151,7 @@
                        <image src="https://wrzs.czjlchem.com:9090/appimg/image/banner/score.png"
                           mode="widthFix"
                           style="width: 36rpx;position: relative;left: 8rpx;"></image>
                        <view class="label-text">道路运输证</view>
                        <view class="label-text">剧毒化学品道路运输通行证</view>
                     </view>
                     <view class="information-value">
                        <view class="">
@@ -228,6 +228,11 @@
         <view class="loginout-main"><u-button text="退出登录"
               type="primary"
               @click="logout"
               shape="circle"
               plain></u-button></view>
         <view class="loginout-main"><u-button text="联系我们"
               type="primary"
               @click="contactUs"
               shape="circle"
               plain></u-button></view>
      </view>
@@ -433,7 +438,7 @@
                     </u-upload>
                  </u-form-item>
                  <u-form-item prop="drivingImg"
                     label="行驶证"
                     label="行驶证车头"
                     labelWidth="35%"
                     borderBottom
                     required
@@ -443,6 +448,24 @@
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="2"
                        multiple
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true">
                     </u-upload>
                  </u-form-item>
                  <u-form-item prop="driverImgCw"
                     label="行驶证车尾"
                     labelWidth="35%"
                     borderBottom
                     required
                     @click="beforeRead">
                     <u-upload :fileList="fileList9"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="9"
                        multiple
                        :maxCount="1"
                        width="250"
@@ -480,6 +503,49 @@
                     borderBottom>
                     <uni-datetime-picker v-model="registerFormModel.expirationTimeDriver" type="datetime"  :start="minDate" />
                  </u-form-item>
                  <u-form-item prop="roadTransportImg"
                     label="道路运输证车头"
                     labelWidth="35%"
                     borderBottom
                     required
                     @click="beforeRead">
                     <u-upload :fileList="fileList7"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="7"
                        multiple
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true">
                     </u-upload>
                  </u-form-item>
                  <u-form-item prop="roadTransportImgCw"
                     label="道路运输证车尾"
                     labelWidth="35%"
                     borderBottom
                     required
                     @click="beforeRead">
                     <u-upload :fileList="fileList10"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="10"
                        multiple
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true">
                     </u-upload>
                  </u-form-item>
                  <u-form-item prop="expirationTimeRoadtransport"
                     label="证件过期时间"
                     labelWidth="35%"
                     borderBottom
                     >
                     <uni-datetime-picker v-model="registerFormModel.expirationTimeRoadtransport" type="datetime"  :start="minDate" />
                  </u-form-item>
                  <u-form-item prop="tradeQualificationImg"
                     label="从业资格证"
                     labelWidth="35%"
@@ -491,6 +557,23 @@
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="4"
                        multiple
                        :maxCount="1"
                        width="250"
                        height="150"
                        :previewFullImage="true">
                     </u-upload>
                  </u-form-item>
                  <u-form-item prop="tradeQualificationImgYyy"
                     label="从业资格证押运员"
                     labelWidth="35%"
                     borderBottom
                     @click="beforeRead">
                     <u-upload :fileList="fileList11"
                        deletable
                        @afterRead="afterRead"
                        @delete="deletePic"
                        name="11"
                        multiple
                        :maxCount="1"
                        width="250"
@@ -565,7 +648,10 @@
               tradeQualificationImg: '',
               roadTransportImg: '',
               inventoryImg: '',
               countryNumberCar: 0
               countryNumberCar: 0,
               driverImgCw:'',
               roadTransportImgCw:"",
               tradeQualificationImgYyy:"",
            },
            registerFormModel:{},
            radiolist2: [{
@@ -702,7 +788,7 @@
               roadTransportImg: {
                  type: 'string',
                  required: true,
                  message: '请上传道路运输证照片',
                  message: '请上传剧毒通行证照片',
                  trigger: ['blur', 'change']
               },
               tradeQualificationImg: {
@@ -720,6 +806,9 @@
            fileList6: [],
            fileList7: [],
            fileList8: [],
            fileList9: [],
            fileList10: [],
            fileList11: [],
            // 修改信息弹出框
            editDriverPopupShow: false,
            editDocShow:false,
@@ -731,7 +820,8 @@
            logoutTitle: '提示',
            logoutContent: '是否确认退出',
            BaseUrl,
            selectedPrintStyle: null
            selectedPrintStyle: null,
            phoneList:[]
         };
      },
      computed: {
@@ -783,6 +873,57 @@
         },
         init() {
            this.getUserEntity();
            uni.request({
               url:  `${BaseUrl}/admin/dict/page`,
               method: 'GET',
               data: {
                  dictType:'Setings'
               },
               header: {
                  Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
                  clientToc: 'Y',
                  'CLIENT_TOC': 'Y',
               },
               success: res => {
                  let dictId=res.data.data?.records[0].id
                  uni.request({
                     url:  `${BaseUrl}/admin/dict/item/page`,
                     method: 'GET',
                     data: {
                        dictId:dictId
                     },
                     header: {
                        Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
                        clientToc: 'Y',
                        'CLIENT_TOC': 'Y',
                     },
                     success: res => {
                        res.data.data.records.forEach(item=>{
                           if(item.description.includes('联系')){
                              this.phoneList=item.value.split(',');
                           }
                        })
                     },
                     fail: err => {
                     }
                  })
               },
               fail: err => {
               }
               })
         },
         contactUs(){
            uni.showActionSheet({
               itemList: this.phoneList,
               success: (res) => {
               uni.makePhoneCall({
                  phoneNumber:this.phoneList[res.tapIndex].split(":")[1]
               })
            },
            fail: (err) => {
               console.log('弹窗取消');
            }
            });
         },
         getUserEntity() {
            uni.showLoading({
@@ -826,8 +967,13 @@
                  driverImg:res.data.driverImg,
                  expirationTimeDriver:res.data.expirationTimeDriver,
                  tradeQualificationImg:res.data.tradeQualificationImg,
                  roadTransportImg:res.data.roadTransportImg,
                  expirationTimeRoadtransport:res.data.expirationTimeRoadtransport,
                  expirationTimeTradequalification:res.data.expirationTimeTradequalification,
                  type:res.data.carType
                  type:res.data.carType,
                  driverImgCw:res.data.driverImgCw,
                  roadTransportImgCw:res.data.roadTransportImgCw,
                  tradeQualificationImgYyy:res.data.tradeQualificationImgYyy,
               }
               if(this.registerFormModel.carImg){
                  if (this.fileList6.length == 0 && this.registerFormModel.carImg.split(",")[0]) {
@@ -841,6 +987,34 @@
                     });
                  }
                 }
                  if(this.registerFormModel.roadTransportImg){
                     if (this.fileList7.length == 0 && this.userInfo.roadTransportImg) {
                     this.fileList7.push({
                        url: `${BaseUrl}${this.userInfo.roadTransportImg}`
                     });
                  }
               }
               if(this.registerFormModel.driverImgCw){
                     if (this.fileList9.length == 0 && this.userInfo.driverImgCw) {
                     this.fileList9.push({
                        url: `${BaseUrl}${this.userInfo.driverImgCw}`
                     });
                  }
               }
               if(this.registerFormModel.roadTransportImgCw){
                     if (this.fileList10.length == 0 && this.userInfo.roadTransportImgCw) {
                     this.fileList10.push({
                        url: `${BaseUrl}${this.userInfo.roadTransportImgCw}`
                     });
                  }
               }
               if(this.registerFormModel.tradeQualificationImgYyy){
                     if (this.fileList11.length == 0 && this.userInfo.tradeQualificationImgYyy) {
                     this.fileList11.push({
                        url: `${BaseUrl}${this.userInfo.tradeQualificationImgYyy}`
                     });
                  }
               }
               this.editUserInfo.password = ''
            });
         },
@@ -938,8 +1112,24 @@
                        this.registerFormModel.carImg = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==7){
                        this.registerFormModel.roadTransportImg = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==8){
                        this.registerFormModel.driverImg = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==9){
                        this.registerFormModel.driverImgCw = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==10){
                        this.registerFormModel.roadTransportImgCw = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==11){
                        this.registerFormModel.tradeQualificationImgYyy = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }
@@ -983,7 +1173,12 @@
                  driverImg:this.registerFormModel.driverImg,
                  expirationTimeDriver:this.registerFormModel.expirationTimeDriver.slice(0,16),
                  tradeQualificationImg:this.registerFormModel.tradeQualificationImg,
                  roadTransportImg:this.registerFormModel.roadTransportImg,
                  expirationTimeRoadtransport:this.registerFormModel.expirationTimeRoadtransport.slice(0,16),
                  expirationTimeTradequalification:this.registerFormModel.expirationTimeTradequalification.slice(0,16),
                  driverImgCw:this.registerFormModel.driverImgCw,
                  roadTransportImgCw:this.registerFormModel.roadTransportImgCw,
                  tradeQualificationImgYyy:this.registerFormModel.tradeQualificationImgYyy,
               }, 'json').then(res => {
                  if (res.code == 0) {
                     this.$u.toast('修改成功');
@@ -1012,6 +1207,7 @@
               drivingImg: uni.getStorageSync('drivingImg'),
               tradeQualificationImg: uni.getStorageSync('tradeQualificationImg')
            };
            this.editUserInfo.otherIdCard=''
            let errorList = ['name','phone','countryNumberCar','carType']
            for(let item in this.editUserInfo){
               if(item ==='bunkerList'){
@@ -1060,7 +1256,6 @@
                  return item.idCard
               }).join(',')
            }
            let data={
               name:this.editUserInfo.name,
               phone:this.editUserInfo.phone,
@@ -1287,7 +1482,7 @@
            &-block {
               width: 690rpx;
               height: 760rpx;
               height: 700rpx;
               background: #ffffff;
               box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
               border-radius: 20rpx;
@@ -1321,7 +1516,7 @@
                        font-size: 30rpx;
                        font-weight: 400;
                        color: #000000;
                        line-height: 85rpx;
                        line-height: 32rpx;
                        text-align: left;
                     }
                  }
@@ -1418,9 +1613,9 @@
      .loginout {
         width: 100%;
         height: 200rpx;
         height: 240rpx;
         @include flex;
         justify-content: space-around;
         justify-content: space-evenly;
         flex-direction: column;
         align-items: center;
         position: relative;