This commit is contained in:
liushuai
2019-10-31 08:11:24 +08:00
parent d3ce0baf0b
commit ca02868500
15 changed files with 563 additions and 435 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card>
<el-card style="width: 1000px">
<el-row>
<span style="margin-left: 10px">零件图号</span>
<el-input v-model="Partpaint" clearable size="small" style="width:200px;height: 29px;margin-top: 10px;margin-bottom: 10px" />
@@ -11,19 +11,29 @@
<el-tooltip :open-delay="1200" effect="dark" content="将所有机床零件入库" placement="top">
<el-button type="warning" size="small" class="el-icon-success" style="margin: 0 0 0 10px" plain @click="Innumber">入库</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="清除该条零件信息" placement="top">
<el-button
size="small"
type="danger"
style="float: right; margin-right: 10px;margin-top: 12px"
plain
class="el-icon-delete"
@click="handleDelete()">移除</el-button>
</el-tooltip>
</el-row>
</el-card>
<el-card>
<el-card style="width: 1000px">
<el-table
v-loading="listLoading"
:data="tableDataNum"
:row-class-name="tableRowClassName"
stripe
highlight-current-row
border
size="mini"
style="width: 100%;margin: 3px 0px"
height="650px">
height="750px">
<el-table-column
label="序号"
align="center"
@@ -39,33 +49,22 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="100">
<el-table-column label="零件图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="计划数量" align="center" min-width="100">
<el-table-column label="计划数量" align="center" min-width="70">
<template slot-scope="scope" align="center">
{{ tableDataNum[scope.$index].plannumber }}
</template>
</el-table-column>
<el-table-column label="入库数量" align="center" min-width="100">
<el-table-column label="入库数量" align="center" min-width="70">
<template slot-scope="scope">
<el-input v-model="tableDataNum[scope.$index].innumber" clearable size="mini"/>
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
<el-select v-model="inventoryNumber" filterable clearable size="mini" placeholder="仓库名称" @change="Getlocate">
<el-option
v-for="item in inventoryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="120">
<el-table-column label="货位" align="center" width="120">
<template slot-scope="scope">
<el-select v-model="locateNumber" filterable clearable size="mini" placeholder="货位名称">
<el-option
@@ -81,26 +80,13 @@
<el-input v-model="tableData[scope.$index].note" clearable size="mini"/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="清除该条零件信息" placement="top">
<el-button
:disabled="scope.row.是否禁用"
size="mini"
type="danger"
plain
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">移除</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { searchTable, insertOne, getinventory, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
import { searchTable, insertOne, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request'
export default {
@@ -114,6 +100,7 @@ export default {
craftplannumber: '',
radio2: 3,
PeopleNumber: '',
NUM: '',
inventoryName: [], // 仓库名称下拉框
inventoryNumber: '',
locateName: [], // 货位名称下拉框
@@ -131,13 +118,21 @@ export default {
created() {
this.initWebpack()
this.getpeopleid()
this.Getinvent()
this.Getlocate()
},
methods: {
// 移除
handleDelete(index, row) {
this.tableDataNum.splice(index, 1)
this.tableData.splice(index, 1)
handleDelete() {
this.tableDataNum.splice(this.NUM, 1)
this.tableData.splice(this.NUM, 1)
this.NUM = ''
},
tableRowClassName({ row, rowIndex }) {
console.log(rowIndex)
this.NUM = rowIndex
},
searchData(index) {
this.NUM = index
},
// 获取人员编号
getpeopleid() {
@@ -309,17 +304,11 @@ export default {
this.tableDataNum = []
this.Partpaint = ''
},
// 仓库查询
Getinvent() {
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
},
// 根据仓库获取货位
Getlocate() {
this.locateName = []
this.locateNumber = ''
if (this.inventoryNumber) {
this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName', this.inventoryNumber)
}
this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName')
}
}
}