Explorar o código

放大返修上传逻辑修改

panhui %!s(int64=6) %!d(string=hai) anos
pai
achega
0520e41907

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 505 - 372
src/main/vue/src/components/ImgItem.vue


+ 1 - 1
src/main/vue/src/components/OrderItem.vue

@@ -927,7 +927,7 @@ export default {
                 });
                 // goNextquery('orderUploadChange',{repairId:item.id,type:type})
             } else {
-                this.goNextquery('orderUploadChangeAlbum', {
+                this.goNextquery('orderUploadAlbum', {
                     repairId: info.AlbumRepairId,
                     imageRepairId: info.imageRepairId,
                     type: 'shop',

+ 477 - 234
src/main/vue/src/pagesPre/OrderUploadAlbum.vue

@@ -1,28 +1,43 @@
 <template>
-    <div class="container">
+    <div class="container" v-loading='loading'>
         <div class="top" v-if="orderInfo.productInfo">
 
-            <el-radio-group v-model="radio1" style="margin-right:10px;" size="mini" @change="changePage">
+            <el-radio-group v-model="radio1" v-if="hasXiutu"
+                style="margin-right:10px;" size="mini" @change="changePage">
                 <el-radio-button label="修图"></el-radio-button>
                 <el-radio-button label="放大"></el-radio-button>
             </el-radio-group>
             <span>订单号:{{orderInfo.orderCode}}</span>
-            <span style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
+            <span
+                style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
             <!-- <span style="font-size:14px;margin-left:20px;">已上传/总张数:{{orderImage.length}} / {{allNum}},最多上传{{allNum*2}}张</span> -->
             <!-- <span v-if="canUploadNum<0" style="font-size:14px;color:red;margin-left:10px">超出{{0-canUploadNum}}张</span> -->
-            <el-button style="float:right;margin:20px;" v-if="canNext" type="warning" class="btn" @click="submit">确定提交</el-button>
+            <el-button style="float:right;margin:20px;" v-if="canNext"
+                type="warning" class="btn" @click="submit">确定提交</el-button>
 
-            <el-button type="primary" v-if="canUploadNum>0" class="btn" @click="dialogVisible=true,needFile=(canUploadNum-addImage.length)">上传图片</el-button>
+            <el-button type="primary" v-if="canUploadNum>0" class="btn"
+                @click="dialogVisible=true,needFile=(canUploadNum-addImage.length)">
+                上传图片</el-button>
 
         </div>
 
         <div style="backgroundColor:#f2f4f5;padding:10px 30px">
-            <div style="color:#666;font-size:14px" :style="{color:needAlbum<=0?'#666':'rgb(251, 110, 8)'}">
-                <span>放大:已上传/总张数:{{orderImage.length}} / {{allNum}},最多上传{{allNum*2}}张</span>
+            <div style="color:#666;font-size:14px"
+                :style="{color:needAlbum<=0&&failAlbum==0?'#666':'rgb(251, 110, 8)'}">
+                <span>放大:已上传/总张数:{{orderImage.length}} /
+                    {{allNum}},最多上传{{allNum*2}}张</span>
                 <span v-if="needAlbum>0">,还需要上传{{needAlbum}}张</span>
-                <span v-if="canUploadNum<0" style="font-size:14px;color:red;margin-left:10px">超出{{0-canUploadNum}}张</span>
+                <span v-if="canUploadNum<0"
+                    style="font-size:14px;color:red;margin-left:10px">超出{{0-canUploadNum}}张</span>
+
+                <span v-if="failAlbum>0"
+                    style="font-size:14px;color:red;margin-left:10px">
+                    当前有{{failAlbum}}张审核失败
+                </span>
             </div>
-            <div style="color:#666;font-size:14px;margin-top:10px" :style="{color:xiutuIsFull?'#666':'rgb(251, 110, 8)'}">{{xiutuTip}}</div>
+            <div style="color:#666;font-size:14px;margin-top:10px"
+                :style="{color:xiutuIsFull?'#666':'rgb(251, 110, 8)'}">
+                {{xiutuTip}}</div>
 
         </div>
 
@@ -64,18 +79,25 @@
                 <div class="el-upload__tip" slot="tip">只能上传RGB图片类型的jpg/png文件,已上传/总张数:{{orderImage.length}} / {{allNum}}&nbsp;&nbsp;&nbsp;{{allNum-orderImage.length>0?'还需要上传'+(allNum-orderImage.length):''}},最多可以上传{{2*allNum-orderImage.length}}张</div>
             </el-upload>
         </el-dialog> -->
-        <el-dialog
-                   title="上传文件"
-                   :visible.sync="dialogVisible"
-                   width="500px" center :before-close="handleClose">
+        <el-dialog title="上传文件" :visible.sync="dialogVisible" width="500px"
+            center :before-close="handleClose">
 
-            <upload-list-file :url='url' :tipInfo='uploadTipInfo' :show='dialogVisible'  hasLimit :limitNum='needFile' @successEvent='checkImageAndAlbum'></upload-list-file>
+            <upload-list-file :url='url' :tipInfo='uploadTipInfo'
+                :show='dialogVisible' hasLimit :limitNum='needFile'
+                @successEvent='checkImageAndAlbum'></upload-list-file>
         </el-dialog>
         <div class="content">
             <template v-if="orderImage.length>0">
                 <!-- <div class="title">原片</div> -->
                 <div class="imgList">
-                    <img-item v-for="(item,index) in orderImage" :key="'finishedImage'+index" @changeRemark="changeRemark" :canCancel="canSubmit" :storeType="true" :label="'finishedImage'" :index="index" :img="item" imgStyle="uploadAlbum" @delImg="delImg" style="display:inline-block;margin:0 30px 30px 0;"></img-item>
+                    <img-item v-for="(item,index) in orderImage"
+                        :key="'finishedImage'+index"
+                        @changeRemark="changeRemark" :canCancel="canSubmit"
+                        :storeType="true" :label="'finishedImage'"
+                        :index="index" :img="item" imgStyle="uploadAlbum"
+                        @delImg="delImg"
+                        style="display:inline-block;margin:0 30px 30px 0;">
+                    </img-item>
                 </div>
             </template>
 
@@ -87,121 +109,167 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex'
-import imgItem from '../components/ImgItem'
-import formValidator from '../formValidator'
-const baseUrl = process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
+import { mapState } from "vuex";
+import imgItem from "../components/ImgItem";
+import formValidator from "../formValidator";
+const baseUrl =
+    process.env.NODE_ENV === "production" ? "../" : "http://localhost:8080";
 export default {
     created() {
         if (!this.$route.query.orderId) {
             this.$router.replace({
-                name: 'userOrder'
-            })
-            return
+                name: "userOrder"
+            });
+            return;
         }
-        this.$http.get({
-            url: '/userOrder/getOne',
-            data: {
-                id: this.$route.query.orderId
-            }
-        }).then(res => {
-            if (res.success) {
-                this.orderInfo = res.data
-
-                if (this.orderInfo.statusFlag != 1) {
-
-
-                    this.canSubmit = false
+        this.$http
+            .get({
+                url: "/userOrder/getOne",
+                data: {
+                    id: this.$route.query.orderId
                 }
+            })
+            .then(res => {
+                if (res.success) {
+                    this.orderInfo = res.data;
 
-                if (res.data.statusFlag == 0) {
-                    this.$alert('该订单暂未支付,点击确定回到订单页面,或支付成功后刷新页面上传', '提示', {
-                        confirmButtonText: '确定',
-                        showClose: false,
-                        callback: action => {
-                            this.$router.replace({
-                                name: 'userOrder',
-                            })
-                        }
-                    });
-                }
+                    if (this.orderInfo.statusFlag != 1) {
+                        this.canSubmit = false;
+                    }
 
-                if (res.data.albumStatus > 0) {
-                    this.$alert('已经上传过放大图片', '提示', {
-                        confirmButtonText: '确定',
-                        showClose: false,
-                        callback: action => {
-                            history.back()
+                    if (!this.$route.query.repairId) {
+                        if (res.data.statusFlag == 0) {
+                            this.$alert(
+                                "该订单暂未支付,点击确定回到订单页面,或支付成功后刷新页面上传",
+                                "提示",
+                                {
+                                    confirmButtonText: "确定",
+                                    showClose: false,
+                                    callback: action => {
+                                        this.$router.replace({
+                                            name: "userOrder"
+                                        });
+                                    }
+                                }
+                            );
                         }
-                    });
-                }
-                else {
-                    this.getImage()
-
-
-
-
 
+                        if (res.data.albumStatus > 0) {
+                            this.$alert("已经上传过放大图片", "提示", {
+                                confirmButtonText: "确定",
+                                showClose: false,
+                                callback: action => {
+                                    history.back();
+                                }
+                            });
+                        } else {
+                            this.getImage();
+                        }
+                    } else {
+                        this.getImage();
+                    }
                 }
-
-            }
-        })
-
-
-
-
-
-
-
+            });
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(["userInfo"]),
         url() {
-            return baseUrl + '/orderAlbum/uploadFileForOrder?storeId=' + this.orderInfo.storeId + '&orderId=' + this.orderInfo.id + '&userId=' + this.userInfo.id + '&typeFlag=album'
+            return (
+                baseUrl +
+                "/orderAlbum/uploadFileForOrder?storeId=" +
+                this.orderInfo.storeId +
+                "&orderId=" +
+                this.orderInfo.id +
+                "&userId=" +
+                this.userInfo.id +
+                "&typeFlag=album"
+            );
         },
         allImage() {
-            var list = []
+            var list = [];
             this.addImage.forEach(item => {
-                list.push(item.url)
-            })
-            return list
+                list.push(item.url);
+            });
+            return list;
         },
         canUploadNum() {
-            var num = 0
+            var num = 0;
             if (this.allNum) {
-                num = this.allNum * 2 - this.orderImage.length
+                num = this.allNum * 2 - this.orderImage.length;
             }
 
-            return num
+            return num;
         },
         orderImgId() {
-            var list = []
+            var list = [];
             this.orderImage.forEach(item => {
-                list.push(item.id)
-            })
-            return list
+                list.push(item.id);
+            });
+            return list;
         },
         orderImgName() {
-            var list = []
+            var list = [];
             this.orderImage.forEach(item => {
-                list.push(item.imageName)
-            })
-            return list
+                list.push(item.imageName);
+            });
+            return list;
         },
         allNum() {
-            return this.orderInfo.albumQuantity
+            return this.orderInfo.albumQuantity;
         },
         canNext() {
-            var result = false
-            if (this.orderImage.length >= this.allNum && this.orderImage.length <= this.allNum * 3 && this.xiutuIsFull) {
-                result = true
+            var result = false;
+            if (
+                this.orderImage.length >= this.allNum &&
+                this.orderImage.length <= this.allNum * 3 &&
+                this.xiutuIsFull &&
+                this.failAlbum == 0
+            ) {
+                result = true;
             }
-            return result
+            return result;
         },
-        uploadTipInfo(){
-            return '只能上传RGB图片类型的jpg/png文件,当前已上传'+this.addImage.length+'张图片,还可以上传'+(this.canUploadNum-this.addImage.length)+'张'
-        }
+        uploadTipInfo() {
+            return (
+                "只能上传RGB图片类型的jpg/png文件,当前已上传" +
+                this.addImage.length +
+                "张图片,还可以上传" +
+                (this.canUploadNum - this.addImage.length) +
+                "张"
+            );
+        },
+        repairNum() {
+            var num = 0;
+            if (this.orderInfo) {
+                var list1 = [...this.orderInfo.orderAlbumRepairList];
+                var list2 = [...this.orderInfo.orderRepairList];
+                if (list1.length > list2.length) {
+                    num = list1.length;
+                } else {
+                    num = list2.length;
+                }
+            }
 
+            return num;
+        },
+        hasXiutu() {
+            var result = false;
+            if (this.orderInfo) {
+                var list1 = [...this.orderInfo.orderAlbumRepairList];
+                list1 = list1.filter(item => {
+                    return item.statusFlag != 0;
+                });
+                var list2 = [...this.orderInfo.orderRepairList];
+                list2 = list2.filter(item => {
+                    return item.statusFlag != 0;
+                });
+                if (list2.length >= list1.length) {
+                    result = true;
+                }
+            }
+
+            return result;
+        }
     },
     data() {
         return {
@@ -222,220 +290,395 @@ export default {
             hasNum: 0,
             diffrentNum: 0,
             warningTip: [],
-            radio1: '放大',
-            xiutuTip: '',
+            radio1: "放大",
+            xiutuTip: "",
             xiutuIsFull: false,
             needAlbum: 0,
-            needFile:0
-        }
+            needFile: 0,
+            failAlbum: 0
+        };
     },
     watch: {
         successNum() {
-            if (this.successNum == this.num && this.chooseName.length > 0 && this.dialogVisible) {
-                this.$alert('当前订单已上传' + this.orderImage.length + '张图片,最多上传' + this.allNum * 2 + '张,' + ((this.allNum - this.orderImage.length > 0) ? ('还需上传' + (this.allNum - this.orderImage.length) + '张,') : '') + '上传图片过程中可能会因为网络限制丢失图片,如果出现丢失可重新拖拽上传。', '提示', {
-                    confirmButtonText: '确定',
-                    callback: action => {
-                        this.dialogVisible = false
+            if (
+                this.successNum == this.num &&
+                this.chooseName.length > 0 &&
+                this.dialogVisible
+            ) {
+                this.$alert(
+                    "当前订单已上传" +
+                        this.orderImage.length +
+                        "张图片,最多上传" +
+                        this.allNum * 2 +
+                        "张," +
+                        (this.allNum - this.orderImage.length > 0
+                            ? "还需上传" +
+                              (this.allNum - this.orderImage.length) +
+                              "张,"
+                            : "") +
+                        "上传图片过程中可能会因为网络限制丢失图片,如果出现丢失可重新拖拽上传。",
+                    "提示",
+                    {
+                        confirmButtonText: "确定",
+                        callback: action => {
+                            this.dialogVisible = false;
+                        }
                     }
-                });
+                );
             }
         }
     },
     methods: {
-        handleClose(){
-            this.dialogVisible=false
-            this.getImage()
+        handleClose() {
+            this.dialogVisible = false;
+            this.getImage();
         },
         getImage() {
             const loading = this.$loading({
                 lock: true,
-                text: '正在加载中',
+                text: "正在加载中"
             });
 
-            this.orderImage = []
-            this.$http.get({
-                url: '/orderAlbum/all',
-                data: {
-                    orderId: this.$route.query.orderId
-                }
-            }).then(res => {
-                if (res.success) {
-
-                    res.data.forEach(item => {
-                        item.isSuccess = true
-                    })
-                    this.orderImage = res.data
-                    this.realNum = res.data.length
-                    loading.close();
-
-
-                }
-            })
-            this.checkImageAndAlbum()
-           
+            this.orderImage = [];
+            this.$http
+                .get({
+                    url: "/orderAlbum/all",
+                    data: {
+                        orderId: this.$route.query.orderId,
+                        repairId: this.$route.query.repairId
+                    }
+                })
+                .then(res => {
+                    if (res.success) {
+                        res.data.forEach(item => {
+                            item.isSuccess = true;
+                        });
+                        this.orderImage = res.data;
+                        this.realNum = res.data.length;
+                        loading.close();
+                    }
+                });
+            this.checkImageAndAlbum();
         },
-        checkImageAndAlbum(){
-             this.$http.get({
-                url: '/userOrder/checkImageAndAlbum',
-                data: {
-                    orderId: this.$route.query.orderId,
-                }
-            }).then(res2 => {
-                this.needAlbum = res2.data.needAlbum
-                this.xiutuTip = '修图:已上传/总张数' + (res2.data.totalImage - res2.data.needImage) + '/' + res2.data.totalImage + ',还需要上传' + res2.data.needImage + '张'
-                if (res2.data.needImage == 0) {
-                    this.xiutuIsFull = true
-                }
-                else {
-                    this.xiutuIsFull = false
-                }
-            })
+        checkImageAndAlbum() {
+            this.$http
+                .get({
+                    url: "/userOrder/checkImageAndAlbum",
+                    data: {
+                        orderId: this.$route.query.orderId,
+                        repairId: this.$route.query.imageRepairId || "",
+                        albumRepairId: this.$route.query.repairId || ""
+                    }
+                })
+                .then(res2 => {
+                    this.needAlbum = res2.data.needAlbum;
+                    this.failAlbum = res2.data.failAlbum;
+                    this.xiutuTip =
+                        "修图:已上传/总张数:" +
+                        (res2.data.totalImage - res2.data.needImage) +
+                        " / " +
+                        res2.data.totalImage +
+                        ",还需要上传" +
+                        res2.data.needImage +
+                        "张";
+                    if (res2.data.needImage == 0) {
+                        this.xiutuIsFull = true;
+                    } else {
+                        this.xiutuIsFull = false;
+                    }
+                });
         },
         chooseImg(index) {
             // console.log(index)
         },
         changeRemark(json) {
-            this.getImage()
-        },
-        handleRemove(file, fileList) {
-
+            this.getImage();
         },
+        handleRemove(file, fileList) {},
         handleSuccess(res) {
             // console.log(res)
-            var tips = [...this.tip]
+            var tips = [...this.tip];
             tips.forEach((item, index) => {
-                var list = item.split('文件正在压缩')
+                var list = item.split("文件正在压缩");
                 if (list[0] === res.data[0].imageName) {
-                    tips.splice(index, 1)
+                    tips.splice(index, 1);
                 }
-            })
-            tips.splice(0, 0, res.data[0].imageName + '文件上传成功')
-            this.tip = tips
+            });
+            tips.splice(0, 0, res.data[0].imageName + "文件上传成功");
+            this.tip = tips;
             setTimeout(() => {
-                var tips = [...this.tip]
+                var tips = [...this.tip];
                 tips.forEach((item, index) => {
-                    if (item.indexOf('文件上传成功') != -1) {
-                        tips.splice(index, 1)
+                    if (item.indexOf("文件上传成功") != -1) {
+                        tips.splice(index, 1);
                     }
-                })
-                this.tip = tips
-            }, 1000)
-
+                });
+                this.tip = tips;
+            }, 1000);
 
             if (this.orderImgId.indexOf(res.data[0].id) == -1) {
-                this.orderImage.splice(0, 0, res.data[0])
-            }
-            else {
-                this.orderImage.splice(this.orderImgId.indexOf(res.data[0].id), 1, res.data[0])
+                this.orderImage.splice(0, 0, res.data[0]);
+            } else {
+                this.orderImage.splice(
+                    this.orderImgId.indexOf(res.data[0].id),
+                    1,
+                    res.data[0]
+                );
             }
 
-            this.successNum++
-
+            this.successNum++;
         },
         handleError(file, fileList) {
-            this.num = fileList.length
+            this.num = fileList.length;
         },
         handleProgress(e, file) {
             if (e.percent == 100) {
-                var position = file.name.lastIndexOf('.')
-                var fileName = file.name.substring(0, position)
-                this.tip.splice(0, 0, fileName + '文件正在压缩')
+                var position = file.name.lastIndexOf(".");
+                var fileName = file.name.substring(0, position);
+                this.tip.splice(0, 0, fileName + "文件正在压缩");
             }
-
         },
         handleOn(file, fileList) {
-            console.log(file)
-            console.log(this.orderImgName.indexOf(file.name), this.chooseName.indexOf(file.name), file.name)
-            var position = file.name.split('.')
-            var lastName = position[position.length - 1]
+            console.log(file);
+            console.log(
+                this.orderImgName.indexOf(file.name),
+                this.chooseName.indexOf(file.name),
+                file.name
+            );
+            var position = file.name.split(".");
+            var lastName = position[position.length - 1];
 
-            var firstName = file.name.substr(0, file.name.lastIndexOf("."))
+            var firstName = file.name.substr(0, file.name.lastIndexOf("."));
 
             // const isJPG = (file.type === '' || file.type === 'image/jpeg' || file.type === 'image/JPEG' || file.type === 'image/png' || file.type === 'image/PNG' || file.type === 'image/cr2' || file.type === 'image/CR2');
-            const isJPG = (lastName === 'jpeg' || lastName === 'GPEG' || lastName === 'jpg' || lastName === 'JPG' || lastName === 'png' || lastName === 'PNG' || lastName === 'cr2' || lastName === 'CR2' || lastName == 'NEF' || lastName == 'nef')
+            const isJPG =
+                lastName === "jpeg" ||
+                lastName === "GPEG" ||
+                lastName === "jpg" ||
+                lastName === "JPG" ||
+                lastName === "png" ||
+                lastName === "PNG" ||
+                lastName === "cr2" ||
+                lastName === "CR2" ||
+                lastName == "NEF" ||
+                lastName == "nef";
             if (!isJPG) {
-                this.$message.warning('图片格式错误')
-                return false
-            }
-            else {
+                this.$message.warning("图片格式错误");
+                return false;
+            } else {
                 if (this.chooseName.indexOf(firstName) != -1) {
-
-                    this.warningTip.push(file.name)
+                    this.warningTip.push(file.name);
                     setTimeout(() => {
-                        this.warningTip.splice(this.warningTip.indexOf(file.name), 1)
-                    }, 1500)
-                    return false
-                }
-                else {
+                        this.warningTip.splice(
+                            this.warningTip.indexOf(file.name),
+                            1
+                        );
+                    }, 1500);
+                    return false;
+                } else {
                     if (this.orderImgName.indexOf(firstName) != -1) {
-                        this.warningTip.push(file.name)
+                        this.warningTip.push(file.name);
                         setTimeout(() => {
-                            this.warningTip.splice(this.warningTip.indexOf(file.name), 1)
-                        }, 1500)
-                        return false
-                    }
-                    else if (this.chooseName.length + this.orderImage.length >= this.allNum * 2) {
-                        this.$message.warning('文件超过最大上传张数')
-                        return false
-                    }
-                    else {
-                        this.chooseName.push(firstName)
+                            this.warningTip.splice(
+                                this.warningTip.indexOf(file.name),
+                                1
+                            );
+                        }, 1500);
+                        return false;
+                    } else if (
+                        this.chooseName.length + this.orderImage.length >=
+                        this.allNum * 2
+                    ) {
+                        this.$message.warning("文件超过最大上传张数");
+                        return false;
+                    } else {
+                        this.chooseName.push(firstName);
                     }
                 }
 
-
-                this.loading = true
-                this.num++
+                this.loading = true;
+                this.num++;
             }
 
-            var position = file.name.lastIndexOf('.')
-            var fileName = file.name.substring(0, position)
-
-
-            this.$http.get({
-                url: '/orderAlbum/getOne',
-                data: {
-                    orderId: this.$route.query.orderId,
-                    imageName: fileName
-                }
-            }).then(res => {
-                if (res.data) {
-                    this.hasNum++
-                }
-            })
-
-
+            var position = file.name.lastIndexOf(".");
+            var fileName = file.name.substring(0, position);
 
+            this.$http
+                .get({
+                    url: "/orderAlbum/getOne",
+                    data: {
+                        orderId: this.$route.query.orderId,
+                        imageName: fileName
+                    }
+                })
+                .then(res => {
+                    if (res.data) {
+                        this.hasNum++;
+                    }
+                });
 
-            return isJPG
+            return isJPG;
         },
         delImg(id) {
-
             if (this.orderImgId.indexOf(id) != -1) {
-                this.orderImage.splice(this.orderImgId.indexOf(id), 1)
+                this.orderImage.splice(this.orderImgId.indexOf(id), 1);
             }
-
         },
         submit() {
             this.$http.post({
-                url: '/userOrder/waitAccept',
+                url: "/orderImage/delOssImage",
                 data: {
-                    id: this.orderInfo.id,
+                    orderId: this.orderInfo.id
                 }
-            }).then(res => {
-                this.$message.success('上传成功');
-                history.back()
-            })
+            });
 
+            this.loading = true;
+            if (this.$route.query.repairId) {
+                if (this.repairNum == 3) {
+                    var data = {
+                        albumRepairId: this.$route.query.repairId,
+                        albumRepairStatus: 3
+                    };
+                    if (this.$route.query.imageRepairId) {
+                        data.imageRepairId = this.$route.query.imageRepairId;
+                        data.imageRepairStatus = 3;
+                    }
+                    this.$http
+                        .post({
+                            url: "/userOrder/updateImageAndAlbumRepair",
+                            data: data
+                        })
+                        .then(res => {
+                            if (res.success) {
+                                this.$http.post({
+                                    url: "/userOrder/msg",
+                                    data: {
+                                        orderId: this.orderInfo.id,
+                                        typeFlag: 2,
+                                        message: "返修超过三次,系统默认通过"
+                                    }
+                                });
+                                if (this.orderInfo.clientOrderId) {
+                                    this.$http.post({
+                                        url: "/clientNotice/save",
+                                        data: {
+                                            clientOrderId: this.orderInfo
+                                                .clientOrderId,
+                                            orderId: this.orderInfo.id,
+                                            userId: this.orderInfo.userId,
+                                            productId: this.orderInfo.productId,
+                                            storeId: this.orderInfo.storeId,
+                                            typeFlag: 4,
+                                            remark: "返修超过三次,系统默认通过"
+                                        }
+                                    });
+                                }
+                                this.$http
+                                    .post({
+                                        url: "/userOrder/confirm",
+                                        data: {
+                                            id: this.orderInfo.id,
+                                            acceptType: "image_album"
+                                        }
+                                    })
+                                    .then(res3 => {
+                                        if (res3.success) {
+                                            this.$http.get({
+                                                url: "/orderImage/createZip",
+                                                data: {
+                                                    orderId: this.orderInfo.id,
+                                                    typeFlag: "finished"
+                                                }
+                                            });
+                                            this.$message.success("提交成功");
+                                            history.back();
+
+                                            this.loading = false;
+                                        }
+                                    });
+                            }
+                        });
+                } else {
+                    var data = {
+                        albumRepairId: this.$route.query.repairId,
+                        albumRepairStatus: 2
+                    };
+                    if (this.$route.query.imageRepairId) {
+                        data.imageRepairId = this.$route.query.imageRepairId;
+                        data.imageRepairStatus = 2;
+                    }
+                    this.$http
+                        .post({
+                            url: "/userOrder/updateImageAndAlbumRepair",
+                            data: data
+                        })
+                        .then(res => {
+                            if (res.success) {
+                                this.$message.success("提交成功");
+                                this.$http.post({
+                                    url: "/userOrder/msg",
+                                    data: {
+                                        orderId: this.orderInfo.id,
+                                        typeFlag: 2,
+                                        message: "返修上传"
+                                    }
+                                });
+                                this.$http.post({
+                                    url: "/orderAlbum/resetAlbumStatus",
+                                    data: {
+                                        orderId: this.orderInfo.id
+                                    }
+                                });
+                                if (this.orderInfo.clientOrderId) {
+                                    this.$http.post({
+                                        url: "/clientNotice/save",
+                                        data: {
+                                            clientOrderId: this.orderInfo
+                                                .clientOrderId,
+                                            orderId: this.orderInfo.id,
+                                            userId: this.orderInfo.userId,
+                                            productId: this.orderInfo.productId,
+                                            storeId: this.orderInfo.storeId,
+                                            typeFlag: 2,
+                                            remark: "返修上传"
+                                        }
+                                    });
+                                }
+                                history.back();
+                                this.loading = false;
+                            }
+                        });
+                }
+            } else {
+                this.$http
+                    .post({
+                        url: "/userOrder/waitAccept",
+                        data: {
+                            id: this.orderInfo.id
+                        }
+                    })
+                    .then(res => {
+                        this.$message.success("上传成功");
+                        history.back();
+                        this.loading = false;
+                    });
+            }
         },
         changePage() {
-            this.$router.replace('/orderUploadChange?type=1&orderId=' + this.$route.query.orderId)
+            this.$router.replace(
+                "/orderUploadChange?orderId=" +
+                    this.$route.query.orderId +
+                    "&repairId=" +
+                    (this.$route.query.imageRepairId || "") +
+                    "&AlbumRepairId=" +
+                    (this.$route.query.repairId || "")
+            );
         }
     },
     components: {
         imgItem
     }
-}
+};
 </script>
 <style lang="less" scoped>
 .container {

+ 220 - 168
src/main/vue/src/pagesPre/OrderUploadChange.vue

@@ -1,28 +1,43 @@
 <template>
-    <div class="container" v-loading='loading' element-loading-text="上传图片中,时间或许会很久,请耐心等待哦!">
+    <div class="container" v-loading='loading' element-loading-text="加载中">
         <div class="top" v-if="orderInfo.productInfo">
 
-            <el-radio-group v-model="radio1" style="margin-right:10px;" v-if="hasAlbum" size="mini" @change="changePage">
+            <el-radio-group v-model="radio1" style="margin-right:10px;"
+                v-if="hasAlbum" size="mini" @change="changePage">
                 <el-radio-button label="修图"></el-radio-button>
                 <el-radio-button label="放大"></el-radio-button>
             </el-radio-group>
 
             <span>订单号:{{orderInfo.orderCode}}</span>
-            <span style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
-
-            <el-button style="float:right;margin:15px 10px 0 20px;width:100px" v-if="!notUp&&albumIsFull" type="primary" class="btn" @click="submit">提交</el-button>
-            <el-select v-if="!isChange" size="mini" style="float:right;margin-top:25px;width:120px" clearable v-model="unFinished" placeholder="筛选状态" @change="getImage">
+            <span
+                style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
+
+            <el-button style="float:right;margin:15px 10px 0 20px;width:100px"
+                v-if="!notUp&&albumIsFull" type="primary" class="btn"
+                @click="submit">提交</el-button>
+            <el-select v-if="!isChange" size="mini"
+                style="float:right;margin-top:25px;width:120px" clearable
+                v-model="unFinished" placeholder="筛选状态" @change="getImage">
                 <el-option key="1" label="未上传" value="1">
                 </el-option>
                 <el-option key="0" label="已上传" value="0">
                 </el-option>
             </el-select>
-            <el-button type="primary" size="mini" style="float:right;margin-top:25px;margin-right:20px" class="btn" plain @click="dialogVisible=true,upLoadImg=[],addImage=[],num=0,successNum=0">批量上传</el-button>
+            <el-button type="primary" size="mini"
+                style="float:right;margin-top:25px;margin-right:20px"
+                class="btn" plain
+                @click="dialogVisible=true,upLoadImg=[],addImage=[],num=0,successNum=0">
+                批量上传</el-button>
             <!-- <el-button type="primary"  size="mini" style="float:right;margin-top:25px;margin-right:20px" @click="goAlbum">上传放大</el-button> -->
         </div>
         <div style="backgroundColor:#f2f4f5;padding:10px 30px">
-            <div style="color:#666;font-size:14px" :style="{color:!notUp?'#666':'rgb(251, 110, 8)'}">修图:已上传/总张数 :{{allNumber-notUp}}/{{allNumber}},还需上传{{notUp}}张</div>
-            <div style="color:#666;font-size:14px;margin-top:10px" v-if="hasAlbum" :style="{color:albumIsFull?'#666':'rgb(251, 110, 8)'}">{{albumTip}}</div>
+            <div style="color:#666;font-size:14px"
+                :style="{color:!notUp?'#666':'rgb(251, 110, 8)'}">修图:已上传/总张数
+                :{{allNumber-notUp}}/{{allNumber}},还需上传{{notUp}}张</div>
+            <div style="color:#666;font-size:14px;margin-top:10px"
+                v-if="hasAlbum"
+                :style="{color:albumIsFull?'#666':'rgb(251, 110, 8)'}">
+                {{albumTip}}</div>
         </div>
 
         <div class="content">
@@ -30,15 +45,32 @@
             <template v-if="orderImage.length>0">
                 <div class="imgList">
                     <div class="title">原<br />片</div>
-                    <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :key="'originalImage'+index" :label='"originalImage"' :index='index' :img='item' :imgStyle='"showInfo"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+                    <img-item v-for="(item,index) in orderImage"
+                        @changeRemark="getImage" :key="'originalImage'+index"
+                        :label='"originalImage"' :index='index' :img='item'
+                        :imgStyle='"showInfo"' @delImg='getImage'
+                        style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;">
+                    </img-item>
                 </div>
 
                 <div class="imgList" style="margin-top:50px;">
                     <div class="title" style="color:#FB6E08">成<br />片</div>
-                    <div style="display:inline-block;vertical-align: middle" v-for="(item,index) in orderImage" :key="'finishedImage'+index">
-                        <single-upload-title v-if="!item.finishedImage||item.statusFlag==2" class="box" :needName='item.imageName' :nowIndex='index' :url='url' @input="changeImg" @start='loading=true' :title='"上传成片"' :width='120' :height='150'>
+                    <div style="display:inline-block;vertical-align: middle"
+                        v-for="(item,index) in orderImage"
+                        :key="'finishedImage'+index">
+                        <single-upload-title
+                            v-if="!item.finishedImage||item.statusFlag==2"
+                            class="box" :needName='item.imageName'
+                            :nowIndex='index' :url='url' @input="changeImg"
+                            @start='loading=true' :title='"上传成片"' :width='120'
+                            :height='150'>
                         </single-upload-title>
-                        <img-item v-if="item.finishedImage" :isChange='isChange' @changeRemark="changeRemark" :label='"finishedImage"' :index='index' :img='item' :imgStyle='"storeUpload"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+                        <img-item v-if="item.finishedImage" :isChange='isChange'
+                            @changeRemark="changeRemark"
+                            :label='"finishedImage"' :index='index' :img='item'
+                            :imgStyle='"storeUpload"' @delImg='getImage'
+                            style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;">
+                        </img-item>
 
                     </div>
                 </div>
@@ -50,7 +82,9 @@
 
         </div>
 
-        <el-pagination v-if="totalNumber>7" background :page-size="7" @current-change="currentPageChange" :current-page="currentPage" layout="total, prev, pager, next" :total="totalNumber">
+        <el-pagination v-if="totalNumber>7" background :page-size="7"
+            @current-change="currentPageChange" :current-page="currentPage"
+            layout="total, prev, pager, next" :total="totalNumber">
         </el-pagination>
 
         <div class="bottom">
@@ -61,12 +95,12 @@
 
         </div>
 
-        <el-dialog
-                   title="上传图片"
-                   :visible.sync="dialogVisible"
-                   width="500px" center :before-close="handleClose">
+        <el-dialog title="上传图片" :visible.sync="dialogVisible" width="500px"
+            center :before-close="handleClose">
 
-            <upload-list-file :url='url' :tipInfo='uploadTipInfo' :show='dialogVisible' checkName :needNameList='needNameList' @successEvent='checkImageAndAlbum'></upload-list-file>
+            <upload-list-file :url='url' :tipInfo='uploadTipInfo'
+                :show='dialogVisible' checkName :needNameList='needNameList'
+                @successEvent='checkImageAndAlbum'></upload-list-file>
         </el-dialog>
 
         <!-- <el-dialog title="上传图片" class="uploadDialog" :visible.sync="dialogVisible" width="80%" top="50px" :close-on-click-modal='false'>
@@ -94,19 +128,19 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex';
-import imgItem from '../components/ImgItem';
-import formValidator from '../formValidator';
+import { mapState } from "vuex";
+import imgItem from "../components/ImgItem";
+import formValidator from "../formValidator";
 const baseUrl =
-    process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
+    process.env.NODE_ENV === "production" ? "../" : "http://localhost:8080";
 export default {
     created() {
         this.$http
             .get({
-                url: '/userOrder/getOne',
+                url: "/userOrder/getOne",
                 data: {
-                    id: this.$route.query.orderId,
-                },
+                    id: this.$route.query.orderId
+                }
             })
             .then(res => {
                 if (res.success) {
@@ -128,11 +162,11 @@ export default {
 
         this.$http
             .get({
-                url: '/orderImage/allImageName',
+                url: "/orderImage/allImageName",
                 data: {
                     orderId: this.$route.query.orderId,
-                    baseRepairId: this.$route.query.repairId || '',
-                },
+                    baseRepairId: this.$route.query.repairId || ""
+                }
             })
             .then(res => {
                 this.needNameList = res.data;
@@ -155,17 +189,17 @@ export default {
         // })
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(["userInfo"]),
         url() {
             return (
                 baseUrl +
-                '/orderImage/uploadFileForOrder?storeId=' +
+                "/orderImage/uploadFileForOrder?storeId=" +
                 this.orderInfo.storeId +
-                '&orderId=' +
+                "&orderId=" +
                 this.orderInfo.id +
-                '&userId=' +
+                "&userId=" +
                 this.userInfo.id +
-                '&typeFlag=finished'
+                "&typeFlag=finished"
             );
         },
         repairNum() {
@@ -216,12 +250,12 @@ export default {
         },
         uploadTipInfo() {
             return (
-                '只能上传RGB图片类型的jpg/png文件,已上传/总张数:' +
+                "只能上传RGB图片类型的jpg/png文件,已上传/总张数:" +
                 (this.allNumber - this.notUp) +
-                '/' +
+                "/" +
                 this.allNumber
             );
-        },
+        }
     },
     data() {
         return {
@@ -236,7 +270,7 @@ export default {
             isFail: false,
             repairId: 0,
             isChange: false,
-            unFinished: '',
+            unFinished: "",
             upLoadImg: [],
             notUp: 0,
             allNumber: 0,
@@ -244,10 +278,10 @@ export default {
             isLoading: false,
             loading: false,
             successNum: 0,
-            radio1: '修图',
-            albumTip: '',
+            radio1: "修图",
+            albumTip: "",
             albumIsFull: false,
-            needNameList: [],
+            needNameList: []
         };
     },
     methods: {
@@ -256,55 +290,63 @@ export default {
             this.dialogVisible = false;
         },
         changePage() {
-            if (this.orderInfo.albumStatus == 0) {
-                this.$router.replace(
-                    '/orderUploadAlbum?orderId=' + this.$route.query.orderId,
-                );
-            } else {
-                this.$router.replace(
-                    '/orderUploadChangeAlbum?orderId=' +
-                        this.$route.query.orderId +
-                        '&repairId=' +
-                        (this.$route.query.AlbumRepairId || '') +
-                        '&imageRepairId=' +
-                        (this.repairId || ''),
-                );
-                //   this.goNextquery('orderUploadChangeAlbum', { repairId: info.AlbumRepairId, imageRepairId:info.im, type: 'shop' })
-            }
+            this.$router.replace(
+                "/orderUploadAlbum?orderId=" +
+                    this.$route.query.orderId +
+                    "&repairId=" +
+                    (this.$route.query.AlbumRepairId || "") +
+                    "&imageRepairId=" +
+                    (this.repairId || "")
+            );
+            // if (this.orderInfo.albumStatus == 0) {
+            //     this.$router.replace(
+            //         "/orderUploadAlbum?orderId=" + this.$route.query.orderId
+            //     );
+            // } else {
+            //     this.$router.replace(
+            //         "/orderUploadChangeAlbum?orderId=" +
+            //             this.$route.query.orderId +
+            //             "&repairId=" +
+            //             (this.$route.query.AlbumRepairId || "") +
+            //             "&imageRepairId=" +
+            //             (this.repairId || "")
+            //     );
+            //     //   this.goNextquery('orderUploadChangeAlbum', { repairId: info.AlbumRepairId, imageRepairId:info.im, type: 'shop' })
+            // }
         },
         handleOn(file) {
             // const isJPG = (file.type === 'image/jpeg' || file.type === 'image/JPEG' || file.type === 'image/png' || file.type === 'image/PNG' || file.type === 'image/cr2' || file.type === 'image/CR2');
-            var allName = file.name.split('.');
+            var allName = file.name.split(".");
             var lastName = allName[allName.length - 1];
 
             // const isJPG = (file.type === '' || file.type === 'image/jpeg' || file.type === 'image/JPEG' || file.type === 'image/png' || file.type === 'image/PNG' || file.type === 'image/cr2' || file.type === 'image/CR2');
             const isJPG =
-                lastName === 'jpeg' ||
-                lastName === 'GPEG' ||
-                lastName === 'jpg' ||
-                lastName === 'JPG' ||
-                lastName === 'png' ||
-                lastName === 'PNG' ||
-                lastName === 'cr2' ||
-                lastName === 'CR2' ||
-                lastName == 'NEF' ||
-                lastName == 'nef';
+                lastName === "jpeg" ||
+                lastName === "GPEG" ||
+                lastName === "jpg" ||
+                lastName === "JPG" ||
+                lastName === "png" ||
+                lastName === "PNG" ||
+                lastName === "cr2" ||
+                lastName === "CR2" ||
+                lastName == "NEF" ||
+                lastName == "nef";
 
             if (!isJPG) {
                 return isJPG;
             }
 
-            var position = file.name.lastIndexOf('.');
+            var position = file.name.lastIndexOf(".");
             var fileName = file.name.substring(0, position);
 
             return new Promise((resolve, reject) => {
                 this.$http
                     .get({
-                        url: '/orderImage/getOne',
+                        url: "/orderImage/getOne",
                         data: {
                             orderId: this.$route.query.orderId,
-                            imageName: fileName,
-                        },
+                            imageName: fileName
+                        }
                     })
                     .then(res => {
                         if (res.data) {
@@ -316,8 +358,8 @@ export default {
                             }
                         } else {
                             this.$message({
-                                message: fileName + '图片不在任务中,不能上传',
-                                type: 'warning',
+                                message: fileName + "图片不在任务中,不能上传",
+                                type: "warning"
                             });
                             reject();
                         }
@@ -328,10 +370,10 @@ export default {
             if (!this.repairId) {
                 this.$http
                     .get({
-                        url: '/userOrder/getOne',
+                        url: "/userOrder/getOne",
                         data: {
-                            id: this.$route.query.orderId,
-                        },
+                            id: this.$route.query.orderId
+                        }
                     })
                     .then(res => {
                         if (res.success) {
@@ -358,7 +400,7 @@ export default {
             var data = {
                 orderId: this.$route.query.orderId,
                 currentPage: this.currentPage,
-                pageNumber: 7,
+                pageNumber: 7
             };
 
             //普通审核筛选
@@ -369,20 +411,20 @@ export default {
             //返修筛选
             if (this.$route.query.repairId) {
                 data.repairId = this.$route.query.repairId;
-                if (data.unFinished == '1') {
+                if (data.unFinished == "1") {
                     data.statusFlag = 2;
-                } else if (data.unFinished == '0') {
+                } else if (data.unFinished == "0") {
                     data.statusFlag = 0;
                 }
-                data.unFinished = '';
+                data.unFinished = "";
                 data.baseRepairId = this.$route.query.repairId;
             }
 
             this.orderImage = [];
             this.$http
                 .get({
-                    url: '/orderImage/page',
-                    data: data,
+                    url: "/orderImage/page",
+                    data: data
                 })
                 .then(res => {
                     if (res.success) {
@@ -409,44 +451,44 @@ export default {
         checkImageAndAlbum() {
             this.$http
                 .get({
-                    url: '/userOrder/checkImageAndAlbum',
+                    url: "/userOrder/checkImageAndAlbum",
                     data: {
                         orderId: this.$route.query.orderId,
-                        repairId: this.$route.query.repairId || '',
-                        albumRepairId: this.$route.query.AlbumRepairId,
-                    },
+                        repairId: this.$route.query.repairId || "",
+                        albumRepairId: this.$route.query.AlbumRepairId || ""
+                    }
                 })
                 .then(res2 => {
                     this.notUp = res2.data.needImage;
 
                     this.allNumber = res2.data.totalImage;
 
-                    if (this.orderInfo.albumStatus == 0) {
+                    this.albumTip =
+                        "放大:已上传/总张数:" +
+                        (res2.data.albumQuantity - res2.data.needAlbum) +
+                        "/" +
+                        res2.data.albumQuantity +
+                        (res2.data.needAlbum > 0
+                            ? ",还需要上传" + res2.data.needAlbum + "张"
+                            : "") +
+                        ",最多上传" +
+                        res2.data.albumQuantity * 2 +
+                        "张";
+
+                    if (res2.data.failAlbum > 0) {
                         this.albumTip =
-                            '放大:已上传/总张数:' +
-                            (res2.data.albumQuantity - res2.data.needAlbum) +
-                            '/' +
-                            res2.data.albumQuantity +
-                            (res2.data.needAlbum > 0
-                                ? ',还需要上传' + res2.data.needAlbum + '张'
-                                : '') +
-                            ',最多上传' +
-                            res2.data.albumQuantity * 2 +
-                            '张';
-                    } else {
-                        this.albumTip =
-                            '放大:已上传/总张数:' +
-                            (res2.data.totalAlbum - res2.data.needAlbum) +
-                            '/' +
-                            res2.data.totalAlbum +
-                            (res2.data.needAlbum > 0
-                                ? ',还需要上传' + res2.data.needAlbum + '张'
-                                : '');
+                            this.albumTip +
+                            ",审核未通过" +
+                            res2.data.failAlbum +
+                            "张";
                     }
-                    if (res2.data.needAlbum <= 0) {
-                        this.albumIsFull = true;
-                    } else {
+
+                    if (res2.data.needAlbum > 0) {
                         this.albumIsFull = false;
+                    } else if (res2.data.failAlbum > 0) {
+                        this.albumIsFull = false;
+                    } else {
+                        this.albumIsFull = true;
                     }
                 });
         },
@@ -470,17 +512,17 @@ export default {
         },
         handleProgress(e, file) {
             if (e.percent == 100) {
-                var position = file.name.lastIndexOf('.');
+                var position = file.name.lastIndexOf(".");
                 var fileName = file.name.substring(0, position);
 
-                this.tip.splice(0, 0, fileName + '文件正在压缩');
+                this.tip.splice(0, 0, fileName + "文件正在压缩");
             }
         },
         handleSuccess(res, flie) {
             console.log(res);
             var tips = [...this.tip];
             tips.forEach((item, index) => {
-                var list = item.split('文件正在压缩');
+                var list = item.split("文件正在压缩");
                 if (list[0] === flie.name) {
                     tips.splice(index, 1);
                 }
@@ -488,7 +530,7 @@ export default {
             tips.splice(
                 0,
                 0,
-                flie.name + (res.success ? '文件上传成功' : '上传失败'),
+                flie.name + (res.success ? "文件上传成功" : "上传失败")
             );
             this.tip = tips;
             setTimeout(() => {
@@ -496,7 +538,7 @@ export default {
                 tips.forEach((item, index) => {
                     if (
                         item.indexOf(
-                            res.success ? '文件上传成功' : '上传失败',
+                            res.success ? "文件上传成功" : "上传失败"
                         ) != -1
                     ) {
                         tips.splice(index, 1);
@@ -510,7 +552,7 @@ export default {
                     this.orderImage.splice(
                         this.orderImgId.indexOf(res.data[0].id),
                         1,
-                        res.data[0],
+                        res.data[0]
                     );
                 }
             } else {
@@ -525,7 +567,7 @@ export default {
         upload() {
             const loading = this.$loading({
                 lock: true,
-                text: '加载中',
+                text: "加载中"
             });
             var id = [];
             this.addImage.forEach(item => {
@@ -533,26 +575,26 @@ export default {
             });
             this.$http
                 .post({
-                    url: '/orderImage/updateFinishedImages',
+                    url: "/orderImage/updateFinishedImages",
                     data: {
                         imageIds: id.toString(),
-                        orderId: this.orderInfo.id,
-                    },
+                        orderId: this.orderInfo.id
+                    }
                 })
                 .then(res => {
                     if (res.success) {
                         loading.close();
-                        this.$message.success('成功');
+                        this.$message.success("成功");
                         this.dialogVisible = false;
                         this.getImage();
                     } else {
-                        this.$message.warning('失败');
+                        this.$message.warning("失败");
                     }
                 });
         },
         saveImage(i) {
             if (i == this.allImage.length) {
-                this.$message.success('成功');
+                this.$message.success("成功");
                 this.dialogVisible = false;
                 this.getImage();
             } else {
@@ -560,29 +602,30 @@ export default {
                     originalImage: this.allImage[i],
                     orderId: this.orderInfo.id,
                     userId: this.userInfo.id,
-                    storeId: this.orderInfo.storeId,
+                    storeId: this.orderInfo.storeId
                 };
                 this.$http
                     .post({
-                        url: '/orderImage/save',
-                        data: data,
+                        url: "/orderImage/save",
+                        data: data
                     })
                     .then(res => {
                         if (res.success) {
                             this.saveImage(i + 1);
                         } else {
-                            this.$message.warning('失败');
+                            this.$message.warning("失败");
                         }
                     });
             }
         },
         submit() {
             this.$http.post({
-                url: '/orderImage/delOssImage',
+                url: "/orderImage/delOssImage",
                 data: {
-                    orderId: this.orderInfo.id,
-                },
+                    orderId: this.orderInfo.id
+                }
             });
+            this.loading = true;
             if (this.$route.query.repairId) {
                 if (
                     this.orderInfo.orderRepairList.length == 3 &&
@@ -592,7 +635,7 @@ export default {
                 ) {
                     var data = {
                         imageRepairId: this.$route.query.repairId,
-                        imageRepairStatus: 3,
+                        imageRepairStatus: 3
                     };
                     if (this.$route.query.AlbumRepairId) {
                         data.albumRepairId = this.$route.query.AlbumRepairId;
@@ -600,22 +643,22 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
-                            data: data,
+                            url: "/userOrder/updateImageAndAlbumRepair",
+                            data: data
                         })
                         .then(res => {
                             if (res.success) {
                                 this.$http.post({
-                                    url: '/userOrder/msg',
+                                    url: "/userOrder/msg",
                                     data: {
                                         orderId: this.orderInfo.id,
                                         typeFlag: 2,
-                                        message: '返修超过三次,系统默认通过',
-                                    },
+                                        message: "返修超过三次,系统默认通过"
+                                    }
                                 });
                                 if (this.orderInfo.clientOrderId) {
                                     this.$http.post({
-                                        url: '/clientNotice/save',
+                                        url: "/clientNotice/save",
                                         data: {
                                             clientOrderId: this.orderInfo
                                                 .clientOrderId,
@@ -624,29 +667,29 @@ export default {
                                             productId: this.orderInfo.productId,
                                             storeId: this.orderInfo.storeId,
                                             typeFlag: 4,
-                                            remark:
-                                                '返修超过三次,系统默认通过',
-                                        },
+                                            remark: "返修超过三次,系统默认通过"
+                                        }
                                     });
                                 }
                                 this.$http
                                     .post({
-                                        url: '/userOrder/confirm',
+                                        url: "/userOrder/confirm",
                                         data: {
                                             id: this.orderInfo.id,
-                                            acceptType: 'image_album',
-                                        },
+                                            acceptType: "image_album"
+                                        }
                                     })
                                     .then(res3 => {
                                         if (res3.success) {
                                             this.$http.get({
-                                                url: '/orderImage/createZip',
+                                                url: "/orderImage/createZip",
                                                 data: {
                                                     orderId: this.orderInfo.id,
-                                                    typeFlag: 'finished',
-                                                },
+                                                    typeFlag: "finished"
+                                                }
                                             });
-                                            this.$message.success('提交成功');
+                                            this.loading = false;
+                                            this.$message.success("提交成功");
                                             history.back();
                                         }
                                     });
@@ -655,7 +698,7 @@ export default {
                 } else {
                     var data = {
                         imageRepairId: this.$route.query.repairId,
-                        imageRepairStatus: 2,
+                        imageRepairStatus: 2
                     };
                     if (this.$route.query.AlbumRepairId) {
                         data.albumRepairId = this.$route.query.AlbumRepairId;
@@ -663,23 +706,30 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
-                            data: data,
+                            url: "/userOrder/updateImageAndAlbumRepair",
+                            data: data
                         })
                         .then(res => {
                             if (res.success) {
-                                this.$message.success('提交成功');
+                                this.$message.success("提交成功");
                                 this.$http.post({
-                                    url: '/userOrder/msg',
+                                    url: "/userOrder/msg",
                                     data: {
                                         orderId: this.orderInfo.id,
                                         typeFlag: 2,
-                                        message: '返修上传',
-                                    },
+                                        message: "返修上传"
+                                    }
+                                });
+
+                                this.$http.post({
+                                    url: "/orderAlbum/resetAlbumStatus",
+                                    data: {
+                                        orderId: this.orderInfo.id
+                                    }
                                 });
                                 if (this.orderInfo.clientOrderId) {
                                     this.$http.post({
-                                        url: '/clientNotice/save',
+                                        url: "/clientNotice/save",
                                         data: {
                                             clientOrderId: this.orderInfo
                                                 .clientOrderId,
@@ -688,10 +738,11 @@ export default {
                                             productId: this.orderInfo.productId,
                                             storeId: this.orderInfo.storeId,
                                             typeFlag: 2,
-                                            remark: '返修上传',
-                                        },
+                                            remark: "返修上传"
+                                        }
                                     });
                                 }
+                                this.loading = false;
                                 history.back();
                             }
                         });
@@ -699,13 +750,14 @@ export default {
             } else {
                 this.$http
                     .post({
-                        url: '/userOrder/waitAccept',
+                        url: "/userOrder/waitAccept",
                         data: {
-                            id: this.orderInfo.id,
-                        },
+                            id: this.orderInfo.id
+                        }
                     })
                     .then(res => {
-                        this.$message.success('上传成功');
+                        this.$message.success("上传成功");
+                        this.loading = false;
                         history.back();
                     });
 
@@ -733,21 +785,21 @@ export default {
             }
         },
         changeImg(newVal) {
-            this.$message.success('提交成功');
+            this.$message.success("提交成功");
             this.loading = false;
             this.getImage();
         },
         updateImg(index, img, size, artworkUrl) {
             this.$http
                 .post({
-                    url: '/orderImage/update',
+                    url: "/orderImage/update",
                     data: {
                         id: this.orderImage[index].id,
                         finishedImage: img,
                         finishedSize: size,
                         statusFlag: 0,
-                        finishedArtwork: artworkUrl,
-                    },
+                        finishedArtwork: artworkUrl
+                    }
                 })
                 .then(res => {
                     if (res.success) {
@@ -756,12 +808,12 @@ export default {
                 });
         },
         goAlbum() {
-            this.$router.push('/OrderUploadAlbum?orderId=' + this.orderInfo.id);
-        },
+            this.$router.push("/OrderUploadAlbum?orderId=" + this.orderInfo.id);
+        }
     },
     components: {
-        imgItem,
-    },
+        imgItem
+    }
 };
 </script>
 <style lang="less" scoped>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio