diff --git a/src/pages/xinrui/equipment/RunLogFill.vue b/src/pages/xinrui/equipment/RunLogFill.vue index 9e3b514..9ae026f 100644 --- a/src/pages/xinrui/equipment/RunLogFill.vue +++ b/src/pages/xinrui/equipment/RunLogFill.vue @@ -60,8 +60,8 @@
- - + +
@@ -94,7 +94,8 @@ export default { show: false, minDate: new Date(2000, 0, 1), defaultDate: new Date(), - disabled1: false + disabled1: false, + disabled2: false } }, beforeRouteLeave (to, from, next) { @@ -138,10 +139,6 @@ export default { } }, calform () { - if (!(this.val3 >= 0 && this.val4 >= 0 && this.val5 >= 0 && this.val6 >= 0 && this.val7 >= 0 && this.val8 >= 0)) { - this.toast('值须>=0') - return - } this.form = { device_code: this.val1, run_date: this.date, @@ -154,6 +151,26 @@ export default { oee_value: this.val9 } }, + toCount () { + if (JSON.stringify(this.robj) === '{}') { + return + } + if (!(this.val3 >= 0 && this.val4 >= 0 && this.val5 >= 0 && this.val6 >= 0 && this.val7 >= 0 && this.val8 >= 0)) { + this.toast('值须>=0') + return + } + this.calculate() + }, + toSave () { + if (JSON.stringify(this.robj) === '{}') { + return + } + if (!(this.val3 >= 0 && this.val4 >= 0 && this.val5 >= 0 && this.val6 >= 0 && this.val7 >= 0 && this.val8 >= 0)) { + this.toast('值须>=0') + return + } + this.save() + }, async calculate () { this.disabled1 = true this.calform() @@ -174,7 +191,7 @@ export default { } }, async save () { - this.disabled1 = true + this.disabled2 = true this.calform() try { let res = await save(this.form) @@ -186,9 +203,9 @@ export default { } else { this.Dialog(res.desc) } - this.disabled1 = false + this.disabled2 = false } catch (error) { - this.disabled1 = false + this.disabled2 = false } } }