This commit is contained in:
liushuai
2019-12-23 12:33:53 +08:00
parent 0dbdfa1623
commit 2aa051ff90
16 changed files with 668 additions and 848 deletions

View File

@@ -2,13 +2,6 @@
<div class="app-container">
<el-card>
<el-row>
<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="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-option
v-for="item in machineTool"
@@ -97,7 +90,7 @@
</template>
<script>
import { initProject, intPartState, searchTable, searchmachine, searchgroup } from '@/api/ManufacturingCenter/StatusQuery'
import { intPartState, searchTable, searchmachine, searchgroup } from '@/api/ManufacturingCenter/StatusQuery'
export default {
data() {
return {
@@ -146,32 +139,15 @@ export default {
})
}
})
initProject().then(response => {
searchmachine().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].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 查询机床
SearchMachine() {
this.machineToolValue = ''
this.machineTool = []
this.groupNumberValue = ''
this.groupNumber = []
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() {
this.groupNumberValue = ''
@@ -188,15 +164,14 @@ export default {
}
},
searchData() {
var check, check1, check2, check3, check4, check5
if (this.entryNameValue) { check = 1 } else { check = 0 }
var check1, check2, check3, check4, check5
if (this.machineToolValue) { check1 = 1 } else { check1 = 0 }
if (this.groupNumberValue) { check2 = 1 } else { check2 = 0 }
if (this.partNumber) { check3 = 1 } else { check3 = 0 }
if (this.partStateValue) { check4 = 1 } else { check4 = 0 }
if (this.partTypeValue) { check5 = 1 } else { check5 = 0 }
this.loading0 = true
searchTable(check, this.entryNameValue, check1, this.machineToolValue, check2, this.groupNumberValue, check3, this.partNumber, check4, this.partStateValue, check5, this.partTypeValue, this.pageCurrent, this.pageSize).then(response => {
searchTable(check1, this.machineToolValue, check2, this.groupNumberValue, check3, this.partNumber, check4, this.partStateValue, check5, this.partTypeValue, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].考核状态 = parseInt(response.data.rows[i].考核状态) - 2
if (response.data.rows[i].传递时间 !== undefined || response.data.rows[i].hasOwnProperty('传递时间')) {