This commit is contained in:
lixin
2018-12-17 20:28:25 +08:00
parent 6cdec71dfd
commit c5435fa539
2 changed files with 105 additions and 31 deletions

View File

@@ -1,6 +1,14 @@
<template>
<div class="app-container">
<el-card>
<el-radio-group
v-model="radio"
size="small"
style="margin: 10px;"
@change="BasicShow()">
<el-radio v-model="radio" :label="1" >修改记录</el-radio>
<el-radio v-model="radio" :label="2" style="margin-left: 2px" >异常记录</el-radio>
</el-radio-group>
<span style="margin-left: 20px">项目名称:</span>
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
<el-option
@@ -25,14 +33,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>仓库:</span>
<el-select v-model="purchaseStateValue" placeholder="仓库" size="small">
<el-option
v-for="item in purchaseState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
@@ -40,7 +40,7 @@
style="margin-left: 10px"
@click="pageCurrent=1;pageSize=10;total=0;getAlterRecord()">查询</el-button>
</el-card>
<el-card>
<el-card v-show="altershow">
<el-table
v-loading="loading1"
:data="tableData1"
@@ -50,32 +50,37 @@
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="项目名称" min-width="200" align="center">
<el-table-column label="项目名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" min-width="200" align="center">
<el-table-column label="机床图号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" min-width="200" align="center">
<el-table-column label="组号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="数量" min-width="200" align="center">
<el-table-column label="名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="数量" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="修改原因" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
{{ scope.row.修改原因 }}
</template>
</el-table-column>
<el-table-column label="姓名" min-width="100" align="center">
<el-table-column label="记录人" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
@@ -85,6 +90,16 @@
{{ scope.row.修改日期 }}
</template>
</el-table-column>
<el-table-column label="仓库" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="零件类型" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
@@ -97,6 +112,8 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card v-show="errorshow">
<el-table
v-loading="loading1"
:data="tableData2"
@@ -106,22 +123,27 @@
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="项目名称" min-width="200" align="center">
<el-table-column label="项目名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" min-width="200" align="center">
<el-table-column label="机床图号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" min-width="200" align="center">
<el-table-column label="组号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="异常数量" min-width="200" align="center">
<el-table-column label="名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="异常数量" min-width="50" align="center">
<template slot-scope="scope">
{{ scope.row.异常数量 }}
</template>
@@ -131,9 +153,19 @@
{{ scope.row.异常原因 }}
</template>
</el-table-column>
<el-table-column label="货位流水号" min-width="100" align="center">
<el-table-column label="仓库" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.货位流水号 }}
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="记录时间" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.记录时间 }}
</template>
</el-table-column>
<el-table-column label="零件类型" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
</el-table>
@@ -202,9 +234,15 @@
{{ scope.row.补投时间 }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态) === 1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">传递</el-button>
</template>
</el-table-column>
</el-table>
@@ -218,7 +256,6 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
<el-button style="margin-left:500px;" type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">传递</el-button>
</div>
<el-table v-loading="" :data="tableData4" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="离线请购单编号" align="center" min-width="150">
@@ -257,7 +294,7 @@
</template>
<script>
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard } from '@/api/Inventory/PartsReplacement'
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse } from '@/api/Inventory/PartsReplacement'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -290,7 +327,12 @@ export default {
GroupNumValue_check: '',
repleacecard: '',
repleacecard_check: '',
people: ''
people: '',
HouseNumber: '',
House: [],
radio: '',
altershow: true,
errorshow: false
}
},
computed: {
@@ -301,12 +343,24 @@ export default {
created() {
this.fetchData()
this.getpeopleid()
this.getHouse()
},
methods: {
// 获取人员编号
getpeopleid() {
this.people = this.id
},
getHouse() {
initWarehouse().then(response => { // 初始化仓库
console.log(response)
for (let i = 0; i < response.data.length; i++) {
this.House.push({
label: response.data[i].仓库名称,
value: response.data[i].仓库流水号
})
}
})
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
},
@@ -424,7 +478,7 @@ export default {
})
},
addCard() {
addReplacementCard(this.people).then(response => {
addReplacementCard(this.people, this.HouseNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
@@ -432,6 +486,15 @@ export default {
this.$message.error('删除失败')
}
})
},
BasicShow() {
if (this.radio === 1) {
this.altershow = true
this.errorshow = false
} else if (this.radio === 2) {
this.altershow = false
this.errorshow = true
}
}
}
}