组桶打印
This commit is contained in:
@@ -87,8 +87,7 @@
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {getDate} from '@/utils/utils.js'
|
||||
const currentDate = getDate({format: true})
|
||||
import {queryRecordNoBucked, confirmBucketAssembly} from '@/utils/getData3.js'
|
||||
import {queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -100,7 +99,6 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
recordNo: '',
|
||||
date: currentDate,
|
||||
materialData: {},
|
||||
weight: '',
|
||||
num: null,
|
||||
@@ -163,7 +161,6 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
@@ -179,14 +176,26 @@
|
||||
// // console.log('error')
|
||||
// }
|
||||
// },
|
||||
labelPrint () {
|
||||
async labelPrint () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
let data = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bucket_code: this.val1, bucket_weight: this.weight})
|
||||
this.toPrint(data)
|
||||
let row = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bucket_code: this.val1, bucket_weight: this.weight})
|
||||
try {
|
||||
let res = await printBucked(row, this.$store.getters.printUrl)
|
||||
if (res) {
|
||||
// uni.showToast({
|
||||
// title: res.message,
|
||||
// icon: 'none'
|
||||
// })
|
||||
this.toPrint(row)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toPrint (row) {
|
||||
let iparr = this.$store.getters.printUrl.split(":")
|
||||
@@ -268,6 +277,7 @@
|
||||
title: '操作成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.toEmpty()
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user