组桶打印

This commit is contained in:
2026-02-05 14:15:44 +08:00
parent 5905ee63df
commit 0af6c1e3c9
8 changed files with 1012 additions and 36 deletions

View File

@@ -52,7 +52,7 @@
<span class="filter_label filter_input_disabled">供应商编码</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="materialData.supp_name" class="filter_input filter_input_disabled" disabled>
<input type="text" v-model="materialData.supp_code" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row border-bottom">
@@ -103,8 +103,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getDate} from '@/utils/utils.js'
const currentDate = getDate({format: true})
import {queryRecordNo, byBagCodeInfo, confirmBagAssembly} from '@/utils/getData3.js'
import {queryRecordNo, byBagCodeInfo, confirmBagAssembly, printBag} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -115,7 +114,6 @@
title: '',
val1: '',
recordNo: '',
date: currentDate,
materialData: {},
num: '',
unit: 'KG',
@@ -202,21 +200,32 @@
// // console.log('error')
// }
// },
labelPrint () {
async labelPrint () {
this.disabled1 = true
if (!this.val1 || JSON.stringify(this.materialData) === '{}') {
this.disabled1 = false
return
}
let row = Object.assign({}, this.materialData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bag_code: this.val1})
const class_code = row.class_code
if (class_code === 'YL001' || class_code === 'FL001' || class_code === 'NBC001') {
// 原料、辅料、内包材
this.printOne(row)
} else {
this.printTwo(row)
try {
let res = await printBag(row, this.$store.getters.printUrl)
if (res) {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
const class_code = row.class_code
if (class_code === 'YL001' || class_code === 'FL001' || class_code === 'NBC001') {
// 原料、辅料、内包材
this.printOne(row)
} else {
this.printTwo(row)
}
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
// this.toPrint(row)
},
printOne (row) {
let iparr = this.$store.getters.printUrl.split(":")
@@ -386,6 +395,7 @@
title: '操作成功',
icon: 'none'
})
this.toEmpty()
this.disabled1 = false
}
}