|
@@ -1,3 +1,12 @@
|
|
|
+function getRandomNum(num = 8) {
|
|
|
+ let str = "";
|
|
|
+ for (var i = 0; i < num; i++) {
|
|
|
+ str += parseInt(Math.random() * 10);
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
function receiptDocuments(data, domId) {
|
|
|
let yy = new Date().getFullYear();
|
|
|
let mm = new Date().getMonth() + 1;
|
|
@@ -8,7 +17,7 @@ function receiptDocuments(data, domId) {
|
|
|
if (dd < 10) {
|
|
|
dd = "0" + dd;
|
|
|
}
|
|
|
- let { customerName, productCodeListVOList, noticeNumber, printUser, drawer, salesman } = data;
|
|
|
+ let { customerName, customName, productCodeListVOList, noticeNumber, printUser, drawer, salesman } = data;
|
|
|
|
|
|
let printContent = `<div class="table" style="display: flex;flex-direction: column;align-items: center;width: 1000px;">
|
|
|
<div class="tableName" style="margin: 0 auto;font-size: 30px;font-weight: bold;">
|
|
@@ -17,14 +26,14 @@ function receiptDocuments(data, domId) {
|
|
|
<div class="title" style="width: 100%; padding: 0 10px;position: relative;">
|
|
|
<div style="display: flex;justify-content: space-between;width: 100%;padding: 0 10px;box-sizing: border-box;">
|
|
|
<span>通知单号 ${noticeNumber}</span>
|
|
|
- <span>单号 ${'未知'}</span>
|
|
|
+ <span>单号 ${getRandomNum()}</span>
|
|
|
</div>
|
|
|
<div
|
|
|
style="display: flex;justify-content: space-between;width: 100%; padding: 0 10px;box-sizing: border-box;margin-bottom: 5px;">
|
|
|
<span>客户名称 <span class="name" style="display: inline-block;
|
|
|
width: 300px;
|
|
|
border-bottom: 2px solid black;
|
|
|
- padding-bottom: 3px;">${customerName}</span>
|
|
|
+ padding-bottom: 3px;">${customerName || customName}</span>
|
|
|
</span>
|
|
|
<span>时间 ${yy} 年 ${mm} 月 ${dd} 日</span>
|
|
|
|