This commit is contained in:
zhangdingyu
2018-11-19 16:31:00 +08:00
31 changed files with 1048 additions and 460 deletions

View File

@@ -5,13 +5,11 @@
<span>项目名称:</span>
<el-select
v-model="entryNameValue"
:remote-method="remoteMethod"
placeholder="项目名称"
style="width:200px"
size="small"
clearable
filterable
remote
@change="empty">
<el-option
v-for="item in entryName"
@@ -20,6 +18,7 @@
:value="item.value"/>
</el-select>
<span>机床号:</span>
<<<<<<< HEAD
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px" @change="empty1">
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" />
</el-input>
@@ -27,6 +26,11 @@
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px">
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" />
</el-input>
=======
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="SearchMachine" @change="empty1"/>
<span>组号:</span>
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
>>>>>>> 45d3903a226c57546658abf8697edd180bd01975
<span>零件号:</span>
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px"/>
<br>
@@ -191,7 +195,9 @@
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitName">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
@@ -238,7 +244,9 @@
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitGroup">提交</el-button>
</div>
</el-dialog>
</div>
@@ -311,8 +319,6 @@ export default {
},
created() {
this.fetchData()
},
mounted() {
this.getList()
},
methods: {
@@ -372,28 +378,15 @@ export default {
})
},
getList() { // 初始化项目名称
this.list = []
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.list.push({
this.entryName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
remoteMethod(query) {
if (query !== '') {
setTimeout(() => {
this.entryName = this.list.filter(item => {
return item.label.toLowerCase()
.indexOf(query.toLowerCase()) > -1
})
}, 1000)
} else {
this.entryName = []
}
},
empty() {
this.machineToolNumber = ''
this.groupNumber = ''