Commit 6dcc2273 authored by youjie's avatar youjie

批量打印

parent f2c0687c
<style scoped>
._PrintPage{
width: 100%;
background-color: white;
position: absolute;
padding-top: 20px;
}
._PrintPage_box{
width: 1000px;
margin: 0 auto;
padding: 0 !important;
}
._border_1{
border: 1px solid #333333;
margin-bottom:30px;
/* page-break-after: always; */
}
/* @media print {
._PrintPage{
margin-left:-145px;
}
} */
._PrintPage_always{
page-break-after: always;
padding-top: 2px;
height: 1550px;
}
</style>
<template v-loading="loading">
<div class="_PrintPage">
<div class="_PrintPage_box">
<div v-for="(items,index) in printDatas" class="_PrintPage_always">
<template v-if="items.type=='2'&&(items.Merge=='0'||items.Merge===null)">
<template v-for="(item,index) in loopNumT">
<div v-if="index+1==2"
:class="{'_border_1':index+1==2}">
<my-Bill :ID="items.id" :width="widthSon" :isPrintPage="true" :color="colorSon" :OrderSource="OrderSource" :name='index+1'></my-Bill>
</div>
</template>
</template>
<template v-else-if="items.type=='1'&&(items.Merge=='0'||items.Merge===null)">
<template v-for="(item,index) in loopNumN">
<div v-if="index+1==2" class="_border_1">
<my-RVB-Bill v-on:helloPP="numAdd" :Num="num" :ID="items.id" :width="widthSon" :isPrintPage="true" :OrderSource="OrderSource" :color="colorSon" :name='index+1'></my-RVB-Bill>
</div>
</template>
</template>
<template v-if="items.type==='7'&&(items.Merge=='0'||items.Merge===null)">
<template v-for="(item,index) in loopNumT">
<div v-if="index+1==2" class="_border_1">
<my-GZ-Bill :ID="items.id" :width="widthSon" :isPrintPage="true" :color="colorSon" :OrderSource="OrderSource" :name='index+1'></my-GZ-Bill>
</div>
</template>
</template>
<!-- 收据3 -->
<template v-if="items.type=='3'">
<template v-for="(item,index) in loopNumT">
<div v-if="index+1==2" class="_border_1">
<my-SJ-Bill :ID="items.id" :width="widthSon" :isPrintPage="true" :color="colorSon" :OrderSource="OrderSource" :name='index+1'></my-SJ-Bill>
</div>
</template>
</template>
<template v-if="items.Merge=='1'">
<template v-for="(item,index) in loopNumN">
<div v-if="index+1==2" class="_border_1">
<my-HB-Bill v-on:helloPP="numAdd" :Num="num" :ID="items.id" :width="widthSon" :isPrintPage="true" :color="colorSon" :name='index+1'></my-HB-Bill>
</div>
</template>
</template>
</div>
</div>
</div>
</template>
<script>
import myBill from "../components/BillModule.vue";
import myrbvBill from "../components/ReceivablesModule.vue";
import myhrBill from "../components/MergeBillModule.vue";
import myGZBill from "../components/GZBillModule.vue";
import mySJBill from "../components/SJBillModule.vue";
export default {
data(){
return{
loading:true,
id:null,
type:null,
isKehu:null,
widthSon:"100%",
colorSon:"#ffffff",
num:0,
loopNumN:this.$route.query.isKehu=='1'?3:2,
loopNumT:2,
Merge:null,
OrderSource:-1,
printDatas:[]
}
},components:{
'my-Bill': myBill,
'my-RVB-Bill':myrbvBill,
'my-HB-Bill':myhrBill,
'my-GZ-Bill': myGZBill,
'my-SJ-Bill': mySJBill,
},methods:{
numAdd(){
this.num = this.num + 1
}
},mounted(){
},created(){
this.printDatas = JSON.parse(this.$route.query.list)
// this.id = this.$route.query.id;
// this.type = this.$route.query.type;
// this.isKehu = this.$route.query.isKehu;
// this.Merge = this.$route.query.Merge;
// this.OrderSource = this.$route.query.OrderSource;
}
}
</script>
......@@ -715,6 +715,12 @@ tr._item_list td:last-child {
>
转交
</button>
<template v-if="msg.Conditon == 1 || (isBatchPrinting&&msg.Conditon == 3)">
<button class="hollowFixedBtn" v-if="!BOSSBtn3" @click="BOSSBtn3 = true">一键打印</button>
<button v-else class="hollowFixedBtn"
@click="BOSSBtn3 = !BOSSBtn3,checkObjList = [],checkList=[],isCkedAll=false">关闭一键打印</button>
<button class="hollowFixedBtn" v-if="BOSSBtn3" @click="BOSSBtnClick(3)">打印</button>
</template>
</li>
</ul>
<div class="Myquery-box">
......@@ -1154,7 +1160,7 @@ tr._item_list td:last-child {
style="margin-bottom:30px;"
>
<tr class="_t_head">
<th v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2">
<th v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2|| BOSSBtn3">
<input type="checkbox" v-model="isCkedAll" @click="checkedAll()" />
</th>
......@@ -1174,7 +1180,7 @@ tr._item_list td:last-child {
<th width="150">{{ $t("system.table_operation") }}</th>
</tr>
<tr class="_item_list" v-for="(item, index) in DataList">
<td v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2">
<td v-if="hbState || checkboxShow || BOSSBtn || BOSSBtn2|| BOSSBtn3">
<input
type="checkbox"
:value="item.FrID"
......@@ -2232,7 +2238,12 @@ export default {
ClientType:'',
ClientID:''
},
PaymentSync: false
PaymentSync: false,
isBatchPrinting: false,
BOSSBtn3: false,
multipleSelection: [],
checkAllObjList: [],
checkObjList: [],
};
},
created() {
......@@ -2300,6 +2311,44 @@ export default {
this.AccountType_post_GetList();
},
methods: {
getMultiple(){
this.multipleSelection = []
// this.checkList = []
let type1 = {
type: null,
id: null,
isKehu: 0,
Merge: null,
OrderSource: null
}
let type2 = {
type: null,
id: null,
Merge: null,
OrderSource: null
}
this.checkObjList.forEach(x => {
// this.checkList.push(x.FrID)
if (x.Type == 1) {
type1 = {
type: String(x.Type),
id: x.FrID,
isKehu: 0,
Merge: x.Is_Merge,
OrderSource: x.OrderSource ? x.OrderSource : -1
}
this.multipleSelection.push(JSON.parse(JSON.stringify(type1)))
} else {
type2 = {
type: String(x.Type),
id: x.FrID,
Merge: x.Is_Merge,
OrderSource: x.OrderSource ? x.OrderSource : -1
}
this.multipleSelection.push(JSON.parse(JSON.stringify(type2)))
}
})
},
GetAuth() {
// var actionCode = 'F_Advance_Match';
// this.CheckUserAuth(actionCode, res => {
......@@ -2505,6 +2554,16 @@ export default {
} else {
if (t === 2) {
this.zhuanBox = true;
}else if (t === 3) {
this.getMultiple()
console.log(this.multipleSelection,'---')
let routeData = this.$router.resolve({
path: '/financial/financalDocument/BatchPrintPage',
query: {
list: JSON.stringify(this.multipleSelection),
}
});
window.open(routeData.href, "_blank");
} else {
this.BOSSDialog = true;
}
......@@ -2677,10 +2736,14 @@ export default {
//全选
if (this.isCkedAll == true) {
this.checkList = [];
this.checkObjList = []
} else {
this.checkAllList.forEach(item => {
this.checkList.push(item);
});
this.checkAllObjList.forEach(item => {
this.checkObjList.push(item);
});
}
},
AccountType_post_GetList() {
......@@ -2799,6 +2862,7 @@ export default {
} else {
data.forEach(x => {
x.modelShow = false;
this.checkAllObjList.push(x)
this.checkAllList.push(x.FrID);
if (x.TCIDList.length > 0) {
if (x.OrderSource == 17) {
......
......@@ -665,7 +665,10 @@
<!-- <button class="hollowFixedBtn" @click="resetPageIndex(),getPageList()">{{$t('pub.searchBtn')}}</button> -->
<q-btn color="primary" size="11px" :label="$t('pub.searchBtn')" @click="resetPageIndex(),getPageList()" style="marginRight:10px" />
<!-- <button class="normalBtn" @click="method5()">导出</button> -->
<q-btn color="primary" size="11px" label="导出" @click="method5()" />
<q-btn color="primary" size="11px" label="导出" @click="method5()" style="marginRight:10px"/>
<q-btn v-if="isBatchPrinting"
color="primary" size="11px"
@click="goPrinting()">批量打印</q-btn>
</li>
</ul>
</div>
......@@ -675,7 +678,14 @@
<!-- multiple-sort>-->
<!-- &lt;!&ndash; 多个排序 &ndash;&gt;-->
<!-- </v-table>-->
<el-table :data="DataList" border style="width: 100%;font-size: 12px">
<el-table :data="DataList" border style="width: 100%;font-size: 12px"
@selection-change="handleSelectionChange"
row-key="FrID">
<el-table-column v-if="isBatchPrinting"
:reserve-selection="true"
type="selection"
width="55">
</el-table-column>
<el-table-column prop="FrID" label="单号" width="100">
<template slot-scope='scope'>
<el-popover popper-class="detailsIT_Journal" placement="bottom-start" trigger="click">
......@@ -1159,6 +1169,9 @@ import treeItemVue from 'src/components/common/tree-table/tree-item.vue';
getInvoiceList:[],
costmode:false,//费用类型的修改弹窗
trabeList:[],//修改费用类型的下啦数据
isBatchPrinting: false,
loadingDC: false,
multipleSelection: []
}
},
created() {
......@@ -1221,6 +1234,12 @@ import treeItemVue from 'src/components/common/tree-table/tree-item.vue';
},
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuList = userInfo.ActionMenuList;
for(let i=0;i<ActionMenuList.length;i++){
if(ActionMenuList[i].FunctionCode.indexOf("isBatchPrinting") != -1){
this.isBatchPrinting = true
}
}
this.getCompanyMsg.RB_Group_Id = this.employeeMsg.GroupId = this.getDepartmentMsg.RB_Group_Id = userInfo
.RB_Group_id; //集团ID
this.DepartIDs = userInfo.RB_Department_Id;
......@@ -1250,6 +1269,56 @@ import treeItemVue from 'src/components/common/tree-table/tree-item.vue';
},
methods: {
handleSelectionChange(val){
this.multipleSelection = []
let type1 = {
type: null,
id: null,
isKehu: 0,
Merge: null,
OrderSource: null
}
let type2 = {
type: null,
id: null,
Merge: null,
OrderSource: null
}
val.forEach(x=>{
if(x.Type==1){
type1 = {
type: String(x.Type),
id: x.FrID,
isKehu: 0,
Merge: x.Is_Merge,
OrderSource: x.OrderSource?x.OrderSource:-1
}
this.multipleSelection.push(JSON.parse(JSON.stringify(type1)))
}else{
type2 = {
type: String(x.Type),
id: x.FrID,
Merge: x.Is_Merge,
OrderSource: x.OrderSource?x.OrderSource:-1
}
this.multipleSelection.push(JSON.parse(JSON.stringify(type2)))
}
})
},
goPrinting(){
if(this.multipleSelection.length==0) return this.$message({
type: 'info',
message: this.$message.error(this.$t("rule.qxzygxytjddanju")),
});
// GetDetail.Type,GetDetail.FrID,GetDetail.Is_Merge,OrderSource
let routeData = this.$router.resolve({
path: '/financial/financalDocument/BatchPrintPage',
query: {
list: JSON.stringify(this.multipleSelection),
}
});
window.open(routeData.href, "_blank");
},
get_GetInvoiceTypeEnumList(){
this.apipost('Financial_get_GetInvoiceTypeEnumList', {}, res => {
......
......@@ -2123,7 +2123,11 @@ const routes = [{
component: () =>
import("pages/financial/financalDocument/PrintPageN.vue")
},
{
path: "/financial/financalDocument/BatchPrintPage", //财务批量打印
component: () =>
import("pages/financial/financalDocument/BatchPrintPage.vue")
},
{
......
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