|
@@ -42,34 +42,36 @@
|
|
|
onLoad(options) {
|
|
|
const _this = this
|
|
|
_this.fromPage = options.page
|
|
|
- _this.infoData = options.data ? JSON.parse(options.data) : {}
|
|
|
- console.log(_this.infoData)
|
|
|
+ _this.infoData = options.data ? JSON.parse(options.data) : {},
|
|
|
+ _this.printNum = _this.fromPage == 'smdy' ? _this.infoData.confirmQty : _this.infoData.qty
|
|
|
+ console.log(_this.infoData)
|
|
|
+ var myDate = new Date()
|
|
|
if(_this.fromPage == 'bdtq'){
|
|
|
_this.printInfo = {
|
|
|
- dealerName: '剪冠汽配西安长ab路店123汽配西安长青二路',
|
|
|
+ dealerName: _this.$store.state.vuex_userData.orgName,
|
|
|
shelfName: _this.infoData.shelfName || '',
|
|
|
productCode: _this.infoData.productEntity&&_this.infoData.productEntity.code || '',
|
|
|
productName: _this.infoData.productEntity&&_this.infoData.productEntity.productName || '',
|
|
|
shelfPlaceCode: _this.infoData.shelfPlaceCode || '',
|
|
|
- currentInven: 3,
|
|
|
- printDate: '2021-12-21 15:30',
|
|
|
- printUser: '张三',
|
|
|
- barCode: 'dealerSn=1033242&shelfSn=342326735950757888&productCode=RPF2340&shelfPlaceCode=A01&shelfPlaceSn=123213'
|
|
|
+ currentInven: _this.printNum,
|
|
|
+ printDate: myDate.toLocaleDateString() +' '+myDate.getHours() +':'+myDate.getMinutes() +':'+myDate.getSeconds(),
|
|
|
+ printUser: _this.$store.state.vuex_userData.username,
|
|
|
+ barCode: `dealerSn=${_this.$store.state.vuex_userData.orgSn}&shelfSn=${_this.infoData.shelfSn}&productCode=${_this.infoData.productEntity&&_this.infoData.productEntity.code}&shelfPlaceCode=${_this.infoData.shelfPlaceCode}&shelfPlaceSn=${_this.infoData.shelfPlaceSn}`
|
|
|
}
|
|
|
}else if(_this.fromPage == 'smdy'){
|
|
|
_this.printInfo = {
|
|
|
- dealerName: '剪冠汽配西安长ab路店123汽配西安长青二路',
|
|
|
+ dealerName: _this.$store.state.vuex_userData.orgName,
|
|
|
shelfName: _this.infoData.shelfName || '',
|
|
|
productCode: _this.infoData.productCode || '',
|
|
|
productName: _this.infoData.productName || '',
|
|
|
shelfPlaceCode: _this.infoData.shelfPlaceCode || '',
|
|
|
- currentInven: 3,
|
|
|
- printDate: '2021-12-21 15:30',
|
|
|
- printUser: '张三',
|
|
|
- barCode: 'dealerSn=1033242&shelfSn=342326735950757888&productCode=RPF2340&shelfPlaceCode=A01&shelfPlaceSn=123213'
|
|
|
+ currentInven: _this.printNum,
|
|
|
+ printDate: myDate.toLocaleDateString() +' '+myDate.getHours() +':'+myDate.getMinutes() +':'+myDate.getSeconds(),
|
|
|
+ printUser: _this.$store.state.vuex_userData.username,
|
|
|
+ barCode: `dealerSn=${_this.$store.state.vuex_userData.orgSn}&shelfSn=${_this.infoData.shelfSn}&productSn=${_this.infoData.productSn}&productCode=${_this.infoData.productCode}&shelfPlaceCode=${_this.infoData.shelfPlaceCode}&shelfPlaceSn=${_this.infoData.shelfPlaceSn}&replenishBillDetailSn=${_this.infoData.replenishBillDetailSn}`
|
|
|
}
|
|
|
}
|
|
|
- _this.printNum = _this.fromPage == 'smdy' ? _this.infoData.confirmQty : _this.infoData.qty
|
|
|
+ console.log('printInfo-----------',_this.printInfo)
|
|
|
},
|
|
|
onUnload() {
|
|
|
this.$refs.kkprinter.closeConnect()
|