|
@@ -6,7 +6,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<!-- 打印结果模态框 -->
|
|
<!-- 打印结果模态框 -->
|
|
|
<Modal
|
|
<Modal
|
|
|
- ref="printResultModal"
|
|
|
|
|
|
|
+ v-model:show="modal"
|
|
|
title="发卡机发卡"
|
|
title="发卡机发卡"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
@@ -60,7 +60,7 @@
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
class="btn btn-danger"
|
|
class="btn btn-danger"
|
|
|
- @click="$refs.printResultModal.show = false"
|
|
|
|
|
|
|
+ @click="modal = false"
|
|
|
>
|
|
>
|
|
|
关闭
|
|
关闭
|
|
|
</button>
|
|
</button>
|
|
@@ -102,6 +102,7 @@ export default {
|
|
|
epc: '', // 打印的EPC
|
|
epc: '', // 打印的EPC
|
|
|
},
|
|
},
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
+ modal: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -118,7 +119,7 @@ export default {
|
|
|
this.printResult.success = false;
|
|
this.printResult.success = false;
|
|
|
this.printResult.message = '无可打印的数据。';
|
|
this.printResult.message = '无可打印的数据。';
|
|
|
|
|
|
|
|
- this.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ this.modal = true;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -127,7 +128,7 @@ export default {
|
|
|
this.printResult.success = false;
|
|
this.printResult.success = false;
|
|
|
this.printResult.message = '使用发卡机发卡,每次只能发一个标签,打印程序收到了' + printPages.length + '个标签数据。';
|
|
this.printResult.message = '使用发卡机发卡,每次只能发一个标签,打印程序收到了' + printPages.length + '个标签数据。';
|
|
|
|
|
|
|
|
- this.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ this.modal = true;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -151,7 +152,7 @@ export default {
|
|
|
printSingleEpc: function (epc) {
|
|
printSingleEpc: function (epc) {
|
|
|
let _self = this;
|
|
let _self = this;
|
|
|
|
|
|
|
|
- _self.$refs.printResultModal.show = false;
|
|
|
|
|
|
|
+ _self.modal = false;
|
|
|
|
|
|
|
|
let promise = PrintEpcUtil.printSingleEpc(this.printerName, epc);
|
|
let promise = PrintEpcUtil.printSingleEpc(this.printerName, epc);
|
|
|
|
|
|
|
@@ -161,14 +162,14 @@ export default {
|
|
|
if (successData.success == false) {
|
|
if (successData.success == false) {
|
|
|
successData.command = 'write';
|
|
successData.command = 'write';
|
|
|
_self.printResult = successData;
|
|
_self.printResult = successData;
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
}
|
|
}
|
|
|
}, errorData => {
|
|
}, errorData => {
|
|
|
_self.loading=false;
|
|
_self.loading=false;
|
|
|
if (errorData.success == false) {
|
|
if (errorData.success == false) {
|
|
|
errorData.command = 'write';
|
|
errorData.command = 'write';
|
|
|
_self.printResult = errorData;
|
|
_self.printResult = errorData;
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -179,18 +180,18 @@ export default {
|
|
|
restoreEpc: function () {
|
|
restoreEpc: function () {
|
|
|
let _self = this;
|
|
let _self = this;
|
|
|
|
|
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
|
|
|
|
|
let promise = PrintEpcUtil.resetTag(this.printerName);
|
|
let promise = PrintEpcUtil.resetTag(this.printerName);
|
|
|
|
|
|
|
|
promise.then(successData => {
|
|
promise.then(successData => {
|
|
|
successData.command = 'restore';
|
|
successData.command = 'restore';
|
|
|
_self.printResult = successData;
|
|
_self.printResult = successData;
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
}, errorData => {
|
|
}, errorData => {
|
|
|
errorData.command = 'restore';
|
|
errorData.command = 'restore';
|
|
|
_self.printResult = errorData;
|
|
_self.printResult = errorData;
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -200,7 +201,7 @@ export default {
|
|
|
readEpc: function () {
|
|
readEpc: function () {
|
|
|
let _self = this;
|
|
let _self = this;
|
|
|
|
|
|
|
|
- _self.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ _self.modal = true;
|
|
|
|
|
|
|
|
let promise = PrintEpcUtil.readEpc(this.printerName);
|
|
let promise = PrintEpcUtil.readEpc(this.printerName);
|
|
|
|
|
|
|
@@ -214,10 +215,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 显示模态框
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ * 显示模态框
|
|
|
|
|
+ */
|
|
|
show: function () {
|
|
show: function () {
|
|
|
- this.$refs.printResultModal.show = true;
|
|
|
|
|
|
|
+ this.modal = true;
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|