wk
2024-11-04 6c20f43ff1cb24758b11fbe29488804e418c4e42
pages/register/register.vue
@@ -148,7 +148,7 @@
               </u-upload>
            </u-form-item>
            <u-form-item prop="drivingImg"
               label="行驶证"
               label="行驶证车头"
               labelWidth="35%"
               borderBottom
               v-if="radiovalue1 == '司机'"
@@ -159,6 +159,25 @@
                  @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
               v-if="radiovalue1 == '司机'"
               required
               @click="beforeRead">
               <u-upload :fileList="fileList7"
                  deletable
                  @afterRead="afterRead"
                  @delete="deletePic"
                  name="7"
                  multiple
                  :maxCount="1"
                  width="250"
@@ -200,7 +219,7 @@
               <uni-datetime-picker v-model="registerFormModel.expirationTimeDriver" type="date"  :start="minDate" />
            </u-form-item>
            <u-form-item prop="roadTransportImg"
               label="道路运输证"
               label="道路运输证车头"
               labelWidth="35%"
               borderBottom
               v-if="radiovalue1 == '司机'"
@@ -211,6 +230,25 @@
                  @afterRead="afterRead"
                  @delete="deletePic"
                  name="6"
                  multiple
                  :maxCount="1"
                  width="250"
                  height="150"
                  :previewFullImage="true">
               </u-upload>
            </u-form-item>
            <u-form-item prop="roadTransportImgCw"
               label="道路运输证车尾"
               labelWidth="35%"
               borderBottom
               v-if="radiovalue1 == '司机'"
               required
               @click="beforeRead">
               <u-upload :fileList="fileList8"
                  deletable
                  @afterRead="afterRead"
                  @delete="deletePic"
                  name="8"
                  multiple
                  :maxCount="1"
                  width="250"
@@ -245,6 +283,24 @@
               <span style="color:red">
                  凡是运输有毒化学物品的车辆必须上传从业资格证并填写从业资格证有效时间
               </span>
            </u-form-item>
            <u-form-item prop="tradeQualificationImgYyy"
               label="从业资格证押运员"
               labelWidth="35%"
               borderBottom
               v-if="radiovalue1 == '司机'"
               @click="beforeRead">
               <u-upload :fileList="fileList9"
                  deletable
                  @afterRead="afterRead"
                  @delete="deletePic"
                  name="9"
                  multiple
                  :maxCount="1"
                  width="250"
                  height="150"
                  :previewFullImage="true">
               </u-upload>
            </u-form-item>
            <u-form-item prop="expirationTimeTradequalification"
               label="证件过期时间"
@@ -403,6 +459,9 @@
               confirmPassword: '',
               tradeQualificationImg: '',
               roadTransportImg:"",
               driverImgCw:'',
               roadTransportImgCw:"",
               tradeQualificationImgYyy:"",
               expirationTimeRoadtransport:"",
               driverImg: '',
               countryNumberCar: 2, //排放类型;国五 1,国六 2
@@ -414,6 +473,9 @@
            fileList4: [],
            fileList5: [],
            fileList6: [],
            fileList7: [],
            fileList8: [],
            fileList9: [],
            rules: {
               countryNumberCar: {
                  required: false,
@@ -520,7 +582,13 @@
               drivingImg: {
                  type: 'string',
                  required: true,
                  message: '请上传行驶证照片',
                  message: '请上传行驶证车头照片',
                  trigger: ['blur', 'change']
               },
               driverImgCw:{
                  type: 'string',
                  required: true,
                  message: '请上传行驶证车尾照片',
                  trigger: ['blur', 'change']
               },
               driverImg: {
@@ -652,6 +720,12 @@
        if(this.registerFormModel.carType==3&&!this.registerFormModel.tradeQualificationImg){
          uni.showToast({
            title: '请上传从业资格证!',
            icon: 'error',
            duration: 2000
          });
        }else if(this.registerFormModel.carType==3&&!this.registerFormModel.tradeQualificationImgYyy){
          uni.showToast({
            title: '请上传从业资格证押运员!',
            icon: 'error',
            duration: 2000
          });
@@ -791,6 +865,18 @@
                        this.registerFormModel.roadTransportImg = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==7){
                        this.registerFormModel.driverImgCw = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==8){
                        this.registerFormModel.roadTransportImgCw = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }else if(num==9){
                        this.registerFormModel.tradeQualificationImgYyy = JSON.parse(res.data)
                           .data.url;
                        resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                     }
                  }
               });