更新
This commit is contained in:
@@ -19,6 +19,17 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 250px;margin-left: 10px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" class="el-icon-search" size="small" plain style="margin: 10px 0 0 10px" @click="pageCurrent=1;pageSize=100;total = 0;pageCurrent0=1;pageSize0=100;total0 = 0;getTableData();getTableData0()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
@@ -138,6 +149,7 @@ export default {
|
||||
Group: '',
|
||||
Groups: [],
|
||||
number: '',
|
||||
dateRange: '', // 日期
|
||||
checkbox_Machine: false,
|
||||
checkbox_Group: false,
|
||||
checkbox_number: false,
|
||||
@@ -188,36 +200,48 @@ export default {
|
||||
},
|
||||
// 按条件查询
|
||||
getTableData() {
|
||||
this.listLoading1 = true
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.tableData1 = []
|
||||
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.result.length === 0) {
|
||||
this.listLoading1 = false
|
||||
} else {
|
||||
this.tableData1 = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
this.listLoading1 = false
|
||||
}
|
||||
})
|
||||
if (this.Machine || this.Group || this.number || this.dateRange) {
|
||||
this.listLoading1 = true
|
||||
let check2
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
|
||||
this.tableData1 = []
|
||||
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, check2, this.dateRange[0], this.dateRange[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.result.length === 0) {
|
||||
this.listLoading1 = false
|
||||
} else {
|
||||
this.tableData1 = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
this.listLoading1 = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入查询条件')
|
||||
}
|
||||
},
|
||||
getTableData0() {
|
||||
this.listLoading2 = true
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.tableData0 = []
|
||||
getTable1(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent0, this.pageSize0).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.listLoading2 = false
|
||||
} else {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.listLoading2 = false
|
||||
}
|
||||
})
|
||||
if (this.Machine || this.Group || this.number || this.dateRange) {
|
||||
this.listLoading2 = true
|
||||
let check2
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
|
||||
this.tableData0 = []
|
||||
getTable1(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, check2, this.dateRange[0], this.dateRange[1], this.pageCurrent0, this.pageSize0).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.listLoading2 = false
|
||||
} else {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
this.listLoading2 = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入查询条件')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
|
||||
Reference in New Issue
Block a user