wk
2024-10-23 f22e264b6c282f597a139f549025cb9120fe0da1
feat:临时入场
1个文件已修改
104 ■■■■ 已修改文件
pages/driver-page/delivery-my/delivery-my/delivery-my.vue 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/delivery-my/delivery-my/delivery-my.vue
@@ -91,7 +91,7 @@
                        </view></uni-td>
                    </uni-tr>
                    </uni-table>
                    <u-form-item prop='contactPicture'>
                    <!-- <u-form-item prop='contactPicture'>
                        <view class="label-text">
                            原发单据
                        </view>
@@ -105,7 +105,7 @@
                            height="150"
                            :previewFullImage="true"
                            ></u-upload>
                    </u-form-item>
                    </u-form-item> -->
                <!-- <u-form-item labelWidth="20%"
                    label="空车出厂"
                    borderBottom
@@ -224,7 +224,7 @@
            if (params.id) {
              this.id = params.id
            }
            this.fileList1 = []
            // this.fileList1 = []
            this.GetMyDelivery()
            uni.getStorage({
                key: 'myDelivery',
@@ -255,7 +255,7 @@
                range: [{"value": 0,"label": "否"    },{"value": 1,"label": "是"}],
                carNumShow: false,
                yuYueData: [],
                fileList1: [], //图片列表
                // fileList1: [], //图片列表
                contactPicture:"",
                registerFormModel: {
                    phone: '',
@@ -390,52 +390,52 @@
                    this.isInputOrigin = true;
                }
            },
            deletePic(event) {
                this.changeisUploadimg(true);
                this[`fileList${event.name}`].splice(event.index, 1);
            },
            async afterRead(event) {
                // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
                let lists = [].concat(event.file);
                let fileListLen = this[`fileList${event.name}`].length;
                lists.map(item => {
                    this[`fileList${event.name}`].push({
                        ...item,
                        status: 'uploading',
                        message: '上传中'
                    });
                });
                for (let i = 0; i < lists.length; i++) {
                    const result = await this.uploadFilePromise(lists[i].url, event.name);
                    let item = this[`fileList${event.name}`][fileListLen];
                    this[`fileList${event.name}`].splice(
                        fileListLen,
                        1,
                        Object.assign(item, {
                            status: 'success',
                            message: '上传成功',
                            url: result
                        })
                    );
                    fileListLen++;
                }
            },
            uploadFilePromise(url, num) {
                return new Promise((resolve, reject) => {
                    let a = uni.uploadFile({
                        url: BaseUrl + '/admin/sys-file/uploadUnToken',
                        filePath: url,
                        name: 'file',
                        success: res => {
                            if (num == 1) {
                                this.contactPicture = JSON.parse(res.data)
                                    .data.url;
                                resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                            }
                        }
                    });
                });
            },
            // deletePic(event) {
            //     this.changeisUploadimg(true);
            //     this[`fileList${event.name}`].splice(event.index, 1);
            // },
            // async afterRead(event) {
            //     // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
            //     let lists = [].concat(event.file);
            //     let fileListLen = this[`fileList${event.name}`].length;
            //     lists.map(item => {
            //         this[`fileList${event.name}`].push({
            //             ...item,
            //             status: 'uploading',
            //             message: '上传中'
            //         });
            //     });
            //     for (let i = 0; i < lists.length; i++) {
            //         const result = await this.uploadFilePromise(lists[i].url, event.name);
            //         let item = this[`fileList${event.name}`][fileListLen];
            //         this[`fileList${event.name}`].splice(
            //             fileListLen,
            //             1,
            //             Object.assign(item, {
            //                 status: 'success',
            //                 message: '上传成功',
            //                 url: result
            //             })
            //         );
            //         fileListLen++;
            //     }
            // },
            // uploadFilePromise(url, num) {
            //     return new Promise((resolve, reject) => {
            //         let a = uni.uploadFile({
            //             url: BaseUrl + '/admin/sys-file/uploadUnToken',
            //             filePath: url,
            //             name: 'file',
            //             success: res => {
            //                 if (num == 1) {
            //                     this.contactPicture = JSON.parse(res.data)
            //                         .data.url;
            //                     resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
            //                 }
            //             }
            //         });
            //     });
            // },
            lohOutLogin(){
                this.$refs.regesterFormRef.validate().then(res => {
                    if(this.daydata.orderType=='外购'){
@@ -453,7 +453,7 @@
                                ...this.registerFormModel,
                                tmTaskCoalContact:{
                                    coalName:this.daydata.productName,
                                    contactPicture:this.contactPicture,
                                    // contactPicture:this.contactPicture,
                                    skin:this.skin,
                                    hair:this.hair,
                                    clean:this.clean
@@ -492,7 +492,7 @@
                                yyId:this.ids.id,
                                ...this.registerFormModel,
                                tmTaskCoalContact:{                                
                                    contactPicture:this.contactPicture,
                                    // contactPicture:this.contactPicture,
                                    numDtoList:numDtoList
                                }
                            }, 'json').then(res => {