|
@@ -30,7 +30,8 @@
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
|
|
|
+ <a-button type="info" @click="printTest">打印</a-button>
|
|
|
+ <a-button type="primary" style="margin-left: 5px" @click="$refs.table.refresh(true)" :disabled="disabled" id="replenishmentManagementList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="replenishmentManagementList-reset">重置</a-button>
|
|
|
<a @click="advanced = !advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -98,10 +99,32 @@
|
|
|
<!-- 签收 -->
|
|
|
<put-warehousing-modal :openModal="openPutWarehousingModal" :nowData="nowData" @ok="handlePutWarehousingOk" @close="handleCancel" />
|
|
|
</a-spin>
|
|
|
+
|
|
|
+ <div id="print">
|
|
|
+ <div class="print-pages" style="font-size: 9px;padding:3pt 0 3pt 6pt;">
|
|
|
+ <div class="storeName" style="text-align: center;font-weight: bold;margin: 2pt 0;">箭冠汽配西安大兴店</div>
|
|
|
+ <div style="overflow: hidden;display: flex;justify-content: space-between;">
|
|
|
+ <div style="padding-right: 3pt;">
|
|
|
+ <div class="shelfName" style="margin-bottom: 2pt;">
|
|
|
+ 西安车领主常青二路数字货架
|
|
|
+ </div>
|
|
|
+ <div class="productCode" style="font-weight: bold;">JA-11070N</div>
|
|
|
+ <div class="productName">箭牌空气滤清器 07款丰田新皇冠2.5 / 3.0</div>
|
|
|
+ <div class="userName" style="margin-top: 2pt;font-size: 8px;"><span style="margin: 0 5pt 0 0;">2021-10-01 15:30</span> <span>王明</span></div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="productSno" style="font-size: 16pt;text-align: center;">A08</div>
|
|
|
+ <div class="qrcode" ref="qrCodeUrl" style="width: 40px;height: 40px;overflow: hidden;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import QRCode from 'qrcodejs2'
|
|
|
+import { getLodop } from '@/libs/LodopFuncs'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
@@ -191,6 +214,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ printTest () {
|
|
|
+ var qrcode = new QRCode(this.$refs.qrCodeUrl, {
|
|
|
+ text: 'dealerSn=1033242&shelfSn=342326735950757888&productCode=RPF2340&shelfPlaceCode=A01&shelfPlaceSn=123213', // 需要转换为二维码的内容
|
|
|
+ width: 40,
|
|
|
+ height: 40,
|
|
|
+ colorDark: '#000000',
|
|
|
+ colorLight: '#ffffff',
|
|
|
+ correctLevel: QRCode.CorrectLevel.H
|
|
|
+ })
|
|
|
+ const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
|
|
|
+ console.log(LODOP, 'LODOP')
|
|
|
+ // LODOP.ADD_PRINT_RECT(0, 0, '40mm', '30mm', 0, 1)
|
|
|
+ LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) // 隐藏底图上有模拟走纸板的条纹线
|
|
|
+ LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
|
|
|
+ LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', document.getElementById('print').innerHTML)
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, '40mm', '30mm')
|
|
|
+ LODOP.PREVIEW()
|
|
|
+ },
|
|
|
// 确认
|
|
|
handleConfirm (row) {
|
|
|
this.nowData = row
|