diff --git a/src/views/productionManagement/deductionPreserve/index.vue b/src/views/productionManagement/deductionPreserve/index.vue index 5f6d81af..80d41096 100644 --- a/src/views/productionManagement/deductionPreserve/index.vue +++ b/src/views/productionManagement/deductionPreserve/index.vue @@ -1,25 +1,10 @@ @@ -101,6 +81,7 @@ export default { menuAlign: 'left', gridBtn: false, searchMenuPosition: 'right', + searchLabelWidth:'auto', align: 'center', menu: false, column: [ @@ -212,22 +193,26 @@ export default { methods: { // 扫描流程卡号 queryOrder() { - this.loading = true; - getWorkOrderByCardNo({ cardNo: this.cardNo }) - .then(res => { - this.cardNo = ''; - if (Object.keys(res.data.data).length != 0) { - this.rowItem = res.data.data; - this.editOpen = true; - this.loading = false; - } else { + if (this.cardNo != '') { + this.loading = true + getWorkOrderByCardNo({ cardNo: this.cardNo }) + .then(res => { + this.cardNo = ''; + if (Object.keys(res.data.data).length != 0) { + + this.rowItem = res.data.data; + this.editOpen = true; + this.loading = false; + } else { + this.loading = false; + this.$message.error('未找到该流程卡号!'); + } + }) + .catch(err => { this.loading = false; - this.$message.error('未找到该流程卡号!'); - } - }) - .catch(err => { - this.loading = false; - }); + }); + } + }, closeDialog(type) {