wk
2024-06-29 bc283f3277c5da93684864e8fbd9f3aee262ca7a
pages/driver-page/drvier-my/drvier-my.vue
@@ -286,6 +286,7 @@
                     required>
                     <u--input v-model="editUserInfo.phone"
                        border="none"
                        disabled
                        inputAlign="left"></u--input>
                  </u-form-item>
                  <!-- <u-form-item labelWidth="20%"
@@ -299,7 +300,7 @@
                  <u-form-item labelWidth="20%"
                     label="体重"
                     prop="weight"
                     required>
                     >
                     <u--input v-model="editUserInfo.weight"
                        border="none"
                        inputAlign="left"
@@ -308,7 +309,7 @@
                  <u-form-item labelWidth="20%"
                     label="车轴数"
                     prop="axleNum"
                     required>
                     >
                     <u--input v-model="editUserInfo.axleNum"
                        border="none"
                        inputAlign="left"></u--input>
@@ -367,7 +368,7 @@
            <view class="editDriverPopup-container-box">
               <u--form labelPosition="left"
                  :model="registerFormModel"
                  ref="editRef">
                  >
                  <u-form-item prop="cardImg1"
                     label="身份证正面"
                     labelWidth="20%"
@@ -462,7 +463,6 @@
                     label="从业资格证"
                     labelWidth="24%"
                     borderBottom
                     v-if="registerFormModel.type == 3||registerFormModel.type == 4"
                     required
                     @click="beforeRead">
                     <u-upload :fileList="fileList4"
@@ -481,7 +481,7 @@
                     label="从业资格过期时间"
                     labelWidth="20%"
                     borderBottom
                     v-if="registerFormModel.type == 3||registerFormModel.type == 4">
                     >
                     <uni-datetime-picker v-model="registerFormModel.expirationTimeTradequalification" type="datetime"  :start="minDate" />
                  </u-form-item>
               </u--form>
@@ -571,12 +571,17 @@
               }
            ],
            rules: {
               name: {
               name: [{
                  type: 'string',
                  required: true,
                  message: '请填写姓名',
                  trigger: ['blur', 'change']
               },
               {
                  pattern: /^[\u4e00-\u9fa5\s]+$/,
                  message: '姓名只能是中文',
                  trigger: ['blur', 'change']
               }],
               idCard: [{
                     type: 'string',
                     required: true,
@@ -941,7 +946,6 @@
         },
         // 修改证件信息
         updateDoc(){
            if(this.registerFormModel.type == 3||this.registerFormModel.type == 4){
               this.$reqPost('saveDriverDocs', {
                  userId:this.registerFormModel.customerid,
                  idCardImg:this.registerFormModel.cardImg1+","+this.registerFormModel.cardImg2,
@@ -953,10 +957,10 @@
                  tradeQualificationImg:this.registerFormModel.tradeQualificationImg,
                  expirationTimeTradequalification:this.registerFormModel.expirationTimeTradequalification.slice(0,16),
               }, 'json').then(res => {
                  this.editDocShow = false;
                  if (res.code == 0) {
                     this.$u.toast('修改成功');
                     this.init();
                     this.editDocShow = false;
                  } else {
                     uni.showToast({
                        title: res.msg,
@@ -965,37 +969,13 @@
                     });
                  }
               })
            }else{
               this.$reqPost('saveDriverDocs', {
                  userId:this.registerFormModel.customerid,
                  idCardImg:this.registerFormModel.cardImg1+","+this.registerFormModel.cardImg2,
                  expirationTimeIdcard:this.registerFormModel.expirationTimeIdcard.slice(0,16),
                  drivingImg:this.registerFormModel.drivingImg,
                  expirationTimeDriving:this.registerFormModel.expirationTimeDriving.slice(0,16),
                  driverImg:this.registerFormModel.driverImg,
                  expirationTimeDriver:this.registerFormModel.expirationTimeDriver.slice(0,16),
               }, 'json').then(res => {
                  this.editDocShow = false;
                  if (res.code == 0) {
                     this.$u.toast('修改成功');
                     this.init();
                  } else {
                     uni.showToast({
                        title: res.msg,
                        icon: 'none',
                        duration: 2000
                     });
                  }
               })
            }
         },
         // 修改用户信息
         updateUser() {
            this.editUserInfo = {
               ...this.editUserInfo,
               carImg: uni.getStorageSync('carImg'),
               drivingImg: uni.getStorageSync('drivingImg'),
               isRegister: '0'
               drivingImg: uni.getStorageSync('drivingImg')
            };
            this.$refs.editRef
               .validate()