This commit is contained in:
zhangdingyu
2019-09-27 17:12:09 +08:00
parent 6640b52bc8
commit a03ebcbdd5
3 changed files with 145 additions and 1 deletions

View File

@@ -0,0 +1,142 @@
<template>
<div class="app-container">
<el-card>
<div slot="header">
<el-row style="margin-bottom:-10px!important;">
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable style="margin-bottom: 10px;"/>
<span>物料规格:</span>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="margin-bottom: 10px;" clearable/>
<span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" style="margin-bottom: 10px;" clearable/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;pageSize=10;searchMaterial()">查询</el-button>
</el-row>
</div>
<el-table :data="tableData1" stripe border height="600px" size="mini" show-summary>
<el-table-column label="名称" align="center" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料来源" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.物料来源 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="货位存量" align="center" width="150" prop="货位存量">
<template slot-scope="scope">
<template v-if="scope.row.changeValue">
<el-input-number v-model="scope.row.货位存量" :min="0" :precision="2" controls-position="right" size="mini" style="width: 90px"/>
<el-button class="cancel-btn" size="mini" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.货位存量 }}</span>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import request from '@/utils/request'
export default {
data() {
return {
materialName: '',
materialSpec: '',
materialModel: '',
tableData1: [],
pageCurrent: 1,
pageSize: 10,
total: 0
}
},
computed: {
...mapGetters([
'id' // 人员编号
])
},
mounted() {
this.searchMaterial()
},
methods: {
// 根据条件查物料货位数量
searchMaterial() {
// this.$router.push('/ManufacturingCenter/StatusQuery')
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
const param = {
url: '',
method: 'post',
data: {
type: '1',
name: `库存管理_库存盘点_物料货位数量_查询数据`,
param: `物料名称_check=${check1}&物料名称=${this.materialName}&物料规格_check=${check2}&物料规格=${this.materialSpec}&物料型号_check=${check3}&物料型号=${this.materialModel}&仓库流水号_check=${0}&仓库流水号=${0}&货位流水号_check=${0}&货位流水号=${0}`,
Pagination: this.pageCurrent + '&' + this.pageSize
}
}
request(param).then(res => {
this.tableData1 = res.data.rows
this.tableData1.map(v => {
this.$set(v, 'changeValue', false)
v.原货位存量 = v.货位存量
return v
})
this.total = res.data.total
})
},
// 分页
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchMaterial()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchMaterial()
}
}
}
</script>
<style scoped>
.el-select{
width:165px
}
.el-input{
width:165px
}
</style>

View File

@@ -297,7 +297,8 @@ export default {
}
.el-input__inner{
border: none!important;
font-size: 18px!important;
/*高精电脑登录input点击往上串*/
/*font-size: 18px!important;*/
color: #29335b!important;
}
.el-form-item {