diff --git a/src/components/print/PrintService.vue b/src/components/print/PrintService.vue
index 03f03b6..273d772 100644
--- a/src/components/print/PrintService.vue
+++ b/src/components/print/PrintService.vue
@@ -48,6 +48,49 @@
取消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -90,7 +133,11 @@ export default {
},
data() {
return {
- printLoading: false
+ printLoading: false,
+ printerSelectionVisible: false,
+ availablePrinters: [],
+ selectedPrinter: '',
+ printCopies: 1
}
},
computed: {
@@ -174,64 +221,23 @@ export default {
* 显示打印机选择对话框
*/
showPrinterSelectionDialog(printers) {
- const h = this.$createElement
- let selectedPrinter = printers.length > 0 ? printers[0].printerName : ''
- let copies = 1
-
- this.$msgbox({
- title: '服务器打印设置',
- message: h('div', [
- h('div', { style: 'margin-bottom: 15px;' }, [
- h('label', { style: 'display: block; margin-bottom: 5px; font-weight: bold;' }, '选择打印机:'),
- h('el-select', {
- props: {
- value: selectedPrinter,
- placeholder: '请选择打印机',
- style: 'width: 100%;'
- },
- on: {
- input: (val) => { selectedPrinter = val }
- }
- }, printers.map(printer =>
- h('el-option', {
- props: {
- key: printer.printerName,
- label: `${printer.printerName} (${printer.ipAddress})`,
- value: printer.printerName
- }
- })
- ))
- ]),
- h('div', { style: 'margin-bottom: 15px;' }, [
- h('label', { style: 'display: block; margin-bottom: 5px; font-weight: bold;' }, '打印份数:'),
- h('el-input-number', {
- props: {
- value: copies,
- min: 1,
- max: 1,
- size: 'mini',
- style: 'width: 100%;',
- disabled: true
- },
- on: {
- input: (val) => { copies = val }
- }
- }),
- h('div', {
- style: 'margin-top: 5px; font-size: 12px; color: #909399;'
- }, 'RFID标签只能打印1份,每张标签需要独立的TID读取和EPC写入过程')
- ])
- ]),
- showCancelButton: true,
- confirmButtonText: '开始打印',
- cancelButtonText: '取消'
- }).then(() => {
- if (!selectedPrinter) {
- this.$message.warning('请选择打印机')
- return
- }
- this.printViaServer(selectedPrinter, copies)
- })
+ this.availablePrinters = printers
+ this.selectedPrinter = printers.length > 0 ? printers[0].printerName : ''
+ this.printCopies = 1
+ this.printerSelectionVisible = true
+ },
+
+ /**
+ * 确认打印
+ */
+ confirmPrint() {
+ if (!this.selectedPrinter) {
+ this.$message.warning('请选择打印机')
+ return
+ }
+
+ this.printerSelectionVisible = false
+ this.printViaServer(this.selectedPrinter, this.printCopies)
},
/**
@@ -481,6 +487,30 @@ export default {
padding-top: 10px;
}
+/* 打印机选择对话框样式 */
+.printer-selection-content {
+ padding: 10px 0;
+}
+
+.form-item {
+ margin-bottom: 20px;
+}
+
+.form-label {
+ display: block;
+ margin-bottom: 8px;
+ font-weight: 600;
+ color: #303133;
+ font-size: 14px;
+}
+
+.form-hint {
+ margin-top: 6px;
+ font-size: 12px;
+ color: #909399;
+ line-height: 1.4;
+}
+
/* 响应式设计 */
@media (max-width: 600px) {
.print-method {
@@ -501,5 +531,13 @@ export default {
.method-content p {
font-size: 12px;
}
+
+ .printer-selection-content {
+ padding: 5px 0;
+ }
+
+ .form-label {
+ font-size: 13px;
+ }
}
diff --git a/src/views/modules/labelSetting/com_add_update_label.vue b/src/views/modules/labelSetting/com_add_update_label.vue
index 63aa3fe..9c5b9ba 100644
--- a/src/views/modules/labelSetting/com_add_update_label.vue
+++ b/src/views/modules/labelSetting/com_add_update_label.vue
@@ -13,15 +13,23 @@
-
+
+
+
+
+
+
+
+
-
+
@@ -95,6 +103,7 @@ export default {
remark: '',
addFlag: false,
printDirection : '横向打印',
+ rfidFlag:''
},
labelNoReadOnly: false,
dataListLoading: false,
@@ -191,7 +200,7 @@ export default {
//判断标签内容是否为空
let labelNo = this.pageData.labelNo.trim();
let labelType = this.pageData.labelType.trim();
- let labelName = this.pageData.labelName.trim();
+ let rfidFlag = this.pageData.rfidFlag.trim();
if(labelNo == null || labelNo === ''){
this.$message.success("标签编号不能为空!");
return false;
@@ -200,8 +209,8 @@ export default {
this.$message.success("标签类型不能为空!");
return false;
}
- if(labelName == null || labelName === ''){
- this.$message.success("报表文件名不能为空!");
+ if(rfidFlag == null || rfidFlag === ''){
+ this.$message.success("请选择是否RFID标签!");
return false;
}
//判断是否是新增标签自定义
diff --git a/src/views/modules/labelSetting/components/PropertyPanel.vue b/src/views/modules/labelSetting/components/PropertyPanel.vue
index b00d01d..fb2f813 100644
--- a/src/views/modules/labelSetting/components/PropertyPanel.vue
+++ b/src/views/modules/labelSetting/components/PropertyPanel.vue
@@ -1,12 +1,10 @@