自制件出入库记录
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin-left: 10px">机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
@@ -12,7 +11,6 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
@@ -20,22 +18,12 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
|
||||
<el-button type="primary" class="el-icon-search" size="small" plain style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=500;total = 0">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-search" size="small" plain style="margin: 10px 0 0 10px" @click="pageCurrent=1;pageSize=100;total = 0;pageCurrent0=1;pageSize0=100;total0 = 0;getTableData();getTableData0()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card style="width: 49.5%; float: left">
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableData1"
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
class="table"
|
||||
border
|
||||
height="730">
|
||||
<el-table v-loading="listLoading1" :data="tableData1" stripe size="mini" style="width: 100%" highlight-current-row border height="730">
|
||||
<el-table-column align="center" label="零件名称" prop="零件名称" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
@@ -76,7 +64,7 @@
|
||||
<el-pagination
|
||||
v-if="!listLoading1"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[15, 20, 30, 500]"
|
||||
:page-sizes="[100, 200, 300, 500]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -86,22 +74,13 @@
|
||||
</el-card>
|
||||
|
||||
<el-card style="width: 49.5%; float: left;margin-left: 10px">
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData0"
|
||||
class="table"
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
border
|
||||
height="730">
|
||||
<el-table-column align="center" label="零件名称" prop="零件名称" width="150px">
|
||||
<el-table v-loading="listLoading2" :data="tableData0" stripe size="mini" style="width: 100%" highlight-current-row border height="730">
|
||||
<el-table-column align="center" label="零件名称" prop="零件名称" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" prop="零件图号" min-idth="150px">
|
||||
<el-table-column align="center" label="零件图号" prop="零件图号" width="130px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -111,22 +90,22 @@
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="机床图号" prop="机床图号" width="120px">
|
||||
<el-table-column align="center" label="机床图号" prop="机床图号" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" prop="组号" width="80px">
|
||||
<el-table-column align="center" label="组号" prop="组号" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领料人" prop="领料人" width="80px">
|
||||
<el-table-column align="center" label="领料人" prop="领料人" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出库时间" prop="出库时间" width="100px">
|
||||
<el-table-column align="center" label="出库时间" prop="出库时间" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
@@ -136,12 +115,12 @@
|
||||
<el-pagination
|
||||
v-if="!listLoading2"
|
||||
:current-page="pageCurrent0"
|
||||
:page-sizes="[15, 20, 30, 500]"
|
||||
:page-sizes="[100, 200, 300, 500]"
|
||||
:page-size="pageSize0"
|
||||
:total="total0"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
@size-change="handleSizeChange0"
|
||||
@current-change="handleCurrentChange0"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -167,16 +146,17 @@ export default {
|
||||
listLoading1: false,
|
||||
listLoading2: false,
|
||||
total: 0, // 总条数
|
||||
pageSize: 500,
|
||||
pageSize: 100,
|
||||
pageCurrent: 1,
|
||||
total0: 0, // 总条数
|
||||
pageSize0: 500,
|
||||
pageSize0: 100,
|
||||
pageCurrent0: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getMachine()
|
||||
this.getTableData()
|
||||
this.getTableData0()
|
||||
},
|
||||
methods: {
|
||||
getMachine() {
|
||||
@@ -209,12 +189,10 @@ export default {
|
||||
// 按条件查询
|
||||
getTableData() {
|
||||
this.listLoading1 = true
|
||||
this.listLoading2 = true
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.tableData1 = []
|
||||
this.tableData0 = []
|
||||
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.listLoading1 = false
|
||||
@@ -224,6 +202,13 @@ export default {
|
||||
this.listLoading1 = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getTableData0() {
|
||||
this.listLoading2 = true
|
||||
this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
|
||||
this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
|
||||
this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
|
||||
this.tableData0 = []
|
||||
getTable1(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent0, this.pageSize0).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.listLoading2 = false
|
||||
@@ -237,17 +222,21 @@ export default {
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.pageCurrent0 = 1
|
||||
this.pageSize0 = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.pageCurrent0 = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleSizeChange0(val) {
|
||||
this.pageCurrent0 = 1
|
||||
this.pageSize0 = val
|
||||
this.getTableData0()
|
||||
},
|
||||
handleCurrentChange0(val) {
|
||||
this.pageCurrent0 = val
|
||||
this.getTableData0()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user