yangan
2024-12-04 2ab92240f1eccf659d7380dc524e76faca6f644c
pages/register/register.vue
@@ -112,9 +112,8 @@
               borderBottom
               v-if="radiovalue1 == '司机'"
               required>
               <u--input v-model="registerFormModel.carNo"
                  placeholder="请输入内容"
                  clearable></u--input>
               <xm-cell special label="车牌号" :value="registerFormModel.carNo" @show="showKeyboard('xmKeyboard')"></xm-cell>
               <xm-keyboard-v2 ref="xmKeyboard" @confirm="(v) => registerFormModel.carNo = v"></xm-keyboard-v2>
            </u-form-item>
            <u-form-item labelWidth="35%"
               label="车辆类型"
@@ -149,7 +148,7 @@
               </u-upload>
            </u-form-item>
            <u-form-item prop="drivingImg"
               label="行驶证"
               label="行驶证车头"
               labelWidth="35%"
               borderBottom
               v-if="radiovalue1 == '司机'"
@@ -160,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"
@@ -201,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 == '司机'"
@@ -212,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"
@@ -246,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="证件过期时间"
@@ -404,6 +459,9 @@
               confirmPassword: '',
               tradeQualificationImg: '',
               roadTransportImg:"",
               driverImgCw:'',
               roadTransportImgCw:"",
               tradeQualificationImgYyy:"",
               expirationTimeRoadtransport:"",
               driverImg: '',
               countryNumberCar: 2, //排放类型;国五 1,国六 2
@@ -415,6 +473,9 @@
            fileList4: [],
            fileList5: [],
            fileList6: [],
            fileList7: [],
            fileList8: [],
            fileList9: [],
            rules: {
               countryNumberCar: {
                  required: false,
@@ -521,7 +582,13 @@
               drivingImg: {
                  type: 'string',
                  required: true,
                  message: '请上传行驶证照片',
                  message: '请上传行驶证车头照片',
                  trigger: ['blur', 'change']
               },
               driverImgCw:{
                  type: 'string',
                  required: true,
                  message: '请上传行驶证车尾照片',
                  trigger: ['blur', 'change']
               },
               driverImg: {
@@ -601,6 +668,9 @@
      },
      methods: {
         ...mapMutations(['changeisUploadimg']),
         showKeyboard(ref){
            this.$refs[ref].toShow(this.registerFormModel.carNo)
         },
         getToday() {
           let now = new Date();
           let year = now.getFullYear();
@@ -650,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
          });
@@ -789,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}`);
                     }
                  }
               });