|
@@ -6,10 +6,14 @@
|
|
style="width: 100%">
|
|
style="width: 100%">
|
|
</el-table>
|
|
</el-table>
|
|
</div> -->
|
|
</div> -->
|
|
- <div class="loading" v-if="urls.length==0"></div>
|
|
|
|
|
|
+ <div class="loading" v-if="urls.length==0&&status==0"></div>
|
|
|
|
+ <div v-if="status==-2">
|
|
|
|
+ <h1>该车还未装货!</h1>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="status==-1">
|
|
|
|
+ <h1>质保书正在紧张制作中,请耐心等待!</h1>
|
|
|
|
+ </div>
|
|
<div id="pdfDom">
|
|
<div id="pdfDom">
|
|
- <div class="blank">
|
|
|
|
- </div>
|
|
|
|
<div class="demo-image__lazy" v-for="(img,index) in urls" :key="index">
|
|
<div class="demo-image__lazy" v-for="(img,index) in urls" :key="index">
|
|
<!-- <el-image v-for="(img,index) in urls" :key="index" :src="img" lazy></el-image> -->
|
|
<!-- <el-image v-for="(img,index) in urls" :key="index" :src="img" lazy></el-image> -->
|
|
<el-image style='width: 100%; height: 100%; justify-content: center;
|
|
<el-image style='width: 100%; height: 100%; justify-content: center;
|
|
@@ -19,9 +23,14 @@
|
|
<!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
|
|
<!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
|
|
<i class="el-icon-download"></i>导出(pdf)
|
|
<i class="el-icon-download"></i>导出(pdf)
|
|
</el-button> -->
|
|
</el-button> -->
|
|
- <el-button style="margin-left: 45%;margin-top: 0.2%;" type="primary" v-print="'#pdfDom'" @click="backScan()">
|
|
|
|
- <i class="el-icon-printer"></i>打印
|
|
|
|
- </el-button>
|
|
|
|
|
|
+ <div class="button-box">
|
|
|
|
+ <el-button v-if="urls.length>0&&status==0" type="primary" v-print="'#pdfDom'" @click="backScan()">
|
|
|
|
+ <i class="el-icon-printer"></i>打印
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="primary" @click="backScan()">
|
|
|
|
+ <i class="el-icon-back"></i>返回
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -33,11 +42,20 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
urls:[],
|
|
urls:[],
|
|
|
|
+ //定义质保书正在紧张制作中、未装货和打印中的状态
|
|
|
|
+ status:0,
|
|
name: 'Loading'
|
|
name: 'Loading'
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.information();
|
|
this.information();
|
|
|
|
+ //三十秒不操作,自动返回扫码页面
|
|
|
|
+ const timer = setInterval(()=>{
|
|
|
|
+ this.backScan();
|
|
|
|
+ },30000)
|
|
|
|
+ this.$once('hook:beforeDestroy', ()=>{
|
|
|
|
+ clearInterval(timer)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
information() {
|
|
information() {
|
|
@@ -48,15 +66,17 @@ export default {
|
|
"/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber
|
|
"/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber
|
|
)
|
|
)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- console.log("res.data.data",res.data.data)
|
|
|
|
- console.log("res.data.code",res.data.code)
|
|
|
|
|
|
+ // console.log("res.data.data",res.data.data)
|
|
|
|
+ // console.log("res.data.code",res.data.code)
|
|
if(res.data.data==-1){
|
|
if(res.data.data==-1){
|
|
this.$message("质保书正在紧张制作中,请耐心等待!")
|
|
this.$message("质保书正在紧张制作中,请耐心等待!")
|
|
|
|
+ this.status = -1;
|
|
}else if(res.data.data==-2) {
|
|
}else if(res.data.data==-2) {
|
|
this.$message("该车还未装货")
|
|
this.$message("该车还未装货")
|
|
|
|
+ this.status = -2;
|
|
}else{
|
|
}else{
|
|
res.data.data.forEach((e) => {
|
|
res.data.data.forEach((e) => {
|
|
- console.log(e)
|
|
|
|
|
|
+ // console.log(e)
|
|
this.urls.push(e)
|
|
this.urls.push(e)
|
|
|
|
|
|
})
|
|
})
|
|
@@ -103,10 +123,6 @@ export default {
|
|
border-top: 0px
|
|
border-top: 0px
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.blank{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 50px;
|
|
|
|
-}
|
|
|
|
.loading {
|
|
.loading {
|
|
position: fixed;
|
|
position: fixed;
|
|
left: 0;
|
|
left: 0;
|
|
@@ -116,4 +132,12 @@ export default {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
z-index: 1000;
|
|
z-index: 1000;
|
|
}
|
|
}
|
|
|
|
+.button-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ text-align: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 0.3125rem;
|
|
|
|
+ margin-bottom: 1.25rem;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|