机床查询、使用滞货

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,24 +2,17 @@
<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" 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>
<span>客户名称:</span>
<el-input v-model="CustomerName" size="small" placeholder="客户名称" readonly style="width: 200px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchTable()">查询</el-button>
</el-row>
</el-card>
@@ -188,14 +181,11 @@
</template>
<script>
import { initProject, searchMachine, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
import { initProject, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
export default {
data() {
return {
projectValue: '',
project: [],
CustomerName: '',
machineNumberValue: '',
machineNumber: [],
loading: false,
@@ -245,19 +235,12 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
if (response.data.length !== 0) {
this.CustomerName = response.data[0].客户名称
}
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].项目名称
})
}
})