技术中心部分修改,添加库存系统

This commit is contained in:
hedekun
2018-11-16 09:08:57 +08:00
parent 666c65dd0f
commit 385816311b
49 changed files with 7923 additions and 7 deletions

View File

@@ -0,0 +1,197 @@
<template>
<div class="app-container">
<el-card>
<span style="margin: 5px">领料单编号</span>
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchListinfor()">查询</el-button>
<el-table
v-loading="listLoading"
:data="tableData1"
border
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="领料单编号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="领料时间" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料时间 }}
</template>
</el-table-column>
<el-table-column label="领料人" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
<el-table
v-loading="listLoading1"
:data="tableDataPicking"
border
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="项目名称" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="组件名称" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column label="领用数量" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.货位流水号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope">
<el-button size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex'
export default {
data() {
return {
ProjectValue: ' ',
Project: [],
ProjectValue_check: 1,
MachineValue: ' ',
Machine: [],
MachineValue_check: 1,
GroupNumValue: ' ',
GroupNumValue_check: 1,
GroupNum: [],
tableDataBasic: [],
tableDataPurchase: [],
tableData1: [],
tableDataPicking: [], // 领料单明细表格
listNumber: '',
pickingListNumber: null, // 领料单编号
pickingListNumberx: '', // 领料单流水号
picikingPeople: '', // 领料人流水号
partProjectNumber: '', // 项目流水号
partProjectName: '', // 项目名称
partMachineNumber: '', // 机床流水号
partMachineName: '', // 机床名称
partGroupNumber: '', // 分组流水号
partGroupName: '', // 分组名称
OutNumber: '', // 出库数量
outNote: '', // 出库备注
getpicikingPeople: '', // 领料人
listLoading: '',
listLoading1: ''
}
},
computed: {
...mapGetters([
'id'
])
},
created() {
this.getpeopleid()
},
methods: {
// 获取人员编号
getpeopleid() {
this.picikingPeople = this.id
console.log(this.picikingPeople)
},
// 查询领料单
searchListinfor() {
this.listLoading = true
searchList(this.pickingListNumber).then(response => {
this.tableData1 = response.data
this.listLoading = false
})
},
// 查询领料单明细
searchListDetailt() {
this.listLoading1 = true
searchListDetail(this.pickingListNumberx).then(response => {
this.tableDataPicking = response.data
this.listLoading1 = false
})
},
// 选择领料单
chooseListinfor(row) {
this.pickingListNumberx = row.领料单流水号
this.getpicikingPeople = row.领料人流水号
console.log(this.pickingListNumberx)
this.searchListDetailt()
},
// 出库
partOut(row) {
console.log(row)
if (row.采购合同明细流水号 !== null) {
WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
} else { this.$message.error('出库失败') }
})
} else if (row.零件类型 === 1 || row.零件类型 === 2) {
PurchasePart(row.组件零件流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
} else { this.$message.error('出库失败') }
})
} else {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
} else { this.$message.error('增加失败') }
})
}
}
}
}
</script>
<style scoped>
</style>