Panhui 6 lat temu
rodzic
commit
5856584944

+ 306 - 206
src/main/vue/src/components/ImgItem.vue

@@ -1,74 +1,128 @@
 <template>
     <div class="imgContent">
         <template v-if="img[label]">
-            <div class="img" v-if='!(imgStyle=="storeUpload"&&img.statusFlag==2)'>
+            <div class="img"
+                v-if='!(imgStyle=="storeUpload"&&img.statusFlag==2)'>
                 <!-- <div class="image" v-if="img" @click="choose" :style="imageStyle" ref="img"></div> -->
-                <img :src="img[label]+'?x-oss-process=image/resize,l_120'" @click="choose" alt="">
+                <img :src="img[label]+'?x-oss-process=image/resize,l_120'"
+                    @click="choose" alt="">
             </div>
-            <div class="remark" v-if='!(imgStyle=="storeUpload"&&img.statusFlag==2)'>{{img.imageName}}
+            <div class="remark">
+                {{img.imageName}}
                 <span v-if="label=='originalImage'">{{img.remark}}</span>
                 <span v-if="label=='finishedImage'">{{img.detailRemark}}</span>
 
             </div>
-            <div v-if="imgStyle=='examine'&&label=='finishedImage'" class="check">
+            <!-- <div class="remark" v-if='imgStyle=="storeUpload"'>
+                {{img.imageName}}
+                <span v-if="label=='finishedImage'">{{img.detailRemark}}</span>
+
+            </div> -->
+            <div v-if="imgStyle=='examine'&&label=='finishedImage'"
+                class="check">
                 <template v-if='!isChange'>
-                    <el-button v-if="img.statusFlag==1" icon="el-icon-check" type="success" circle size="mini"></el-button>
-                    <el-button @click="changeStatus(1)" v-else icon="el-icon-check" type="success" circle plain size="mini"></el-button>
-                    <el-button v-if="img.statusFlag==2" type="danger" icon="el-icon-close" circle size="mini"></el-button>
-                    <el-button @click="dialogFormVisible=true,detailRemarkFlag=''" v-else type="danger" icon="el-icon-close" circle plain size="mini"></el-button>
+                    <el-button v-if="img.statusFlag==1" icon="el-icon-check"
+                        type="success" circle size="mini"></el-button>
+                    <el-button @click="changeStatus(1)" v-else
+                        icon="el-icon-check" type="success" circle plain
+                        size="mini"></el-button>
+                    <el-button v-if="img.statusFlag==2" type="danger"
+                        icon="el-icon-close" circle size="mini"></el-button>
+                    <el-button
+                        @click="dialogFormVisible=true,detailRemarkFlag=''"
+                        v-else type="danger" icon="el-icon-close" circle plain
+                        size="mini"></el-button>
                 </template>
 
-                <el-button @click="dialogFormVisible=true,detailRemarkFlag='1'" icon="el-icon-edit" circle plain size="mini"></el-button>
+                <el-button @click="dialogFormVisible=true,detailRemarkFlag='1'"
+                    icon="el-icon-edit" circle plain size="mini"></el-button>
 
             </div>
             <div class="check" v-if="imgStyle=='upload'">
-                <el-button v-if="canCancel" @click="delImg" type="danger" icon="el-icon-delete" circle plain size="mini"></el-button>
-                <el-button v-if="!storeType" @click="dialogFormVisible=true" icon="el-icon-edit" circle plain size="mini"></el-button>
-                <el-button v-else @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
+                <el-button v-if="canCancel" @click="delImg" type="danger"
+                    icon="el-icon-delete" circle plain size="mini"></el-button>
+                <el-button v-if="!storeType" @click="dialogFormVisible=true"
+                    icon="el-icon-edit" circle plain size="mini"></el-button>
+                <el-button v-else @click="dialogFormVisible=true"
+                    icon="el-icon-info" circle plain size="mini"></el-button>
             </div>
 
             <div class="check" v-if="imgStyle=='storeUpload'">
-                <el-button v-if='img.statusFlag!=2' @click="delFinishImg" type="danger" icon="el-icon-delete" circle plain size="mini"></el-button>
-                <el-button v-if="img.detailRemark" @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
+                <el-button v-if='img.statusFlag!=2' @click="delFinishImg"
+                    type="danger" icon="el-icon-delete" circle plain
+                    size="mini"></el-button>
+                <el-button v-if="img.detailRemark"
+                    @click="dialogFormVisible=true" icon="el-icon-info" circle
+                    plain size="mini"></el-button>
             </div>
 
             <div class="check" v-if="imgStyle=='showInfo'">
-                <el-button @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
+                <el-button @click="dialogFormVisible=true" icon="el-icon-info"
+                    circle plain size="mini"></el-button>
             </div>
 
-            <el-dialog :title="(storeType?'查看':'添加/修改')+'备注'" :visible.sync="dialogFormVisible" width='30%'>
+            <el-dialog :title="(storeType?'查看':'添加/修改')+'备注'"
+                :visible.sync="dialogFormVisible" width='30%'>
                 <el-form label-width="80px">
                     <el-form-item :label="imgStyle=='examine'?'返修备注':'图片备注'">
-                        <el-input :disabled="storeType" type="textarea" v-model="remark" auto-complete="off"></el-input>
+                        <el-input :disabled="storeType" type="textarea"
+                            v-model="remark" auto-complete="off"></el-input>
                     </el-form-item>
                 </el-form>
                 <div slot="footer" class="dialog-footer" v-if="!storeType">
-                    <el-button @click="dialogFormVisible = false">取 消</el-button>
-                    <el-button type="primary" @click="saveRemark">添 加</el-button>
+                    <el-button @click="dialogFormVisible = false">取 消
+                    </el-button>
+                    <el-button type="primary" @click="saveRemark">添 加
+                    </el-button>
                 </div>
             </el-dialog>
 
-            <el-dialog v-if="label=='originalImage'" :title="img.imageName+' '+imgStyleStr+'预览'" :visible.sync="preView" :width="imageStyle.width+40+'px'">
+            <el-dialog v-if="label=='originalImage'"
+                :title="img.imageName+' '+imgStyleStr+'预览'"
+                :visible.sync="preView" :width="imageStyle.width+40+'px'">
                 <!-- <img-zoom v-if="label=='finishedImage'" :src="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)" :bigsrc="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)*2" :configs="configs"></img-zoom> -->
                 <!-- <img v-if="label=='finishedImage'" :src="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)" alt=""> -->
-                <img :src="img[label]+'?x-oss-process=image/resize,l_500'" alt="">
+                <img :src="img[label]+'?x-oss-process=image/resize,l_500'"
+                    alt="">
             </el-dialog>
 
-            <div class="box" v-if="preView&&label=='finishedImage'" @click="preView=false">
-                <div draggable='false' :style="{transform:'scale('+nowNum+')'}" class="img-content" @click.stop="" @dragenter='dragStop' @dragover='dragStop' @mousewheel='scrollEvent' @mousedown="drugEvent" @mousemove="drugmoveEvent" @mouseup="isDrug=false">
-                    <img draggable="false" :id='"img"+label+img.id' :style="{transform:'translate('+bigImgStyle.left+'px,'+bigImgStyle.top+'px)',height:realImg.height+'px',width:realImg.width+'px'}" :src="img[label]+'?x-oss-process=image/resize,m_lfit,h_'+bigImgStyle.height*2+',w_'+bigImgStyle.width*2" alt="">
+            <div class="box" v-if="preView&&label=='finishedImage'"
+                @click="preView=false">
+                <div draggable='false' :style="{transform:'scale('+nowNum+')'}"
+                    class="img-content" @click.stop="" @dragenter='dragStop'
+                    @dragover='dragStop' @mousewheel='scrollEvent'
+                    @mousedown="drugEvent" @mousemove="drugmoveEvent"
+                    @mouseup="isDrug=false">
+                    <img draggable="false" :id='"img"+label+img.id'
+                        :style="{transform:'translate('+bigImgStyle.left+'px,'+bigImgStyle.top+'px)',height:realImg.height+'px',width:realImg.width+'px'}"
+                        :src="img[label]+'?x-oss-process=image/resize,m_lfit,h_'+bigImgStyle.height*2+',w_'+bigImgStyle.width*2"
+                        alt="">
                 </div>
-                <el-button icon="el-icon-close" @click="preView=false" circle class="closeBtn"></el-button>
+                <el-button icon="el-icon-close" @click="preView=false" circle
+                    class="closeBtn"></el-button>
 
-                <div v-if="imgStyle=='examine'&&label=='finishedImage'" class="checkContent" @click.stop="">
+                <div v-if="imgStyle=='examine'&&label=='finishedImage'"
+                    class="checkContent" @click.stop="">
                     <template v-if='!isChange'>
-                        <el-button style="margin-right:20px;" v-if="img.statusFlag==1" icon="el-icon-check" type="success" circle></el-button>
-                        <el-button style="margin-right:20px;" @click.stop="changeStatus(1)" v-else icon="el-icon-check" type="success" circle plain></el-button>
-                        <el-button style="margin-right:20px;" v-if="img.statusFlag==2" type="danger" icon="el-icon-close" circle></el-button>
-                        <el-button style="margin-right:20px;" @click.stop="dialogFormVisible=true,detailRemarkFlag=''" v-else type="danger" icon="el-icon-close" circle plain></el-button>
+                        <el-button style="margin-right:20px;"
+                            v-if="img.statusFlag==1" icon="el-icon-check"
+                            type="success" circle></el-button>
+                        <el-button style="margin-right:20px;"
+                            @click.stop="changeStatus(1)" v-else
+                            icon="el-icon-check" type="success" circle plain>
+                        </el-button>
+                        <el-button style="margin-right:20px;"
+                            v-if="img.statusFlag==2" type="danger"
+                            icon="el-icon-close" circle></el-button>
+                        <el-button style="margin-right:20px;"
+                            @click.stop="dialogFormVisible=true,detailRemarkFlag=''"
+                            v-else type="danger" icon="el-icon-close" circle
+                            plain></el-button>
                     </template>
 
-                    <el-button @click.stop="dialogFormVisible=true,detailRemarkFlag='1'" icon="el-icon-edit" circle plain></el-button>
+                    <el-button
+                        @click.stop="dialogFormVisible=true,detailRemarkFlag='1'"
+                        icon="el-icon-edit" circle plain></el-button>
 
                 </div>
             </div>
@@ -79,9 +133,9 @@
 </template>
 
 <script>
-import imgZoom from '../components/ImgZoom'
+import imgZoom from "../components/ImgZoom";
 export default {
-    name: 'imgItem',
+    name: "imgItem",
     props: {
         img: {
             type: Object,
@@ -89,11 +143,11 @@ export default {
         },
         imgStyle: {
             type: String,
-            default: ''
+            default: ""
         },
         label: {
             type: String,
-            default: 'originalImage'
+            default: "originalImage"
         },
         index: {
             type: Number,
@@ -112,10 +166,10 @@ export default {
         return {
             detailRemarkFlag: "",
             imageStyle: {
-                backgroundColor: '#ebebeb'
+                backgroundColor: "#ebebeb"
             },
             dialogFormVisible: false,
-            remark: '',
+            remark: "",
             preView: false,
             configs: {
                 width: 400,
@@ -123,8 +177,7 @@ export default {
                 maskWidth: 200,
                 maskHeight: 200,
 
-
-                maskColor: 'red',
+                maskColor: "red",
                 maskOpacity: 0.2,
                 imgWithd: 500,
                 imgHeight: 500
@@ -138,309 +191,356 @@ export default {
                 width: 0,
                 height: 0,
                 left: 0,
-                top: 0,
+                top: 0
             },
             nowNum: 1,
             drag: {
                 X: 0,
-                Y: 0,
+                Y: 0
             },
             isDrug: false,
             realImg: {
                 width: 0,
                 height: 0
             }
-        }
+        };
     },
     computed: {
         imgStyleStr() {
-            var str = '原片'
-            if (this.label == 'finishedImage') {
-                str = '成片'
+            var str = "原片";
+            if (this.label == "finishedImage") {
+                str = "成片";
             }
-            return str
+            return str;
         }
     },
     created() {
-        this.getImg()
-        if (this.label == 'originalImage') {
-            this.remark = this.img.remark
-        }
-        else {
-            this.remark = this.img.detailRemark
+        this.getImg();
+        if (this.label == "originalImage") {
+            this.remark = this.img.remark;
+        } else {
+            this.remark = this.img.detailRemark;
         }
 
         if (this.$route.query.type) {
-            if (this.$route.query.type == 'user') {
-                this.storeType = false
+            if (this.$route.query.type == "user") {
+                this.storeType = false;
+            } else {
+                this.storeType = true;
             }
-            else { this.storeType = true }
-
         }
 
-        this.allHeight = window.innerHeight
-
+        this.allHeight = window.innerHeight;
     },
     methods: {
         dragStop(e) {
-            e.preventDefault()
+            e.preventDefault();
         },
         dragStartEvent(e) {
             this.drag = {
                 X: e.offsetX,
                 Y: e.offsetY
-            }
+            };
         },
         drugmoveEvent(e) {
-
             if (this.isDrug) {
-                var left = this.bigImgStyle.left + e.offsetX - this.drag.X
-                var top = this.bigImgStyle.top + e.offsetY - this.drag.Y
-
-
-                var imgWidth = parseInt(document.getElementById('img' + this.label + this.img.id).offsetWidth * this.nowNum)
-                var imgHeight = parseInt(document.getElementById('img' + this.label + this.img.id).offsetHeight * this.nowNum)
-
-                if ((imgHeight - window.innerHeight) / 2 < top * this.nowNum || 0 - (imgHeight - window.innerHeight) / 2 > top * this.nowNum) {
-                    top = this.bigImgStyle.top
+                var left = this.bigImgStyle.left + e.offsetX - this.drag.X;
+                var top = this.bigImgStyle.top + e.offsetY - this.drag.Y;
+
+                var imgWidth = parseInt(
+                    document.getElementById("img" + this.label + this.img.id)
+                        .offsetWidth * this.nowNum
+                );
+                var imgHeight = parseInt(
+                    document.getElementById("img" + this.label + this.img.id)
+                        .offsetHeight * this.nowNum
+                );
+
+                if (
+                    (imgHeight - window.innerHeight) / 2 < top * this.nowNum ||
+                    0 - (imgHeight - window.innerHeight) / 2 > top * this.nowNum
+                ) {
+                    top = this.bigImgStyle.top;
                 }
-                if ((imgWidth - window.innerWidth) / 2 < left * this.nowNum || 0 - (imgWidth - window.innerWidth) / 2 > left * this.nowNum) {
-                    left = this.bigImgStyle.left
+                if (
+                    (imgWidth - window.innerWidth) / 2 < left * this.nowNum ||
+                    0 - (imgWidth - window.innerWidth) / 2 > left * this.nowNum
+                ) {
+                    left = this.bigImgStyle.left;
                 }
 
-
                 if (imgWidth <= window.innerWidth) {
-                    left = 0
+                    left = 0;
                 }
                 if (imgHeight <= window.innerHeight) {
-                    top = 0
+                    top = 0;
                 }
 
-
-
-
-                this.bigImgStyle.left = left
-                this.bigImgStyle.top = top
-                console.log(imgHeight, top)
+                this.bigImgStyle.left = left;
+                this.bigImgStyle.top = top;
+                console.log(imgHeight, top);
             }
         },
         drugEvent(e) {
             this.drag = {
                 X: e.offsetX,
                 Y: e.offsetY
-            }
-            console.log(e)
-            this.isDrug = true
+            };
+            console.log(e);
+            this.isDrug = true;
         },
         scrollEvent(e) {
-
             if (e.deltaY < 0) {
                 if (this.nowNum < 2) {
-                    this.nowNum = this.nowNum + 0.1
+                    this.nowNum = this.nowNum + 0.1;
                 }
-            }
-            else {
+            } else {
                 if (this.nowNum > 1) {
-                    this.nowNum = this.nowNum - 0.1
-                    var imgWidth = parseInt(document.getElementById('img' + this.label + this.img.id).offsetWidth * this.nowNum)
-                    var imgHeight = parseInt(document.getElementById('img' + this.label + this.img.id).offsetHeight * this.nowNum)
-
-                    if ((imgHeight - window.innerHeight) / 2 > this.bigImgStyle.top * this.nowNum || 0 - (imgHeight - window.innerHeight) / 2 < this.bigImgStyle.top * this.nowNum) {
+                    this.nowNum = this.nowNum - 0.1;
+                    var imgWidth = parseInt(
+                        document.getElementById(
+                            "img" + this.label + this.img.id
+                        ).offsetWidth * this.nowNum
+                    );
+                    var imgHeight = parseInt(
+                        document.getElementById(
+                            "img" + this.label + this.img.id
+                        ).offsetHeight * this.nowNum
+                    );
+
+                    if (
+                        (imgHeight - window.innerHeight) / 2 >
+                            this.bigImgStyle.top * this.nowNum ||
+                        0 - (imgHeight - window.innerHeight) / 2 <
+                            this.bigImgStyle.top * this.nowNum
+                    ) {
                         if (this.bigImgStyle.top > 0) {
-                            this.bigImgStyle.top = (imgHeight - window.innerHeight) / 2 / this.nowNum
-                        }
-                        else {
-                            this.bigImgStyle.top = 0 - (imgHeight - window.innerHeight) / 2 / this.nowNum
+                            this.bigImgStyle.top =
+                                (imgHeight - window.innerHeight) /
+                                2 /
+                                this.nowNum;
+                        } else {
+                            this.bigImgStyle.top =
+                                0 -
+                                (imgHeight - window.innerHeight) /
+                                    2 /
+                                    this.nowNum;
                         }
                     }
-                    if ((imgWidth - window.innerWidth) / 2 > this.bigImgStyle.left * this.nowNum || 0 - (imgWidth - window.innerWidth) / 2 < this.bigImgStyle.left * this.nowNum) {
+                    if (
+                        (imgWidth - window.innerWidth) / 2 >
+                            this.bigImgStyle.left * this.nowNum ||
+                        0 - (imgWidth - window.innerWidth) / 2 <
+                            this.bigImgStyle.left * this.nowNum
+                    ) {
                         if (this.bigImgStyle.left > 0) {
-                            this.bigImgStyle.left = (imgWidth - window.innerWidth) / 2 / this.nowNum
-                        }
-                        else {
-                            this.bigImgStyle.left = 0 - (imgWidth - window.innerWidth) / 2 / this.nowNum
+                            this.bigImgStyle.left =
+                                (imgWidth - window.innerWidth) /
+                                2 /
+                                this.nowNum;
+                        } else {
+                            this.bigImgStyle.left =
+                                0 -
+                                (imgWidth - window.innerWidth) /
+                                    2 /
+                                    this.nowNum;
                         }
                     }
                 }
             }
-
         },
         choose() {
             // if (this.imgStyle == 'upload') {
             //     this.dialogFormVisible = true
             // }
             // if (this.imgStyle == 'preView' || (this.imgStyle == 'examine' && this.label == 'finishedImage')) {
-            this.preView = true
-            this.nowNum = 1
-            this.bigImgStyle.left = 0
-            this.bigImgStyle.top = 0
+            this.preView = true;
+            this.nowNum = 1;
+            this.bigImgStyle.left = 0;
+            this.bigImgStyle.top = 0;
             // }
         },
         getImg() {
             if (this.img[this.label]) {
-                var img = new Image()
+                var img = new Image();
                 img.onload = () => {
-                    var key = img.width / img.height
-                    var width = 500
-                    var height = 500
-                    var width1 = window.innerWidth
-                    var height1 = window.innerHeight
+                    var key = img.width / img.height;
+                    var width = 500;
+                    var height = 500;
+                    var width1 = window.innerWidth;
+                    var height1 = window.innerHeight;
 
                     this.imgInfo = {
                         width: img.width / 2,
                         height: img.height / 2
-                    }
+                    };
                     if (key > 1) {
-                        height = img.height / img.width * width
-                    }
-                    else {
-                        width = img.width / img.height * height
+                        height = (img.height / img.width) * width;
+                    } else {
+                        width = (img.width / img.height) * height;
                         // width1 = img.width / img.height * height1
                     }
-                    console.log(width)
+                    console.log(width);
                     this.imageStyle = {
                         backgroundImage: `url(${this.img[this.label]})`,
                         width: width,
-                        height: height + 'px'
-                    }
-                    this.configs.imgWithd = width
-                    this.configs.imgHeight = height
+                        height: height + "px"
+                    };
+                    this.configs.imgWithd = width;
+                    this.configs.imgHeight = height;
 
                     this.bigImgStyle = {
                         width: width1,
                         height: height1,
                         top: 0,
-                        left: 0,
-                    }
-                }
-                img.src = this.img[this.label]
+                        left: 0
+                    };
+                };
+                img.src = this.img[this.label];
 
-                var img2 = new Image()
+                var img2 = new Image();
                 img2.onload = () => {
                     this.realImg = {
                         width: img2.width,
                         height: img2.height
-                    }
-
-                }
-
-                img2.src = this.img[this.label] + '?x-oss-process=image/resize,m_lfit,h_' + window.innerHeight + ',w_' + window.innerWidth
+                    };
+                };
+
+                img2.src =
+                    this.img[this.label] +
+                    "?x-oss-process=image/resize,m_lfit,h_" +
+                    window.innerHeight +
+                    ",w_" +
+                    window.innerWidth;
             }
         },
         delImg() {
             if (this.img.id) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
-                        url: '/orderImage/del',
-                        data: { id: this.img.id }
-                    })
-                }).then(() => {
-                    console.log('chencgg ')
-                    this.dialogFormVisible = false
-                    this.$message.success('删除成功');
-                    this.$emit('delImg', this.img.id)
+                this.$alert("删除将无法恢复,确认要删除么?", "警告", {
+                    type: "error"
                 })
+                    .then(() => {
+                        return this.$http.post({
+                            url: "/orderImage/del",
+                            data: { id: this.img.id }
+                        });
+                    })
+                    .then(() => {
+                        console.log("chencgg ");
+                        this.dialogFormVisible = false;
+                        this.$message.success("删除成功");
+                        this.$emit("delImg", this.img.id);
+                    });
             }
         },
         saveRemark() {
-            if (this.img.id && this.imgStyle == 'upload') {
+            if (this.img.id && this.imgStyle == "upload") {
                 if (!this.remark) {
-                    this.$message.success('成功');
-                    this.dialogFormVisible = false
-                    return
+                    this.$message.success("成功");
+                    this.dialogFormVisible = false;
+                    return;
                 }
                 var data = {
                     remark: this.remark,
                     id: this.img.id
-                }
+                };
 
                 if (!data.remark) {
-                    data.remark = ''
+                    data.remark = "";
                 }
 
-                this.$http.post({
-                    url: '/orderImage/update',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.dialogFormVisible = false
-                        this.$message.success('成功');
-                        this.$emit('changeRemark', { remark: this.remark, id: this.img.id })
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            }
-            else {
+                this.$http
+                    .post({
+                        url: "/orderImage/update",
+                        data: data
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            this.dialogFormVisible = false;
+                            this.$message.success("成功");
+                            this.$emit("changeRemark", {
+                                remark: this.remark,
+                                id: this.img.id
+                            });
+                        } else {
+                            this.$message.warning("失败");
+                        }
+                    });
+            } else {
                 var data = {
                     id: this.img.id,
                     orderId: this.img.orderId,
                     storeId: this.img.storeId,
                     userId: this.img.userId,
-                    statusFlag: 2,
+                    statusFlag: 2
                     // detailRemark: this.remark
-                }
+                };
                 if (this.remark) {
-                    data.detailRemark = this.remark
+                    data.detailRemark = this.remark;
                 }
                 if (this.detailRemarkFlag) {
-                    data.detailRemarkFlag = this.detailRemarkFlag
+                    data.detailRemarkFlag = this.detailRemarkFlag;
                 }
-                this.$http.post({
-                    url: '/orderImage/repair',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.dialogFormVisible = false
-                        this.$message.success('成功');
-                        this.$emit('changeRemark')
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
+                this.$http
+                    .post({
+                        url: "/orderImage/repair",
+                        data: data
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            this.dialogFormVisible = false;
+                            this.$message.success("成功");
+                            this.$emit("changeRemark");
+                        } else {
+                            this.$message.warning("失败");
+                        }
+                    });
             }
         },
         changeStatus(index) {
             var data = {
                 statusFlag: index,
                 id: this.img.id
-            }
-            this.$http.post({
-                url: '/orderImage/update',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.$message.success('成功');
-                    this.$emit('changeRemark')
-                } else {
-                    this.$message.warning('失败')
-                }
-            });
+            };
+            this.$http
+                .post({
+                    url: "/orderImage/update",
+                    data: data
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success("成功");
+                        this.$emit("changeRemark");
+                    } else {
+                        this.$message.warning("失败");
+                    }
+                });
         },
         delFinishImg() {
             var data = {
                 id: this.img.id,
-                finishedImage: 'null',
+                finishedImage: "null",
                 finishedSize: 0
-            }
-            this.$http.post({
-                url: '/orderImage/update',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.$message.success('成功');
-                    this.$emit('changeRemark')
-                } else {
-                    this.$message.warning('失败')
-                }
-            });
+            };
+            this.$http
+                .post({
+                    url: "/orderImage/update",
+                    data: data
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success("成功");
+                        this.$emit("changeRemark");
+                    } else {
+                        this.$message.warning("失败");
+                    }
+                });
         }
-
     },
     components: {
         imgZoom
     }
-}
+};
 </script>
 
 <style lang="less" scoped>

+ 154 - 280
src/main/vue/src/components/ImgItemOrder.vue

@@ -1,13 +1,11 @@
 <template>
     <div class="imgContent">
         <template v-if="img[label]">
-            <div class="img" v-if="!(imgStyle=='storeUpload'&&img.statusFlag==2)">
+            <div class="img"
+                v-if="!(imgStyle=='storeUpload'&&img.statusFlag==2)">
                 <!-- <div class="image" v-if="img" @click="choose" :style="imageStyle" ref="img"></div> -->
-                <img
-                    :src="img[label]+'?x-oss-process=image/resize,m_lfit,h_120,w_120'"
-                    @click="choose"
-                    alt
-                />
+                <img :src="img[label]+'?x-oss-process=image/resize,m_lfit,h_120,w_120'"
+                    @click="choose" alt />
             </div>
             <!-- <div class="remark" v-if="imgStyle=='storeUpload'">
                 {{img.imageName}}
@@ -19,220 +17,109 @@
                 <span v-if="label=='originalImage'">{{img.remark}}</span>
                 <span v-if="label=='finishedImage'">{{img.detailRemark}}</span>
             </div>
-            <div v-if="imgStyle=='examine'&&label=='finishedImage'" class="check">
+            <div v-if="imgStyle=='examine'&&label=='finishedImage'"
+                class="check">
                 <template v-if="!isChange">
-                    <el-button
-                        v-if="img.statusFlag==1"
-                        icon="el-icon-check"
-                        type="success"
-                        circle
-                        size="mini"
-                    ></el-button>
-                    <el-button
-                        @click="changeStatus(1)"
-                        v-else
-                        icon="el-icon-check"
-                        type="success"
-                        circle
-                        plain
-                        size="mini"
-                    ></el-button>
-                    <el-button
-                        v-if="img.statusFlag==2"
-                        type="danger"
-                        icon="el-icon-close"
-                        circle
-                        size="mini"
-                    ></el-button>
+                    <el-button v-if="img.statusFlag==1" icon="el-icon-check"
+                        type="success" circle size="mini"></el-button>
+                    <el-button @click="changeStatus(1)" v-else
+                        icon="el-icon-check" type="success" circle plain
+                        size="mini"></el-button>
+                    <el-button v-if="img.statusFlag==2" type="danger"
+                        icon="el-icon-close" circle size="mini"></el-button>
                     <el-button
                         @click="dialogFormVisible=true,detailRemarkFlag=''"
-                        v-else
-                        type="danger"
-                        icon="el-icon-close"
-                        circle
-                        plain
-                        size="mini"
-                    ></el-button>
+                        v-else type="danger" icon="el-icon-close" circle plain
+                        size="mini"></el-button>
                 </template>
 
-                <el-button
-                    v-if="!(repairID&&img.statusFlag!=2)"
+                <el-button v-if="!(repairID&&img.statusFlag!=2)"
                     @click="dialogFormVisible=true,detailRemarkFlag='1'"
-                    icon="el-icon-edit"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                    icon="el-icon-edit" circle plain size="mini"></el-button>
             </div>
             <div class="check" v-if="imgStyle=='upload'">
-                <el-button
-                    v-if="canCancel"
-                    @click="delImg"
-                    type="danger"
-                    icon="el-icon-delete"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button v-if="canCancel" @click="delImg" type="danger"
+                    icon="el-icon-delete" circle plain size="mini"></el-button>
                 <!-- <el-button v-if="!storeType" @click="dialogFormVisible=true" icon="el-icon-edit" circle plain size="mini"></el-button> -->
-                <el-button
-                    v-else
-                    @click="dialogFormVisible=true"
-                    icon="el-icon-info"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button v-else @click="dialogFormVisible=true"
+                    icon="el-icon-info" circle plain size="mini"></el-button>
             </div>
             <div class="check" v-if="imgStyle=='choosePhoto'">
                 <el-popover placement="bottom" width="220" trigger="hover">
-                    <el-button
-                        type="primary"
-                        size="mini"
-                        v-if="img.fangda=='Y'"
-                        @click="changeImg('fangda','N')"
-                    >放大</el-button>
-                    <el-button
-                        type="primary"
-                        size="mini"
-                        plain
-                        v-else
-                        @click="changeImg('fangda','Y')"
-                    >放大</el-button>
-                    <el-button
-                        type="warning"
-                        size="mini"
-                        v-if="img.album=='Y'"
-                        @click="changeImg('album','N')"
-                    >相册</el-button>
-                    <el-button
-                        type="warning"
-                        size="mini"
-                        plain
-                        v-else
-                        @click="changeImg('album','Y')"
-                    >相册</el-button>
-                    <el-button
-                        size="mini"
-                        v-if="img.selectFlag=='Y'"
-                        @click="changeImg('selectFlag','N')"
-                    >取消选择</el-button>
-                    <el-button size="mini" v-else @click="changeImg('selectFlag','Y')">选择照片</el-button>
+                    <el-button type="primary" size="mini" v-if="img.fangda=='Y'"
+                        @click="changeImg('fangda','N')">放大</el-button>
+                    <el-button type="primary" size="mini" plain v-else
+                        @click="changeImg('fangda','Y')">放大</el-button>
+                    <el-button type="warning" size="mini" v-if="img.album=='Y'"
+                        @click="changeImg('album','N')">相册</el-button>
+                    <el-button type="warning" size="mini" plain v-else
+                        @click="changeImg('album','Y')">相册</el-button>
+                    <el-button size="mini" v-if="img.selectFlag=='Y'"
+                        @click="changeImg('selectFlag','N')">取消选择</el-button>
+                    <el-button size="mini" v-else
+                        @click="changeImg('selectFlag','Y')">选择照片</el-button>
 
-                    <el-button
-                        icon="el-icon-check"
-                        type="success"
-                        circle
-                        size="mini"
-                        slot="reference"
-                        v-if="img.selectFlag=='Y'"
-                    ></el-button>
-                    <el-button
-                        icon="el-icon-check"
-                        slot="reference"
-                        type="success"
-                        circle
-                        size="mini"
-                        plain
-                        v-else
-                    ></el-button>
+                    <el-button icon="el-icon-check" type="success" circle
+                        size="mini" slot="reference" v-if="img.selectFlag=='Y'">
+                    </el-button>
+                    <el-button icon="el-icon-check" slot="reference"
+                        type="success" circle size="mini" plain v-else>
+                    </el-button>
                 </el-popover>
 
-                <el-button
-                    v-if="!storeType"
-                    @click="dialogFormVisible=true"
-                    icon="el-icon-edit"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button v-if="!storeType" @click="dialogFormVisible=true"
+                    icon="el-icon-edit" circle plain size="mini"></el-button>
             </div>
 
             <div class="check" v-if="imgStyle=='storeUpload'">
-                <el-button
-                    v-if="img.statusFlag!=2"
-                    @click="delFinishImg"
-                    type="danger"
-                    icon="el-icon-delete"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
-                <el-button
-                    v-if="img.detailRemark"
-                    @click="dialogFormVisible=true"
-                    icon="el-icon-info"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button v-if="img.statusFlag!=2" @click="delFinishImg"
+                    type="danger" icon="el-icon-delete" circle plain
+                    size="mini"></el-button>
+                <el-button v-if="img.detailRemark"
+                    @click="dialogFormVisible=true" icon="el-icon-info" circle
+                    plain size="mini"></el-button>
             </div>
 
             <div class="check" v-if="imgStyle=='showInfo'">
-                <el-button
-                    @click="dialogFormVisible=true"
-                    icon="el-icon-info"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button @click="dialogFormVisible=true" icon="el-icon-info"
+                    circle plain size="mini"></el-button>
             </div>
 
             <div class="check" v-if="imgStyle=='uploadAlbum'">
-                <el-button
-                    @click="delFinishImg"
-                    type="danger"
-                    icon="el-icon-delete"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
-                <el-button
-                    @click="dialogFormVisible=true"
-                    icon="el-icon-info"
-                    circle
-                    plain
-                    size="mini"
-                ></el-button>
+                <el-button @click="delFinishImg" type="danger"
+                    icon="el-icon-delete" circle plain size="mini"></el-button>
+                <el-button @click="dialogFormVisible=true" icon="el-icon-info"
+                    circle plain size="mini"></el-button>
             </div>
 
-            <el-dialog
-                :title="(storeType?'查看':'添加/修改')+'备注'"
-                :visible.sync="dialogFormVisible"
-                width="30%"
-            >
+            <el-dialog :title="(storeType?'查看':'添加/修改')+'备注'"
+                :visible.sync="dialogFormVisible" width="30%">
                 <el-form label-width="80px">
                     <el-form-item :label="imgStyle=='examine'?'返修备注':'图片备注'">
-                        <el-input
-                            :disabled="storeType"
-                            type="textarea"
-                            v-model="remark"
-                            auto-complete="off"
-                        ></el-input>
+                        <el-input :disabled="storeType" type="textarea"
+                            v-model="remark" auto-complete="off"></el-input>
                     </el-form-item>
                 </el-form>
                 <div slot="footer" class="dialog-footer" v-if="!storeType">
-                    <el-button @click="dialogFormVisible = false">取 消</el-button>
-                    <el-button type="primary" @click="saveRemark">添 加</el-button>
+                    <el-button @click="dialogFormVisible = false">取 消
+                    </el-button>
+                    <el-button type="primary" @click="saveRemark">添 加
+                    </el-button>
                 </div>
             </el-dialog>
 
-            <el-dialog
-                v-if="label=='originalImage'||imgStyle != 'examine'"
+            <el-dialog v-if="label=='originalImage'||imgStyle != 'examine'"
                 :title="img.imageName+' '+imgStyleStr+'预览'"
-                :visible.sync="preView"
-                :width="imageStyle.width+40+'px'"
-            >
+                :visible.sync="preView" :width="imageStyle.width+40+'px'">
                 <!-- <img-zoom v-if="label=='finishedImage'" :src="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)" :bigsrc="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)*2" :configs="configs"></img-zoom> -->
                 <!-- <img v-if="label=='finishedImage'" :src="img[label]+'?x-oss-process=image/resize,l_'+(allHeight-200)" alt=""> -->
-                <img :src="img[label]+'?x-oss-process=image/resize,l_500'" alt />
+                <img :src="img[label]+'?x-oss-process=image/resize,l_500'"
+                    alt />
             </el-dialog>
 
-            <div
-                class="box"
+            <div class="box"
                 v-if="preView&&label=='finishedImage'&&imgStyle == 'examine'"
-                @click="preView=false"
-            >
+                @click="preView=false">
                 <!-- <div draggable='false' :style="{transform:'scale('+nowNum+')'}" class="img-content" @click.stop="" @dragenter='dragStop' @dragover='dragStop' @mousewheel='scrollEvent' @mousedown="drugEvent" @mousemove="drugmoveEvent" @mouseup="isDrug=false">
                     <img draggable="false" :id='"img"+label+img.id' :style="{transform:'translate('+bigImgStyle.left+'px,'+bigImgStyle.top+'px)',height:realImg.height+'px',width:realImg.width+'px'}" :src="img[label]+'?x-oss-process=image/resize,m_lfit,h_'+bigImgStyle.height*2+',w_'+bigImgStyle.width*2" alt="">
                 </div>
@@ -250,26 +137,16 @@
 
                 </div>-->
 
-                <div
-                    v-loading="loading"
-                    draggable="false"
-                    :style="{transform:'scale('+nowNum+')'}"
-                    @click.stop
-                    class="img-content"
-                    @dragenter="dragStop"
-                    @dragover="dragStop"
-                    @mousewheel="scrollEvent"
-                    @mousedown="drugEvent"
-                    @mousemove="drugmoveEvent"
-                    @mouseup="isDrug=false"
-                >
-                    <img
-                        draggable="false"
-                        :id="'img'+label+nowShowInfo.id"
+                <div v-loading="loading" draggable="false"
+                    :style="{transform:'scale('+nowNum+')'}" @click.stop
+                    class="img-content" @dragenter="dragStop"
+                    @dragover="dragStop" @mousewheel="scrollEvent"
+                    @mousedown="drugEvent" @mousemove="drugmoveEvent"
+                    @mouseup="isDrug=false">
+                    <img draggable="false" :id="'img'+label+nowShowInfo.id"
                         :style="{transform:'translate('+bigImgStyle.left+'px,'+bigImgStyle.top+'px)',height:nowShowInfo.realHeight+'px',width:nowShowInfo.realWidth+'px'}"
                         :src="nowShowInfo[nowChooseLable]+'?x-oss-process=image/resize,m_lfit,h_'+bigImgHeight*2+',w_'+bigImgWidth*2"
-                        alt
-                    />
+                        alt />
                 </div>
 
                 <div class="left" @click.stop="goPre">
@@ -281,14 +158,15 @@
                 </div>
 
                 <div class="editButtons" @click.stop>
-                    <el-button
-                        v-if="!isAlbum"
-                        round
+                    <el-button v-if="!isAlbum" round
                         @click="nowChooseLable=(nowChooseLable=='originalImage'?'finishedImage':'originalImage')"
-                        style="margin-right:30px;"
-                    >切换{{nowChooseLable=='originalImage'?'成片':'原片'}}</el-button>
-                    <img :src="buttonImg.fail[isFail?1:0]" alt @click="failImage" />
-                    <img :src="buttonImg.pass[isPass?1:0]" @click="passImage" alt />
+                        style="margin-right:30px;">
+                        切换{{nowChooseLable=='originalImage'?'成片':'原片'}}
+                    </el-button>
+                    <img :src="buttonImg.fail[isFail?1:0]" alt
+                        @click="failImage" />
+                    <img :src="buttonImg.pass[isPass?1:0]" @click="passImage"
+                        alt />
                 </div>
             </div>
         </template>
@@ -865,29 +743,27 @@ export default {
             }
         },
         changeStatus(index) {
-            this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
-                data => {
-                    var data = {
-                        id: this.img.id,
-                        orderId: this.img.orderId
-                    };
-                    this.$http
-                        .post({
-                            url: this.isAlbum
-                                ? "/orderAlbum/pass"
-                                : "/orderImage/pass",
-                            data: data
-                        })
-                        .then(res => {
-                            if (res.success) {
-                                this.$message.success("成功");
-                                this.$emit("changeRemark");
-                            } else {
-                                this.$message.warning("失败");
-                            }
-                        });
-                }
-            );
+            // this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
+            // data => {
+            var data = {
+                id: this.img.id,
+                orderId: this.img.orderId
+            };
+            this.$http
+                .post({
+                    url: this.isAlbum ? "/orderAlbum/pass" : "/orderImage/pass",
+                    data: data
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success("成功");
+                        this.$emit("changeRemark");
+                    } else {
+                        this.$message.warning("失败");
+                    }
+                });
+            // }
+            // );
         },
         delFinishImg() {
             if (this.imgStyle == "uploadAlbum") {
@@ -1041,70 +917,68 @@ export default {
             this.allImageList = list;
         },
         failImage() {
-            this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
-                data => {
-                    if (this.isFail) {
-                        return;
-                    }
-                    this.$prompt("请输入返修原因", "提示", {
-                        confirmButtonText: "不通过",
-                        cancelButtonText: "取消"
-                    })
-                        .then(({ value }) => {
-                            var data = {
-                                id: this.nowShowInfo.id,
-                                orderId: this.nowShowInfo.orderId,
-                                storeId: this.nowShowInfo.storeId,
-                                userId: this.nowShowInfo.userId,
-                                statusFlag: 2
-                                // detailRemarkFlag: ''
-                            };
-                            if (value) {
-                                data.detailRemark = value;
-                            }
-                            this.$http
-                                .post({
-                                    url: this.isAlbum
-                                        ? "/orderAlbum/repair"
-                                        : "/orderImage/repair",
-                                    data: data
-                                })
-                                .then(res => {
-                                    if (res.success) {
-                                        this.getOrderInfo(2);
-                                    } else {
-                                    }
-                                });
-                        })
-                        .catch(() => {});
-                }
-            );
-        },
-        passImage() {
-            this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
-                data => {
-                    if (this.isPass) {
-                        return;
-                    }
+            // this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
+            // data => {
+            if (this.isFail) {
+                return;
+            }
+            this.$prompt("请输入返修原因", "提示", {
+                confirmButtonText: "不通过",
+                cancelButtonText: "取消"
+            })
+                .then(({ value }) => {
                     var data = {
-                        id: this.img.id,
-                        orderId: this.img.orderId
+                        id: this.nowShowInfo.id,
+                        orderId: this.nowShowInfo.orderId,
+                        storeId: this.nowShowInfo.storeId,
+                        userId: this.nowShowInfo.userId,
+                        statusFlag: 2
+                        // detailRemarkFlag: ''
                     };
+                    if (value) {
+                        data.detailRemark = value;
+                    }
                     this.$http
                         .post({
                             url: this.isAlbum
-                                ? "/orderAlbum/pass"
-                                : "/orderImage/pass",
+                                ? "/orderAlbum/repair"
+                                : "/orderImage/repair",
                             data: data
                         })
                         .then(res => {
                             if (res.success) {
-                                this.getOrderInfo(1);
+                                this.getOrderInfo(2);
                             } else {
                             }
                         });
-                }
-            );
+                })
+                .catch(() => {});
+            // }
+            // );
+        },
+        passImage() {
+            // this.checkStatus(this.nowShowInfo.orderId, this.repairID).then(
+            // data => {
+            if (this.isPass) {
+                return;
+            }
+            var data = {
+                id: this.img.id,
+                orderId: this.img.orderId
+            };
+            this.$http
+                .post({
+                    url: this.isAlbum ? "/orderAlbum/pass" : "/orderImage/pass",
+                    data: data
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.getOrderInfo(1);
+                    } else {
+                    }
+                });
+            // }
+            // );
         }
     },
     components: {

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

@@ -134,7 +134,7 @@
             <span style="margin-left:20px;">{{info.remark}}</span>
         </div>
 
-        <div class="repairItem" v-for="(item,index) in info.orderRepairList" v-if="item.statusFlag>0" >
+        <div class="repairItem" v-for="(item,index) in info.orderRepairList" v-if="item.statusFlag>0" :key="index">
             <div class="box">
                 {{index+1}}
             </div>

+ 1 - 32
src/main/vue/src/pages/OrderExamineAlbum.vue

@@ -146,7 +146,7 @@
 </template>
 <script>
 import { mapState } from 'vuex';
-import imgItem from '../components/ImgItem';
+import imgItem from '../components/ImgItemOrder';
 import formValidator from '../formValidator';
 const baseUrl =
     process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
@@ -550,37 +550,6 @@ export default {
                     })
                     .then(res2 => {
                         if (res2.success) {
-                            this.$http.post({
-                                url: '/userOrder/msg',
-                                data: {
-                                    orderId: this.orderInfo.id,
-                                    typeFlag: 1,
-                                    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.get({
-                                url: '/orderImage/createZip',
-                                data: {
-                                    orderId: this.orderInfo.id,
-                                    typeFlag: 'finished',
-                                },
-                            });
-                            this.$message.success('提交成功');
                             loading.close();
                             history.back();
                         }

+ 86 - 173
src/main/vue/src/pages/OrderUploadChange.vue

@@ -1,13 +1,9 @@
 <template>
-    <div class="container" v-loading="loading" element-loading-text="上传图片中,时间或许会很久,请耐心等待哦!">
+    <div class="container" v-loading="loading"
+        element-loading-text="上传图片中,时间或许会很久,请耐心等待哦!">
         <div class="top">
-            <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>
@@ -15,45 +11,30 @@
             <span>订单号:{{orderInfo.orderCode}}</span>
             <span style="margin-left:20px;">{{orderInfo.productName}}</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-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"
+            <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>
+                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"
+            <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>
+                :style="{color:albumIsFull?'#666':'rgb(251, 110, 8)'}">
+                {{albumTip}}</div>
         </div>
 
         <div class="content" style="padding:0 0 20px;">
@@ -63,17 +44,12 @@
                         <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;">
@@ -81,34 +57,21 @@
                         <br />片
                     </div>
-                    <div
-                        style="display:inline-block;vertical-align: middle"
+                    <div style="display:inline-block;vertical-align: middle"
                         v-for="(item,index) in orderImage"
-                        :key="'finishedImage'+index"
-                    >
+                        :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"
+                            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>
+                            :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>
             </template>
@@ -118,32 +81,16 @@
             </div>
         </div>
 
-        <el-pagination
-            style="padding:30px 0;"
-            v-if="totalNumber>7"
-            background
-            :page-size="7"
-            @current-change="currentPageChange"
-            :current-page="currentPage"
-            layout="total, prev, pager, next"
-            :total="totalNumber"
-        ></el-pagination>
-
-        <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>
+        <el-pagination style="padding:30px 0;" v-if="totalNumber>7" background
+            :page-size="7" @current-change="currentPageChange"
+            :current-page="currentPage" layout="total, prev, pager, next"
+            :total="totalNumber"></el-pagination>
+
+        <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>
         </el-dialog>
 
         <!-- <el-dialog title="上传图片" class="uploadDialog" :visible.sync="dialogVisible" width="80%" top="50px" :close-on-click-modal='false'>
@@ -188,13 +135,9 @@ export default {
             .then(res => {
                 if (res.success) {
                     this.orderInfo = res.data;
-                    // if (this.$route.query.repairId) {
-                    //     this.repairId = this.$route.query.repairId;
-                    // } else {
-                    //     if (this.orderInfo.orderRepairList.length > 0) {
-                    //         this.repairId = this.orderInfo.orderRepairList[0].id;
-                    //     }
-                    // }
+                    if (this.$route.query.repairId) {
+                        this.repairId = this.$route.query.repairId;
+                    }
                     this.getImage();
                 }
             });
@@ -524,18 +467,18 @@ export default {
                                 ",至少需要上传" +
                                 this.orderInfo.fandaAmount +
                                 "张";
-                                console.log(  res2.data.albumQuantity +
+                            console.log(
+                                res2.data.albumQuantity +
                                     this.orderInfo.fandaAmount -
-                                    res2.data.needAlbum )
+                                    res2.data.needAlbum
+                            );
                             if (
-                              res2.data.albumQuantity -
-                                    res2.data.needAlbum>=
-                                 this.orderInfo.fandaAmount
+                                res2.data.albumQuantity - res2.data.needAlbum >=
+                                this.orderInfo.fandaAmount
                             ) {
                                 res2.data.needAlbum = 0;
-                            }
-                            else{
-                                  res2.data.needAlbum = 1;
+                            } else {
+                                res2.data.needAlbum = 1;
                             }
                         } else {
                             this.albumTip =
@@ -706,48 +649,24 @@ export default {
                         })
                         .then(res => {
                             if (res.success) {
-                                this.$http.post({
-                                    url: "/userOrderDetail/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",
+                                        url: "/userOrderDetail/update",
                                         data: {
                                             id: this.orderInfo.id,
-                                            acceptType: "image_album"
+                                            statusFlag:OrderStatus.CHECKOVER,
+                                            albumStatus:
+                                                OrderAlbumStatus.FINISH
                                         }
                                     })
-                                    .then(res3 => {
-                                        if (res3.success) {
-                                            this.$http.get({
-                                                url: "/orderImage/createZip",
-                                                data: {
-                                                    orderId: this.orderInfo.id,
-                                                    typeFlag: "finished"
-                                                }
-                                            });
-                                            this.$message.success("提交成功");
+                                    .then(res => {
+                                        if (res.success) {
+                                            this.$message.success(
+                                                "上传图片成功"
+                                            );
                                             history.back();
+                                        } else {
+                                            this.$message.warning(res.error);
                                         }
                                     });
                             }
@@ -763,36 +682,30 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: "/userOrder/updateImageAndAlbumRepair",
+                            url: "/userOrderDetail/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: "返修上传"
-                                    }
-                                });
-                                if (this.orderInfo.clientOrderId) {
-                                    this.$http.post({
-                                        url: "/clientNotice/save",
+                                this.$http
+                                    .post({
+                                        url: "/userOrderDetail/update",
                                         data: {
-                                            clientOrderId: this.orderInfo
-                                                .clientOrderId,
-                                            orderId: this.orderInfo.id,
-                                            userId: this.orderInfo.userId,
-                                            productId: this.orderInfo.productId,
-                                            storeId: this.orderInfo.storeId,
-                                            typeFlag: 2,
-                                            remark: "返修上传"
+                                            id: this.orderInfo.id,
+                                            albumStatus:
+                                                OrderAlbumStatus.REWORKACCEPT
+                                        }
+                                    })
+                                    .then(res => {
+                                        if (res.success) {
+                                            this.$message.success(
+                                                "上传图片成功"
+                                            );
+                                            history.back();
+                                        } else {
+                                            this.$message.warning(res.error);
                                         }
                                     });
-                                }
-                                history.back();
                             }
                         });
                 }

+ 162 - 169
src/main/vue/src/pages/OrderUploadChangeAlbum.vue

@@ -1,27 +1,42 @@
 <template>
-    <div class="container" v-loading='loading' element-loading-text="上传图片中,时间或许会很久,请耐心等待哦!">
+    <div class="container" v-loading='loading'
+        element-loading-text="上传图片中,时间或许会很久,请耐心等待哦!">
         <div class="top">
-            <el-radio-group v-model="radio1" style="margin-right:10px;" size="mini" @change="changePage" v-if="hasXiutu">
+            <el-radio-group v-model="radio1" style="margin-right:10px;"
+                size="mini" @change="changePage" v-if="hasXiutu">
                 <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.productName}}</span>
-            <el-button style="float:right;margin:15px 10px 0 20px;width:100px" v-if="!needAblum&&xiutuIsFull" 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-button style="float:right;margin:15px 10px 0 20px;width:100px"
+                v-if="!needAblum&&xiutuIsFull" 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>
         </div>
 
         <div style="backgroundColor:#f2f4f5;padding:10px 30px">
-            <div style="color:#666;font-size:14px" :style="{color:needAblum==0?'#666':'rgb(251, 110, 8)'}">
-                <span>放大:已上传/总张数:{{allNum-needAblum}} / {{allNum}},还需要上传{{needAblum}}张</span>
+            <div style="color:#666;font-size:14px"
+                :style="{color:needAblum==0?'#666':'rgb(251, 110, 8)'}">
+                <span>放大:已上传/总张数:{{allNum-needAblum}} /
+                    {{allNum}},还需要上传{{needAblum}}张</span>
             </div>
-            <div v-if="hasXiutu" style="color:#666;font-size:14px;margin-top:10px" :style="{color:xiutuIsFull?'#666':'rgb(251, 110, 8)'}">{{xiutuTip}}</div>
+            <div v-if="hasXiutu"
+                style="color:#666;font-size:14px;margin-top:10px"
+                :style="{color:xiutuIsFull?'#666':'rgb(251, 110, 8)'}">
+                {{xiutuTip}}</div>
 
         </div>
 
@@ -30,10 +45,21 @@
             <template v-if="orderImage.length>0">
                 <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='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='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' isAlbum @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'
+                            isAlbum @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>
@@ -45,7 +71,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">
@@ -56,12 +84,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'>
@@ -85,29 +113,25 @@
     </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: "/userOrderDetail/getOne",
                 data: {
-                    id: this.$route.query.orderId,
-                },
+                    id: this.$route.query.orderId
+                }
             })
             .then(res => {
                 if (res.success) {
                     this.orderInfo = res.data;
                     if (this.$route.query.repairId) {
                         this.repairId = this.$route.query.repairId;
-                    } else {
-                        if (this.orderInfo.orderAlbumRepairList.length > 0) {
-                            this.repairId = this.orderInfo.orderAlbumRepairList[0].id;
-                        }
                     }
                     this.getImage();
                 }
@@ -115,28 +139,28 @@ export default {
 
         this.$http
             .get({
-                url: '/orderAlbum/allImageName',
+                url: "/orderAlbum/allImageName",
                 data: {
                     orderId: this.$route.query.orderId,
-                    baseRepairId: this.$route.query.repairId || '',
-                },
+                    baseRepairId: this.$route.query.repairId || ""
+                }
             })
             .then(res => {
                 this.needNameList = res.data;
             });
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(["userInfo"]),
         url() {
             return (
                 baseUrl +
-                '/orderAlbum/uploadFileForOrder?storeId=' +
+                "/orderAlbum/uploadFileForOrder?storeId=" +
                 this.orderInfo.storeId +
-                '&orderId=' +
+                "&orderId=" +
                 this.orderInfo.id +
-                '&userId=' +
+                "&userId=" +
                 this.userInfo.id +
-                '&typeFlag=album_repair'
+                "&typeFlag=album_repair"
             );
         },
         repairNum() {
@@ -166,7 +190,7 @@ export default {
         },
         hasXiutu() {
             var result = false;
-            if (this.orderInfo) {
+            if (this.orderInfo.orderAlbumRepairList) {
                 var list1 = [...this.orderInfo.orderAlbumRepairList];
                 list1 = list1.filter(item => {
                     return item.statusFlag != 0;
@@ -184,12 +208,12 @@ export default {
         },
         uploadTipInfo() {
             return (
-                '只能上传RGB图片类型的jpg/png文件,已上传/总张数:' +
+                "只能上传RGB图片类型的jpg/png文件,已上传/总张数:" +
                 (this.allNum - this.needAblum) +
-                '/' +
+                "/" +
                 this.allNum
             );
-        },
+        }
     },
     data() {
         return {
@@ -204,7 +228,7 @@ export default {
             isFail: false,
             repairId: 0,
             isChange: false,
-            unFinished: '',
+            unFinished: "",
             upLoadImg: [],
             // notUp: 0,
             // allNumber: 0,
@@ -212,12 +236,12 @@ export default {
             isLoading: false,
             loading: false,
             successNum: 0,
-            radio1: '放大',
-            xiutuTip: '',
+            radio1: "放大",
+            xiutuTip: "",
             xiutuIsFull: false,
             needAblum: 0,
             allNum: 0,
-            needNameList: [],
+            needNameList: []
         };
     },
     methods: {
@@ -227,37 +251,37 @@ export default {
         },
         changePage() {
             this.$router.replace(
-                '/orderUploadChange?orderId=' +
+                "/orderUploadChange?orderId=" +
                     this.$route.query.orderId +
-                    '&repairId=' +
-                    (this.$route.query.imageRepairId || '') +
-                    '&AlbumRepairId=' +
-                    (this.repairId || ''),
+                    "&repairId=" +
+                    (this.$route.query.imageRepairId || "") +
+                    "&AlbumRepairId=" +
+                    (this.repairId || "")
             );
         },
         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);
 
             if (!this.repairId) {
@@ -266,11 +290,11 @@ export default {
                 return new Promise((resolve, reject) => {
                     this.$http
                         .get({
-                            url: '/orderAlbum/getOne',
+                            url: "/orderAlbum/getOne",
                             data: {
                                 orderId: this.$route.query.orderId,
-                                imageName: fileName,
-                            },
+                                imageName: fileName
+                            }
                         })
                         .then(res => {
                             if (res.data) {
@@ -283,8 +307,8 @@ export default {
                             } else {
                                 this.$message({
                                     message:
-                                        fileName + '图片不在任务中,不能上传',
-                                    type: 'warning',
+                                        fileName + "图片不在任务中,不能上传",
+                                    type: "warning"
                                 });
                                 reject();
                             }
@@ -296,10 +320,10 @@ export default {
             if (!this.repairId) {
                 this.$http
                     .get({
-                        url: '/userOrder/getOne',
+                        url: "/userOrderDetail/getOne",
                         data: {
-                            id: this.$route.query.orderId,
-                        },
+                            id: this.$route.query.orderId
+                        }
                     })
                     .then(res => {
                         if (res.success) {
@@ -326,7 +350,7 @@ export default {
             var data = {
                 orderId: this.$route.query.orderId,
                 currentPage: this.currentPage,
-                pageNumber: 7,
+                pageNumber: 7
             };
 
             //普通审核筛选
@@ -337,20 +361,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: '/orderAlbum/page',
-                    data: data,
+                    url: "/orderAlbum/page",
+                    data: data
                 })
                 .then(res => {
                     if (res.success) {
@@ -377,24 +401,24 @@ export default {
         checkImageAndAlbum() {
             this.$http
                 .get({
-                    url: '/userOrder/checkImageAndAlbum',
+                    url: "/userOrderDetail/checkImageAndAlbum",
                     data: {
                         orderId: this.$route.query.orderId,
                         repairId: this.$route.query.imageRepairId,
-                        albumRepairId: this.$route.query.repairId || '',
-                    },
+                        albumRepairId: this.$route.query.repairId || ""
+                    }
                 })
                 .then(res2 => {
                     this.needAblum = res2.data.needAlbum;
                     this.allNum = res2.data.totalAlbum;
                     this.xiutuTip =
-                        '修图:已上传/总张数' +
+                        "修图:已上传/总张数" +
                         (res2.data.totalImage - res2.data.needImage) +
-                        '/' +
+                        "/" +
                         res2.data.totalImage +
-                        ',还需要上传' +
+                        ",还需要上传" +
                         res2.data.needImage +
-                        '张';
+                        "张";
                     if (res2.data.needImage == 0) {
                         this.xiutuIsFull = true;
                     } else {
@@ -422,17 +446,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);
                 }
@@ -440,7 +464,7 @@ export default {
             tips.splice(
                 0,
                 0,
-                flie.name + (res.success ? '文件上传成功' : '上传失败'),
+                flie.name + (res.success ? "文件上传成功" : "上传失败")
             );
             this.tip = tips;
             setTimeout(() => {
@@ -448,7 +472,7 @@ export default {
                 tips.forEach((item, index) => {
                     if (
                         item.indexOf(
-                            res.success ? '文件上传成功' : '上传失败',
+                            res.success ? "文件上传成功" : "上传失败"
                         ) != -1
                     ) {
                         tips.splice(index, 1);
@@ -484,7 +508,7 @@ export default {
         upload() {
             const loading = this.$loading({
                 lock: true,
-                text: '加载中',
+                text: "加载中"
             });
             var id = [];
             this.addImage.forEach(item => {
@@ -492,29 +516,29 @@ export default {
             });
             this.$http
                 .post({
-                    url: '/orderAlbum/updateFinishedImages',
+                    url: "/orderAlbum/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("失败");
                     }
                 });
         },
         submit() {
             this.$http.post({
-                url: '/orderImage/delOssImage',
+                url: "/orderImage/delOssImage",
                 data: {
-                    orderId: this.orderInfo.id,
-                },
+                    orderId: this.orderInfo.id
+                }
             });
             if (this.$route.query.repairId) {
                 if (
@@ -525,7 +549,7 @@ export default {
                 ) {
                     var data = {
                         albumRepairId: this.$route.query.repairId,
-                        albumRepairStatus: 3,
+                        albumRepairStatus: 3
                     };
                     if (this.$route.query.imageRepairId) {
                         data.imageRepairId = this.$route.query.imageRepairId;
@@ -533,54 +557,29 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
-                            data: data,
+                            url: "/userOrderDetail/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',
+                                        url: "/userOrderDetail/update",
                                         data: {
                                             id: this.orderInfo.id,
-                                            acceptType: 'image_album',
-                                        },
+                                            albumStatus:
+                                                OrderAlbumStatus.FINISH,
+                                            statusFlag: OrderStatus.CHECKOVER
+                                        }
                                     })
-                                    .then(res3 => {
-                                        if (res3.success) {
-                                            this.$http.get({
-                                                url: '/orderImage/createZip',
-                                                data: {
-                                                    orderId: this.orderInfo.id,
-                                                    typeFlag: 'finished',
-                                                },
-                                            });
-                                            this.$message.success('提交成功');
+                                    .then(res => {
+                                        if (res.success) {
+                                            this.$message.success(
+                                                "上传图片成功"
+                                            );
                                             history.back();
+                                        } else {
+                                            this.$message.warning(res.error);
                                         }
                                     });
                             }
@@ -588,7 +587,7 @@ export default {
                 } else {
                     var data = {
                         albumRepairId: this.$route.query.repairId,
-                        albumRepairStatus: 2,
+                        albumRepairStatus: 2
                     };
                     if (this.$route.query.imageRepairId) {
                         data.imageRepairId = this.$route.query.imageRepairId;
@@ -596,68 +595,62 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
-                            data: data,
+                            url: "/userOrderDetail/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: '返修上传',
-                                    },
-                                });
-                                if (this.orderInfo.clientOrderId) {
-                                    this.$http.post({
-                                        url: '/clientNotice/save',
+                                this.$http
+                                    .post({
+                                        url: "/userOrderDetail/update",
                                         data: {
-                                            clientOrderId: this.orderInfo
-                                                .clientOrderId,
-                                            orderId: this.orderInfo.id,
-                                            userId: this.orderInfo.userId,
-                                            productId: this.orderInfo.productId,
-                                            storeId: this.orderInfo.storeId,
-                                            typeFlag: 2,
-                                            remark: '返修上传',
-                                        },
+                                            id: this.orderInfo.id,
+                                            albumStatus:
+                                                OrderAlbumStatus.REWORKACCEPT
+                                        }
+                                    })
+                                    .then(res => {
+                                        if (res.success) {
+                                            this.$message.success(
+                                                "上传图片成功"
+                                            );
+                                            history.back();
+                                        } else {
+                                            this.$message.warning(res.error);
+                                        }
                                     });
-                                }
-                                history.back();
                             }
                         });
                 }
             }
         },
         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) {
                         this.getImage();
                     }
                 });
-        },
+        }
     },
     components: {
-        imgItem,
-    },
+        imgItem
+    }
 };
 </script>
 <style lang="less" scoped>

+ 308 - 397
src/main/vue/src/pages/UserOrderDetails.vue

@@ -4,447 +4,269 @@
             <!-- <el-select v-model="storeId" size="small" clearable filterable placeholder="店铺" @change="searchData" style="width:120px">
                 <el-option v-for="item in storeInfos" :key="item.id" :label="item.storeName" :value="item.id"></el-option>
             </el-select>-->
-            <el-select
-                v-model="userId"
-                size="small"
-                clearable
-                filterable
-                placeholder="用户"
-                @change="searchData"
-                style="width:120px"
-            >
-                <el-option
-                    v-for="item in userInfos"
-                    :key="item.id"
-                    :label="item.nickname"
-                    :value="item.id"
-                ></el-option>
+            <el-select v-model="userId" size="small" clearable filterable
+                placeholder="用户" @change="searchData" style="width:120px">
+                <el-option v-for="item in userInfos" :key="item.id"
+                    :label="item.nickname" :value="item.id"></el-option>
             </el-select>
-            <el-select
-                v-model="payModeKey"
-                size="small"
-                clearable
-                filterable
-                placeholder="支付方式"
-                @change="searchData"
-                style="width:120px"
-            >
-                <el-option
-                    v-for="item in payModeOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                ></el-option>
+            <el-select v-model="payModeKey" size="small" clearable filterable
+                placeholder="支付方式" @change="searchData" style="width:120px">
+                <el-option v-for="item in payModeOptions" :key="item.value"
+                    :label="item.label" :value="item.value"></el-option>
             </el-select>
-            <el-select
-                v-model="typeFlagKey"
-                size="small"
-                clearable
-                filterable
-                placeholder="订单类型"
-                @change="searchData"
-                style="width:120px"
-            >
-                <el-option
-                    v-for="item in typeFlagOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                ></el-option>
+            <el-select v-model="typeFlagKey" size="small" clearable filterable
+                placeholder="订单类型" @change="searchData" style="width:120px">
+                <el-option v-for="item in typeFlagOptions" :key="item.value"
+                    :label="item.label" :value="item.value"></el-option>
             </el-select>
-            <el-select
-                v-model="orderStatusKey"
-                size="small"
-                clearable
-                filterable
-                placeholder="订单状态"
-                @change="searchData"
-                style="width:120px"
-            >
-                <el-option
-                    v-for="item in orderStatusOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                ></el-option>
+            <el-select v-model="orderStatusKey" size="small" clearable
+                filterable placeholder="订单状态" @change="searchData"
+                style="width:120px">
+                <el-option v-for="item in orderStatusOptions" :key="item.value"
+                    :label="item.label" :value="item.value"></el-option>
             </el-select>
 
-            <el-input
-                placeholder="关键字"
-                size="small"
-                v-model="filter1"
-                clearable
-                class="filter-item"
-            ></el-input>
-            <el-button
-                @click="searchData"
-                type="primary"
-                size="small"
-                icon="el-icon-search"
-                class="filter-item"
-            >搜索</el-button>
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable
+                class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small"
+                icon="el-icon-search" class="filter-item">搜索</el-button>
             <el-button
                 @click="showAdvancedQueryDialog = !showAdvancedQueryDialog"
-                type="primary"
-                size="small"
-                icon="el-icon-search"
-                class="filter-item"
-            >高级查询</el-button>
-            <el-button
-                @click="showTableSortDialog = !showTableSortDialog"
-                type="primary"
-                size="small"
-                icon="el-icon-sort"
-                class="filter-item"
-            >排序</el-button>
+                type="primary" size="small" icon="el-icon-search"
+                class="filter-item">高级查询</el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog"
+                type="primary" size="small" icon="el-icon-sort"
+                class="filter-item">排序</el-button>
             <el-button
                 @click="$router.push({path:'/userOrderDetail',query:{column:$route.query.column}})"
-                type="primary"
-                size="small"
-                icon="el-icon-edit"
-                class="filter-item"
-            >添加</el-button>
-            <el-button
-                @click="exportExcel"
-                type="primary"
-                size="small"
-                icon="el-icon-share"
-                class="filter-item"
-            >导出EXCEL</el-button>
-            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                type="primary" size="small" icon="el-icon-edit"
+                class="filter-item">添加</el-button>
+            <el-button @click="exportExcel" type="primary" size="small"
+                icon="el-icon-share" class="filter-item">导出EXCEL</el-button>
+            <el-dropdown trigger="click" size="medium"
+                class="table-column-filter">
                 <span>
                     筛选数据
                     <i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
-                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
-                    <el-checkbox
-                        v-for="item in tableColumns"
-                        :key="item.value"
-                        v-model="item.show"
-                    >{{item.label}}</el-checkbox>
+                <el-dropdown-menu slot="dropdown"
+                    class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value"
+                        v-model="item.show">{{item.label}}</el-checkbox>
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
-            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"></el-table-column>
-            <el-table-column v-if="isColumnShow('id')" prop="id" label="ID" min-width="50"></el-table-column>
+        <el-table :data="tableData" :height="tableHeight" row-key="id"
+            ref="table">
+            <el-table-column v-if="multipleMode" align="center" type="selection"
+                width="50"></el-table-column>
+            <el-table-column v-if="isColumnShow('id')" prop="id" label="ID"
+                min-width="50"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('statusFlag')"
-                prop="statusFlag"
-                :formatter="StatusFlagFormatter"
-                label="状态"
-                min-width="80"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('statusFlag')" prop="statusFlag"
+                :formatter="StatusFlagFormatter" label="状态" min-width="80">
+            </el-table-column>
 
-            <el-table-column v-if="isColumnShow('userId')" prop="userId" label="用户" min-width="70"></el-table-column>
+            <el-table-column v-if="isColumnShow('userId')" prop="userId"
+                label="用户" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('orderCode')"
-                prop="orderCode"
-                label="订单号"
-                min-width="150"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('orderCode')" prop="orderCode"
+                label="订单号" min-width="150"></el-table-column>
 
-            <el-table-column prop="storeId" label="店铺" min-width="70" v-if="!storeLogin"></el-table-column>
+            <el-table-column prop="storeId" label="店铺" min-width="70"
+                v-if="!storeLogin"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('typeFlag')"
-                prop="typeFlag"
-                :formatter="TypeFlagFormatter"
-                label="类型"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('typeFlag')" prop="typeFlag"
+                :formatter="TypeFlagFormatter" label="类型" min-width="70">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('productId')"
-                prop="productId"
-                label="商品"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('productId')" prop="productId"
+                label="商品" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('productName')"
-                prop="productName"
-                label="商品名"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('productName')"
+                prop="productName" label="商品名" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('quantity')"
-                prop="quantity"
-                label="数量"
-                min-width="50"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('quantity')" prop="quantity"
+                label="数量" min-width="50"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('totalPrice')"
-                prop="totalPrice"
-                label="总价格"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('totalPrice')" prop="totalPrice"
+                label="总价格" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('dealPrice')"
-                prop="dealPrice"
-                label="支付价格"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('dealPrice')" prop="dealPrice"
+                label="支付价格" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('payMode')"
-                prop="payMode"
-                :formatter="PayModeFormatter"
-                label="支付方式"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('payMode')" prop="payMode"
+                :formatter="PayModeFormatter" label="支付方式" min-width="70">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('useType')"
-                prop="useType"
-                label="消费方式"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('useType')" prop="useType"
+                label="消费方式" min-width="100"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('bookPhotoTime')"
-                prop="bookPhotoTime"
-                label="预约拍照时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('bookPhotoTime')"
+                prop="bookPhotoTime" label="预约拍照时间"
+                :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('photoTime')"
-                prop="photoTime"
-                label="拍照时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('photoTime')" prop="photoTime"
+                label="拍照时间" :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('bookSelectTime')"
-                prop="bookSelectTime"
-                label="预约选片时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('bookSelectTime')"
+                prop="bookSelectTime" label="预约选片时间"
+                :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('selectTime')"
-                prop="selectTime"
-                label="选片时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('selectTime')" prop="selectTime"
+                label="选片时间" :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('bookCheckTime')"
-                prop="bookCheckTime"
-                label="预约审片时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('bookCheckTime')"
+                prop="bookCheckTime" label="预约审片时间"
+                :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('checkTime')"
-                prop="checkTime"
-                label="审片时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('checkTime')" prop="checkTime"
+                label="审片时间" :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('bookAccessTime')"
-                prop="bookAccessTime"
-                label="预约取件时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('bookAccessTime')"
+                prop="bookAccessTime" label="预约取件时间"
+                :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('accessTime')"
-                prop="accessTime"
-                label="取件时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('accessTime')" prop="accessTime"
+                label="取件时间" :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('commentTime')"
-                prop="commentTime"
-                label="评论时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('commentTime')"
+                prop="commentTime" label="评论时间" :formatter="DateTimeFormatter"
+                min-width="100"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('downPayment')"
-                prop="downPayment"
-                label="定金"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('downPayment')"
+                prop="downPayment" label="定金" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('unitPrice')"
-                prop="unitPrice"
-                label="单价"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('unitPrice')" prop="unitPrice"
+                label="单价" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('offPrice')"
-                prop="offPrice"
-                label="减价格"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('offPrice')" prop="offPrice"
+                label="减价格" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('couponPrice')"
-                prop="couponPrice"
-                label="优惠价格"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('couponPrice')"
+                prop="couponPrice" label="优惠价格" min-width="70">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('payTime')"
-                prop="payTime"
-                label="支付时间"
-                :formatter="DateTimeFormatter"
-                min-width="100"
-            ></el-table-column>
-            <el-table-column
-                v-if="isColumnShow('message')"
-                prop="message"
-                label="留言"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('payTime')" prop="payTime"
+                label="支付时间" :formatter="DateTimeFormatter" min-width="100">
+            </el-table-column>
+            <el-table-column v-if="isColumnShow('message')" prop="message"
+                label="留言" min-width="100"></el-table-column>
 
-            <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100"></el-table-column>
+            <el-table-column v-if="isColumnShow('remark')" prop="remark"
+                label="备注" min-width="100"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('showFlag')"
-                prop="showFlag"
-                label="前端显示"
-                min-width="50"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('showFlag')" prop="showFlag"
+                label="前端显示" min-width="50"></el-table-column>
 
-            <el-table-column v-if="isColumnShow('fee')" prop="fee" label="手续费" min-width="50"></el-table-column>
+            <el-table-column v-if="isColumnShow('fee')" prop="fee" label="手续费"
+                min-width="50"></el-table-column>
 
-            <el-table-column v-if="isColumnShow('coin')" prop="coin" label="余额" min-width="70"></el-table-column>
+            <el-table-column v-if="isColumnShow('coin')" prop="coin" label="余额"
+                min-width="70"></el-table-column>
 
-            <el-table-column v-if="isColumnShow('point')" prop="point" label="积分" min-width="70"></el-table-column>
+            <el-table-column v-if="isColumnShow('point')" prop="point"
+                label="积分" min-width="70"></el-table-column>
 
-            <el-table-column v-if="isColumnShow('cash')" prop="cash" label="现金" min-width="70"></el-table-column>
+            <el-table-column v-if="isColumnShow('cash')" prop="cash" label="现金"
+                min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('userAddressId')"
-                prop="userAddressId"
-                label="地址Id"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('userAddressId')"
+                prop="userAddressId" label="地址Id" min-width="70">
+            </el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('serviceId')"
-                prop="serviceId"
-                label="店铺服务"
-                min-width="70"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('serviceId')" prop="serviceId"
+                label="店铺服务" min-width="70"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('orderId')"
-                prop="orderId"
-                label="订单Id"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('orderId')" prop="orderId"
+                label="订单Id" min-width="100"></el-table-column>
 
-            <el-table-column
-                v-if="isColumnShow('tailMoney')"
-                prop="tailMoney"
-                label="尾款"
-                min-width="100"
-            ></el-table-column>
+            <el-table-column v-if="isColumnShow('tailMoney')" prop="tailMoney"
+                label="尾款" min-width="100"></el-table-column>
 
-            <el-table-column label="操作" align="right" fixed="right" min-width="300">
+            <el-table-column label="操作" align="right" fixed="right"
+                min-width="300">
                 <template slot-scope="scope">
-                    <el-button
-                        v-if="scope.row.tailorFlag=='Y'"
+                    <el-button v-if="scope.row.tailorFlag=='Y'"
                         @click="$router.push({path:'/orderServices',query:{column:scope.row.id+',orderDetailId'}})"
-                        type="primary"
-                        size="small"
-                        plain
-                    >定制服务</el-button>
-                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                        type="primary" size="small" plain>定制服务</el-button>
+                    <el-button @click="editRow(scope.row)" type="primary"
+                        size="mini" plain>编辑</el-button>
                     <!-- <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button> -->
                     <el-button
                         v-if="StatusFlagFormatter('','',scope.row.statusFlag)=='预约拍照'"
-                        size="mini"
-                        type="success"
-                        plain
-                        @click="changeStaute(scope.row.id,scope.row.statusFlag+1)"
-                    >拍照完成</el-button>
+                        size="mini" type="success" plain
+                        @click="changeStaute(scope.row.id,scope.row.statusFlag+1)">
+                        拍照完成</el-button>
                     <el-button
                         v-if="(StatusFlagFormatter('','',scope.row.statusFlag)=='拍照完成'||StatusFlagFormatter('','',scope.row.statusFlag)=='预约选片')&&scope.row.albumStatus==OrderAlbumStatus.WAITUPLOAD"
-                        size="mini"
-                        type="success"
-                        plain
-                        @click="goNext('orderUpload',scope.row.id)"
-                    >上传选片</el-button>
-                      <el-button
+                        size="mini" type="success" plain
+                        @click="goNext('orderUpload',scope.row.id)">上传选片
+                    </el-button>
+                    <el-button
                         v-if="(StatusFlagFormatter('','',scope.row.statusFlag)=='拍照完成'||StatusFlagFormatter('','',scope.row.statusFlag)=='预约选片')&&scope.row.albumStatus==OrderAlbumStatus.WAITSELECT"
-                        size="mini"
-                        type="success"
-                        plain
-                        @click="goNext('choosePhoto',scope.row.id)"
-                    >选择照片</el-button>
-                      <el-button
+                        size="mini" type="success" plain
+                        @click="goNext('choosePhoto',scope.row.id)">选择照片
+                    </el-button>
+                    <el-button
                         v-if="(scope.row.statusFlag==OrderStatus.BOOKCHECK||scope.row.statusFlag==OrderStatus.SELECTOVER)&&scope.row.albumStatus==OrderAlbumStatus.SELECTOVER"
-                        size="mini"
-                        type="success"
-                        plain
-                        @click="goNext('orderUploadChange',scope.row.id)"
-                    >上传修图</el-button>
-                     <el-button
+                        size="mini" type="success" plain
+                        @click="goNext('orderUploadChange',scope.row.id)">上传修图
+                    </el-button>
+                    <el-button
                         v-if="(scope.row.statusFlag==OrderStatus.BOOKCHECK||scope.row.statusFlag==OrderStatus.SELECTOVER)&&scope.row.albumStatus==OrderAlbumStatus.WAITACCEPT"
-                        size="mini"
-                        type="success"
-                        plain
-                        @click="goNext('orderExamine',scope.row.id)"
-                    >审核照片</el-button>
+                        size="mini" type="success" plain
+                        @click="goNext('orderExamine',scope.row.id)">审核照片
+                    </el-button>
+                    <el-button
+                        v-if="(scope.row.statusFlag==OrderStatus.BOOKCHECK||scope.row.statusFlag==OrderStatus.SELECTOVER)&&scope.row.albumStatus==OrderAlbumStatus.REWORK"
+                        size="mini" type="success" plain
+                        @click="goRepaire('orderUploadChange',scope.row)">返修上传
+                    </el-button>
+                    <el-button
+                        v-if="(scope.row.statusFlag==OrderStatus.BOOKCHECK||scope.row.statusFlag==OrderStatus.SELECTOVER)&&scope.row.albumStatus==OrderAlbumStatus.REWORKACCEPT"
+                        size="mini" type="success" plain
+                        @click="goExamine('orderExamine',scope.row)">返修审核
+                    </el-button>
                 </template>
             </el-table-column>
         </el-table>
         <div class="pagination-wrapper">
             <div class="multiple-mode-wrapper" v-if="0">
-                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button size="small" v-if="!multipleMode"
+                    @click="toggleMultipleMode(true)">批量编辑</el-button>
                 <el-button-group v-else>
-                    <el-button size="small" @click="operation1">批量操作1</el-button>
-                    <el-button size="small" @click="operation2">批量操作2</el-button>
-                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                    <el-button size="small" @click="operation1">批量操作1
+                    </el-button>
+                    <el-button size="small" @click="operation2">批量操作2
+                    </el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">
+                        取消</el-button>
                 </el-button-group>
             </div>
-            <el-pagination
-                background
-                @size-change="pageSizeChange"
-                @current-change="currentPageChange"
-                :current-page="currentPage"
-                :page-sizes="[10, 20, 30, 40, 50]"
-                :page-size="pageSize"
+            <el-pagination background @size-change="pageSizeChange"
+                @current-change="currentPageChange" :current-page="currentPage"
+                :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
                 layout="total, sizes, prev, pager, next, jumper"
-                :total="totalNumber"
-            ></el-pagination>
+                :total="totalNumber"></el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
-            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加
+            </el-button>
             <el-table :data="advancedQueryFields">
                 <el-table-column prop="link" label="链接符" align="center">
                     <template slot-scope="{row}">
-                        <el-select
-                            placeholder="链接"
-                            size="small"
-                            v-model="row.link"
-                            class="filter-item"
-                        >
+                        <el-select placeholder="链接" size="small"
+                            v-model="row.link" class="filter-item">
                             <el-option label="AND" value="AND"></el-option>
                             <el-option label="OR" value="OR"></el-option>
                         </el-select>
@@ -453,24 +275,19 @@
                 <el-table-column prop="name" label="字段" align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
-                            <el-option
-                                v-for="item in advancedQueryColumns"
-                                :label="item.label"
-                                :value="item.value"
-                                :key="item.value"
-                            ></el-option>
+                            <el-option v-for="item in advancedQueryColumns"
+                                :label="item.label" :value="item.value"
+                                :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
-                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                <el-table-column prop="searchMethod" label="搜索方式" width="150"
+                    align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.searchMethod">
-                            <el-option
-                                v-for="item in searchMethods"
-                                :label="item"
-                                :value="item"
-                                :key="item"
-                            ></el-option>
+                            <el-option v-for="item in searchMethods"
+                                :label="item" :value="item" :key="item">
+                            </el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -481,28 +298,28 @@
                 </el-table-column>
                 <el-table-column width="60" align="center">
                     <template slot-scope="{ row, column, $index }">
-                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                        <el-button @click="removeField($index)" size="small"
+                            type="text">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
 
             <span slot="footer" class="dialog-footer">
-                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+                <el-button @click="advancedQuery"
+                    :loading="$store.state.fetchingData">确定</el-button>
             </span>
         </el-dialog>
 
         <el-dialog title="排序" :visible.sync="showTableSortDialog">
-            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加
+            </el-button>
             <el-table :data="tableSortFields">
                 <el-table-column prop="name" label="字段" align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
-                            <el-option
-                                v-for="item in advancedQueryColumns"
-                                :label="item.label"
-                                :value="item.value"
-                                :key="item.value"
-                            ></el-option>
+                            <el-option v-for="item in advancedQueryColumns"
+                                :label="item.label" :value="item.value"
+                                :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -516,13 +333,15 @@
                 </el-table-column>
                 <el-table-column width="60" align="center">
                     <template slot-scope="{ row, column, $index }">
-                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                        <el-button @click="removeSortField($index)" size="small"
+                            type="text">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
 
             <span slot="footer" class="dialog-footer">
-                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+                <el-button @click="tableSortQuery"
+                    :loading="$store.state.fetchingData">确定</el-button>
             </span>
         </el-dialog>
 
@@ -535,7 +354,7 @@
 import { mapState } from "vuex";
 import { format } from "date-fns";
 import zh from "date-fns/locale/zh_cn";
-import {OrderStatus, OrderAlbumStatus } from "../Constants";
+import { OrderStatus, OrderAlbumStatus } from "../Constants";
 export default {
     name: "UserOrderDetails",
     created() {
@@ -999,8 +818,8 @@ export default {
                 }
             ],
             typeFlagKey: "",
-            OrderAlbumStatus:OrderAlbumStatus,
-            OrderStatus:OrderStatus
+            OrderAlbumStatus: OrderAlbumStatus,
+            OrderStatus: OrderStatus
         };
     },
     computed: {
@@ -1260,14 +1079,106 @@ export default {
                     }
                 });
         },
-        goNext(name,id){
-            console.log(name)
+        goNext(name, id) {
+            console.log(name);
             this.$router.push({
-                name:name,
-                query:{
-                    orderId:id
+                name: name,
+                query: {
+                    orderId: id
                 }
-            })
+            });
+        },
+        goExamine(name, info) {
+            console.log(info);
+            var orderRepairList = info.orderRepairList.filter(item => {
+                return item.statusFlag != 0;
+            });
+
+            var orderAlbumRepairList = info.orderAlbumRepairList.filter(
+                item => {
+                    return item.statusFlag != 0;
+                }
+            );
+
+            if (orderAlbumRepairList.length > orderRepairList.length) {
+                this.$router.push({
+                    name: "orderExamineAlbum",
+                    query: {
+                        orderId: info.id,
+                        repairId:
+                            orderAlbumRepairList[
+                                orderAlbumRepairList.length - 1
+                            ].id
+                    }
+                });
+            } else if (orderAlbumRepairList.length < orderRepairList.length) {
+                this.$router.push({
+                    name: "orderExamine",
+                    query: {
+                        orderId: info.id,
+                        repairId: orderRepairList[orderRepairList.length - 1].id
+                    }
+                });
+            } else {
+                this.$router.push({
+                    name: "orderExamine",
+                    query: {
+                        orderId: info.id,
+                        repairId:
+                            orderRepairList[orderRepairList.length - 1].id,
+                        AlbumRepairId:
+                            orderAlbumRepairList[
+                                orderAlbumRepairList.length - 1
+                            ].id
+                    }
+                });
+            }
+        },
+        goRepaire(name, info) {
+            console.log(info);
+            var orderRepairList = info.orderRepairList.filter(item => {
+                return item.statusFlag != 0;
+            });
+
+            var orderAlbumRepairList = info.orderAlbumRepairList.filter(
+                item => {
+                    return item.statusFlag != 0;
+                }
+            );
+
+            if (orderAlbumRepairList.length > orderRepairList.length) {
+                this.$router.push({
+                    name: "orderUploadChangeAlbum",
+                    query: {
+                        orderId: info.id,
+                        repairId:
+                            orderAlbumRepairList[
+                                orderAlbumRepairList.length - 1
+                            ].id
+                    }
+                });
+            } else if (orderAlbumRepairList.length < orderRepairList.length) {
+                this.$router.push({
+                    name: "orderUploadChange",
+                    query: {
+                        orderId: info.id,
+                        repairId: orderRepairList[orderRepairList.length - 1].id
+                    }
+                });
+            } else {
+                this.$router.push({
+                    name: "orderUploadChange",
+                    query: {
+                        orderId: info.id,
+                        repairId:
+                            orderRepairList[orderRepairList.length - 1].id,
+                        AlbumRepairId:
+                            orderAlbumRepairList[
+                                orderAlbumRepairList.length - 1
+                            ].id
+                    }
+                });
+            }
         }
     }
 };