修改缺省
This commit is contained in:
parent
7bdca483f6
commit
6d1a797fd3
@ -544,10 +544,33 @@ export default {
|
|||||||
|
|
||||||
operationData (type) {
|
operationData (type) {
|
||||||
if (type == "PRINT") {
|
if (type == "PRINT") {
|
||||||
|
// 检查设备名称是否为空
|
||||||
|
if (!this.deviceName || this.deviceName.trim() === '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入设备名称',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查设备状态
|
||||||
if (this.deviceDetail.status == 0 && this.deviceDetail.status != -1) {
|
if (this.deviceDetail.status == 0 && this.deviceDetail.status != -1) {
|
||||||
|
// 显示确认提示框
|
||||||
|
uni.showModal({
|
||||||
|
title: '确认打印',
|
||||||
|
content: '请确认门关闭并且设备处于可打印状态!',
|
||||||
|
confirmText: '确认执行',
|
||||||
|
cancelText: '取消',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
// 用户确认后执行打印
|
||||||
this.sendWsCommand(type);
|
this.sendWsCommand(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
if (type == "CONTINUE") {
|
if (type == "CONTINUE") {
|
||||||
if (
|
if (
|
||||||
this.deviceDetail.status != 1 &&
|
this.deviceDetail.status != 1 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user