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

1

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