wk
2024-11-04 6c20f43ff1cb24758b11fbe29488804e418c4e42
feat:注册更改
2个文件已修改
205 ■■■■■ 已修改文件
pages/driver-page/drvier-my/drvier-my.vue 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/register/register.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/drvier-my/drvier-my.vue
@@ -438,7 +438,7 @@
                            </u-upload>
                        </u-form-item>
                        <u-form-item prop="drivingImg"
                            label="行驶证"
                            label="行驶证车头"
                            labelWidth="35%"
                            borderBottom
                            required
@@ -448,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"
@@ -486,7 +504,7 @@
                            <uni-datetime-picker v-model="registerFormModel.expirationTimeDriver" type="datetime"  :start="minDate" />
                        </u-form-item>
                        <u-form-item prop="roadTransportImg"
                            label="道路运输证"
                            label="道路运输证车头"
                            labelWidth="35%"
                            borderBottom
                            required
@@ -496,6 +514,24 @@
                                @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"
@@ -521,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"
@@ -595,7 +648,10 @@
                    tradeQualificationImg: '',
                    roadTransportImg: '',
                    inventoryImg: '',
                    countryNumberCar: 0
                    countryNumberCar: 0,
                    driverImgCw:'',
                    roadTransportImgCw:"",
                    tradeQualificationImgYyy:"",
                },
                registerFormModel:{},
                radiolist2: [{
@@ -750,6 +806,9 @@
                fileList6: [],
                fileList7: [],
                fileList8: [],
                fileList9: [],
                fileList10: [],
                fileList11: [],
                // 修改信息弹出框
                editDriverPopupShow: false,
                editDocShow:false,
@@ -911,7 +970,10 @@
                        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]) {
@@ -925,12 +987,33 @@
                            });
                        }
                      }
                    if(this.registerFormModel.roadTransportImg){
                        if (this.fileList7.length == 0 && this.userInfo.roadTransportImg) {
                        this.fileList7.push({
                            url: `${BaseUrl}${this.userInfo.roadTransportImg}`
                        });
                        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 = ''
                });
@@ -1037,6 +1120,18 @@
                                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}`);
                            }
                            
                        }
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}`);
                            }
                        }
                    });