Commit 0d8c08dc authored by 黄媛媛's avatar 黄媛媛

1

parent 73c12f02
...@@ -248,13 +248,16 @@ export default { ...@@ -248,13 +248,16 @@ export default {
UserName:'', UserName:'',
UserId:0, UserId:0,
GoodsName:'', GoodsName:'',
DistributionUserId:'',
}, },
platList:[], platList:[],
option:[ option:[
{Id:1,name:'订单号'}, {Id:1,name:'订单号'},
{Id:2,name:'用户名'}, {Id:2,name:'用户名'},
{Id:3,name:'用户ID'}, {Id:3,name:'用户ID'},
{Id:4,name:'商品名称'} {Id:4,name:'商品名称'},
{Id:5,name:'返佣用户id'}
], ],
msgId:1, msgId:1,
ExpressList:[], ExpressList:[],
...@@ -296,24 +299,35 @@ export default { ...@@ -296,24 +299,35 @@ export default {
this.msg.UserName=''; this.msg.UserName='';
this.msg.UserId=''; this.msg.UserId='';
this.msg.GoodsName=''; this.msg.GoodsName='';
this.msg.DistributionUserId = 0
} }
if(val==2){ if(val==2){
this.msg.OrderNo=''; this.msg.OrderNo='';
this.msg.UserName=msgVal; this.msg.UserName=msgVal;
this.msg.UserId=''; this.msg.UserId='';
this.msg.GoodsName=''; this.msg.GoodsName='';
this.msg.DistributionUserId = 0
} }
if(val==3){ if(val==3){
this.msg.OrderNo=''; this.msg.OrderNo='';
this.msg.UserName=''; this.msg.UserName='';
this.msg.UserId=msgVal; this.msg.UserId=msgVal;
this.msg.GoodsName=''; this.msg.GoodsName='';
this.msg.DistributionUserId = 0
} }
if(val==4){ if(val==4){
this.msg.OrderNo=''; this.msg.OrderNo='';
this.msg.UserName=''; this.msg.UserName='';
this.msg.UserId=''; this.msg.UserId='';
this.msg.GoodsName=msgVal; this.msg.GoodsName=msgVal;
this.msg.DistributionUserId = 0
}
if(val==5){
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.DistributionUserId = msgVal
} }
}, },
...@@ -360,6 +374,7 @@ export default { ...@@ -360,6 +374,7 @@ export default {
this.msg.UserName=''; this.msg.UserName='';
this.msg.UserId=0; this.msg.UserId=0;
this.msg.GoodsName=''; this.msg.GoodsName='';
this.msg.DistributionUserId = 0
} }
if(this.dateList && this.dateList.length>0){ if(this.dateList && this.dateList.length>0){
this.msg.StartTime=this.dateList[0]; this.msg.StartTime=this.dateList[0];
......
<style> <style id='style1'>
.printManage .mimitBody { .printManage .mimitBody {
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
height: 360px; height: 360px;
border: 1px solid #000; border: 1px solid #000;
padding: 10px; padding: 10px;
} }
</style> </style>
<template> <template>
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
<span style="color:rgb(64, 158, 255);cursor:pointer;" @click="CommonJump('procurementMaage')">采购管理</span><span <span style="color:rgb(64, 158, 255);cursor:pointer;" @click="CommonJump('procurementMaage')">采购管理</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>打印</span> style="margin:0 9px;color:#C0C4CC">/</span><span>打印</span>
</div> </div>
<el-button type="primary" size="small" @click="batchprint">批量打印</el-button> <el-button type="primary" size="small" @click="batchprint(1)">批量打印</el-button>
</div> </div>
<div class="mimitBody"> <div class="mimitBody">
<div> <div>
...@@ -118,45 +119,47 @@ ...@@ -118,45 +119,47 @@
</el-row> </el-row>
</div> </div>
<div class="xuanzhong" id = 'xuanzhong' > <div class="xuanzhong" id = 'xuanzhong' style="display:none">
<div v-for="(item,index) in checkList" :key="index" class="xuanzhong_item" :id = "item.page" > <!-- <div v-for="(item,index) in checkList" :key="index" class="xuanzhong_item" :id = "item.page" > -->
<div>{{item.GoodsName}}</div> <div v-for="(item,index) in checkList" :key="index" :id = "item.page" style=" width: 283px; height: 283px;padding: 10px;display: flex;flex-direction: column; justify-content: space-around;">
<div> <div style=" width:100%; height:40px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;">
<el-row :gutter="10"> {{item.GoodsName}}
<el-col :span="12"> </div>
<img :src="domainManager().DomainUrl+item.QRImage" alt="" style="width:100%"> <div style=' width:100%; display: flex;flex-direction: row;align-items: center;margin-top:10px'>
</el-col> <img :src="domainManager().DomainUrl+item.QRImage" alt="" style="width:180px;height: 180px">
<el-col :span="12" style='font-size:12px;'> <div style="display: flex;flex-direction: column;font-size:11px;width:150px">
<div style='margin-top:20px'> <div>
<span class="print_item_c_r_s">入库人:</span> <span style=" display: inline-block; width: 62px;">入库人:</span>
<span>{{item.EmName}}</span> <span>{{item.EmName}}</span>
</div> </div>
<div style='margin-top:5px'> <div style='margin-top:3px'>
<span class="print_item_c_r_s">入库时间:</span> <span style=" display: inline-block; width: 62px;">入库时间:</span>
<span>{{item.CreateDate}}</span> <span>{{item.CreateDate}}</span>
</div> </div>
<div style='margin-top:5px'> <div style='margin-top:3px'>
<span class="print_item_c_r_s">仓库名称:</span> <span style=" display: inline-block; width: 62px;">仓库名称:</span>
<span>{{item.WareHouseName}}</span> <span>{{item.WareHouseName}}</span>
</div> </div>
<div style='margin-top:5px'> <div style='margin-top:3px; width:150px; height:30px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;'>
<span class="print_item_c_r_s">商品规格:</span> <span style=" display: inline-block; width: 62px;">商品规格:</span>
<span v-for="(x,y) in item.SpecificationList" :key="y">{{x}} <span v-if="item.SpecificationList.length !== y+1"> , </span></span> <span v-for="(x,y) in item.SpecificationList" :key="y">{{x}} <span v-if="item.SpecificationList.length !== y+1"> , </span></span>
</div> </div>
<div style='margin-top:5px'> <div style='margin-top:3px'>
<span class="print_item_c_r_s">成本价格:</span> <span style=" display: inline-block; width: 62px;">成本价格:</span>
<span>{{item.CostMoney}}</span> <span>{{item.CostMoney}}</span>
</div> </div>
</el-col> </div>
</el-row>
</div> </div>
<div style=" margin:0 auto"> <div style="margin-top:3px">
<img :src="domainManager().DomainUrl+item.TQRImage" alt="" > <div>
</div> <img :src="domainManager().DomainUrl+item.TQRImage" alt="" >
<div style=" text-align: center;"> </div>
<div style=" text-align: center;margin-top:3px">
<span>{{item.TQRCode}}</span> <span>{{item.TQRCode}}</span>
</div>
</div> </div>
</div> </div>
...@@ -166,11 +169,9 @@ ...@@ -166,11 +169,9 @@
</div> </div>
</template> </template>
<script> <script>
import {getJCP} from '../../assets/js/jcp-vue' import { getLodop } from '../../assets/js/LodopFuncs' //导入模块
export default { export default {
components:{
getJCP
},
data() { data() {
return { return {
Detaildata:{}, Detaildata:{},
...@@ -247,16 +248,60 @@ export default { ...@@ -247,16 +248,60 @@ export default {
} }
this.$forceUpdate() this.$forceUpdate()
}, },
batchprint(){//批量打印 batchprint(num){//批量打印
var myDoc = { if(this.checkList.length>0){
documents : document, // 打印页面(div)们在本文档中 // http://www.c-lodop.com/LodopDemo.html 官网地址
copyrights : '杰创软件拥有版权 www.jatools.com' // 版权声明必须  let page = 'page'+num
}; let LODOP = getLodop()//调用getLodop获取LODOP对象
var jcp = getJCP(); LODOP.PRINT_INIT(num)
jcp.printPreview(myDoc, false); var strFormHtml="<body>"+document.getElementById(page).innerHTML+"</body>";
LODOP.ADD_PRINT_HTM(20,15,300,300,strFormHtml);
// LODOP.PREVIEW()//预览打印
LODOP.PRINT()//直接打印打印
if(LODOP.CVERSION){
LODOP.On_Return = function(TaskID, Value){
console.log(TaskID)
console.log(Value)
console.log(123123)
if(Value){
num++;//循环打印
if(this.checkList.length>=num){
setTimeout(()=>{
this.batchprint(num)
},1000)
}
}else{
console.log('错误')
}
}
LODOP.PRINT()
}else{
console.log('进入')
if( LODOP.PRINT()){
num++;//循环打印
if(this.checkList.length>=num){
setTimeout(()=>{
this.batchprint(num)
},1000)
}
}else{
console.log('错误')
}
}
}else{
this.Error('请选择要打印的标签');
} }
}
}, },
mounted() { mounted() {
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="入库" placement="top"> <el-tooltip class="item" effect="dark" content="打印" placement="top">
<img src="../../assets/img/userman/print2.png" alt="" class="temp_imgStyle" @click="goprint(scope.row)" style="width:20px;height:20px" > <img src="../../assets/img/userman/print2.png" alt="" class="temp_imgStyle" @click="goprint(scope.row)" style="width:20px;height:20px" >
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="入库" placement="top" v-if="scope.row.StockInStatus==1 || scope.row.StockInStatus==2 "> <el-tooltip class="item" effect="dark" content="入库" placement="top" v-if="scope.row.StockInStatus==1 || scope.row.StockInStatus==2 ">
......
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