This commit is contained in:
liushuai
2020-03-20 18:06:37 +08:00
parent 7389ead64d
commit 4d32454b1a
19 changed files with 387 additions and 165 deletions

View File

@@ -2,7 +2,7 @@
<div>
<el-col style="width: auto">
<el-card>
<el-select v-model="toolNumValue" filterable clearable size="small" style="margin-top:10px;width: 180px" placeholder="机床号" @change="typeChange1()">
<el-select v-model="toolNumValue" filterable clearable size="small" style="margin-top:10px;width: 180px" placeholder="机床号" @change="typeChange1();searchTable()">
<el-option
v-for="item in toolNum"
:key="item.value"
@@ -12,7 +12,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px;width: 120px" placeholder="组号">
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px;width: 120px" placeholder="组号" @change="searchTable">
<el-option
v-for="item in Num"
:key="item.value"
@@ -125,7 +125,6 @@ export default {
},
created() {
this.typeChange()
this.searchTable()
},
methods: {
fetchData() {
@@ -168,35 +167,39 @@ export default {
})
},
searchTable() {
this.loading1 = true
this.tableData1 = []
this.tableData2 = []
if (this.entryNameValue !== null && this.entryNameValue !== '') {
this.check_entryNameValue = 1
if (this.NumValue || this.toolNumValue || this.partName) {
this.loading1 = true
this.tableData1 = []
this.tableData2 = []
if (this.entryNameValue !== null && this.entryNameValue !== '') {
this.check_entryNameValue = 1
} else {
this.check_entryNameValue = 0
}
if (this.toolNumValue !== null && this.toolNumValue !== '') {
this.check_toolNumValue = 1
} else {
this.check_toolNumValue = 0
}
if (this.NumValue !== null && this.NumValue !== '') {
this.check_NumValue = 1
} else {
this.check_NumValue = 0
}
if (this.partName !== null && this.partName !== '') {
this.check_partName = 1
} else {
this.check_partName = 0
}
searchTable(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
}).then(() => {
this.loading1 = false
})
} else {
this.check_entryNameValue = 0
this.$message.warning('请输入查询条件')
}
if (this.toolNumValue !== null && this.toolNumValue !== '') {
this.check_toolNumValue = 1
} else {
this.check_toolNumValue = 0
}
if (this.NumValue !== null && this.NumValue !== '') {
this.check_NumValue = 1
} else {
this.check_NumValue = 0
}
if (this.partName !== null && this.partName !== '') {
this.check_partName = 1
} else {
this.check_partName = 0
}
searchTable(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
}).then(() => {
this.loading1 = false
})
},
searchTable2(row) {
this.loading2 = true