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

@@ -10,6 +10,17 @@ export function initProject() {
} }
}) })
} }
// 查询仓库
export function initWarehouse() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_货位仓库_仓库_查询数据'
}
})
}
// 机床查询 // 机床查询
export function searchmachine(check, num) { export function searchmachine(check, num) {
return request({ return request({
@@ -75,14 +86,14 @@ export function searchReplacementCard(pageCurrent, pageSize, card_check, card) {
}) })
} }
// 补投增加 // 补投增加
export function addReplacementCard(Number) { export function addReplacementCard(Number, house) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '库存管理_补投单_补投单增加', name: '库存管理_补投单_补投单增加',
param: '人员编号=' + Number param: '人员编号=' + Number + '&仓库流水号=' + house
} }
}) })
} }
@@ -99,14 +110,14 @@ export function deleteReplacementCard(Number) {
}) })
} }
// 补投增加 // 补投增加
export function addCardDetail(Number, project, machine, team, mun, reason) { export function addCardDetail(Number, project, machine, team, name, mass, locate, parttype, reason) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '库存管理_仓库补投_补投单明细增加', name: '库存管理_零件补投_批量增加补投单明细',
param: '补投单流水号=' + Number + '&项目流水号=' + project + '&机床流水号=' + machine + '&组件流水号=' + team + '&补投数量=' + mun + '&原因=' + reason param: '补投单流水号=' + Number + '&项目流水号=' + project + '&机床流水号=' + machine + '&组件流水号=' + team + '&名称组=' + name + '&数量=' + mass + '&货位流水号组=' + locate + '&零件类型组=' + parttype + '&原因=' + reason
} }
}) })
} }

View File

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