diff --git a/src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue b/src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue index 6e1e4f0..2a827ab 100644 --- a/src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue +++ b/src/views/modules/shopOrder/workOrderAlloc/searchWorkOrderAlloc.vue @@ -49,7 +49,7 @@ - + @@ -87,6 +87,7 @@ v-model="searchData.date1" type="date" value-format="yyyy-MM-dd" + @change="handleEnterDateChange" placeholder="开始日期" style="width: 45%"> @@ -95,6 +96,7 @@ v-model="searchData.date2" type="date" value-format="yyyy-MM-dd" + @change="handleEnterDateChange" placeholder="结束日期" style="width: 45%"> @@ -119,6 +121,27 @@ + + + + + ~ + + + + @@ -339,6 +362,8 @@ export default { partDescription: '', orderNo: '', status: '', + reportDate1: '', + reportDate2: '', date1: '', date2: '', date3: '', @@ -464,6 +489,28 @@ export default { this.searchData.date1 = formatDate(firstDay); this.searchData.date2 = formatDate(lastDay); }, + // 选择报工日期后,清空生产订单号和录入日期 + handleReportDateChange() { + if (this.searchData.reportDate1 || this.searchData.reportDate2) { + this.searchData.orderNo = ''; + this.searchData.date1 = ''; + this.searchData.date2 = ''; + } + }, + // 录入生产订单号后,清空报工日期 + handleOrderNoChange(val) { + if (val) { + this.searchData.reportDate1 = ''; + this.searchData.reportDate2 = ''; + } + }, + // 选择录入日期后,清空报工日期 + handleEnterDateChange() { + if (this.searchData.date1 || this.searchData.date2) { + this.searchData.reportDate1 = ''; + this.searchData.reportDate2 = ''; + } + }, // 计算表格高度 calculateTableHeight() { this.$nextTick(() => { @@ -487,6 +534,8 @@ export default { partDescription: '', orderNo: '', status: '', + reportDate1: '', + reportDate2: '', date1: '', date2: '', date3: '',