客户
This commit is contained in:
@@ -143,7 +143,7 @@
|
||||
getDataList () {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/tickets/contract/list'),
|
||||
url: this.$http.adornUrl('/flow/contract/list'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.pageIndex,
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
<p class="tip_p">一、产品明细单</p>
|
||||
<table class="det_table">
|
||||
<tr>
|
||||
<th width="50px">物料编号</th>
|
||||
<th width="50px">物料名称</th>
|
||||
<th width="50px">型号</th>
|
||||
<th width="50px">数量</th>
|
||||
<th width="50px">单位</th>
|
||||
<th width="50px">单价(元)</th>
|
||||
<th width="50px">总价(元)</th>
|
||||
<th width="50px">备注</th>
|
||||
<th width="20%">物料编号</th>
|
||||
<th width="20%">物料名称</th>
|
||||
<th width="10%">型号</th>
|
||||
<th width="10%">数量</th>
|
||||
<th width="10%">单位</th>
|
||||
<th width="10%">单价(元)</th>
|
||||
<th width="10%">总价(元)</th>
|
||||
<th width="10%">备注</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{ e.materialCode }}</td>
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataList: [{materialCode: 'S9410002000002'}]
|
||||
dataList: [{materialCode: 'S9410002000002'}, {materialCode: 'S9410002000003'}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -99,15 +99,9 @@ export default {
|
||||
// 打印
|
||||
addAndPrint () {
|
||||
const LODOP = getLodop()
|
||||
LODOP.PRINT_INIT("打印合同模板")
|
||||
// 设置纸张大小为 A4
|
||||
LODOP.PRINT_INITA("0mm", "0mm", "210mm", "297mm", "打印合同模板")
|
||||
LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4")
|
||||
LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW", 1)
|
||||
LODOP.SET_SHOW_MODE("SETUP_ENABLES", "11111111100001")
|
||||
LODOP.ADD_PRINT_SETUP_BKIMG("./bg.jpg")
|
||||
LODOP.ADD_PRINT_TEXT(0, 0, 700, 50, "产品供应合同")
|
||||
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2); // 2 表示水平居中
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12); // 设置字号为 12
|
||||
// 获取弹窗内容并转换为 HTML 字符串
|
||||
const popupContent = document.getElementById('popupContent').innerHTML
|
||||
const printHtml = `
|
||||
@@ -116,12 +110,12 @@ export default {
|
||||
.zd-col-12 {width: 50%;}
|
||||
.dialog_content {width: 100%;}
|
||||
.det_table {width: 100%; border-collapse: collapse;border: 1px solid #000;}
|
||||
.det_table th, .det_table td {border: 1px solid #000;font-size: 10px; line-height: 23px;}
|
||||
.det_table th, .det_table td {border: 1px solid #000;font-size: 10px; line-height: 23px; padding: 0;}
|
||||
</style>
|
||||
${popupContent}
|
||||
`
|
||||
// 添加弹窗内容到打印任务
|
||||
LODOP.ADD_PRINT_HTM(50, 50, "100%", "100%", printHtml)
|
||||
LODOP.ADD_PRINT_HTM("0mm", "0mm", "RightMargin:0mm", "BottomMargin:0mm", printHtml)
|
||||
LODOP.PREVIEW()// 预览
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user