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