This commit is contained in:
liushuai
2019-09-27 18:10:57 +08:00
7 changed files with 167 additions and 23 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

@@ -186,12 +186,12 @@
</el-table-column>
<el-table-column label="签订日期" align="center">
<template slot-scope="scope">
{{ scope.row.合同签订日期 ? scope.row.合同签订日期.substring(0, 11) : '-' }}
{{ scope.row.合同签订日期&&scope.row.合同签订日期!=='1900-01-01 00:00:00' ? scope.row.合同签订日期.substring(0, 11) : '-' }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center">
<template slot-scope="scope">
{{ scope.row.发货节点 ? scope.row.发货节点.substring(0, 11) : '-' }}
{{ scope.row.发货节点&&scope.row.发货节点!=='1900-01-01 00:00:00' ? scope.row.发货节点.substring(0, 11) : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="理论工时">
@@ -2412,14 +2412,14 @@ export default {
if (response.data[0].能力平衡 === 0) { this.color[10] = 'weikaishi' } else if (response.data[0].能力平衡 !== 0 && response.data[0].能力平衡 !== 100) { this.color[10] = 'jixingzhong' } else if (response.data[0].能力平衡 === 100) { this.color[10] = 'yiwancheng' }
if (response.data[0].外协 === 0) { this.color[11] = 'weikaishi' } else if (response.data[0].外协 !== 0 && response.data[0].外协 !== 100) { this.color[11] = 'jixingzhong' } else if (response.data[0].外协 === 100) { this.color[11] = 'yiwancheng' }
if (response.data[0].车间加工 === 0) { this.color[12] = 'weikaishi' } else if (response.data[0].车间加工 !== 0 && response.data[0].车间加工 !== 100) { this.color[12] = 'jixingzhong' } else if (response.data[0].车间加工 === 100) { this.color[12] = 'yiwancheng' }
if (response.data[0].采购质检 === '-') { this.color[13] = 'weikaishi' } else { this.color[13] = 'jixingzhong' }
if (response.data[0].自制质检 === '-') { this.color[14] = 'weikaishi' } else { this.color[14] = 'jixingzhong' }
if (response.data[0].采购质检 === 11111111) { this.color[13] = 'weikaishi' } else { this.color[13] = 'jixingzhong' }
if (response.data[0].自制质检 === 11111111) { this.color[14] = 'weikaishi' } else { this.color[14] = 'jixingzhong' }
if (response.data[0].成组配套 === 0) { this.color[15] = 'weikaishi' } else if (response.data[0].成组配套 !== 0 && response.data[0].成组配套 !== 100) { this.color[15] = 'jixingzhong' } else if (response.data[0].成组配套 === 100) { this.color[15] = 'yiwancheng' }
if (response.data[0].油漆 === 0) { this.color[16] = 'weikaishi' } else if (response.data[0].油漆 !== 0 && response.data[0].油漆 !== 100) { this.color[16] = 'jixingzhong' } else if (response.data[0].油漆 === 100) { this.color[16] = 'yiwancheng' }
if (response.data[0].冷作 === 0) { this.color[17] = 'weikaishi' } else if (response.data[0].冷作 !== 0 && response.data[0].冷作 !== 100) { this.color[17] = 'jixingzhong' } else if (response.data[0].冷作 === 100) { this.color[17] = 'yiwancheng' }
if (response.data[0].机械装配 === 0) { this.color[18] = 'weikaishi' } else if (response.data[0].机械装配 !== 0 && response.data[0].机械装配 !== 100) { this.color[18] = 'jixingzhong' } else if (response.data[0].机械装配 === 100) { this.color[18] = 'yiwancheng' }
if (response.data[0].电气装配 === 0) { this.color[19] = 'weikaishi' } else if (response.data[0].电气装配 !== 0 && response.data[0].电气装配 !== 100) { this.color[19] = 'jixingzhong' } else if (response.data[0].电气装配 === 100) { this.color[19] = 'yiwancheng' }
if (response.data[0].装配质检 === '-') { this.color[20] = 'weikaishi' } else { this.color[20] = 'jixingzhong' }
if (response.data[0].装配质检 === 11111111) { this.color[20] = 'weikaishi' } else { this.color[20] = 'jixingzhong' }
if (response.data[0].总装调试状态 === 0) { this.color[21] = 'weikaishi' } else if (response.data[0].总装调试状态 === 1) { this.color[21] = 'jixingzhong' } else if (response.data[0].总装调试状态 === 2) { this.color[21] = 'yiwancheng' }
if (response.data[0].发货状态 === 0) { this.color[22] = 'weikaishi' } else if (response.data[0].发货状态 === 1) { this.color[22] = 'jixingzhong' } else if (response.data[0].发货状态 === 2) { this.color[22] = 'yiwancheng' }
})

View File

@@ -85,27 +85,27 @@
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="110">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
{{ scope.row.合同签订日期&&scope.row.合同签订日期!=='1900/1/1' ? scope.row.合同签订日期 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="图纸会签节点" width="110">
<template slot-scope="scope">
{{ scope.row.图纸会签节点 }}
{{ scope.row.图纸会签节点&&scope.row.图纸会签节点!=='1900/1/1' ? scope.row.图纸会签节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="设备预验收节点" width="110">
<template slot-scope="scope">
{{ scope.row.设备预验收节点 }}
{{ scope.row.设备预验收节点&&scope.row.设备预验收节点!=='1900/1/1' ? scope.row.设备预验收节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="发货节点" width="110">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
{{ scope.row.发货节点&&scope.row.发货节点!=='1900/1/1' ? scope.row.发货节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="安装调试节点" width="110">
<template slot-scope="scope">
{{ scope.row.安装调试节点 }}
{{ scope.row.安装调试节点&&scope.row.安装调试节点!=='1900/1/1' ? scope.row.安装调试节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="90">

View File

@@ -131,27 +131,27 @@
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="100">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
{{ scope.row.合同签订日期&&scope.row.合同签订日期!=='1900/1/1' ? scope.row.合同签订日期 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="图纸会签节点" width="100">
<template slot-scope="scope">
{{ scope.row.图纸会签节点 }}
{{ scope.row.图纸会签节点&&scope.row.图纸会签节点!=='1900/1/1' ? scope.row.图纸会签节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="设备预验收节点" width="110">
<template slot-scope="scope">
{{ scope.row.设备预验收节点 }}
{{ scope.row.设备预验收节点&&scope.row.设备预验收节点!=='1900/1/1' ? scope.row.设备预验收节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="发货节点" width="85">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
{{ scope.row.发货节点&&scope.row.发货节点!=='1900/1/1' ? scope.row.图纸会签节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="安装调试节点" width="100">
<template slot-scope="scope">
{{ scope.row.安装调试节点 }}
{{ scope.row.安装调试节点&&scope.row.安装调试节点!=='1900/1/1' ? scope.row.安装调试节点 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="85">