|
@@ -48,33 +48,14 @@
|
|
|
<a-button id="replenishmentManagement-printSticker-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
|
|
|
</div>
|
|
|
</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-modal>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+import moment from 'moment'
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
-import { getLodop } from '@/libs/LodopFuncs'
|
|
|
+import { JGPrintTag } from '@/libs/JGPrint'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { shelfReplenishDetailList, shelfReplenishDetail, shelfReplenishPrintSign } from '@/api/shelfReplenish'
|
|
|
export default {
|
|
@@ -131,21 +112,11 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
modalTit () {
|
|
|
- const hjName = this.nowData && this.nowData.shelfName ? this.nowData.shelfName : ''
|
|
|
+ const hjName = this.nowData && this.nowData.shelfInfo.shelfName ? this.nowData.shelfInfo.shelfName : ''
|
|
|
return '补货单打印贴签——' + hjName
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- printTest () {
|
|
|
- const 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
|
|
|
- })
|
|
|
- },
|
|
|
// 表格选中项
|
|
|
rowSelectionFun (obj) {
|
|
|
this.rowSelectionInfo = obj || null
|
|
@@ -154,16 +125,42 @@ export default {
|
|
|
handleSave () {
|
|
|
if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length < 1)) {
|
|
|
this.$message.warning('请至少选择一个产品')
|
|
|
- return
|
|
|
- }
|
|
|
- this.spinning = true
|
|
|
- shelfReplenishPrintSign({ replenishBillSn: this.nowData && this.nowData.replenishBillSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.$emit('ok')
|
|
|
- this.isShow = false
|
|
|
+ } else {
|
|
|
+ // const 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 nowData = this.nowData
|
|
|
+ const list = this.rowSelectionInfo.selectedRows
|
|
|
+ let htmlStr = ''
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ htmlStr = htmlStr + '<div class="print-pages" style="font-size: 9px;padding:3pt 0 3pt 6pt;">'
|
|
|
+ htmlStr = htmlStr + '<div class="storeName" style="text-align: center;font-weight: bold;margin: 2pt 0;">' + nowData.outStockPersonName + '</div>'
|
|
|
+ htmlStr = htmlStr + '<div style="overflow: hidden;display: flex;justify-content: space-between;">'
|
|
|
+ htmlStr = htmlStr + '<div style="padding-right: 3pt;">'
|
|
|
+ htmlStr = htmlStr + '<div class="shelfName" style="margin-bottom: 2pt;">'
|
|
|
+ htmlStr = htmlStr + nowData.shelfInfo.shelfName
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ htmlStr = htmlStr + '<div class="productCode" style="font-weight: bold;">' + list[i].productCode + '</div>'
|
|
|
+ htmlStr = htmlStr + '<div class="productName">' + list[i].product.name + '</div>'
|
|
|
+ htmlStr = htmlStr + '<div class="userName" style="margin-top: 2pt;font-size: 8px;">'
|
|
|
+ htmlStr = htmlStr + '<span style="margin: 0 5pt 0 0;">' + moment().format('YYYY-MM-DD HH:mm') + '</span>'
|
|
|
+ htmlStr = htmlStr + '<span>王明</span>'
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ htmlStr = htmlStr + '<div>'
|
|
|
+ htmlStr = htmlStr + '<div class="productSno" style="font-size: 16pt;text-align: center;">A08</div>'
|
|
|
+ htmlStr = htmlStr + '<div class="qrcode" ref="qrCodeUrl" style="width: 40px;height: 40px;overflow: hidden;"></div>'
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ htmlStr = htmlStr + '</div>'
|
|
|
+ JGPrintTag(htmlStr, '40mm', '30mm', list[i].printQty)
|
|
|
}
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
+ }
|
|
|
},
|
|
|
// 基本信息
|
|
|
getDetail () {
|