机床查询、使用滞货

This commit is contained in:
liushuai
2019-01-21 09:37:51 +08:00
parent 969a1bc8d6
commit bce18ed9cd
17 changed files with 373 additions and 514 deletions

View File

@@ -2,21 +2,16 @@
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" filterable clearable>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchDetail()">查询</el-button>
</el-row>
@@ -144,13 +139,11 @@
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
import { initProject, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
export default {
data() {
return {
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
floatNum: '',
@@ -177,23 +170,19 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
async searchDetail() { // 主表查询
this.dataAll = []