Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

suochencheng 6 лет назад
Родитель
Сommit
4a034fbb13
2 измененных файлов с 360 добавлено и 487 удалено
  1. 354 428
      src/main/vue/src/pages/OrderExamine.vue
  2. 6 59
      src/main/vue/src/pages/OrderExamineAlbum.vue

+ 354 - 428
src/main/vue/src/pages/OrderExamine.vue

@@ -1,168 +1,156 @@
 <template>
     <div class="container">
-   
-            <div
-                 class="top"
-                 >
-                <el-radio-group
-                                v-model="radio1"
-                                style="margin-right:10px;"
-                                v-if="hasAlbum"
-                                size="mini"
-                                @change="changePage">
-                    <el-radio-button label="修图"></el-radio-button>
-                    <el-radio-button label="放大"></el-radio-button>
-                </el-radio-group>
-                <span>订单号:{{orderInfo.orderCode}}</span>
-                <span style="margin-left:20px;">{{orderInfo.productName}}</span>
-                <template v-if="!isChange">
-
-                    <el-button
-                               style="float:right;margin:20px 20px 0 30px;"
-                               v-if="albumInfo.failImage==0&&albumInfo.failAlbum==0&&needCheckNum==0 &&albumInfo.needAlbum==0"
-                               type="primary"
-                               class="btn"
-                               @click="submit">审核通过</el-button>
-                    <el-button
-                               style="float:right;margin:20px 20px 0 30px;"
-                               v-if="(albumInfo.failImage!=0||albumInfo.failAlbum!=0)&&needCheckNum==0 &&albumInfo.needAlbum==0"
-                               type="warning"
-                               class="btn"
-                               @click="getRepair">确认提交第{{repairNum}}次返修</el-button>
-                </template>
-                <el-select
-                           v-if="!isChange"
-                           size="mini"
-                           style="float:right;margin-top:25px;width:120px"
-                           clearable
-                           v-model="statusFlag"
-                           placeholder="筛选状态"
-                           @change="getImage">
-                    <el-option
-                               key="0"
-                               label="未审核"
-                               value="0"></el-option>
-                    <el-option
-                               key="1"
-                               label="审核通过"
-                               value="1"></el-option>
-                    <el-option
-                               key="2"
-                               label="审核失败"
-                               value="2"></el-option>
-                </el-select>
-
+        <div class="top">
+            <el-radio-group
+                v-model="radio1"
+                style="margin-right:10px;"
+                v-if="hasAlbum"
+                size="mini"
+                @change="changePage"
+            >
+                <el-radio-button label="修图"></el-radio-button>
+                <el-radio-button label="放大"></el-radio-button>
+            </el-radio-group>
+            <span>订单号:{{orderInfo.orderCode}}</span>
+            <span style="margin-left:20px;">{{orderInfo.productName}}</span>
+            <template v-if="!isChange">
                 <el-button
-                           size="mini"
-                           type="danger"
-                           v-if="!isChange"
-                           plain
-                           @click="repairBatch"
-                           style="float:right;margin-top:25px;margin-right:20px">全部审核失败</el-button>
+                    style="float:right;margin:20px 20px 0 30px;"
+                    v-if="albumInfo.failImage==0&&albumInfo.failAlbum==0&&needCheckNum==0 &&albumInfo.needAlbum==0"
+                    type="primary"
+                    class="btn"
+                    @click="submit"
+                >审核通过</el-button>
                 <el-button
-                           size="mini"
-                           type="success"
-                           v-if="!isChange"
-                           plain
-                           @click="passBatch"
-                           style="float:right;margin-top:25px;margin-right:10px">全部审核通过</el-button>
-            </div>
-            <div style="backgroundColor:#f2f4f5;padding:10px 30px">
-                <div
-                     style="font-size:14px;color:#666"
-                     :style="{color:needCheckNum==0?'#666':'rgb(251, 110, 8)'}">修图:已审核/全部:{{allNumber-needCheckNum}}/{{allNumber}}</div>
-                <div
-                     style="font-size:14px;color:#666;margin-top:5px"
-                     v-if="hasAlbum"
-                     :style="{color:albumInfo.needAlbum==0?'#666':'rgb(251, 110, 8)'}">放大:已审核/全部:{{albumInfo.totalAlbum-albumInfo.needAlbum}}/{{albumInfo.totalAlbum}}</div>
-            </div>
-
-            <div class="content">
-                <template v-if="orderImage.length>0">
-                    <div class="imgList">
-                        <div class="title">
-                            原
-                            <br>片
-                        </div>
-
-                        <img-item
-                                  v-for="(item,index) in orderImage"
-                                  :key="'originalImage'+index"
-                                  @changeRemark="getImage"
-                                  :label="'originalImage'"
-                                  :index="index"
-                                  :img="item"
-                                  :imgStyle="'examine'"
-                                  @delImg="getImage"
-                                  style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+                    style="float:right;margin:20px 20px 0 30px;"
+                    v-if="(albumInfo.failImage!=0||albumInfo.failAlbum!=0)&&needCheckNum==0 &&albumInfo.needAlbum==0"
+                    type="warning"
+                    class="btn"
+                    @click="getRepair"
+                >确认提交第{{repairNum}}次返修</el-button>
+            </template>
+            <el-select
+                v-if="!isChange"
+                size="mini"
+                style="float:right;margin-top:25px;width:120px"
+                clearable
+                v-model="statusFlag"
+                placeholder="筛选状态"
+                @change="getImage"
+            >
+                <el-option key="0" label="未审核" value="0"></el-option>
+                <el-option key="1" label="审核通过" value="1"></el-option>
+                <el-option key="2" label="审核失败" value="2"></el-option>
+            </el-select>
+
+            <el-button
+                size="mini"
+                type="danger"
+                v-if="!isChange"
+                plain
+                @click="repairBatch"
+                style="float:right;margin-top:25px;margin-right:20px"
+            >全部审核失败</el-button>
+            <el-button
+                size="mini"
+                type="success"
+                v-if="!isChange"
+                plain
+                @click="passBatch"
+                style="float:right;margin-top:25px;margin-right:10px"
+            >全部审核通过</el-button>
+        </div>
+        <div style="backgroundColor:#f2f4f5;padding:10px 30px">
+            <div
+                style="font-size:14px;color:#666"
+                :style="{color:needCheckNum==0?'#666':'rgb(251, 110, 8)'}"
+            >修图:已审核/全部:{{allNumber-needCheckNum}}/{{allNumber}}</div>
+            <div
+                style="font-size:14px;color:#666;margin-top:5px"
+                v-if="hasAlbum"
+                :style="{color:albumInfo.needAlbum==0?'#666':'rgb(251, 110, 8)'}"
+            >放大:已审核/全部:{{albumInfo.totalAlbum-albumInfo.needAlbum}}/{{albumInfo.totalAlbum}}</div>
+        </div>
+
+        <div class="content">
+            <template v-if="orderImage.length>0">
+                <div class="imgList">
+                    <div class="title">
+                        原
+                        <br />片
                     </div>
 
-                    <div
-                         class="imgList"
-                         style="margin-top:50px;">
-                        <div
-                             class="title"
-                             style="color:#FB6E08">
-                            成
-                            <br>片
-                        </div>
-                        <img-item
-                                  :isChange="isChange"
-                                  v-for="(item,index) in orderImage"
-                                  :key="'finishedImage'+index"
-                                  :currentNum="index+(currentPage-1)*7"
-                                  :totalNumber="totalNumber"
-                                  :orderImageList="orderImage"
-                                  @changeRemark="changeRemark"
-                                  :label="'finishedImage'"
-                                  :index="index"
-                                  :img="item"
-                                  :imgStyle="'examine'"
-                                  @delImg="getImage"
-                                  style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+                    <img-item
+                        v-for="(item,index) in orderImage"
+                        :key="'originalImage'+index"
+                        @changeRemark="getImage"
+                        :label="'originalImage'"
+                        :index="index"
+                        :img="item"
+                        :imgStyle="'examine'"
+                        @delImg="getImage"
+                        style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"
+                    ></img-item>
+                </div>
+
+                <div class="imgList" style="margin-top:50px;">
+                    <div class="title" style="color:#FB6E08">
+                        成
+                        <br />片
                     </div>
-                </template>
-                <div
-                     v-else
-                     class="nothing">
-                    <img
-                         src="../assets/nothingImg.png"
-                         alt>
-                    <p>没有图片哦!</p>
+                    <img-item
+                        :isChange="isChange"
+                        v-for="(item,index) in orderImage"
+                        :key="'finishedImage'+index"
+                        :currentNum="index+(currentPage-1)*7"
+                        :totalNumber="totalNumber"
+                        :orderImageList="orderImage"
+                        @changeRemark="changeRemark"
+                        :label="'finishedImage'"
+                        :index="index"
+                        :img="item"
+                        :imgStyle="'examine'"
+                        @delImg="getImage"
+                        style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"
+                    ></img-item>
                 </div>
+            </template>
+            <div v-else class="nothing">
+                <img src="../assets/nothingImg.png" alt />
+                <p>没有图片哦!</p>
             </div>
-
-            <el-pagination
-                           style="padding:0 0 20px"
-                           background
-                           :page-size="7"
-                           @current-change="currentPageChange"
-                           :current-page="currentPage"
-                           layout="total, prev, pager, next"
-                           :total="totalNumber"></el-pagination>
-
-            
+        </div>
+
+        <el-pagination
+            style="padding:0 0 20px"
+            background
+            :page-size="7"
+            @current-change="currentPageChange"
+            :current-page="currentPage"
+            layout="total, prev, pager, next"
+            :total="totalNumber"
+        ></el-pagination>
     </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() {
         if (!this.$route.query.orderId) {
-            this.$router.replace('/userOrder');
+            this.$router.replace("/userOrder");
             return;
         }
 
         this.$http
             .get({
-                url: '/userOrderDetail/getOne',
+                url: "/userOrderDetail/getOne",
                 data: {
-                    id: this.$route.query.orderId,
-                },
+                    id: this.$route.query.orderId
+                }
             })
             .then(res => {
                 if (res.success) {
@@ -176,9 +164,9 @@ export default {
         }
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(["userInfo"]),
         url() {
-            return baseUrl + '/assets/uploadFile';
+            return baseUrl + "/assets/uploadFile";
         },
         allImage() {
             var list = [];
@@ -232,7 +220,7 @@ export default {
                 list1.forEach((item, index) => {
                     var jsonp = {
                         AlbumRepairId: list1[index].id,
-                        AlbumStatusFlag: list1[index].statusFlag,
+                        AlbumStatusFlag: list1[index].statusFlag
                     };
                     if (index < list2.length) {
                         jsonp.imageRepairId = list2[index].id;
@@ -258,13 +246,13 @@ export default {
             }
 
             return list;
-        },
+        }
     },
     data() {
         return {
             orderInfo: {
-                orderAlbumRepairList:[],
-                orderRepairList:[]
+                orderAlbumRepairList: [],
+                orderRepairList: []
             },
             dialogVisible: false,
             addImage: [],
@@ -275,13 +263,13 @@ export default {
             isFail: false,
             repairId: 0,
             isChange: false,
-            statusFlag: '',
+            statusFlag: "",
             needCheckNum: 0,
             isFirstCheck: true,
             isFinish: false,
-            radio1: '修图',
+            radio1: "修图",
             albumInfo: {},
-            allNumber: 0,
+            allNumber: 0
         };
     },
     methods: {
@@ -289,10 +277,10 @@ export default {
             if (!this.repairId) {
                 this.$http
                     .get({
-                        url: '/userOrderDetail/getOne',
+                        url: "/userOrderDetail/getOne",
                         data: {
-                            id: this.$route.query.orderId,
-                        },
+                            id: this.$route.query.orderId
+                        }
                     })
                     .then(res => {
                         if (res.success) {
@@ -320,7 +308,7 @@ export default {
                 orderId: this.$route.query.orderId,
                 currentPage: this.currentPage,
                 pageNumber: 7,
-                selectFlag:'Y'
+                selectFlag: "Y"
             };
             if (this.repairId) {
                 data.repairId = this.repairId;
@@ -334,8 +322,8 @@ export default {
             this.orderImage = [];
             this.$http
                 .get({
-                    url: '/orderImage/page',
-                    data: data,
+                    url: "/orderImage/page",
+                    data: data
                 })
                 .then(res => {
                     if (res.success) {
@@ -376,13 +364,13 @@ export default {
 
             this.$http
                 .get({
-                    url: 'userOrderDetail/checkRepairImageAndAlbum',
+                    url: "userOrderDetail/checkRepairImageAndAlbum",
                     data: {
                         orderId: this.$route.query.orderId,
-                        repairId: this.$route.query.repairId || '',
-                        albumRepairId: this.$route.query.AlbumRepairId || '',
-                        selectFlag:'Y'
-                    },
+                        repairId: this.$route.query.repairId || "",
+                        albumRepairId: this.$route.query.AlbumRepairId || "",
+                        selectFlag: "Y"
+                    }
                 })
                 .then(res => {
                     this.needCheckNum = res.data.needImage;
@@ -391,7 +379,7 @@ export default {
                         needAlbum: res.data.needAlbum,
                         totalAlbum: res.data.totalAlbum,
                         failAlbum: res.data.failAlbum,
-                        failImage: res.data.failImage,
+                        failImage: res.data.failImage
                     };
                 });
         },
@@ -405,7 +393,7 @@ export default {
                 item.response.data.forEach(todo => {
                     var jsop = {
                         originalImage: todo,
-                        remark: '',
+                        remark: ""
                     };
                     list.push(jsop);
                 });
@@ -420,16 +408,16 @@ export default {
                 ) {
                     var jsop = {
                         originalImage: item,
-                        remark: '',
+                        remark: ""
                     };
                     this.addImage.push(jsop);
                 } else if (this.addImage.length > this.canUploadNum) {
                     this.$message({
                         message:
-                            '已经上传' +
+                            "已经上传" +
                             this.addImage.length +
-                            '张图片了,请预览后确认图片',
-                        type: 'warning',
+                            "张图片了,请预览后确认图片",
+                        type: "warning"
                     });
                 }
             });
@@ -442,7 +430,7 @@ export default {
         },
         saveImage(i) {
             if (i == this.allImage.length) {
-                this.$message.success('成功');
+                this.$message.success("成功");
                 this.dialogVisible = false;
                 this.getImage();
             } else {
@@ -450,18 +438,18 @@ export default {
                     originalImage: this.allImage[i],
                     orderId: this.orderInfo.id,
                     userId: this.userInfo.id,
-                    storeId: this.orderInfo.storeId,
+                    storeId: this.orderInfo.storeId
                 };
                 this.$http
                     .post({
-                        url: '/orderImage/save',
-                        data: data,
+                        url: "/orderImage/save",
+                        data: data
                     })
                     .then(res => {
                         if (res.success) {
                             this.saveImage(i + 1);
                         } else {
-                            this.$message.warning('失败');
+                            this.$message.warning("失败");
                         }
                     });
             }
@@ -470,7 +458,7 @@ export default {
             this.checkStatus(this.orderId, this.repairId).then(data => {
                 const loading = this.$loading({
                     lock: true,
-                    text: '加载中',
+                    text: "加载中"
                 });
 
                 if (this.$route.query.repairId) {
@@ -487,7 +475,7 @@ export default {
                     // })
                     var data = {
                         imageRepairId: this.$route.query.repairId,
-                        imageRepairStatus: 3,
+                        imageRepairStatus: 3
                     };
                     if (this.$route.query.AlbumRepairId) {
                         data.albumRepairId = this.$route.query.AlbumRepairId;
@@ -495,8 +483,8 @@ export default {
                     }
                     this.$http
                         .post({
-                            url: '/userOrderDetail/updateImageAndAlbumRepair',
-                            data: data,
+                            url: "/userOrderDetail/updateImageAndAlbumRepair",
+                            data: data
                         })
                         .then(res => {
                             if (!res.success) {
@@ -506,44 +494,44 @@ export default {
                         });
                 }
 
-                var confirmAcceptType = '';
+                var confirmAcceptType = "";
 
                 if (this.albumInfo.failImage == 0) {
-                    confirmAcceptType = 'order_image';
+                    confirmAcceptType = "order_image";
                 }
 
                 if (this.albumInfo.failAlbum == 0) {
-                    confirmAcceptType = 'order_album';
+                    confirmAcceptType = "order_album";
                 }
 
                 if (
                     this.albumInfo.failImage == 0 &&
                     this.albumInfo.failAlbum == 0
                 ) {
-                    confirmAcceptType = 'image_album';
+                    confirmAcceptType = "image_album";
                 }
 
                 this.$http
                     .post({
-                        url: '/userOrderDetail/confirm',
+                        url: "/userOrderDetail/confirm",
                         data: {
                             id: this.orderInfo.id,
-                            acceptType: confirmAcceptType,
-                        },
+                            acceptType: confirmAcceptType
+                        }
                     })
                     .then(res2 => {
                         if (res2.success) {
                             this.$http.post({
-                                url: '/userOrderDetail/msg',
+                                url: "/userOrderDetail/msg",
                                 data: {
                                     orderId: this.orderInfo.id,
                                     typeFlag: 1,
-                                    message: '审片成功',
-                                },
+                                    message: "审片成功"
+                                }
                             });
                             if (this.orderInfo.clientOrderId) {
                                 this.$http.post({
-                                    url: '/clientNotice/save',
+                                    url: "/clientNotice/save",
                                     data: {
                                         clientOrderId: this.orderInfo
                                             .clientOrderId,
@@ -552,222 +540,163 @@ export default {
                                         productId: this.orderInfo.productId,
                                         storeId: this.orderInfo.storeId,
                                         typeFlag: 4,
-                                        remark: '审片成功',
-                                    },
+                                        remark: "审片成功"
+                                    }
                                 });
                             }
                             this.$http.get({
-                                url: '/orderImage/createZip',
+                                url: "/orderImage/createZip",
                                 data: {
                                     orderId: this.orderInfo.id,
-                                    typeFlag: 'finished',
-                                },
+                                    typeFlag: "finished"
+                                }
                             });
-                            this.$message.success('提交成功');
+                            this.$message.success("提交成功");
                             loading.close();
                             history.back();
                         }
                     });
             });
         },
-        getRepair() {
-            // this.checkStatus(this.orderId, this.repairId).then((data) => {
-            //     const loading = this.$loading({
-            //         lock: true,
-            //         text: '加载中',
-            //     });
-            //     this.$http.post({
-            //         url: '/userOrder/repair',
-            //         data: {
-            //             id: this.orderInfo.id,
-            //             statusFlag: 4
-            //         }
-            //     }).then(res => {
-            //         if (res.success) {
+        async getRepair() {
 
-            //             loading.close();
-            //             this.$message.success('提交成功');
-            //             this.$http.post({
-            //                 url: '/userOrder/msg',
-            //                 data: {
-            //                     orderId: this.orderInfo.id,
-            //                     typeFlag: 1,
-            //                     message: '审片失败'
-            //                 }
-            //             })
-            //             history.back()
+            const loading = this.$loading({
+                lock: true,
+                text: "加载中"
+            });
 
-            //         }
-            //     })
-            // })
+            var repairAcceptType = "";
+            if (this.albumInfo.failImage > 0) {
+                repairAcceptType = "order_image";
+            }
+            if (this.albumInfo.failAlbum > 0) {
+                repairAcceptType = "order_album";
+            }
 
-            this.checkStatus(this.orderId, this.repairId).then(async data => {
-                const loading = this.$loading({
-                    lock: true,
-                    text: '加载中',
-                });
+            if (this.albumInfo.failImage > 0 && this.albumInfo.failAlbum > 0) {
+                repairAcceptType = "image_album";
+            }
 
-                var repairAcceptType = '';
-                if (this.albumInfo.failImage > 0) {
-                    repairAcceptType = 'order_image';
-                }
-                if (this.albumInfo.failAlbum > 0) {
-                    repairAcceptType = 'order_album';
+            if (this.albumInfo.failImage > 0 || this.albumInfo.failAlbum > 0) {
+                await this.$http
+                    .post({
+                        url: "/userOrderDetail/repair",
+                        data: {
+                            id: this.orderInfo.id,
+                            acceptType: repairAcceptType
+                        }
+                    })
+                    .then(res => {
+                        if (!res.success) {
+                            this.$message.error(res.error);
+                            return;
+                        }
+                    });
+            }
+
+            if (
+                this.albumInfo.failImage == 0 ||
+                this.albumInfo.failAlbum == 0
+            ) {
+                var data = {
+                    imageRepairId: this.$route.query.repairId || "",
+                    imageRepairStatus: 3
+                };
+                if (this.$route.query.AlbumRepairId) {
+                    data.albumRepairId = this.$route.query.AlbumRepairId;
+                    data.albumRepairStatus = 3;
                 }
+                await this.$http
+                    .post({
+                        url: "/userOrderDetail/updateImageAndAlbumRepair",
+                        data: data
+                    })
+                    .then(res => {
+                        if (!res.success) {
+                            this.$message.error(res.error);
+                            return;
+                        }
+                    });
 
-                if (
-                    this.albumInfo.failImage > 0 &&
-                    this.albumInfo.failAlbum > 0
-                ) {
-                    repairAcceptType = 'image_album';
+                var confirmAcceptType = "";
+
+                if (this.albumInfo.failImage == 0) {
+                    confirmAcceptType = "order_image";
                 }
 
-                if (
-                    this.albumInfo.failImage > 0 ||
-                    this.albumInfo.failAlbum > 0
-                ) {
-                    await this.$http
-                        .post({
-                            url: '/userOrder/repair',
-                            data: {
-                                id: this.orderInfo.id,
-                                acceptType: repairAcceptType,
-                            },
-                        })
-                        .then(res => {
-                            if (!res.success) {
-                                this.$message.error(res.error);
-                                return;
-                            }
-                        });
+                if (this.albumInfo.failAlbum == 0) {
+                    confirmAcceptType = "order_album";
                 }
 
                 if (
-                    this.albumInfo.failImage == 0 ||
+                    this.albumInfo.failImage == 0 &&
                     this.albumInfo.failAlbum == 0
                 ) {
-                    var data = {
-                        imageRepairId: this.$route.query.repairId || '',
-                        imageRepairStatus: 3,
-                    };
-                    if (this.$route.query.AlbumRepairId) {
-                        data.albumRepairId = this.$route.query.AlbumRepairId;
-                        data.albumRepairStatus = 3;
-                    }
-                    await this.$http
-                        .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
-                            data: data,
-                        })
-                        .then(res => {
-                            if (!res.success) {
-                                this.$message.error(res.error);
-                                return;
-                            }
-                        });
-
-                    var confirmAcceptType = '';
-
-                    if (this.albumInfo.failImage == 0) {
-                        confirmAcceptType = 'order_image';
-                    }
-
-                    if (this.albumInfo.failAlbum == 0) {
-                        confirmAcceptType = 'order_album';
-                    }
-
-                    if (
-                        this.albumInfo.failImage == 0 &&
-                        this.albumInfo.failAlbum == 0
-                    ) {
-                        confirmAcceptType = 'image_album';
-                    }
-
-                    await this.$http
-                        .post({
-                            url: '/userOrder/confirm',
-                            data: {
-                                id: this.orderInfo.id,
-                                acceptType: confirmAcceptType,
-                            },
-                        })
-                        .then(res => {
-                            if (!res.success) {
-                                this.$message.error(res.error);
-                                return;
-                            }
-                        });
+                    confirmAcceptType = "image_album";
                 }
-                loading.close();
-                this.$message.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',
+
+                await this.$http
+                    .post({
+                        url: "/userOrderDetail/confirm",
                         data: {
-                            clientOrderId: this.orderInfo.clientOrderId,
-                            orderId: this.orderInfo.id,
-                            userId: this.orderInfo.userId,
-                            productId: this.orderInfo.productId,
-                            storeId: this.orderInfo.storeId,
-                            typeFlag: 3,
-                            remark: '审片失败',
-                        },
+                            id: this.orderInfo.id,
+                            acceptType: confirmAcceptType
+                        }
+                    })
+                    .then(res => {
+                        if (!res.success) {
+                            this.$message.error(res.error);
+                            return;
+                        }
                     });
-                }
-                history.back();
-            });
+            }
+            loading.close();
+            this.$message.success("提交成功");
+            history.back();
         },
         goShare() {
             this.checkStatus(this.orderId, this.repairId).then(data => {
-                var repair = '';
+                var repair = "";
                 if (this.$route.query.repairId) {
-                    repair = '&repairId=' + this.$route.query.repairId;
+                    repair = "&repairId=" + this.$route.query.repairId;
                 }
-                this.$prompt('请输入分享密钥,6位数字', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
+                this.$prompt("请输入分享密钥,6位数字", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
                     inputPattern: /^\d{6}$/,
                     inputValue: this.orderInfo.orderPassword,
-                    inputErrorMessage: '密钥的格式为6位数字',
+                    inputErrorMessage: "密钥的格式为6位数字"
                 })
                     .then(({ value }) => {
                         this.$http
                             .post({
-                                url: '/userOrder/update',
+                                url: "/userOrder/update",
                                 data: {
                                     id: this.orderInfo.id,
-                                    orderPassword: value,
-                                },
+                                    orderPassword: value
+                                }
                             })
                             .then(res => {
                                 if (res.success) {
                                     this.$alert(
                                         '分享成功,您的分享密钥为:<span style="color:#3cb1cd;font-weight:bold;font-size:24px;">' +
                                             value +
-                                            '</span><br/>点击确定转到下列分享链接:<br/> https://www.tutuxiang.com/index#/orderExamineShare?orderId=' +
+                                            "</span><br/>点击确定转到下列分享链接:<br/> https://www.tutuxiang.com/index#/orderExamineShare?orderId=" +
                                             this.$route.query.orderId +
                                             repair,
-                                        '分享链接',
+                                        "分享链接",
                                         {
-                                            confirmButtonText: '确定',
+                                            confirmButtonText: "确定",
                                             dangerouslyUseHTMLString: true,
                                             callback: action => {
                                                 window.open(
-                                                    'https://www.tutuxiang.com/index#/orderExamineShare?orderId=' +
+                                                    "https://www.tutuxiang.com/index#/orderExamineShare?orderId=" +
                                                         this.$route.query
                                                             .orderId +
-                                                        repair,
+                                                        repair
                                                 );
-                                            },
-                                        },
+                                            }
+                                        }
                                     );
                                 }
                             });
@@ -781,96 +710,93 @@ export default {
             // document.execCommand("Copy"); //执行浏览器复制命令
         },
         passBatch() {
-                this.$confirm(
-                    '全部通过按钮只会通过未审核的图片,已经审核通过或者失败的图片不会改变状态, 是否继续?',
-                    '提示',
-                    {
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
-                        type: 'warning',
-                    },
-                )
-                    .then(() => {
-                        const loading = this.$loading({
-                            lock: true,
+            this.$confirm(
+                "全部通过按钮只会通过未审核的图片,已经审核通过或者失败的图片不会改变状态, 是否继续?",
+                "提示",
+                {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }
+            )
+                .then(() => {
+                    const loading = this.$loading({
+                        lock: true
+                    });
+                    this.$http
+                        .post({
+                            url: "/orderImage/passBatch",
+                            data: {
+                                orderId: this.orderInfo.id,
+                                storeId: this.orderInfo.storeId,
+                                userId: this.orderInfo.userId
+                            }
+                        })
+                        .then(res => {
+                            loading.close();
+                            if (res.success) {
+                                this.dialogFormVisible = false;
+                                this.$message.success("成功");
+                                this.changeRemark();
+                            } else {
+                                this.$message.success("成功");
+                                this.changeRemark();
+                            }
                         });
-                        this.$http
-                            .post({
-                                url: '/orderImage/passBatch',
-                                data: {
-                                    orderId: this.orderInfo.id,
-                                    storeId: this.orderInfo.storeId,
-                                    userId: this.orderInfo.userId,
-                                },
-                            })
-                            .then(res => {
-                                loading.close();
-                                if (res.success) {
-                                    this.dialogFormVisible = false;
-                                    this.$message.success('成功');
-                                    this.changeRemark();
-                                } else {
-                                    this.$message.success('成功');
-                                    this.changeRemark();
-                                }
-                            });
-                    })
-                    .catch(() => {});
-     
+                })
+                .catch(() => {});
         },
         repairBatch() {
-          
-                this.$confirm(
-                    '全部通过按钮只会通过未审核的图片,已经审核通过或者失败的图片不会改变状态, 是否继续?',
-                    '提示',
-                    {
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
-                        type: 'warning',
-                    },
-                )
-                    .then(() => {
-                        const loading = this.$loading({
-                            lock: true,
+            this.$confirm(
+                "全部通过按钮只会通过未审核的图片,已经审核通过或者失败的图片不会改变状态, 是否继续?",
+                "提示",
+                {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }
+            )
+                .then(() => {
+                    const loading = this.$loading({
+                        lock: true
+                    });
+                    this.$http
+                        .post({
+                            url: "/orderImage/repairBatch",
+                            data: {
+                                orderId: this.orderInfo.id,
+                                storeId: this.orderInfo.storeId,
+                                userId: this.orderInfo.userId
+                            }
+                        })
+                        .then(res => {
+                            loading.close();
+                            if (res.success) {
+                                this.dialogFormVisible = false;
+                                this.$message.success("成功");
+                                this.changeRemark();
+                            } else {
+                                this.$message.success("成功");
+                                this.changeRemark();
+                            }
                         });
-                        this.$http
-                            .post({
-                                url: '/orderImage/repairBatch',
-                                data: {
-                                    orderId: this.orderInfo.id,
-                                    storeId: this.orderInfo.storeId,
-                                    userId: this.orderInfo.userId,
-                                },
-                            })
-                            .then(res => {
-                                loading.close();
-                                if (res.success) {
-                                    this.dialogFormVisible = false;
-                                    this.$message.success('成功');
-                                    this.changeRemark();
-                                } else {
-                                    this.$message.success('成功');
-                                    this.changeRemark();
-                                }
-                            });
-                    })
-                    .catch(() => {});
-        
+                })
+                .catch(() => {});
         },
         changePage() {
             this.$router.replace(
-                '/orderExamineAlbum?orderId=' +
+                "/orderExamineAlbum?orderId=" +
                     this.$route.query.orderId +
-                    '&repairId=' +
-                    (this.$route.query.AlbumRepairId || '') +
-                    '&imageRepairId=' +
-                    (this.$route.query.repairId || ''),
+                    "&repairId=" +
+                    (this.$route.query.AlbumRepairId || "") +
+                    "&imageRepairId=" +
+                    (this.$route.query.repairId || "")
             );
-        },
+        }
     },
     components: {
-        imgItem,
-    },
+        imgItem
+    }
 };
 </script>
 <style lang="less" scoped>

+ 6 - 59
src/main/vue/src/pages/OrderExamineAlbum.vue

@@ -600,38 +600,8 @@ export default {
                     });
             });
         },
-        getRepair() {
-            // this.getOrder().then((info) => {
-            //     console.log(info)
-            //     return
-
-            //     var id = 0
-
-            //     if (info.orderAlbumRepairList.length > 0) {
-            //         id = info.orderAlbumRepairList[info.orderAlbumRepairList.length - 1].id
-            //     }
-
-            //     const loading = this.$loading({
-            //         lock: true,
-            //         text: '加载中',
-            //     });
-            //     this.$http.post({
-            //         url: '/orderAlbumRepair/update',
-            //         data: {
-            //             id: id,
-            //             statusFlag: 1
-            //         }
-            //     }).then(res => {
-            //         if (res.success) {
-
-            //             loading.close();
-            //             this.$message.success('提交成功');
-            //             history.back()
-
-            //         }
-            //     })
-            // })
-            this.checkStatus(this.orderId, this.repairId).then(async data => {
+      async  getRepair() {
+          
                 const loading = this.$loading({
                     lock: true,
                     text: '加载中',
@@ -658,7 +628,7 @@ export default {
                 ) {
                     await this.$http
                         .post({
-                            url: '/userOrder/repair',
+                            url: '/userOrderDetail/repair',
                             data: {
                                 id: this.orderInfo.id,
                                 acceptType: repairAcceptType,
@@ -685,7 +655,7 @@ export default {
                     }
                     await this.$http
                         .post({
-                            url: '/userOrder/updateImageAndAlbumRepair',
+                            url: '/userOrderDetail/updateImageAndAlbumRepair',
                             data: data,
                         })
                         .then(res => {
@@ -714,7 +684,7 @@ export default {
 
                     await this.$http
                         .post({
-                            url: '/userOrder/confirm',
+                            url: '/userOrderDetail/confirm',
                             data: {
                                 id: this.orderInfo.id,
                                 acceptType: confirmAcceptType,
@@ -729,32 +699,9 @@ export default {
                 }
                 loading.close();
                 this.$message.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: 3,
-                            remark: '审片失败',
-                        },
-                    });
-                }
+               
 
                 history.back();
-            });
         },
         goShare() {
             this.checkStatus(this.orderId, this.repairId).then(data => {