Commit df630458 authored by 黄媛媛's avatar 黄媛媛

update

parent b712b8d9
......@@ -26,7 +26,7 @@
>查询</span>
<span @click="Export" style="margin-left:20px" class="addSpan">导出</span>
<span @click="LYExport" style="margin-left:20px" class="addSpan">领用导出</span>
<span @click="goCode" style="margin-left:20px" class="addSpan">二维码打印</span>
</div>
<div class="padContent">
......@@ -255,6 +255,16 @@ export default {
this.getPropertyStatus();
},
methods: {
goCode(){
let msg=JSON.stringify(this.msg)
this.$router.push({
path: "/codePrint",
query: {
msg: msg
}
});
},
LYExport(){
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
......
<template>
<div class="codePrint">
<div class="codeContent">
<ul class="codeUl">
<li v-for="(item,index) in tableData" :key="index">
<div>
<img v-if="item.QRCode && item.QRCode!=''" :src="`${baseUrl}${item.QRCode}`" alt="">
<img v-else style="width:99px;heigth:99px" src="../../assets/img/noimg.png" alt="">
</div>
<p style="position:relative;top:-10px"><span @click="getCheckDes(item)" class="underline">{{ item.PropertyNum }}</span></p>
</li>
</ul>
</div>
<el-dialog top="0" title="资产详情" :visible.sync="CheckDetailState" width="1150px">
<CheckDetails ref="mychild"></CheckDetails>
</el-dialog>
</div>
</template>
<script>
import CheckDetails from "@/components/global/CheckDetails.vue";
export default {
name: "assetsList",
components: {
CheckDetails
},
data() {
return {
baseUrl:'http://property.oytour.com',
CheckDetailState: false,
currentPage: 1,
tableData: [],
loading: false,
total: 0,
msg: {
Name: "",
PropertyNum: "",
SerialNumber: "",
CategoryId: "",
PropertyStatus: "",
EmployeeId: "",
SupplierId: "",
StartTime: "",
EndTime: ""
},
PropertyId:'',
};
},
mounted() {
if(this.$route.query.msg){
this.msg=JSON.parse(this.$route.query.msg);
}
this.getList();
},
methods: {
getCheckDes(item){
this.PropertyId=item.Id;
this.CheckDetailState=true;
setTimeout(()=>{
this.$refs.mychild.InitData(this.PropertyId);
},10)
},
getList() {
delete this.msg.pageIndex;
delete this.msg.pageSize;
this.loading = true;
this.apiJavaPost(
"/api/property/GetPropertyQRCodeList",
this.msg,
res => {
this.loading = false;
console.log("res",res);
if (res.data.resultCode === 1) {
this.tableData = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
}
};
</script>
<style>
.codePrint{
margin: 0;
padding: 0;
width: 100%;
display: flex;
flex-direction: column;
height: 100%;
margin-top:10px;
box-sizing: border-box;
page-break-after: always;
position: absolute;
}
.codeUl{
width: 100%;
box-sizing: border-box;
page-break-after: always;
}
.codeUl li{
display: inline-block;
width: 200px;
text-align: center;
font-size: 12px;
}
.codeContent{
width: 1000px;
margin: 0 auto;
border: 1px solid #333333;
padding:0!important;
}
</style>
......@@ -277,5 +277,11 @@ export default {
]
},
// 二维码打印
{
path: '/codePrint',
name: 'codePrint',
component: resolve => require(['@/components/report/codePrint'], resolve),
},
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment