xuxueyang
2024-09-14 03eca9cdec1d290be4be60d4d9d5038257b93586
updat 合伙人
已修改1个文件
20 ■■■■■ 文件已修改
sub_pages/supplier/print/print-list.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/print/print-list.vue
@@ -186,6 +186,7 @@
                    //     ...data
                    // }
                    this.items = data || []
                    console.log('items len:', this.items.length)
                }
            } else {
                this.$message.showToast('获取详情失败')
@@ -514,15 +515,16 @@
            },
            async openControl() {
                //打印
                // console.log('openControl start')
                let that = this;
                var that = this;
                if (that.items.num <= 0) {
                    that.$message.showToast('打印数目不能小于0')
                    return
                }
                var totalnum = 0
                for (var each of that.items) {
                    totalnum += each.num
                    totalnum += each.num || 1
                }
                if (totalnum <= 0) {
                    that.$message.showToast('打印数目不能小于0')
                    return
                }
                if (totalnum > 3) {
                    await that.$message.confirm(`打印数目为${totalnum}张,确定打印吗`)
@@ -534,7 +536,7 @@
                that.buffs = []
                for (var each of that.items) {
                    for (var i = 0; i < each.num; i++) {
                    for (var i = 0; i < (each.num || 1); i++) {
                        var command = tsc.jpPrinter.createNew()
                        //根据数目不同,打印不同数目
@@ -582,7 +584,7 @@
                        command.setText(60, 230, "TSS24.BF2", 1, 1, "————————————")
                        command.setText(30, 260, "TSS24.BF2", 1, 1, "花满芫")
                        command.setText(200, 260, "TSS24.BF2", 1, 1, `数目: ${i+1}/${each.num}`)
                        command.setText(200, 260, "TSS24.BF2", 1, 1, `数目: ${i+1}/${each.num||1}`)
                        // command.setText(20, 40, "TSS24.BF2", 1, 1, "" + (that.item.warehouseName || '待分配'))
                        // // 库位: 
@@ -634,7 +636,7 @@
                        // command.setBar(170, 180, "EAN8", 64, 1, 3, 3, "1234567")
                        command.setPagePrint()
                        // console.log('that.buffs', that.buffs.length)
                        that.buffs.push(command.getData())
                    }