add:大屏新增打印功能
This commit is contained in:
@@ -314,6 +314,11 @@
|
||||
prop="material_id"
|
||||
label="图纸查看"
|
||||
/>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<button v-if="scope.row.material_id != undefined" class="call-button" @click="doPrint(scope.row)">打印</button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -324,6 +329,9 @@
|
||||
<el-col :span="4">
|
||||
<button class="login_button" @click="toSure">确定</button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<button class="login_button" @click="customPrint">自定义打印</button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-show="type === 'CACHE'" class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
|
||||
@@ -391,6 +399,51 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-show="errorShow" class="modal" style="z-index: 22;" />
|
||||
<!-- 打印确认弹窗-->
|
||||
<div v-show="printShow" class="pop-wraper pop-wraper-1" :class="{'popshow': printShow, 'pophide': !printShow}" style="z-index: 23;">
|
||||
<div class="pop-h1">确认打印内容</div>
|
||||
<div class="filter-items">
|
||||
<div class="info-list" style="color: #F0F3F4">
|
||||
<!-- 订单号 竖向行 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">订单号</div>
|
||||
<div class="info-value">{{printData.order_code}}</div>
|
||||
</div>
|
||||
|
||||
<!-- 物料号 竖向行 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">物料号</div>
|
||||
<div class="info-value">{{printData.material_code}}</div>
|
||||
</div>
|
||||
|
||||
<!-- 数量 竖向行 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">数量</div>
|
||||
<div class="info-value amount">{{printData.material_qty}}</div>
|
||||
</div>
|
||||
|
||||
<!-- 日期 竖向行 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">日期</div>
|
||||
<div class="info-value date">{{printData.create_time}}</div>
|
||||
</div>
|
||||
|
||||
<!-- 人员 竖向行 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">人员</div>
|
||||
<div class="info-value">{{printData.username}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="space-around">
|
||||
<el-col :span="6">
|
||||
<button class="login_button login_button_dis" @click="printShow = false">取消</button>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<button class="login_button" @click="confirmPrint">确认打印</button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -398,6 +451,9 @@
|
||||
import crudProduceScreen from './produceScreen'
|
||||
import {getAgvStatus} from '@/api/agv_alarm'
|
||||
// import crudProduceScreen from './mork'
|
||||
|
||||
const bp = window.BrowserPrint
|
||||
console.log('斑马打印sdk加载',bp)
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -424,7 +480,9 @@ export default {
|
||||
// 异常信息相关属性
|
||||
hasError: false,
|
||||
errorDetails: [],
|
||||
errorShow: false
|
||||
errorShow: false,
|
||||
printShow: false,
|
||||
printData: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -524,6 +582,22 @@ export default {
|
||||
});
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
doPrint(row){
|
||||
console.log(localStorage.getItem('screenData'))
|
||||
|
||||
this.printShow = true
|
||||
this.printData = row
|
||||
this.printData.username = JSON.parse(localStorage.getItem('screenData')).username || ''
|
||||
|
||||
},
|
||||
confirmPrint(){
|
||||
console.log(this.printData)
|
||||
this.printShow = false
|
||||
this.printData = {}
|
||||
},
|
||||
customPrint(){
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
@@ -1024,4 +1098,45 @@ export default {
|
||||
.text-large .search_button {
|
||||
font-size: 16px;
|
||||
}
|
||||
/*确认打印内容样式*/
|
||||
/* 竖向信息列表 - 干净利落 */
|
||||
.info-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* 左侧标签区 - 固定宽度,整洁 */
|
||||
.info-label {
|
||||
min-width: 68px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.3px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* 右侧内容区 - 可换行,竖向自然 */
|
||||
.info-value {
|
||||
flex: 1;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
word-break: break-word;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 针对不同字段轻微风格微调 */
|
||||
.info-value.amount {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.info-value.date {
|
||||
font-family: monospace;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user