|
|
@@ -1,14 +1,16 @@
|
|
|
<template>
|
|
|
<div class="bg">
|
|
|
+ <!-- 列表页面打印入库单 -->
|
|
|
<el-dialog
|
|
|
width="26cm"
|
|
|
height="12cm"
|
|
|
:modal-append-to-body="false"
|
|
|
title="采购入库单"
|
|
|
:visible.sync="scanVisible"
|
|
|
+ id="pageid"
|
|
|
>
|
|
|
<!-- 表单是否显示 -->
|
|
|
- <div style="height: 500px; width: 95%; margin: 0 auto">
|
|
|
+ <div style="height: 500px; width: 95%; margin: 0 auto" >
|
|
|
<div ref="qrcode" id="box">
|
|
|
<vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
|
|
|
<div
|
|
|
@@ -17,35 +19,34 @@
|
|
|
style="margin-bottom: 30px"
|
|
|
>
|
|
|
<div style="page-break-after: always">
|
|
|
- <div class="word-title">
|
|
|
- <h4>采购入库单</h4>
|
|
|
- </div>
|
|
|
- <div class="tagBox">
|
|
|
- <div>
|
|
|
- <div style="font-size: 10px">
|
|
|
- 申购部门:<span style="margin-left: 10px">{{
|
|
|
- item1.shen_gou_bu_men_|bumenfilters(bumenList)
|
|
|
- }}</span>
|
|
|
- </div>
|
|
|
- <div style="font-size: 10px">
|
|
|
- 供应商:<span style="margin-left: 10px">{{
|
|
|
- item1.gong_ying_shang_
|
|
|
- | gongyingshang(gongyingshangList)
|
|
|
- }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div style="margin-left: 20px;margin-right: 5px;font-size: 10px; ">
|
|
|
- 采购订单编号:<span style="margin-left: 10px;">{{item1.cai_gou_ding_dan_}}</span>
|
|
|
- </div>
|
|
|
- <div style="margin-left: 20px; margin-right: 5px; font-size: 10px; ">
|
|
|
- 日期 :<span style="margin-left: 10px">{{item1.dao_huo_ri_qi_}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<div>
|
|
|
- <table :border="1">
|
|
|
+ <table :border="1">
|
|
|
<thead>
|
|
|
+ <tr class="title">
|
|
|
+ <th colspan="15">
|
|
|
+ <div class="word-title" style="background:#fff;">
|
|
|
+ <h4>采购入库单1</h4>
|
|
|
+ </div>
|
|
|
+ <div class="tagBox">
|
|
|
+ <div>
|
|
|
+ <div style="font-size: 10px;text-align: left;">申购部门:
|
|
|
+ <span style="margin-left: 10px">{{item1.shen_gou_bu_men_|bumenfilters(bumenList)}}</span>
|
|
|
+ </div>
|
|
|
+ <div style="font-size: 10px">供应商:
|
|
|
+ <span style="margin-left: 10px">{{item1.gong_ying_shang_| gongyingshang(gongyingshangList)}}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: left;">
|
|
|
+ <div style="font-size: 10px; ">采购订单编号:
|
|
|
+ <span >{{item1.cai_gou_ding_dan_}}</span>
|
|
|
+ </div>
|
|
|
+ <div style="font-size: 10px; ">日期 :
|
|
|
+ <span >{{item1.dao_huo_ri_qi_}}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<th style="width: 40px">序号</th>
|
|
|
<th style="font-weight: normal">物料编码</th>
|
|
|
@@ -68,16 +69,14 @@
|
|
|
<tr v-for="(item, index) in item1" :key="index">
|
|
|
<td style="width: 30px">{{ index + 1 }}</td>
|
|
|
<td style="width: 70px">{{ item.wu_liao_bian_ma_ }}</td>
|
|
|
- <td style="width: 120px">
|
|
|
- {{ item.wu_liao_ming_chen }}
|
|
|
- </td>
|
|
|
+ <td style="width: 120px">{{ item.wu_liao_ming_chen }}</td>
|
|
|
<td style="width: 60px">{{ item.huo_hao_ }}</td>
|
|
|
<td style="width: 60px">{{ item.pi_hao_ }}</td>
|
|
|
<td style="width: 80px">{{ item.gui_ge_xing_hao_ }}</td>
|
|
|
<td style="width: 120px"> {{ item.gong_ying_shang_| gongyingshang(gongyingshangList) }} </td>
|
|
|
<td style="width: 45px">{{ item.shu_liang_ }}</td>
|
|
|
<td style="width: 45px">{{ item.dan_wei_ }}</td>
|
|
|
- <td style="width: 60px">{{ item.dan_jia_han_shui_ }}</td>
|
|
|
+ <td style="width: 60px">{{ item.dan_jia_han_shui_ |numToFixed}}</td>
|
|
|
<td style="width: 45px">{{ item.shui_lv_ }}</td>
|
|
|
<td style="width: 45px">{{ item.dan_jia_|numToFixed}}</td>
|
|
|
<td style="width: 45px"> {{ item.dan_jia_han_shui_|shuieToFixed(item.shu_liang_,item.dan_jia_) }}</td>
|
|
|
@@ -102,19 +101,21 @@
|
|
|
<td style="width: 60px">{{ item1|addhshjToFixed }}</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
+ <tfoot class="bottom">
|
|
|
+ <tr>
|
|
|
+ <td colspan="6" style="text-align:left">
|
|
|
+ <div style="margin-top:10px">仓管员:{{ item1.name2 }}</div>
|
|
|
+ </td>
|
|
|
+ <!-- <td colspan="1" class="footer-row">
|
|
|
+ <div style="margin-top:10px" ref="innerRef">{{index1}}</div>
|
|
|
+ </td> -->
|
|
|
+ <td colspan="9" style="text-align:right">
|
|
|
+ <div style="margin-top:10px">审核人:{{ item1.name3 }} </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tfoot>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <div class="bottom">
|
|
|
- <div>仓管员:{{ item1.name2 }}
|
|
|
- <!-- /{{ item1.time2 }} -->
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- 审核人:{{ item1.name3 }}
|
|
|
- <!-- /{{
|
|
|
- item1.time3
|
|
|
- }} -->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</vue-easy-print>
|
|
|
@@ -238,7 +239,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
watch: {
|
|
|
obj() {
|
|
|
this.getInit();
|
|
|
@@ -272,12 +272,11 @@ export default {
|
|
|
return a.toFixed("2") * 1 + b.toFixed("2") * 1;
|
|
|
},
|
|
|
getInit() {
|
|
|
-
|
|
|
- console.log(this.obj)
|
|
|
var idStr = "";
|
|
|
this.obj.forEach((item) => {idStr += item + ",";});
|
|
|
idStr = idStr.substring(0, idStr.length - 1);
|
|
|
this.getLook(idStr);
|
|
|
+
|
|
|
},
|
|
|
getLook(id) {
|
|
|
this.list = [];
|
|
|
@@ -290,23 +289,19 @@ export default {
|
|
|
let addjine = 0;
|
|
|
let addshuie = 0;
|
|
|
repostCurd("sql", sql).then((res) => {
|
|
|
-
|
|
|
zhubiao = res.variables.data;
|
|
|
zhubiao.forEach((item) => {
|
|
|
let sql1 = `select * FROM t_cgysjlb WHERE FIND_IN_SET(wai_jian_,'${item.id_}')`;
|
|
|
repostCurd("sql", sql1).then((res) => {
|
|
|
-
|
|
|
let data = res.variables.data;
|
|
|
let s2 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y-%m-%d') AS CREATE_TIME_ FROM ibps_party_employee as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT PROC_INST_ID_ FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_04lhxla' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
|
|
|
repostCurd("sql", s2).then((res) => {
|
|
|
-
|
|
|
name2 = res.variables.data[0].NAME_;
|
|
|
time2 = res.variables.data[0].CREATE_TIME_;
|
|
|
data["name2"] = name2;
|
|
|
data["time2"] = time2;
|
|
|
let s3 = `select a.NAME_,DATE_FORMAT(b.CREATE_TIME_,'%Y-%m-%d') AS CREATE_TIME_ FROM ibps_party_employee as a join ibps_bpm_oper_log as b on a.ID_ = b.CREATE_BY_ where b.PROC_INST_ID_ = ( SELECT PROC_INST_ID_ FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${item.id_}' LIMIT 1) AND b.NODE_ID_ = 'Activity_1dk76gy' ORDER BY b.CREATE_TIME_ DESC LIMIT 1`;
|
|
|
repostCurd("sql", s3).then((res) => {
|
|
|
-
|
|
|
name3 = res.variables.data[0].NAME_;
|
|
|
time3 = res.variables.data[0].CREATE_TIME_;
|
|
|
data["name3"] = name3;
|
|
|
@@ -335,24 +330,69 @@ export default {
|
|
|
addhanshuiheji = 0;
|
|
|
addjine = 0;
|
|
|
addshuie = 0;
|
|
|
- console.log(this_.list);
|
|
|
+ // this_.getPage();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
},
|
|
|
+ // getPage(){
|
|
|
+ // let bodyEle = document.getElementById("pageid");
|
|
|
+ // console.log(bodyEle)
|
|
|
+ // //获取页面总长度
|
|
|
+ // let bodyHeight = bodyEle.clientHeight;
|
|
|
+ // //获取页数 1026:单页A4纸总高度(不同得浏览器打印高度不一致,根据自己需求调整)
|
|
|
+ // console.log(bodyHeight,"高度")
|
|
|
+ // let count = (bodyHeight / 500) + 1;
|
|
|
+ // //动态添加页码 通过绝对定位
|
|
|
+ // for (let i = 0; i < count; i++) {
|
|
|
+ // var topValue = Number(500 * (i + 1)) + Number(20 * i);
|
|
|
+ // let foot = '<div class="pagerFooter" style="top:' + 200 + 'px;">' + '第' + (i + 1) + '页' + '<div>';
|
|
|
+ // this.$refs.innerRef[i].innerHTML = i+1
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+@page {
|
|
|
+ size: auto; /* auto is the initial value */
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+</style>
|
|
|
<style lang="scss" scoped>
|
|
|
+
|
|
|
+
|
|
|
+// @page :first {
|
|
|
+// color: green;
|
|
|
+
|
|
|
+// @top-left {
|
|
|
+// content: "foo" !important;
|
|
|
+// color: blue;
|
|
|
+// }
|
|
|
+// @top-right {
|
|
|
+// content: "bar";
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
.bottom {
|
|
|
margin-top: 15px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- font-size: 10px;
|
|
|
+ border-bottom: 1px solid #fff;
|
|
|
+ border-left: 1px solid #fff;
|
|
|
+ border-right: 1px solid #fff;
|
|
|
+}
|
|
|
+.title{
|
|
|
+ border-top: 1px solid #fff;
|
|
|
+ border-left: 1px solid #fff;
|
|
|
+ border-right: 1px solid #fff;
|
|
|
}
|
|
|
.word-title {
|
|
|
display: flex;
|