This commit is contained in:
liushuai
2020-05-13 18:42:58 +08:00
parent 5dcb28e73e
commit decf0bf58e
8 changed files with 339 additions and 708 deletions

View File

@@ -2,14 +2,21 @@
<div class="app-container">
<el-card>
<el-row>
<el-select v-model="machineToolValue" placeholder="机床号" size="small" filterable clearable style="width: 150px" @change="searchGroupList">
<!-- <el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">-->
<!-- <el-option-->
<!-- v-for="item in entryName"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<el-select v-model="machineToolValue" placeholder="机床号" filterable size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-option
v-for="item in machineTool"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;">
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">
<el-option
v-for="item in groupNumber"
:key="item.value"
@@ -118,6 +125,8 @@
</template>
<script>
// import { url } from '@/utils/request'
// import axios from 'axios'
import { initProject, searchmachine, searchgroup, searchdata, warehousing, selectdepartment, selectleaders } from '@/api/Inventory/SelfMadePartsWarehouseOut'
export default {
data() {
@@ -153,8 +162,8 @@ export default {
}
},
created() {
this.SearchMachine()
// this.searchData()
this.initProject()
this.searchData()
},
methods: {
searchData() {
@@ -164,7 +173,6 @@ export default {
const groupNumberValue_check = this.groupNumberValue === '' ? 0 : 1
const partNumber_check = this.partNumber === '' || this.partNumber === null ? 0 : 1
searchdata(entryNameValue_check, this.entryNameValue, machineToolValue_check, this.machineToolValue, groupNumberValue_check, this.groupNumberValue, partNumber_check, this.partNumber, this.pageCurrent, this.pageSize).then(response => {
console.log(response.data)
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
@@ -203,12 +211,13 @@ export default {
}
})
},
fetchData() {
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.entryName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.machineTool.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
@@ -219,14 +228,16 @@ export default {
this.machineTool = []
this.groupNumberValue = ''
this.groupNumber = []
searchmachine(0, 0).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineTool.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
if (this.entryNameValue) {
searchmachine(this.entryNameValue, 1).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineTool.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
},
// 查询组号
searchGroupList() {